From 1d698dbca4ab6471d5d11ca7420ed504d10cf92d Mon Sep 17 00:00:00 2001 From: adibwp Date: Tue, 20 Aug 2024 17:58:02 +0700 Subject: [PATCH] add button detail func mockup --- specimen-collection/components/left.vue | 2 +- specimen-collection/components/right.vue | 55 ++++++++++++++++------- specimen-collection/modules/collection.js | 10 ++++- 3 files changed, 49 insertions(+), 18 deletions(-) diff --git a/specimen-collection/components/left.vue b/specimen-collection/components/left.vue index 6c977a7..973be3d 100644 --- a/specimen-collection/components/left.vue +++ b/specimen-collection/components/left.vue @@ -59,7 +59,7 @@ export default { headers: [ { title: this.$t('message.tablePatient.date'), - align: "left", + align: "start", sortable: false, key: "date", width: "15%", diff --git a/specimen-collection/components/right.vue b/specimen-collection/components/right.vue index dbef363..606b4a6 100644 --- a/specimen-collection/components/right.vue +++ b/specimen-collection/components/right.vue @@ -4,7 +4,7 @@
-
+
@@ -27,6 +27,7 @@ style="height: 40px; width: 40px; display: flex; align-items: center; justify-content: center;" class="rounded-lg bg-secondary-lighten pa-2 pointer" @click="setCall(selected)" + v-show="selected.doneCall !== 'Y'" >
+

-

- -
- 06-08-2024 14:17 -
-
- 00-00-0000 00:00 + +
+
+ {{ formatDate(item.sDate) }} +
+
+ {{ item.eDate === "" ? '00-00-0000 00:00': formatDate(item.eDate) }} +
+

-

- {{ y }} + {{ y }}
@@ -221,6 +229,9 @@ details: { get() { return this.$store.state.collection.details; + }, + set(data) { + this.$store.commit("") } }, pemeriksaan() { @@ -237,9 +248,21 @@ } }, setCall(data) { - data.status = "Call"; - this.selected = data; - } + if (data.status == "New") { + data.status = "Call"; + } else if (data.status == "Call") { + data.doneCall = "Y"; + } + }, + setReq(data, status) { + data.requirement = status; + data.eDate= new Date(); + }, + formatDate(date) { + if (!date) return null; + + return moment(date).format("DD-MM-YYYY HH:mm"); + }, }, } diff --git a/specimen-collection/modules/collection.js b/specimen-collection/modules/collection.js index dd81ea7..a444d16 100644 --- a/specimen-collection/modules/collection.js +++ b/specimen-collection/modules/collection.js @@ -10,6 +10,7 @@ const store = { kelpelanggan: "PASIEN MANDIRI", nama: "Tn. Alpha", status: "New", + doneCall: "N", }, { tanggal: "31-07-2024", @@ -17,6 +18,7 @@ const store = { kelpelanggan: "PASIEN KLINISI", nama: "Tn. Beta", status: "New", + doneCall: "N", }, { tanggal: "30-07-2024", @@ -24,6 +26,7 @@ const store = { kelpelanggan: "PASIEN KLINISI", nama: "Tn. Gamma", status: "New", + doneCall: "N", }, ], selected_patients: { @@ -39,15 +42,20 @@ const store = { { specimen: "EDTA Rutin", barcode: "055000035LSE1A", + requirement: "", + sDate: new Date(), + eDate: "", }, { specimen: "EDTA Rutin", barcode: "0550000AA223FF", + requirement: "", + sDate: new Date(), + eDate: "", }, ], jenis: ["DARAH", "SWAB/SEKRET" ] }, - pemeriksaan: [ "Hematologi Lengkap", "Golongan Darah Rhesus", "Kultur Usap Tenggorokan (Vitek)", ]