Issues: added possibility to display issues only when user is hauptzustaendig

This commit is contained in:
Alexei Karpenko
2025-12-18 15:19:02 +01:00
parent 2d71a436f6
commit 3e77d80d26
7 changed files with 156 additions and 27 deletions
@@ -1,11 +1,11 @@
export default {
getOpenIssuesByProperties(person_id, oe_kurzbz, fehlertyp_kurzbz, apps, behebung_parameter)
getOpenIssuesByProperties(person_id, oe_kurzbz, fehlertyp_kurzbz, apps, behebung_parameter, hauptzustaendig)
{
return {
method: 'get',
url: '/api/frontend/v1/issues/Issues/getOpenIssuesByProperties',
params: { person_id, oe_kurzbz, fehlertyp_kurzbz, apps, behebung_parameter }
params: { person_id, oe_kurzbz, fehlertyp_kurzbz, apps, behebung_parameter, hauptzustaendig }
};
}
+8 -4
View File
@@ -8,6 +8,10 @@ export default {
person_id: Number,
//oe_kurzbz: String,
apps: [String, Array],
hauptzustaendig: {
type: Boolean,
default: false
},
endpoint: {
type: Object,
required: true
@@ -26,14 +30,14 @@ export default {
watch: {
},
mounted() {
this.getOpenIssuesCount();
this.countPersonOpenIssues();
},
methods: {
getOpenIssuesCount() {
countPersonOpenIssues() {
this.isFetching = true;
this.$api.call(
this.endpoint.countPersonOpenIssues(this.person_id)
this.endpoint.countPersonOpenIssues(this.person_id, this.hauptzustaendig)
)
.then(result => {
//this.$emit('issuesLoaded', this.issues);
@@ -45,7 +49,7 @@ export default {
checkPerson() {
this.isFetching = true;
this.$api.call(
this.endpoint.checkPerson(this.person_id)
this.endpoint.checkPerson(this.person_id, this.hauptzustaendig)
)
.then(result => {
//this.$emit('issuesLoaded', this.issues);
+14 -3
View File
@@ -1,4 +1,4 @@
import ApiIssues from '../../api/factory/issues.js';
import ApiIssueList from '../../api/factory/issueList.js';
export default {
name: 'IssueList',
@@ -11,10 +11,14 @@ export default {
fehlertyp_kurzbz: String,
apps: [String, Array],
behebung_parameter: Array,
hauptzustaendig: {
type: Boolean,
default: false
},
date: null,
endpoint: {
type: Object,
default: ApiIssues
default: ApiIssueList
}
},
data() {
@@ -45,7 +49,14 @@ export default {
fetchIssues() {
this.isFetching = true;
this.$api.call(
this.endpoint.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,
this.hauptzustaendig
)
)
.then(result => {
this.issues = result.data;