From 4d9d4928f3d5e457a7611458c127cd2c0b388d80 Mon Sep 17 00:00:00 2001 From: "zeinab.ashrafi" Date: Sat, 17 May 2025 13:51:00 +0330 Subject: [PATCH] fix : cycles export --- src/router/paths.js | 2 +- src/views/Cycle/List.vue | 2 +- src/views/Dashboard.vue | 6 +++--- src/views/Item/List.vue | 8 ++++---- src/views/Package/List.vue | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/router/paths.js b/src/router/paths.js index edac23c..e4331e2 100644 --- a/src/router/paths.js +++ b/src/router/paths.js @@ -169,7 +169,7 @@ export default [ name: 'NotVerifyTestResult', view: 'TestResult/List', meta: { - title: 'Not Verify Test Resul | CSSD Dashboard' + title: 'Verify Test Resul | CSSD Dashboard' } }, { diff --git a/src/views/Cycle/List.vue b/src/views/Cycle/List.vue index 826839e..31add1c 100644 --- a/src/views/Cycle/List.vue +++ b/src/views/Cycle/List.vue @@ -252,7 +252,7 @@ export default { } }, async download() { - const result = await ApiService.get(urls.exportItems()); + const result = await ApiService.get(urls.exportCycles()); if (result && result.status == 200) { window.open(result.data.data.url, '_blank'); } diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 0c00023..4d38db5 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -222,7 +222,7 @@ export default { text: 'all existing packages in your medical center ', // image: '/img/Static/Dashboard/alltest.png', color: 'WM-LightGray-BG', - route: {name: 'AllItem'}, + route: {name: 'AllPackage'}, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md4 sm4', @@ -254,7 +254,7 @@ export default { text: 'All active labels in your medical center', // image: '/img/Static/Dashboard/alltest.png', color: 'WM-LightGray-BG', - route: {name: 'AllResultTest'}, + route: {name: 'AllLabels'}, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md8 sm8', @@ -286,7 +286,7 @@ export default { text: 'All active cycles in your medical center', // image: '/img/Static/Dashboard/alltest.png', color: 'WM-LightGray-BG', - route: {name: 'AllResultTest'}, + route: {name: 'AllCycle'}, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md8 sm8', diff --git a/src/views/Item/List.vue b/src/views/Item/List.vue index 57d00c8..cd2b873 100644 --- a/src/views/Item/List.vue +++ b/src/views/Item/List.vue @@ -259,7 +259,7 @@ export default { }, async download() { const result = await ApiService.get(urls.exportItems()); - if (result && result.status == 200) { + if (result && result.status === 200) { window.open(result.data.data.url, '_blank'); } }, @@ -269,9 +269,9 @@ export default { properties: {width: '30'}, success: async () => { const result = await ApiService.delete(urls.removeItem(id)); - if (result && result.status == 200) { + if (result && result.status === 200) { for (const key in this.items) { - if (this.items.hasOwnProperty(key) && this.items[key].id == id) { + if (this.items.hasOwnProperty(key) && this.items[key].id === id) { this.items.splice(key, 1); } } @@ -282,7 +282,7 @@ export default { }, async loadMedicalCenters() { const result = await ApiService.get(urls.listFilterItemsTestResult); - if (result && result.status == 200) { + if (result && result.status === 200) { this.medicalCenters = result.data.data.MedicalCenters; } }, diff --git a/src/views/Package/List.vue b/src/views/Package/List.vue index ed50231..982c86b 100644 --- a/src/views/Package/List.vue +++ b/src/views/Package/List.vue @@ -223,7 +223,7 @@ export default { } filter += (page) ? `page=${page}` : `page=1`; const result = await ApiService.get(urls.listPackage(filter)); - if (result && result.status == 200) { + if (result && result.status === 200) { const {data, meta} = result.data; this.items = data; this.currentPage = meta.current_page; @@ -233,7 +233,7 @@ export default { }, async show(testResultId) { const result = await ApiService.get(urls.showPackage(testResultId)); - if (result && result.status == 200) { + if (result && result.status === 200) { this.changeCurrentModal({ modal: "modal-package-show", properties: {result} @@ -246,7 +246,7 @@ export default { properties: {width: '30'}, success: async () => { const result = await ApiService.delete(urls.removePackage(testResultId)); - if (result && result.status == 200) { + if (result && result.status === 200) { for (const key in this.items) { if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) { this.items.splice(key, 1); @@ -259,7 +259,7 @@ export default { }, async generateBarcode(id, type) { const result = await ApiService.post(urls.Barcode(id, type)); - if (result && result.status == 200) { + if (result && result.status === 200) { this.changeCurrentModal({ modal: "modal-barcode-barcode", properties: {result} @@ -268,7 +268,7 @@ export default { }, async loadMedicalCenters() { const result = await ApiService.get(urls.listFilterItemsTestResult); - if (result && result.status == 200) { + if (result && result.status === 200) { this.medicalCenters = result.data.data.MedicalCenters; } }, @@ -315,7 +315,7 @@ export default { }, async download() { const result = await ApiService.get(urls.exportPackages()); - if (result && result.status == 200) { + if (result && result.status === 200) { window.open(result.data.data.url, '_blank'); } },