From 5180079ee003313df0a1826283a3cc753fef82c9 Mon Sep 17 00:00:00 2001 From: Aurthur Musendame Date: Sun, 6 Nov 2022 15:09:15 +0200 Subject: [PATCH] added save sampless loder --- frontend/vite/src/stores/dashboard.ts | 2 +- frontend/vite/src/views/dashboard/Tat.vue | 227 +----------------- frontend/vite/src/views/sample/SamplesAdd.vue | 13 +- 3 files changed, 19 insertions(+), 223 deletions(-) diff --git a/frontend/vite/src/stores/dashboard.ts b/frontend/vite/src/stores/dashboard.ts index 1338596c..ec74d2cd 100644 --- a/frontend/vite/src/stores/dashboard.ts +++ b/frontend/vite/src/stores/dashboard.ts @@ -43,7 +43,7 @@ export const useDashBoardStore = defineStore('dashboard', () => { const dashboard = ref({ currentTab: 'overview', - tabs: ['overview', 'resource', 'laggard', 'peformance', 'tat', 'notices', 'line-listing'], + tabs: ['overview', 'resource', 'laggard', 'peformance', 'notices', 'line-listing'], // 'tat' showFilters: false, filterRange: { from: "", to: "" }, currentFilter: "T", diff --git a/frontend/vite/src/views/dashboard/Tat.vue b/frontend/vite/src/views/dashboard/Tat.vue index ff19bdfa..2166764d 100644 --- a/frontend/vite/src/views/dashboard/Tat.vue +++ b/frontend/vite/src/views/dashboard/Tat.vue @@ -1,230 +1,17 @@ \ No newline at end of file diff --git a/frontend/vite/src/views/sample/SamplesAdd.vue b/frontend/vite/src/views/sample/SamplesAdd.vue index 9fba0123..6b99ed3a 100644 --- a/frontend/vite/src/views/sample/SamplesAdd.vue +++ b/frontend/vite/src/views/sample/SamplesAdd.vue @@ -10,6 +10,7 @@ import { object, string, array, number } from 'yup'; import { IClient } from '../../models/client'; import { useApiUtil, useNotifyToast } from '../../composables' +import LoadingMessage from '../../components/Spinners/LoadingMessage.vue'; const sampleStore = useSampleStore(); const patientStore = usePatientStore(); @@ -74,6 +75,7 @@ const analysesProfiles = computed(() => analysisStore.getAnalysesProfiles); // Analysis Request Form + const arSaving = ref(false); const arSchema = object({ clientRequestId: string().required("Client Request ID is Required"), clinicalData: string().nullable(), @@ -99,6 +101,7 @@ const { value: samples } = useField('samples'); const submitARForm = handleSubmit((values) => { + arSaving.value = true; for(let sample of values.samples || []) { if(typeof sample?.sampleType !== 'number') { @@ -126,8 +129,10 @@ } withClientMutation(ADD_ANALYSIS_REQUEST, {payload}, "createAnalysisRequest") .then((result) => { - sampleStore.addAnalysisRequest(result) + sampleStore.addAnalysisRequest(result); router.push({ name: "patient-detail", params: { patientUid: patient.value?.uid }}); + }).finally(() => { + arSaving.value = false; }); } @@ -304,11 +309,15 @@
+
+ +