mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
Issues: added possibility to display issues only when user is hauptzustaendig
This commit is contained in:
@@ -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,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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user