From 0e5683c40780507dd5f2b98e1507216995939bed Mon Sep 17 00:00:00 2001 From: David Whittaker Date: Fri, 8 Dec 2023 18:09:52 -0800 Subject: [PATCH] Fixing hierarchy in statement --- .../src/case/ReportSubmissionCard.vue | 49 +++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/src/dispatch/static/dispatch/src/case/ReportSubmissionCard.vue b/src/dispatch/static/dispatch/src/case/ReportSubmissionCard.vue index 8c5eeabc769d..5f076b65f7c9 100644 --- a/src/dispatch/static/dispatch/src/case/ReportSubmissionCard.vue +++ b/src/dispatch/static/dispatch/src/case/ReportSubmissionCard.vue @@ -226,34 +226,33 @@ export default { } if (this.$route.query.case_type) { - this.case_type = this.$route.query.case_type - } - let filterOptions = { - q: "", - sortBy: ["name"], - descending: [false], - itemsPerPage: this.numItems, - } - - if (this.project) { - filterOptions = { - filters: { - project: [this.project], - name: [this.$route.query.case_type], - enabled: ["true"], - }, - ...filterOptions, + let filterOptions = { + q: "", + sortBy: ["name"], + descending: [false], + itemsPerPage: this.numItems, } - } - filterOptions = SearchUtils.createParametersFromTableOptions({ ...filterOptions }) - CaseTypeApi.getAll(filterOptions).then((response) => { - if (response.data.items.length > 0) { - this.case_type = response.data.items[0] - } else { - this.case_type = this.$route.query.case_type + if (this.project) { + filterOptions = { + filters: { + project: [this.project], + name: [this.$route.query.case_type], + enabled: ["true"], + }, + ...filterOptions, + } } - }) + + filterOptions = SearchUtils.createParametersFromTableOptions({ ...filterOptions }) + CaseTypeApi.getAll(filterOptions).then((response) => { + if (response.data.items.length > 0) { + this.case_type = response.data.items[0] + } else { + this.case_type = this.$route.query.case_type + } + }) + } if (this.$route.query.case_priority) { this.case_priority = { name: this.$route.query.case_priority }