From 2d71a436f6646b7962b814a4726a9bb06e53f38c Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Tue, 16 Dec 2025 17:30:25 +0100 Subject: [PATCH] IssueList: possible to pass endpoint dynamically --- public/js/components/Issues/IssueList.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/public/js/components/Issues/IssueList.js b/public/js/components/Issues/IssueList.js index e70fa7831..e7a54f117 100644 --- a/public/js/components/Issues/IssueList.js +++ b/public/js/components/Issues/IssueList.js @@ -11,7 +11,11 @@ export default { fehlertyp_kurzbz: String, apps: [String, Array], behebung_parameter: Array, - date: null + date: null, + endpoint: { + type: Object, + default: ApiIssues + } }, data() { return { @@ -33,9 +37,7 @@ export default { }, }, mounted() { - //this.currentDate = props.date || new Date(); - this.currentDate = new Date(); - console.log("created in list"); + this.currentDate = this.date || new Date(); this.fetchIssues(); }, methods: { @@ -43,7 +45,7 @@ export default { fetchIssues() { this.isFetching = true; this.$api.call( - ApiIssues.getOpenIssuesByProperties(this.person_id, this.oe_kurzbz, this.fehlertyp_kurzbz, this.apps, this.behebung_parameter) + this.endpoint.getOpenIssuesByProperties(this.person_id, this.oe_kurzbz, this.fehlertyp_kurzbz, this.apps, this.behebung_parameter) ) .then(result => { this.issues = result.data;