pat-shared-components 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pat-shared-components.js +1 -1
- package/dist/pat-shared-components.mjs +82 -80
- package/dist/src/components/BookingDetail/BookingCtaButtons.vue.js +1 -1
- package/dist/src/components/BookingDetail/BookingCtaButtons.vue.js.map +1 -1
- package/dist/src/components/BookingDetail/BookingCtaButtons.vue.mjs +54 -28
- package/dist/src/components/BookingDetail/BookingCtaButtons.vue.mjs.map +1 -1
- package/dist/src/components/BookingDetail/BookingDetail.vue.js +1 -1
- package/dist/src/components/BookingDetail/BookingDetail.vue.js.map +1 -1
- package/dist/src/components/BookingDetail/BookingDetail.vue.mjs +68 -59
- package/dist/src/components/BookingDetail/BookingDetail.vue.mjs.map +1 -1
- package/dist/src/components/BookingDetail/BookingDetailDesktop.vue.js +1 -1
- package/dist/src/components/BookingDetail/BookingDetailDesktop.vue.js.map +1 -1
- package/dist/src/components/BookingDetail/BookingDetailDesktop.vue.mjs +71 -62
- package/dist/src/components/BookingDetail/BookingDetailDesktop.vue.mjs.map +1 -1
- package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue.js +2 -0
- package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue.js.map +1 -0
- package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue.mjs +34 -0
- package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue.mjs.map +1 -0
- package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue2.js +2 -0
- package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue2.js.map +1 -0
- package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue2.mjs +5 -0
- package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue2.mjs.map +1 -0
- package/dist/src/constants/Common.js +1 -1
- package/dist/src/constants/Common.js.map +1 -1
- package/dist/src/constants/Common.mjs +22 -17
- package/dist/src/constants/Common.mjs.map +1 -1
- package/dist/src/constants/Enums.js +1 -1
- package/dist/src/constants/Enums.js.map +1 -1
- package/dist/src/constants/Enums.mjs +16 -15
- package/dist/src/constants/Enums.mjs.map +1 -1
- package/dist/src/locales/en.json.js +1 -1
- package/dist/src/locales/en.json.mjs +6 -0
- package/dist/src/locales/en.json.mjs.map +1 -1
- package/dist/src/locales/vi.json.js +1 -1
- package/dist/src/locales/vi.json.mjs +6 -0
- package/dist/src/locales/vi.json.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/BookingDetail/BookingCtaButtons.vue.d.ts +14 -2
- package/dist/types/components/BookingDetail/BookingDetail.vue.d.ts +10 -1
- package/dist/types/components/BookingDetail/BookingDetailDesktop.vue.d.ts +10 -1
- package/dist/types/components/BookingDetail/PaymentSuccessLabel.vue.d.ts +23 -0
- package/dist/types/constants/Common.d.ts +3 -0
- package/dist/types/constants/Enums.d.ts +17 -0
- package/dist/types/types/Booking.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,114 +1,123 @@
|
|
|
1
|
-
import { defineComponent as x, computed as
|
|
1
|
+
import { defineComponent as x, computed as f, openBlock as e, createElementBlock as b, createBlock as i, Fragment as O, createElementVNode as l, createVNode as s, unref as t, createCommentVNode as a, withCtx as S, createTextVNode as N, toDisplayString as y } from "vue";
|
|
2
2
|
import V from "../Shared/BookingBasicInfo.vue.mjs";
|
|
3
3
|
import D from "./BookingNote.vue.mjs";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
4
|
+
import F from "../Shared/BookingNumber.vue.mjs";
|
|
5
|
+
import L from "./TestList.vue.mjs";
|
|
6
|
+
import w from "./TotalPayment.vue.mjs";
|
|
7
|
+
import E from "./DiagSupport.vue.mjs";
|
|
8
|
+
import $ from "./SampleCollectionInfo.vue.mjs";
|
|
9
|
+
import T from "../Shared/PatientName.vue.mjs";
|
|
10
10
|
import j from "./BookingResultStatus.vue.mjs";
|
|
11
11
|
import q from "../Shared/BottomCurved.vue.mjs";
|
|
12
12
|
import { useBookingDetail as z } from "../../composables/BookingDetail.mjs";
|
|
13
13
|
import A from "../Shared/SectionTitle.vue.mjs";
|
|
14
14
|
import { BookingStatus as G } from "../../constants/Enums.mjs";
|
|
15
15
|
import H from "./BookingCtaButtons.vue.mjs";
|
|
16
|
-
import I from "
|
|
17
|
-
import J from "
|
|
18
|
-
import K from "./
|
|
19
|
-
|
|
16
|
+
import I from "./PaymentSuccessLabel.vue.mjs";
|
|
17
|
+
import J from "../Shared/BookingDetailSkeleton.vue.mjs";
|
|
18
|
+
import K from "./BookingAttachment.vue.mjs";
|
|
19
|
+
import M from "./AppointmentBookingList.vue.mjs";
|
|
20
|
+
const P = { class: "psc-space-y-11 psc-px-4 psc-pb-4" }, Q = { class: "psc-space-y-6" }, R = { class: "psc-space-y-1" }, U = { class: "psc-space-y-4" }, W = { class: "psc-rounded-lg psc-shadow" }, X = { class: "psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6" }, Y = { class: "psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic" }, yo = /* @__PURE__ */ x({
|
|
20
21
|
__name: "BookingDetail",
|
|
21
22
|
props: {
|
|
22
23
|
booking: null,
|
|
23
24
|
loading: { type: Boolean },
|
|
24
|
-
hideSupport: { type: Boolean, default: !1 }
|
|
25
|
+
hideSupport: { type: Boolean, default: !1 },
|
|
26
|
+
payOnlineLoading: { type: Boolean, default: !1 },
|
|
27
|
+
payOnlineFailed: { type: Boolean, default: !1 }
|
|
25
28
|
},
|
|
26
|
-
emits: ["click:find-location"],
|
|
27
|
-
setup(
|
|
28
|
-
const o =
|
|
29
|
+
emits: ["click:find-location", "click:pay-online"],
|
|
30
|
+
setup(v, { emit: c }) {
|
|
31
|
+
const o = v, n = f(() => o.booking), r = f(
|
|
29
32
|
() => o.booking.booking_status === G.Created
|
|
30
|
-
), { patient:
|
|
31
|
-
return (
|
|
32
|
-
var
|
|
33
|
-
return e(),
|
|
34
|
-
o.loading ? (e(),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
), { patient: h, doctor: B } = z(n);
|
|
34
|
+
return (m, p) => {
|
|
35
|
+
var k, u, d, _, g;
|
|
36
|
+
return e(), b("div", P, [
|
|
37
|
+
o.loading ? (e(), i(J, { key: 0 })) : (e(), b(O, { key: 1 }, [
|
|
38
|
+
l("div", Q, [
|
|
39
|
+
l("div", R, [
|
|
40
|
+
s(T, {
|
|
38
41
|
"first-name": o.booking.first_name
|
|
39
42
|
}, null, 8, ["first-name"]),
|
|
40
|
-
|
|
43
|
+
s(j, {
|
|
41
44
|
"test-result-key": o.booking.test_result_key,
|
|
42
45
|
"result-status": o.booking.result_status,
|
|
43
46
|
"booking-status": o.booking.booking_status
|
|
44
47
|
}, null, 8, ["test-result-key", "result-status", "booking-status"])
|
|
45
48
|
]),
|
|
46
|
-
|
|
49
|
+
s(I, {
|
|
50
|
+
booking: o.booking
|
|
51
|
+
}, null, 8, ["booking"]),
|
|
52
|
+
s(H, {
|
|
47
53
|
booking: o.booking,
|
|
48
|
-
"
|
|
49
|
-
|
|
54
|
+
"pay-online-loading": o.payOnlineLoading,
|
|
55
|
+
"pay-online-failed": o.payOnlineFailed,
|
|
56
|
+
"onClick:findLocation": p[0] || (p[0] = (C) => c("click:find-location")),
|
|
57
|
+
"onClick:payOnline": p[1] || (p[1] = (C) => c("click:pay-online"))
|
|
58
|
+
}, null, 8, ["booking", "pay-online-loading", "pay-online-failed"])
|
|
50
59
|
]),
|
|
51
|
-
t(r) ? (e(),
|
|
60
|
+
t(r) ? (e(), i($, {
|
|
52
61
|
key: 0,
|
|
53
62
|
booking: o.booking
|
|
54
|
-
}, null, 8, ["booking"])) :
|
|
55
|
-
|
|
56
|
-
|
|
63
|
+
}, null, 8, ["booking"])) : a("", !0),
|
|
64
|
+
l("div", U, [
|
|
65
|
+
s(A, null, {
|
|
57
66
|
default: S(() => [
|
|
58
|
-
N(
|
|
67
|
+
N(y(m.$t("psc.test_result_booking_booking_details")), 1)
|
|
59
68
|
]),
|
|
60
69
|
_: 1
|
|
61
70
|
}),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
patient: t(
|
|
71
|
+
l("div", W, [
|
|
72
|
+
s(V, {
|
|
73
|
+
patient: t(h),
|
|
65
74
|
doctor: t(B),
|
|
66
75
|
class: "psc-px-4 psc-py-4 lg:psc-px-6"
|
|
67
76
|
}, null, 8, ["patient", "doctor"]),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
77
|
+
s(q),
|
|
78
|
+
l("div", X, [
|
|
79
|
+
s(F, {
|
|
71
80
|
"booking-code": o.booking.booking_code,
|
|
72
81
|
"booking-status": o.booking.booking_status,
|
|
73
|
-
"payment-status": ((
|
|
82
|
+
"payment-status": ((k = o.booking.data) == null ? void 0 : k.type) === "foc" ? void 0 : o.booking.payment_status
|
|
74
83
|
}, null, 8, ["booking-code", "booking-status", "payment-status"]),
|
|
75
|
-
t(
|
|
84
|
+
t(n).services && t(n).services.length ? (e(), i(L, {
|
|
76
85
|
key: 0,
|
|
77
|
-
services: t(
|
|
78
|
-
"booking-type": ((
|
|
79
|
-
}, null, 8, ["services", "booking-type"])) :
|
|
80
|
-
t(
|
|
86
|
+
services: t(n).services,
|
|
87
|
+
"booking-type": ((d = (u = o.booking) == null ? void 0 : u.data) == null ? void 0 : d.type) || ""
|
|
88
|
+
}, null, 8, ["services", "booking-type"])) : a("", !0),
|
|
89
|
+
t(n).total_amount ? (e(), i(w, {
|
|
81
90
|
key: 1,
|
|
82
|
-
"total-amount": t(
|
|
83
|
-
}, null, 8, ["total-amount"])) :
|
|
84
|
-
t(
|
|
91
|
+
"total-amount": t(n).total_amount
|
|
92
|
+
}, null, 8, ["total-amount"])) : a("", !0),
|
|
93
|
+
t(n).note ? (e(), i(D, {
|
|
85
94
|
key: 2,
|
|
86
|
-
note: t(
|
|
87
|
-
}, null, 8, ["note"])) :
|
|
88
|
-
(
|
|
95
|
+
note: t(n).note
|
|
96
|
+
}, null, 8, ["note"])) : a("", !0),
|
|
97
|
+
(_ = t(n).data) != null && _.attachment_urls && t(n).data.attachment_urls.length ? (e(), i(K, {
|
|
89
98
|
key: 3,
|
|
90
|
-
attachments: t(
|
|
91
|
-
}, null, 8, ["attachments"])) :
|
|
92
|
-
|
|
93
|
-
(g = t(
|
|
99
|
+
attachments: t(n).data.attachment_urls
|
|
100
|
+
}, null, 8, ["attachments"])) : a("", !0),
|
|
101
|
+
l("div", Y, y(m.$t("psc.disclaimer")), 1),
|
|
102
|
+
(g = t(n).appointment_bookings) != null && g.length ? (e(), i(M, {
|
|
94
103
|
key: 4,
|
|
95
|
-
appointments: t(
|
|
104
|
+
appointments: t(n).appointment_bookings,
|
|
96
105
|
"is-desktop": !1
|
|
97
|
-
}, null, 8, ["appointments"])) :
|
|
106
|
+
}, null, 8, ["appointments"])) : a("", !0)
|
|
98
107
|
])
|
|
99
108
|
])
|
|
100
109
|
]),
|
|
101
|
-
t(r) ?
|
|
110
|
+
t(r) ? a("", !0) : (e(), i($, {
|
|
102
111
|
key: 1,
|
|
103
112
|
booking: o.booking
|
|
104
113
|
}, null, 8, ["booking"])),
|
|
105
|
-
o.hideSupport ?
|
|
114
|
+
o.hideSupport ? a("", !0) : (e(), i(E, { key: 2 }))
|
|
106
115
|
], 64))
|
|
107
116
|
]);
|
|
108
117
|
};
|
|
109
118
|
}
|
|
110
119
|
});
|
|
111
120
|
export {
|
|
112
|
-
|
|
121
|
+
yo as default
|
|
113
122
|
};
|
|
114
123
|
//# sourceMappingURL=BookingDetail.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingDetail.vue.mjs","sources":["../../../../src/components/BookingDetail/BookingDetail.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"psc-space-y-11 psc-px-4 psc-pb-4\" }\nconst _hoisted_2 = { class: \"psc-space-y-6\" }\nconst _hoisted_3 = { class: \"psc-space-y-1\" }\nconst _hoisted_4 = { class: \"psc-space-y-4\" }\nconst _hoisted_5 = { class: \"psc-rounded-lg psc-shadow\" }\nconst _hoisted_6 = { class: \"psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6\" }\nconst _hoisted_7 = { class: \"psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic\" }\n\nimport type { Booking } from '@/types';\nimport BookingBasicInfo from '../Shared/BookingBasicInfo.vue';\nimport BookingNote from './BookingNote.vue';\nimport BookingNumber from '../Shared/BookingNumber.vue';\nimport TestList from './TestList.vue';\nimport TotalPayment from './TotalPayment.vue';\nimport DiagSupport from './DiagSupport.vue';\nimport SampleCollectionInfo from './SampleCollectionInfo.vue';\nimport PatientName from '@/components/Shared/PatientName.vue';\nimport BookingResultStatus from './BookingResultStatus.vue';\nimport BottomCurved from '../Shared/BottomCurved.vue';\nimport { useBookingDetail } from '@/composables/BookingDetail';\nimport SectionTitle from '@/components/Shared/SectionTitle.vue';\nimport { computed } from 'vue';\nimport { BookingStatus } from '@/constants/Enums';\nimport BookingCtaButtons from './BookingCtaButtons.vue';\nimport BookingDetailSkeleton from '../Shared/BookingDetailSkeleton.vue';\nimport BookingAttachment from './BookingAttachment.vue';\nimport AppointmentBookingList from './AppointmentBookingList.vue';\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n loading: boolean;\n hideSupport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BookingDetail',\n props: {\n booking: null,\n loading: { type: Boolean },\n hideSupport: { type: Boolean, default: false }\n },\n emits: ['click:find-location'],\n setup(__props: any, { emit }) {\n\nconst props = __props as { booking: Booking, loading: boolean, hideSupport: boolean };\n\n\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst booking = computed(() => props.booking);\nconst isBookingCreated = computed(\n () => props.booking.booking_status === BookingStatus.Created\n);\nconst { patient, doctor } = useBookingDetail(booking);\n\n/**\n * Methods\n */\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (props.loading)\n ? (_openBlock(), _createBlock(BookingDetailSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(PatientName, {\n \"first-name\": props.booking.first_name\n }, null, 8, [\"first-name\"]),\n _createVNode(BookingResultStatus, {\n \"test-result-key\": props.booking.test_result_key,\n \"result-status\": props.booking.result_status,\n \"booking-status\": props.booking.booking_status\n }, null, 8, [\"test-result-key\", \"result-status\", \"booking-status\"])\n ]),\n _createVNode(BookingCtaButtons, {\n booking: props.booking,\n \"onClick:findLocation\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:find-location')))\n }, null, 8, [\"booking\"])\n ]),\n (_unref(isBookingCreated))\n ? (_openBlock(), _createBlock(SampleCollectionInfo, {\n key: 0,\n booking: props.booking\n }, null, 8, [\"booking\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(SectionTitle, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('psc.test_result_booking_booking_details')), 1)\n ]),\n _: 1\n }),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(BookingBasicInfo, {\n patient: _unref(patient),\n doctor: _unref(doctor),\n class: \"psc-px-4 psc-py-4 lg:psc-px-6\"\n }, null, 8, [\"patient\", \"doctor\"]),\n _createVNode(BottomCurved),\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(BookingNumber, {\n \"booking-code\": props.booking.booking_code,\n \"booking-status\": props.booking.booking_status,\n \"payment-status\": \n props.booking.data?.type === 'foc'\n ? undefined\n : props.booking.payment_status\n \n }, null, 8, [\"booking-code\", \"booking-status\", \"payment-status\"]),\n (_unref(booking).services && _unref(booking).services.length)\n ? (_openBlock(), _createBlock(TestList, {\n key: 0,\n services: _unref(booking).services,\n \"booking-type\": props.booking?.data?.type || ''\n }, null, 8, [\"services\", \"booking-type\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).total_amount)\n ? (_openBlock(), _createBlock(TotalPayment, {\n key: 1,\n \"total-amount\": _unref(booking).total_amount\n }, null, 8, [\"total-amount\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).note)\n ? (_openBlock(), _createBlock(BookingNote, {\n key: 2,\n note: _unref(booking).note\n }, null, 8, [\"note\"]))\n : _createCommentVNode(\"\", true),\n (\n _unref(booking).data?.attachment_urls &&\n _unref(booking).data.attachment_urls.length\n )\n ? (_openBlock(), _createBlock(BookingAttachment, {\n key: 3,\n attachments: _unref(booking).data.attachment_urls\n }, null, 8, [\"attachments\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_7, _toDisplayString(_ctx.$t('psc.disclaimer')), 1),\n (_unref(booking).appointment_bookings?.length)\n ? (_openBlock(), _createBlock(AppointmentBookingList, {\n key: 4,\n appointments: _unref(booking).appointment_bookings,\n \"is-desktop\": false\n }, null, 8, [\"appointments\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n (!_unref(isBookingCreated))\n ? (_openBlock(), _createBlock(SampleCollectionInfo, {\n key: 1,\n booking: props.booking\n }, null, 8, [\"booking\"]))\n : _createCommentVNode(\"\", true),\n (!props.hideSupport)\n ? (_openBlock(), _createBlock(DiagSupport, { key: 2 }))\n : _createCommentVNode(\"\", true)\n ], 64))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_sfc_main","_defineComponent","__props","emit","props","booking","computed","isBookingCreated","BookingStatus","patient","doctor","useBookingDetail","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","BookingDetailSkeleton","_Fragment","_createElementVNode","_createVNode","PatientName","BookingResultStatus","BookingCtaButtons","$event","_unref","SampleCollectionInfo","_createCommentVNode","SectionTitle","_withCtx","_createTextVNode","_toDisplayString","BookingBasicInfo","BottomCurved","BookingNumber","_a","TestList","_c","_b","TotalPayment","BookingNote","BookingAttachment","AppointmentBookingList","DiagSupport"],"mappings":";;;;;;;;;;;;;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,sCACtBC,IAAa,EAAE,OAAO,mBACtBC,IAAa,EAAE,OAAO,mBACtBC,IAAa,EAAE,OAAO,mBACtBC,IAAa,EAAE,OAAO,+BACtBC,IAAa,EAAE,OAAO,8DACtBC,IAAa,EAAE,OAAO,gEA+BAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,SAAS;AAAA,IACT,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,aAAa,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,EAC/C;AAAA,EACA,OAAO,CAAC,qBAAqB;AAAA,EAC7B,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAEhC,UAAMC,IAAQF,GAYRG,IAAUC,EAAS,MAAMF,EAAM,OAAO,GACtCG,IAAmBD;AAAA,MACvB,MAAMF,EAAM,QAAQ,mBAAmBI,EAAc;AAAA,IAAA,GAEjD,EAAE,SAAAC,GAAS,QAAAC,EAAO,IAAIC,EAAiBN,CAAO;AAM7C,WAAA,CAACO,GAAUC,MAAgB;;AAChC,aAAQC,EAAW,GAAGC,EAAoB,OAAOtB,GAAY;AAAA,QAC1DW,EAAM,WACFU,EAAA,GAAcE,EAAaC,GAAuB,EAAE,KAAK,EAAG,CAAA,MAC5DH,EAAc,GAAAC,EAAoBG,GAAW,EAAE,KAAK,KAAK;AAAA,UACxDC,EA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;AAAA,kBACL,aAAahB,EAAOpB,CAAO,EAAE,KAAK;AAAA,gBAAA,GACjC,MAAM,GAAG,CAAC,aAAa,CAAC,KAC3BsB,EAAoB,IAAI,EAAI;AAAA,gBAChCR,EAAoB,OAAOpB,GAAYgC,EAAiBnB,EAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC;AAAA,iBACpFa,IAAAA,EAAOpB,CAAO,EAAE,yBAAhBoB,QAAAA,EAAsC,UAClCX,EAAW,GAAGE,EAAa0B,GAAwB;AAAA,kBAClD,KAAK;AAAA,kBACL,cAAcjB,EAAOpB,CAAO,EAAE;AAAA,kBAC9B,cAAc;AAAA,gBAAA,GACb,MAAM,GAAG,CAAC,cAAc,CAAC,KAC5BsB,EAAoB,IAAI,EAAI;AAAA,cAAA,CACjC;AAAA,YAAA,CACF;AAAA,UAAA,CACF;AAAA,UACCF,EAAOlB,CAAgB,IAKrBoB,EAAoB,IAAI,EAAI,KAJ3Bb,EAAW,GAAGE,EAAaU,GAAsB;AAAA,YAChD,KAAK;AAAA,YACL,SAAStB,EAAM;AAAA,UAAA,GACd,MAAM,GAAG,CAAC,SAAS,CAAC;AAAA,UAEzBA,EAAM,cAEJuB,EAAoB,IAAI,EAAI,KAD3Bb,KAAcE,EAAa2B,GAAa,EAAE,KAAK,EAAE,CAAC;AAAA,WAEtD,EAAE;AAAA,MAAA,CACV;AAAA,IAAA;AAAA,EAEH;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"BookingDetail.vue.mjs","sources":["../../../../src/components/BookingDetail/BookingDetail.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"psc-space-y-11 psc-px-4 psc-pb-4\" }\nconst _hoisted_2 = { class: \"psc-space-y-6\" }\nconst _hoisted_3 = { class: \"psc-space-y-1\" }\nconst _hoisted_4 = { class: \"psc-space-y-4\" }\nconst _hoisted_5 = { class: \"psc-rounded-lg psc-shadow\" }\nconst _hoisted_6 = { class: \"psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6\" }\nconst _hoisted_7 = { class: \"psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic\" }\n\nimport type { Booking } from '@/types';\nimport BookingBasicInfo from '../Shared/BookingBasicInfo.vue';\nimport BookingNote from './BookingNote.vue';\nimport BookingNumber from '../Shared/BookingNumber.vue';\nimport TestList from './TestList.vue';\nimport TotalPayment from './TotalPayment.vue';\nimport DiagSupport from './DiagSupport.vue';\nimport SampleCollectionInfo from './SampleCollectionInfo.vue';\nimport PatientName from '@/components/Shared/PatientName.vue';\nimport BookingResultStatus from './BookingResultStatus.vue';\nimport BottomCurved from '../Shared/BottomCurved.vue';\nimport { useBookingDetail } from '@/composables/BookingDetail';\nimport SectionTitle from '@/components/Shared/SectionTitle.vue';\nimport { computed } from 'vue';\nimport { BookingStatus } from '@/constants/Enums';\nimport BookingCtaButtons from './BookingCtaButtons.vue';\nimport PaymentSuccessLabel from './PaymentSuccessLabel.vue';\nimport BookingDetailSkeleton from '../Shared/BookingDetailSkeleton.vue';\nimport BookingAttachment from './BookingAttachment.vue';\nimport AppointmentBookingList from './AppointmentBookingList.vue';\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n loading: boolean;\n hideSupport?: boolean;\n payOnlineLoading?: boolean;\n payOnlineFailed?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BookingDetail',\n props: {\n booking: null,\n loading: { type: Boolean },\n hideSupport: { type: Boolean, default: false },\n payOnlineLoading: { type: Boolean, default: false },\n payOnlineFailed: { type: Boolean, default: false }\n },\n emits: ['click:find-location', 'click:pay-online'],\n setup(__props: any, { emit }) {\n\nconst props = __props as { booking: Booking, loading: boolean, hideSupport: boolean, payOnlineLoading: boolean, payOnlineFailed: boolean };\n\n\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst booking = computed(() => props.booking);\nconst isBookingCreated = computed(\n () => props.booking.booking_status === BookingStatus.Created\n);\nconst { patient, doctor } = useBookingDetail(booking);\n\n/**\n * Methods\n */\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (props.loading)\n ? (_openBlock(), _createBlock(BookingDetailSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(PatientName, {\n \"first-name\": props.booking.first_name\n }, null, 8, [\"first-name\"]),\n _createVNode(BookingResultStatus, {\n \"test-result-key\": props.booking.test_result_key,\n \"result-status\": props.booking.result_status,\n \"booking-status\": props.booking.booking_status\n }, null, 8, [\"test-result-key\", \"result-status\", \"booking-status\"])\n ]),\n _createVNode(PaymentSuccessLabel, {\n booking: props.booking\n }, null, 8, [\"booking\"]),\n _createVNode(BookingCtaButtons, {\n booking: props.booking,\n \"pay-online-loading\": props.payOnlineLoading,\n \"pay-online-failed\": props.payOnlineFailed,\n \"onClick:findLocation\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:find-location'))),\n \"onClick:payOnline\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:pay-online')))\n }, null, 8, [\"booking\", \"pay-online-loading\", \"pay-online-failed\"])\n ]),\n (_unref(isBookingCreated))\n ? (_openBlock(), _createBlock(SampleCollectionInfo, {\n key: 0,\n booking: props.booking\n }, null, 8, [\"booking\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(SectionTitle, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('psc.test_result_booking_booking_details')), 1)\n ]),\n _: 1\n }),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(BookingBasicInfo, {\n patient: _unref(patient),\n doctor: _unref(doctor),\n class: \"psc-px-4 psc-py-4 lg:psc-px-6\"\n }, null, 8, [\"patient\", \"doctor\"]),\n _createVNode(BottomCurved),\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(BookingNumber, {\n \"booking-code\": props.booking.booking_code,\n \"booking-status\": props.booking.booking_status,\n \"payment-status\": \n props.booking.data?.type === 'foc'\n ? undefined\n : props.booking.payment_status\n \n }, null, 8, [\"booking-code\", \"booking-status\", \"payment-status\"]),\n (_unref(booking).services && _unref(booking).services.length)\n ? (_openBlock(), _createBlock(TestList, {\n key: 0,\n services: _unref(booking).services,\n \"booking-type\": props.booking?.data?.type || ''\n }, null, 8, [\"services\", \"booking-type\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).total_amount)\n ? (_openBlock(), _createBlock(TotalPayment, {\n key: 1,\n \"total-amount\": _unref(booking).total_amount\n }, null, 8, [\"total-amount\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).note)\n ? (_openBlock(), _createBlock(BookingNote, {\n key: 2,\n note: _unref(booking).note\n }, null, 8, [\"note\"]))\n : _createCommentVNode(\"\", true),\n (\n _unref(booking).data?.attachment_urls &&\n _unref(booking).data.attachment_urls.length\n )\n ? (_openBlock(), _createBlock(BookingAttachment, {\n key: 3,\n attachments: _unref(booking).data.attachment_urls\n }, null, 8, [\"attachments\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_7, _toDisplayString(_ctx.$t('psc.disclaimer')), 1),\n (_unref(booking).appointment_bookings?.length)\n ? (_openBlock(), _createBlock(AppointmentBookingList, {\n key: 4,\n appointments: _unref(booking).appointment_bookings,\n \"is-desktop\": false\n }, null, 8, [\"appointments\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n (!_unref(isBookingCreated))\n ? (_openBlock(), _createBlock(SampleCollectionInfo, {\n key: 1,\n booking: props.booking\n }, null, 8, [\"booking\"]))\n : _createCommentVNode(\"\", true),\n (!props.hideSupport)\n ? (_openBlock(), _createBlock(DiagSupport, { key: 2 }))\n : _createCommentVNode(\"\", true)\n ], 64))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_sfc_main","_defineComponent","__props","emit","props","booking","computed","isBookingCreated","BookingStatus","patient","doctor","useBookingDetail","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","BookingDetailSkeleton","_Fragment","_createElementVNode","_createVNode","PatientName","BookingResultStatus","PaymentSuccessLabel","BookingCtaButtons","$event","_unref","SampleCollectionInfo","_createCommentVNode","SectionTitle","_withCtx","_createTextVNode","_toDisplayString","BookingBasicInfo","BottomCurved","BookingNumber","_a","TestList","_c","_b","TotalPayment","BookingNote","BookingAttachment","AppointmentBookingList","DiagSupport"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,sCACtBC,IAAa,EAAE,OAAO,mBACtBC,IAAa,EAAE,OAAO,mBACtBC,IAAa,EAAE,OAAO,mBACtBC,IAAa,EAAE,OAAO,+BACtBC,IAAa,EAAE,OAAO,8DACtBC,IAAa,EAAE,OAAO,gEAkCAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,SAAS;AAAA,IACT,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,aAAa,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IAC7C,kBAAkB,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IAClD,iBAAiB,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,EACnD;AAAA,EACA,OAAO,CAAC,uBAAuB,kBAAkB;AAAA,EACjD,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAEhC,UAAMC,IAAQF,GAYRG,IAAUC,EAAS,MAAMF,EAAM,OAAO,GACt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GE,EAAaW,GAAsB;AAAA,YAChD,KAAK;AAAA,YACL,SAASvB,EAAM;AAAA,UAAA,GACd,MAAM,GAAG,CAAC,SAAS,CAAC;AAAA,UAEzBA,EAAM,cAEJwB,EAAoB,IAAI,EAAI,KAD3Bd,KAAcE,EAAa4B,GAAa,EAAE,KAAK,EAAE,CAAC;AAAA,WAEtD,EAAE;AAAA,MAAA,CACV;AAAA,IAAA;AAAA,EAEH;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),d=require("../Shared/BookingBasicInfo.vue.js"),y=require("./BookingNote.vue.js"),m=require("../Shared/BookingNumber.vue.js"),v=require("./TestList.vue.js"),b=require("./TotalPayment.vue.js"),B=require("./DiagSupport.vue.js"),f=require("./SampleCollectionInfo.vue.js"),N=require("./BookingResultStatus.vue.js"),V=require("../Shared/BottomCurved.vue.js"),h=require("../../composables/BookingDetail.js"),q=require("../Shared/SectionTitle.vue.js"),C=require("./BookingCtaButtons.vue.js"),S=require("./PaymentSuccessLabel.vue.js"),x=require("./BookingDetailDesktopSkeleton/BookingDetailDesktopSkeleton.vue.js"),D=require("./BookingAttachment.vue.js"),E=require("./AppointmentBookingList.vue.js"),w={class:"psc-flex psc-flex-wrap psc-px-4 psc-pb-4"},L={class:"psc-w-full psc-space-y-2 psc-pb-6"},O={class:"psc-w-2/3"},T={class:"psc-rounded-lg psc-shadow"},$={class:"psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6"},F={class:"psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic"},A={class:"psc-w-1/3 psc-space-y-11 psc-pl-11"},I=e.defineComponent({__name:"BookingDetailDesktop",props:{booking:null,loading:{type:Boolean},hideSupport:{type:Boolean,default:!1},payOnlineLoading:{type:Boolean,default:!1},payOnlineFailed:{type:Boolean,default:!1}},emits:["click:find-location","click:pay-online"],setup(p,{emit:s}){const t=p,o=e.computed(()=>t.booking),{patient:_,doctor:k}=h.useBookingDetail(o);return(i,n)=>{var a,c,l,u,r;return e.openBlock(),e.createElementBlock("div",w,[t.loading?(e.openBlock(),e.createBlock(x,{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",L,[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.$t("psc.test_result_booking_booking_details")),1)]),_:1}),e.createVNode(N,{"test-result-key":t.booking.test_result_key,"result-status":t.booking.result_status,"booking-status":t.booking.booking_status},null,8,["test-result-key","result-status","booking-status"])]),e.createElementVNode("div",O,[e.createElementVNode("div",T,[e.createVNode(d,{patient:e.unref(_),doctor:e.unref(k),class:"psc-px-4 psc-py-4 lg:psc-px-6"},null,8,["patient","doctor"]),e.createVNode(V,{type:"lg"}),e.createElementVNode("div",$,[e.createVNode(m,{"booking-code":t.booking.booking_code,"booking-status":t.booking.booking_status,"payment-status":((a=t.booking.data)==null?void 0:a.type)==="foc"?void 0:t.booking.payment_status},null,8,["booking-code","booking-status","payment-status"]),e.unref(o).services&&e.unref(o).services.length?(e.openBlock(),e.createBlock(v,{key:0,services:e.unref(o).services,"booking-type":(l=(c=t==null?void 0:t.booking)==null?void 0:c.data)==null?void 0:l.type},null,8,["services","booking-type"])):e.createCommentVNode("",!0),e.unref(o).total_amount?(e.openBlock(),e.createBlock(b,{key:1,"total-amount":e.unref(o).total_amount},null,8,["total-amount"])):e.createCommentVNode("",!0),e.unref(o).note?(e.openBlock(),e.createBlock(y,{key:2,note:e.unref(o).note},null,8,["note"])):e.createCommentVNode("",!0),(u=e.unref(o).data)!=null&&u.attachment_urls&&e.unref(o).data.attachment_urls.length?(e.openBlock(),e.createBlock(D,{key:3,attachments:e.unref(o).data.attachment_urls},null,8,["attachments"])):e.createCommentVNode("",!0),e.createElementVNode("div",F,e.toDisplayString(i.$t("psc.disclaimer")),1),(r=e.unref(o).appointment_bookings)!=null&&r.length?(e.openBlock(),e.createBlock(E,{key:4,appointments:e.unref(o).appointment_bookings,"is-desktop":!0},null,8,["appointments"])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",A,[e.createVNode(S,{booking:t.booking},null,8,["booking"]),e.createVNode(C,{booking:t.booking,"pay-online-loading":t.payOnlineLoading,"pay-online-failed":t.payOnlineFailed,"onClick:findLocation":n[0]||(n[0]=g=>s("click:find-location")),"onClick:payOnline":n[1]||(n[1]=g=>s("click:pay-online"))},null,8,["booking","pay-online-loading","pay-online-failed"]),e.createVNode(f,{booking:t.booking},null,8,["booking"]),t.hideSupport?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(B,{key:0}))])],64))])}}});module.exports=I;
|
|
2
2
|
//# sourceMappingURL=BookingDetailDesktop.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingDetailDesktop.vue.js","sources":["../../../../src/components/BookingDetail/BookingDetailDesktop.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"psc-flex psc-flex-wrap psc-px-4 psc-pb-4\" }\nconst _hoisted_2 = { class: \"psc-w-full psc-space-y-2 psc-pb-6\" }\nconst _hoisted_3 = { class: \"psc-w-2/3\" }\nconst _hoisted_4 = { class: \"psc-rounded-lg psc-shadow\" }\nconst _hoisted_5 = { class: \"psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6\" }\nconst _hoisted_6 = { class: \"psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic\" }\nconst _hoisted_7 = { class: \"psc-w-1/3 psc-space-y-11 psc-pl-11\" }\n\nimport type { Booking } from '@/types';\nimport BookingBasicInfo from '../Shared/BookingBasicInfo.vue';\nimport BookingNote from './BookingNote.vue';\nimport BookingNumber from '../Shared/BookingNumber.vue';\nimport TestList from './TestList.vue';\nimport TotalPayment from './TotalPayment.vue';\nimport DiagSupport from './DiagSupport.vue';\nimport SampleCollectionInfo from './SampleCollectionInfo.vue';\nimport BookingResultStatus from './BookingResultStatus.vue';\nimport BottomCurved from '../Shared/BottomCurved.vue';\nimport { useBookingDetail } from '@/composables/BookingDetail';\nimport SectionTitle from '@/components/Shared/SectionTitle.vue';\nimport { computed } from 'vue';\nimport BookingCtaButtons from './BookingCtaButtons.vue';\nimport BookingDetailDesktopSkeleton from './BookingDetailDesktopSkeleton/BookingDetailDesktopSkeleton.vue';\nimport BookingAttachment from './BookingAttachment.vue';\nimport AppointmentBookingList from './AppointmentBookingList.vue';\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n loading: boolean;\n hideSupport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BookingDetailDesktop',\n props: {\n booking: null,\n loading: { type: Boolean },\n hideSupport: { type: Boolean, default: false }\n },\n emits: ['click:find-location'],\n setup(__props: any, { emit }) {\n\nconst props = __props as { booking: Booking, loading: boolean, hideSupport: boolean };\n\n\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst booking = computed(() => props.booking);\nconst { patient, doctor } = useBookingDetail(booking);\n\n/**\n * Methods\n */\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (props.loading)\n ? (_openBlock(), _createBlock(BookingDetailDesktopSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(SectionTitle, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('psc.test_result_booking_booking_details')), 1)\n ]),\n _: 1\n }),\n _createVNode(BookingResultStatus, {\n \"test-result-key\": props.booking.test_result_key,\n \"result-status\": props.booking.result_status,\n \"booking-status\": props.booking.booking_status\n }, null, 8, [\"test-result-key\", \"result-status\", \"booking-status\"])\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(BookingBasicInfo, {\n patient: _unref(patient),\n doctor: _unref(doctor),\n class: \"psc-px-4 psc-py-4 lg:psc-px-6\"\n }, null, 8, [\"patient\", \"doctor\"]),\n _createVNode(BottomCurved, { type: \"lg\" }),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(BookingNumber, {\n \"booking-code\": props.booking.booking_code,\n \"booking-status\": props.booking.booking_status,\n \"payment-status\": \n props.booking.data?.type === 'foc'\n ? undefined\n : props.booking.payment_status\n \n }, null, 8, [\"booking-code\", \"booking-status\", \"payment-status\"]),\n (_unref(booking).services && _unref(booking).services.length)\n ? (_openBlock(), _createBlock(TestList, {\n key: 0,\n services: _unref(booking).services,\n \"booking-type\": props?.booking?.data?.type\n }, null, 8, [\"services\", \"booking-type\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).total_amount)\n ? (_openBlock(), _createBlock(TotalPayment, {\n key: 1,\n \"total-amount\": _unref(booking).total_amount\n }, null, 8, [\"total-amount\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).note)\n ? (_openBlock(), _createBlock(BookingNote, {\n key: 2,\n note: _unref(booking).note\n }, null, 8, [\"note\"]))\n : _createCommentVNode(\"\", true),\n (\n _unref(booking).data?.attachment_urls &&\n _unref(booking).data.attachment_urls.length\n )\n ? (_openBlock(), _createBlock(BookingAttachment, {\n key: 3,\n attachments: _unref(booking).data.attachment_urls\n }, null, 8, [\"attachments\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_6, _toDisplayString(_ctx.$t('psc.disclaimer')), 1),\n (_unref(booking).appointment_bookings?.length)\n ? (_openBlock(), _createBlock(AppointmentBookingList, {\n key: 4,\n appointments: _unref(booking).appointment_bookings,\n \"is-desktop\": true\n }, null, 8, [\"appointments\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createVNode(BookingCtaButtons, {\n booking: props.booking,\n \"onClick:findLocation\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:find-location')))\n }, null, 8, [\"booking\"]),\n _createVNode(SampleCollectionInfo, {\n booking: props.booking\n }, null, 8, [\"booking\"]),\n (!props.hideSupport)\n ? (_openBlock(), _createBlock(DiagSupport, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ])\n ], 64))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_sfc_main","_defineComponent","__props","emit","props","booking","computed","patient","doctor","useBookingDetail","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","BookingDetailDesktopSkeleton","_Fragment","_createElementVNode","_createVNode","SectionTitle","_withCtx","_createTextVNode","_toDisplayString","BookingResultStatus","BookingBasicInfo","_unref","BottomCurved","BookingNumber","_a","TestList","_c","_b","_createCommentVNode","TotalPayment","BookingNote","BookingAttachment","AppointmentBookingList","BookingCtaButtons","$event","SampleCollectionInfo","DiagSupport"],"mappings":"6qBAGMA,EAAa,CAAE,MAAO,4CACtBC,EAAa,CAAE,MAAO,qCACtBC,EAAa,CAAE,MAAO,aACtBC,EAAa,CAAE,MAAO,6BACtBC,EAAa,CAAE,MAAO,4DACtBC,EAAa,CAAE,MAAO,8DACtBC,EAAa,CAAE,MAAO,sCA6BAC,EAAiBC,kBAAA,CAC3C,OAAQ,uBACR,MAAO,CACL,QAAS,KACT,QAAS,CAAE,KAAM,OAAQ,EACzB,YAAa,CAAE,KAAM,QAAS,QAAS,EAAM,CAC/C,EACA,MAAO,CAAC,qBAAqB,EAC7B,MAAMC,EAAc,CAAE,KAAAC,GAAQ,CAEhC,MAAMC,EAAQF,EAYRG,EAAUC,EAAA,SAAS,IAAMF,EAAM,OAAO,EACtC,CAAE,QAA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AK,EACL,aAAcX,EAAAA,MAAOpB,CAAO,EAAE,qBAC9B,aAAc,EAAA,EACb,KAAM,EAAG,CAAC,cAAc,CAAC,GAC5B2B,EAAoB,mBAAA,GAAI,EAAI,CAAA,CACjC,CAAA,CACF,CAAA,CACF,EACDf,EAAA,mBAAoB,MAAOlB,EAAY,CACrCmB,EAAAA,YAAamB,EAAmB,CAC9B,QAASjC,EAAM,QACf,uBAAwBO,EAAO,CAAC,IAAMA,EAAO,CAAC,EAAK2B,GAAiBnC,EAAK,qBAAqB,EAC7F,EAAA,KAAM,EAAG,CAAC,SAAS,CAAC,EACvBe,EAAAA,YAAaqB,EAAsB,CACjC,QAASnC,EAAM,OACd,EAAA,KAAM,EAAG,CAAC,SAAS,CAAC,EACrBA,EAAM,YAEJ4B,qBAAoB,GAAI,EAAI,GAD3BpB,cAAcE,EAAa,YAAA0B,EAAa,CAAE,IAAK,CAAE,CAAC,EACvB,CACjC,GACA,EAAE,EAAA,CACV,CAAA,CAEH,CAEA,CAAC"}
|
|
1
|
+
{"version":3,"file":"BookingDetailDesktop.vue.js","sources":["../../../../src/components/BookingDetail/BookingDetailDesktop.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"psc-flex psc-flex-wrap psc-px-4 psc-pb-4\" }\nconst _hoisted_2 = { class: \"psc-w-full psc-space-y-2 psc-pb-6\" }\nconst _hoisted_3 = { class: \"psc-w-2/3\" }\nconst _hoisted_4 = { class: \"psc-rounded-lg psc-shadow\" }\nconst _hoisted_5 = { class: \"psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6\" }\nconst _hoisted_6 = { class: \"psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic\" }\nconst _hoisted_7 = { class: \"psc-w-1/3 psc-space-y-11 psc-pl-11\" }\n\nimport type { Booking } from '@/types';\nimport BookingBasicInfo from '../Shared/BookingBasicInfo.vue';\nimport BookingNote from './BookingNote.vue';\nimport BookingNumber from '../Shared/BookingNumber.vue';\nimport TestList from './TestList.vue';\nimport TotalPayment from './TotalPayment.vue';\nimport DiagSupport from './DiagSupport.vue';\nimport SampleCollectionInfo from './SampleCollectionInfo.vue';\nimport BookingResultStatus from './BookingResultStatus.vue';\nimport BottomCurved from '../Shared/BottomCurved.vue';\nimport { useBookingDetail } from '@/composables/BookingDetail';\nimport SectionTitle from '@/components/Shared/SectionTitle.vue';\nimport { computed } from 'vue';\nimport BookingCtaButtons from './BookingCtaButtons.vue';\nimport PaymentSuccessLabel from './PaymentSuccessLabel.vue';\nimport BookingDetailDesktopSkeleton from './BookingDetailDesktopSkeleton/BookingDetailDesktopSkeleton.vue';\nimport BookingAttachment from './BookingAttachment.vue';\nimport AppointmentBookingList from './AppointmentBookingList.vue';\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n loading: boolean;\n hideSupport?: boolean;\n payOnlineLoading?: boolean;\n payOnlineFailed?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BookingDetailDesktop',\n props: {\n booking: null,\n loading: { type: Boolean },\n hideSupport: { type: Boolean, default: false },\n payOnlineLoading: { type: Boolean, default: false },\n payOnlineFailed: { type: Boolean, default: false }\n },\n emits: ['click:find-location', 'click:pay-online'],\n setup(__props: any, { emit }) {\n\nconst props = __props as { booking: Booking, loading: boolean, hideSupport: boolean, payOnlineLoading: boolean, payOnlineFailed: boolean };\n\n\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst booking = computed(() => props.booking);\nconst { patient, doctor } = useBookingDetail(booking);\n\n/**\n * Methods\n */\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (props.loading)\n ? (_openBlock(), _createBlock(BookingDetailDesktopSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(SectionTitle, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('psc.test_result_booking_booking_details')), 1)\n ]),\n _: 1\n }),\n _createVNode(BookingResultStatus, {\n \"test-result-key\": props.booking.test_result_key,\n \"result-status\": props.booking.result_status,\n \"booking-status\": props.booking.booking_status\n }, null, 8, [\"test-result-key\", \"result-status\", \"booking-status\"])\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(BookingBasicInfo, {\n patient: _unref(patient),\n doctor: _unref(doctor),\n class: \"psc-px-4 psc-py-4 lg:psc-px-6\"\n }, null, 8, [\"patient\", \"doctor\"]),\n _createVNode(BottomCurved, { type: \"lg\" }),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(BookingNumber, {\n \"booking-code\": props.booking.booking_code,\n \"booking-status\": props.booking.booking_status,\n \"payment-status\": \n props.booking.data?.type === 'foc'\n ? undefined\n : props.booking.payment_status\n \n }, null, 8, [\"booking-code\", \"booking-status\", \"payment-status\"]),\n (_unref(booking).services && _unref(booking).services.length)\n ? (_openBlock(), _createBlock(TestList, {\n key: 0,\n services: _unref(booking).services,\n \"booking-type\": props?.booking?.data?.type\n }, null, 8, [\"services\", \"booking-type\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).total_amount)\n ? (_openBlock(), _createBlock(TotalPayment, {\n key: 1,\n \"total-amount\": _unref(booking).total_amount\n }, null, 8, [\"total-amount\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).note)\n ? (_openBlock(), _createBlock(BookingNote, {\n key: 2,\n note: _unref(booking).note\n }, null, 8, [\"note\"]))\n : _createCommentVNode(\"\", true),\n (\n _unref(booking).data?.attachment_urls &&\n _unref(booking).data.attachment_urls.length\n )\n ? (_openBlock(), _createBlock(BookingAttachment, {\n key: 3,\n attachments: _unref(booking).data.attachment_urls\n }, null, 8, [\"attachments\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_6, _toDisplayString(_ctx.$t('psc.disclaimer')), 1),\n (_unref(booking).appointment_bookings?.length)\n ? (_openBlock(), _createBlock(AppointmentBookingList, {\n key: 4,\n appointments: _unref(booking).appointment_bookings,\n \"is-desktop\": true\n }, null, 8, [\"appointments\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createVNode(PaymentSuccessLabel, {\n booking: props.booking\n }, null, 8, [\"booking\"]),\n _createVNode(BookingCtaButtons, {\n booking: props.booking,\n \"pay-online-loading\": props.payOnlineLoading,\n \"pay-online-failed\": props.payOnlineFailed,\n \"onClick:findLocation\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:find-location'))),\n \"onClick:payOnline\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:pay-online')))\n }, null, 8, [\"booking\", \"pay-online-loading\", \"pay-online-failed\"]),\n _createVNode(SampleCollectionInfo, {\n booking: props.booking\n }, null, 8, [\"booking\"]),\n (!props.hideSupport)\n ? (_openBlock(), _createBlock(DiagSupport, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ])\n ], 64))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_sfc_main","_defineComponent","__props","emit","props","booking","computed","patient","doctor","useBookingDetail","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","BookingDetailDesktopSkeleton","_Fragment","_createElementVNode","_createVNode","SectionTitle","_withCtx","_createTextVNode","_toDisplayString","BookingResultStatus","BookingBasicInfo","_unref","BottomCurved","BookingNumber","_a","TestList","_c","_b","_createCommentVNode","TotalPayment","BookingNote","BookingAttachment","AppointmentBookingList","Payment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CAAC,EAClEe,EAAAA,YAAasB,EAAsB,CACjC,QAASpC,EAAM,OACd,EAAA,KAAM,EAAG,CAAC,SAAS,CAAC,EACrBA,EAAM,YAEJ4B,qBAAoB,GAAI,EAAI,GAD3BpB,cAAcE,EAAa,YAAA2B,EAAa,CAAE,IAAK,CAAE,CAAC,EACvB,CACjC,GACA,EAAE,EAAA,CACV,CAAA,CAEH,CAEA,CAAC"}
|
|
@@ -1,95 +1,104 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as h, computed as B, openBlock as n, createElementBlock as g, createBlock as i, Fragment as x, createElementVNode as a, createVNode as s, withCtx as w, createTextVNode as C, toDisplayString as f, unref as t, createCommentVNode as l } from "vue";
|
|
2
|
+
import O from "../Shared/BookingBasicInfo.vue.mjs";
|
|
3
3
|
import D from "./BookingNote.vue.mjs";
|
|
4
4
|
import N from "../Shared/BookingNumber.vue.mjs";
|
|
5
5
|
import S from "./TestList.vue.mjs";
|
|
6
6
|
import V from "./TotalPayment.vue.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
7
|
+
import F from "./DiagSupport.vue.mjs";
|
|
8
|
+
import L from "./SampleCollectionInfo.vue.mjs";
|
|
9
|
+
import E from "./BookingResultStatus.vue.mjs";
|
|
10
|
+
import T from "../Shared/BottomCurved.vue.mjs";
|
|
11
11
|
import { useBookingDetail as j } from "../../composables/BookingDetail.mjs";
|
|
12
12
|
import q from "../Shared/SectionTitle.vue.mjs";
|
|
13
13
|
import z from "./BookingCtaButtons.vue.mjs";
|
|
14
|
-
import A from "./
|
|
15
|
-
import G from "./
|
|
16
|
-
import H from "./
|
|
17
|
-
|
|
14
|
+
import A from "./PaymentSuccessLabel.vue.mjs";
|
|
15
|
+
import G from "./BookingDetailDesktopSkeleton/BookingDetailDesktopSkeleton.vue.mjs";
|
|
16
|
+
import H from "./BookingAttachment.vue.mjs";
|
|
17
|
+
import I from "./AppointmentBookingList.vue.mjs";
|
|
18
|
+
const J = { class: "psc-flex psc-flex-wrap psc-px-4 psc-pb-4" }, K = { class: "psc-w-full psc-space-y-2 psc-pb-6" }, M = { class: "psc-w-2/3" }, P = { class: "psc-rounded-lg psc-shadow" }, Q = { class: "psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6" }, R = { class: "psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic" }, U = { class: "psc-w-1/3 psc-space-y-11 psc-pl-11" }, ko = /* @__PURE__ */ h({
|
|
18
19
|
__name: "BookingDetailDesktop",
|
|
19
20
|
props: {
|
|
20
21
|
booking: null,
|
|
21
22
|
loading: { type: Boolean },
|
|
22
|
-
hideSupport: { type: Boolean, default: !1 }
|
|
23
|
+
hideSupport: { type: Boolean, default: !1 },
|
|
24
|
+
payOnlineLoading: { type: Boolean, default: !1 },
|
|
25
|
+
payOnlineFailed: { type: Boolean, default: !1 }
|
|
23
26
|
},
|
|
24
|
-
emits: ["click:find-location"],
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
return (
|
|
28
|
-
var
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
a("div",
|
|
32
|
-
|
|
33
|
-
default:
|
|
34
|
-
|
|
27
|
+
emits: ["click:find-location", "click:pay-online"],
|
|
28
|
+
setup(y, { emit: c }) {
|
|
29
|
+
const o = y, e = B(() => o.booking), { patient: b, doctor: v } = j(e);
|
|
30
|
+
return (r, p) => {
|
|
31
|
+
var m, u, d, k, _;
|
|
32
|
+
return n(), g("div", J, [
|
|
33
|
+
o.loading ? (n(), i(G, { key: 0 })) : (n(), g(x, { key: 1 }, [
|
|
34
|
+
a("div", K, [
|
|
35
|
+
s(q, null, {
|
|
36
|
+
default: w(() => [
|
|
37
|
+
C(f(r.$t("psc.test_result_booking_booking_details")), 1)
|
|
35
38
|
]),
|
|
36
39
|
_: 1
|
|
37
40
|
}),
|
|
38
|
-
|
|
39
|
-
"test-result-key":
|
|
40
|
-
"result-status":
|
|
41
|
-
"booking-status":
|
|
41
|
+
s(E, {
|
|
42
|
+
"test-result-key": o.booking.test_result_key,
|
|
43
|
+
"result-status": o.booking.result_status,
|
|
44
|
+
"booking-status": o.booking.booking_status
|
|
42
45
|
}, null, 8, ["test-result-key", "result-status", "booking-status"])
|
|
43
46
|
]),
|
|
44
|
-
a("div",
|
|
45
|
-
a("div",
|
|
46
|
-
|
|
47
|
-
patient:
|
|
48
|
-
doctor:
|
|
47
|
+
a("div", M, [
|
|
48
|
+
a("div", P, [
|
|
49
|
+
s(O, {
|
|
50
|
+
patient: t(b),
|
|
51
|
+
doctor: t(v),
|
|
49
52
|
class: "psc-px-4 psc-py-4 lg:psc-px-6"
|
|
50
53
|
}, null, 8, ["patient", "doctor"]),
|
|
51
|
-
|
|
52
|
-
a("div",
|
|
53
|
-
|
|
54
|
-
"booking-code":
|
|
55
|
-
"booking-status":
|
|
56
|
-
"payment-status": ((
|
|
54
|
+
s(T, { type: "lg" }),
|
|
55
|
+
a("div", Q, [
|
|
56
|
+
s(N, {
|
|
57
|
+
"booking-code": o.booking.booking_code,
|
|
58
|
+
"booking-status": o.booking.booking_status,
|
|
59
|
+
"payment-status": ((m = o.booking.data) == null ? void 0 : m.type) === "foc" ? void 0 : o.booking.payment_status
|
|
57
60
|
}, null, 8, ["booking-code", "booking-status", "payment-status"]),
|
|
58
|
-
|
|
61
|
+
t(e).services && t(e).services.length ? (n(), i(S, {
|
|
59
62
|
key: 0,
|
|
60
|
-
services:
|
|
61
|
-
"booking-type": (
|
|
62
|
-
}, null, 8, ["services", "booking-type"])) :
|
|
63
|
-
|
|
63
|
+
services: t(e).services,
|
|
64
|
+
"booking-type": (d = (u = o == null ? void 0 : o.booking) == null ? void 0 : u.data) == null ? void 0 : d.type
|
|
65
|
+
}, null, 8, ["services", "booking-type"])) : l("", !0),
|
|
66
|
+
t(e).total_amount ? (n(), i(V, {
|
|
64
67
|
key: 1,
|
|
65
|
-
"total-amount":
|
|
66
|
-
}, null, 8, ["total-amount"])) :
|
|
67
|
-
|
|
68
|
+
"total-amount": t(e).total_amount
|
|
69
|
+
}, null, 8, ["total-amount"])) : l("", !0),
|
|
70
|
+
t(e).note ? (n(), i(D, {
|
|
68
71
|
key: 2,
|
|
69
|
-
note:
|
|
70
|
-
}, null, 8, ["note"])) :
|
|
71
|
-
(
|
|
72
|
+
note: t(e).note
|
|
73
|
+
}, null, 8, ["note"])) : l("", !0),
|
|
74
|
+
(k = t(e).data) != null && k.attachment_urls && t(e).data.attachment_urls.length ? (n(), i(H, {
|
|
72
75
|
key: 3,
|
|
73
|
-
attachments:
|
|
74
|
-
}, null, 8, ["attachments"])) :
|
|
75
|
-
a("div",
|
|
76
|
-
(
|
|
76
|
+
attachments: t(e).data.attachment_urls
|
|
77
|
+
}, null, 8, ["attachments"])) : l("", !0),
|
|
78
|
+
a("div", R, f(r.$t("psc.disclaimer")), 1),
|
|
79
|
+
(_ = t(e).appointment_bookings) != null && _.length ? (n(), i(I, {
|
|
77
80
|
key: 4,
|
|
78
|
-
appointments:
|
|
81
|
+
appointments: t(e).appointment_bookings,
|
|
79
82
|
"is-desktop": !0
|
|
80
|
-
}, null, 8, ["appointments"])) :
|
|
83
|
+
}, null, 8, ["appointments"])) : l("", !0)
|
|
81
84
|
])
|
|
82
85
|
])
|
|
83
86
|
]),
|
|
84
|
-
a("div",
|
|
85
|
-
|
|
86
|
-
booking:
|
|
87
|
-
"onClick:findLocation": l[0] || (l[0] = (R) => b("click:find-location"))
|
|
87
|
+
a("div", U, [
|
|
88
|
+
s(A, {
|
|
89
|
+
booking: o.booking
|
|
88
90
|
}, null, 8, ["booking"]),
|
|
89
|
-
|
|
90
|
-
booking:
|
|
91
|
+
s(z, {
|
|
92
|
+
booking: o.booking,
|
|
93
|
+
"pay-online-loading": o.payOnlineLoading,
|
|
94
|
+
"pay-online-failed": o.payOnlineFailed,
|
|
95
|
+
"onClick:findLocation": p[0] || (p[0] = ($) => c("click:find-location")),
|
|
96
|
+
"onClick:payOnline": p[1] || (p[1] = ($) => c("click:pay-online"))
|
|
97
|
+
}, null, 8, ["booking", "pay-online-loading", "pay-online-failed"]),
|
|
98
|
+
s(L, {
|
|
99
|
+
booking: o.booking
|
|
91
100
|
}, null, 8, ["booking"]),
|
|
92
|
-
|
|
101
|
+
o.hideSupport ? l("", !0) : (n(), i(F, { key: 0 }))
|
|
93
102
|
])
|
|
94
103
|
], 64))
|
|
95
104
|
]);
|
|
@@ -97,6 +106,6 @@ const I = { class: "psc-flex psc-flex-wrap psc-px-4 psc-pb-4" }, J = { class: "p
|
|
|
97
106
|
}
|
|
98
107
|
});
|
|
99
108
|
export {
|
|
100
|
-
|
|
109
|
+
ko as default
|
|
101
110
|
};
|
|
102
111
|
//# sourceMappingURL=BookingDetailDesktop.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingDetailDesktop.vue.mjs","sources":["../../../../src/components/BookingDetail/BookingDetailDesktop.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"psc-flex psc-flex-wrap psc-px-4 psc-pb-4\" }\nconst _hoisted_2 = { class: \"psc-w-full psc-space-y-2 psc-pb-6\" }\nconst _hoisted_3 = { class: \"psc-w-2/3\" }\nconst _hoisted_4 = { class: \"psc-rounded-lg psc-shadow\" }\nconst _hoisted_5 = { class: \"psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6\" }\nconst _hoisted_6 = { class: \"psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic\" }\nconst _hoisted_7 = { class: \"psc-w-1/3 psc-space-y-11 psc-pl-11\" }\n\nimport type { Booking } from '@/types';\nimport BookingBasicInfo from '../Shared/BookingBasicInfo.vue';\nimport BookingNote from './BookingNote.vue';\nimport BookingNumber from '../Shared/BookingNumber.vue';\nimport TestList from './TestList.vue';\nimport TotalPayment from './TotalPayment.vue';\nimport DiagSupport from './DiagSupport.vue';\nimport SampleCollectionInfo from './SampleCollectionInfo.vue';\nimport BookingResultStatus from './BookingResultStatus.vue';\nimport BottomCurved from '../Shared/BottomCurved.vue';\nimport { useBookingDetail } from '@/composables/BookingDetail';\nimport SectionTitle from '@/components/Shared/SectionTitle.vue';\nimport { computed } from 'vue';\nimport BookingCtaButtons from './BookingCtaButtons.vue';\nimport BookingDetailDesktopSkeleton from './BookingDetailDesktopSkeleton/BookingDetailDesktopSkeleton.vue';\nimport BookingAttachment from './BookingAttachment.vue';\nimport AppointmentBookingList from './AppointmentBookingList.vue';\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n loading: boolean;\n hideSupport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BookingDetailDesktop',\n props: {\n booking: null,\n loading: { type: Boolean },\n hideSupport: { type: Boolean, default: false }\n },\n emits: ['click:find-location'],\n setup(__props: any, { emit }) {\n\nconst props = __props as { booking: Booking, loading: boolean, hideSupport: boolean };\n\n\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst booking = computed(() => props.booking);\nconst { patient, doctor } = useBookingDetail(booking);\n\n/**\n * Methods\n */\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (props.loading)\n ? (_openBlock(), _createBlock(BookingDetailDesktopSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(SectionTitle, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('psc.test_result_booking_booking_details')), 1)\n ]),\n _: 1\n }),\n _createVNode(BookingResultStatus, {\n \"test-result-key\": props.booking.test_result_key,\n \"result-status\": props.booking.result_status,\n \"booking-status\": props.booking.booking_status\n }, null, 8, [\"test-result-key\", \"result-status\", \"booking-status\"])\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(BookingBasicInfo, {\n patient: _unref(patient),\n doctor: _unref(doctor),\n class: \"psc-px-4 psc-py-4 lg:psc-px-6\"\n }, null, 8, [\"patient\", \"doctor\"]),\n _createVNode(BottomCurved, { type: \"lg\" }),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(BookingNumber, {\n \"booking-code\": props.booking.booking_code,\n \"booking-status\": props.booking.booking_status,\n \"payment-status\": \n props.booking.data?.type === 'foc'\n ? undefined\n : props.booking.payment_status\n \n }, null, 8, [\"booking-code\", \"booking-status\", \"payment-status\"]),\n (_unref(booking).services && _unref(booking).services.length)\n ? (_openBlock(), _createBlock(TestList, {\n key: 0,\n services: _unref(booking).services,\n \"booking-type\": props?.booking?.data?.type\n }, null, 8, [\"services\", \"booking-type\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).total_amount)\n ? (_openBlock(), _createBlock(TotalPayment, {\n key: 1,\n \"total-amount\": _unref(booking).total_amount\n }, null, 8, [\"total-amount\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).note)\n ? (_openBlock(), _createBlock(BookingNote, {\n key: 2,\n note: _unref(booking).note\n }, null, 8, [\"note\"]))\n : _createCommentVNode(\"\", true),\n (\n _unref(booking).data?.attachment_urls &&\n _unref(booking).data.attachment_urls.length\n )\n ? (_openBlock(), _createBlock(BookingAttachment, {\n key: 3,\n attachments: _unref(booking).data.attachment_urls\n }, null, 8, [\"attachments\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_6, _toDisplayString(_ctx.$t('psc.disclaimer')), 1),\n (_unref(booking).appointment_bookings?.length)\n ? (_openBlock(), _createBlock(AppointmentBookingList, {\n key: 4,\n appointments: _unref(booking).appointment_bookings,\n \"is-desktop\": true\n }, null, 8, [\"appointments\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createVNode(BookingCtaButtons, {\n booking: props.booking,\n \"onClick:findLocation\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:find-location')))\n }, null, 8, [\"booking\"]),\n _createVNode(SampleCollectionInfo, {\n booking: props.booking\n }, null, 8, [\"booking\"]),\n (!props.hideSupport)\n ? (_openBlock(), _createBlock(DiagSupport, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ])\n ], 64))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_sfc_main","_defineComponent","__props","emit","props","booking","computed","patient","doctor","useBookingDetail","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","BookingDetailDesktopSkeleton","_Fragment","_createElementVNode","_createVNode","SectionTitle","_withCtx","_createTextVNode","_toDisplayString","BookingResultStatus","BookingBasicInfo","_unref","BottomCurved","BookingNumber","_a","TestList","_c","_b","_createCommentVNode","TotalPayment","BookingNote","BookingAttachment","AppointmentBookingList","BookingCtaButtons","$event","SampleCollectionInfo","DiagSupport"],"mappings":";;;;;;;;;;;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,8CACtBC,IAAa,EAAE,OAAO,uCACtBC,IAAa,EAAE,OAAO,eACtBC,IAAa,EAAE,OAAO,+BACtBC,IAAa,EAAE,OAAO,8DACtBC,IAAa,EAAE,OAAO,gEACtBC,IAAa,EAAE,OAAO,wCA6BAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,SAAS;AAAA,IACT,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,aAAa,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,EAC/C;AAAA,EACA,OAAO,CAAC,qBAAqB;AAAA,EAC7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;AAAA,gBAChCf,EAAoB,OAAOnB,GAAYwB,EAAiBZ,EAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC;AAAA,iBACpFe,IAAAA,EAAOpB,CAAO,EAAE,yBAAhBoB,QAAAA,EAAsC,UAClCb,EAAW,GAAGE,EAAasB,GAAwB;AAAA,kBAClD,KAAK;AAAA,kBACL,cAAcX,EAAOpB,CAAO,EAAE;AAAA,kBAC9B,cAAc;AAAA,gBAAA,GACb,MAAM,GAAG,CAAC,cAAc,CAAC,KAC5B2B,EAAoB,IAAI,EAAI;AAAA,cAAA,CACjC;AAAA,YAAA,CACF;AAAA,UAAA,CACF;AAAA,UACDf,EAAoB,OAAOlB,GAAY;AAAA,YACrCmB,EAAamB,GAAmB;AAAA,cAC9B,SAASjC,EAAM;AAAA,cACf,wBAAwBO,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI,CAAC2B,MAAiBnC,EAAK,qBAAqB;AAAA,YAC7F,GAAA,MAAM,GAAG,CAAC,SAAS,CAAC;AAAA,YACvBe,EAAaqB,GAAsB;AAAA,cACjC,SAASnC,EAAM;AAAA,YACd,GAAA,MAAM,GAAG,CAAC,SAAS,CAAC;AAAA,YACrBA,EAAM,cAEJ4B,EAAoB,IAAI,EAAI,KAD3BpB,KAAcE,EAAa0B,GAAa,EAAE,KAAK,EAAE,CAAC;AAAA,UACvB,CACjC;AAAA,WACA,EAAE;AAAA,MAAA,CACV;AAAA,IAAA;AAAA,EAEH;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"BookingDetailDesktop.vue.mjs","sources":["../../../../src/components/BookingDetail/BookingDetailDesktop.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"psc-flex psc-flex-wrap psc-px-4 psc-pb-4\" }\nconst _hoisted_2 = { class: \"psc-w-full psc-space-y-2 psc-pb-6\" }\nconst _hoisted_3 = { class: \"psc-w-2/3\" }\nconst _hoisted_4 = { class: \"psc-rounded-lg psc-shadow\" }\nconst _hoisted_5 = { class: \"psc-relative psc-space-y-6 psc-px-4 psc-pb-4 lg:psc-px-6\" }\nconst _hoisted_6 = { class: \"psc-my-4 psc-rounded-lg psc-bg-gray-100 psc-p-2 psc-italic\" }\nconst _hoisted_7 = { class: \"psc-w-1/3 psc-space-y-11 psc-pl-11\" }\n\nimport type { Booking } from '@/types';\nimport BookingBasicInfo from '../Shared/BookingBasicInfo.vue';\nimport BookingNote from './BookingNote.vue';\nimport BookingNumber from '../Shared/BookingNumber.vue';\nimport TestList from './TestList.vue';\nimport TotalPayment from './TotalPayment.vue';\nimport DiagSupport from './DiagSupport.vue';\nimport SampleCollectionInfo from './SampleCollectionInfo.vue';\nimport BookingResultStatus from './BookingResultStatus.vue';\nimport BottomCurved from '../Shared/BottomCurved.vue';\nimport { useBookingDetail } from '@/composables/BookingDetail';\nimport SectionTitle from '@/components/Shared/SectionTitle.vue';\nimport { computed } from 'vue';\nimport BookingCtaButtons from './BookingCtaButtons.vue';\nimport PaymentSuccessLabel from './PaymentSuccessLabel.vue';\nimport BookingDetailDesktopSkeleton from './BookingDetailDesktopSkeleton/BookingDetailDesktopSkeleton.vue';\nimport BookingAttachment from './BookingAttachment.vue';\nimport AppointmentBookingList from './AppointmentBookingList.vue';\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n loading: boolean;\n hideSupport?: boolean;\n payOnlineLoading?: boolean;\n payOnlineFailed?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BookingDetailDesktop',\n props: {\n booking: null,\n loading: { type: Boolean },\n hideSupport: { type: Boolean, default: false },\n payOnlineLoading: { type: Boolean, default: false },\n payOnlineFailed: { type: Boolean, default: false }\n },\n emits: ['click:find-location', 'click:pay-online'],\n setup(__props: any, { emit }) {\n\nconst props = __props as { booking: Booking, loading: boolean, hideSupport: boolean, payOnlineLoading: boolean, payOnlineFailed: boolean };\n\n\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst booking = computed(() => props.booking);\nconst { patient, doctor } = useBookingDetail(booking);\n\n/**\n * Methods\n */\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (props.loading)\n ? (_openBlock(), _createBlock(BookingDetailDesktopSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(SectionTitle, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('psc.test_result_booking_booking_details')), 1)\n ]),\n _: 1\n }),\n _createVNode(BookingResultStatus, {\n \"test-result-key\": props.booking.test_result_key,\n \"result-status\": props.booking.result_status,\n \"booking-status\": props.booking.booking_status\n }, null, 8, [\"test-result-key\", \"result-status\", \"booking-status\"])\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(BookingBasicInfo, {\n patient: _unref(patient),\n doctor: _unref(doctor),\n class: \"psc-px-4 psc-py-4 lg:psc-px-6\"\n }, null, 8, [\"patient\", \"doctor\"]),\n _createVNode(BottomCurved, { type: \"lg\" }),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(BookingNumber, {\n \"booking-code\": props.booking.booking_code,\n \"booking-status\": props.booking.booking_status,\n \"payment-status\": \n props.booking.data?.type === 'foc'\n ? undefined\n : props.booking.payment_status\n \n }, null, 8, [\"booking-code\", \"booking-status\", \"payment-status\"]),\n (_unref(booking).services && _unref(booking).services.length)\n ? (_openBlock(), _createBlock(TestList, {\n key: 0,\n services: _unref(booking).services,\n \"booking-type\": props?.booking?.data?.type\n }, null, 8, [\"services\", \"booking-type\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).total_amount)\n ? (_openBlock(), _createBlock(TotalPayment, {\n key: 1,\n \"total-amount\": _unref(booking).total_amount\n }, null, 8, [\"total-amount\"]))\n : _createCommentVNode(\"\", true),\n (_unref(booking).note)\n ? (_openBlock(), _createBlock(BookingNote, {\n key: 2,\n note: _unref(booking).note\n }, null, 8, [\"note\"]))\n : _createCommentVNode(\"\", true),\n (\n _unref(booking).data?.attachment_urls &&\n _unref(booking).data.attachment_urls.length\n )\n ? (_openBlock(), _createBlock(BookingAttachment, {\n key: 3,\n attachments: _unref(booking).data.attachment_urls\n }, null, 8, [\"attachments\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_6, _toDisplayString(_ctx.$t('psc.disclaimer')), 1),\n (_unref(booking).appointment_bookings?.length)\n ? (_openBlock(), _createBlock(AppointmentBookingList, {\n key: 4,\n appointments: _unref(booking).appointment_bookings,\n \"is-desktop\": true\n }, null, 8, [\"appointments\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createVNode(PaymentSuccessLabel, {\n booking: props.booking\n }, null, 8, [\"booking\"]),\n _createVNode(BookingCtaButtons, {\n booking: props.booking,\n \"pay-online-loading\": props.payOnlineLoading,\n \"pay-online-failed\": props.payOnlineFailed,\n \"onClick:findLocation\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:find-location'))),\n \"onClick:payOnline\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:pay-online')))\n }, null, 8, [\"booking\", \"pay-online-loading\", \"pay-online-failed\"]),\n _createVNode(SampleCollectionInfo, {\n booking: props.booking\n }, null, 8, [\"booking\"]),\n (!props.hideSupport)\n ? (_openBlock(), _createBlock(DiagSupport, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ])\n ], 64))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_sfc_main","_defineComponent","__props","emit","props","booking","computed","patient","doctor","useBookingDetail","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","BookingDetailDesktopSkeleton","_Fragment","_createElementVNode","_createVNode","SectionTitle","_withCtx","_createTextVNode","_toDisplayString","BookingResultStatus","BookingBasicInfo","_unref","BottomCurved","BookingNumber","_a","TestList","_c","_b","_createCommentVNode","TotalPayment","BookingNote","BookingAttachment","AppointmentBookingList","PaymentSuccessLabel","BookingCtaButtons","$event","SampleCollectionInfo","DiagSupport"],"mappings":";;;;;;;;;;;;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,8CACtBC,IAAa,EAAE,OAAO,uCACtBC,IAAa,EAAE,OAAO,eACtBC,IAAa,EAAE,OAAO,+BACtBC,IAAa,EAAE,OAAO,8DACtBC,IAAa,EAAE,OAAO,gEACtBC,IAAa,EAAE,OAAO,wCAgCAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,SAAS;AAAA,IACT,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,aAAa,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IAC7C,kBAAkB,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IAClD,iBAAiB,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,EACnD;AAAA,EACA,OAAO,CAAC,uBAAuB,kBAAkB;AAAA,EACjD,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAEhC,UAAMC,IAAQF,GAYRG,IAAUC,EAAS,MAAMF,EAAM,OAAO,GACtC,EAAE,SAAAG,GAAS,QAAAC,EAAO,IAAIC,EAAiBJ,CAAO;AAM7C,WAAA,CAACK,GAAUC,MAAgB;;AAChC,aAAQC,EAAW,GAAGC,EAAoB,OAAOpB,GAAY;AAAA,QAC1DW,EAAM,WACFQ,EAAA,GAAcE,EAAaC,GAA8B,EAAE,KAAK,EAAG,CAAA,MACnEH,EAAc,GAAA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,EAAI;AAAA,cAAA,CACjC;AAAA,YAAA,CACF;AAAA,UAAA,CACF;AAAA,UACDf,EAAoB,OAAOlB,GAAY;AAAA,YACrCmB,EAAamB,GAAqB;AAAA,cAChC,SAASjC,EAAM;AAAA,YACd,GAAA,MAAM,GAAG,CAAC,SAAS,CAAC;AAAA,YACvBc,EAAaoB,GAAmB;AAAA,cAC9B,SAASlC,EAAM;AAAA,cACf,sBAAsBA,EAAM;AAAA,cAC5B,qBAAqBA,EAAM;AAAA,cAC3B,wBAAwBO,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI,CAAC4B,MAAiBpC,EAAK,qBAAqB;AAAA,cAC9F,qBAAqBQ,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI,CAAC4B,MAAiBpC,EAAK,kBAAkB;AAAA,YAAA,GACvF,MAAM,GAAG,CAAC,WAAW,sBAAsB,mBAAmB,CAAC;AAAA,YAClEe,EAAasB,GAAsB;AAAA,cACjC,SAASpC,EAAM;AAAA,YACd,GAAA,MAAM,GAAG,CAAC,SAAS,CAAC;AAAA,YACrBA,EAAM,cAEJ4B,EAAoB,IAAI,EAAI,KAD3BpB,KAAcE,EAAa2B,GAAa,EAAE,KAAK,EAAE,CAAC;AAAA,UACvB,CACjC;AAAA,WACA,EAAE;AAAA,MAAA,CACV;AAAA,IAAA;AAAA,EAEH;AAEA,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),r=require("../../constants/Common.js"),p=require("../../helpers/DateHelper.js"),i={key:0,class:"psc-flex psc-items-center psc-gap-2 psc-rounded-lg psc-bg-green-lighten-1 psc-px-4 psc-py-3 psc-font-semibold psc-text-green-darken-2"},a=e.createElementVNode("i",{class:"dgic-circle-check psc-text-xl"},null,-1),l={key:0,class:"psc-ml-auto psc-text-sm psc-font-normal"},u=e.defineComponent({__name:"PaymentSuccessLabel",props:{booking:null},setup(s){const t=s,c=e.computed(()=>!!t.booking.source_type&&r.SOURCE_TYPES_PAID_ONLINE_BY_PATIENT.includes(t.booking.source_type)&&!!t.booking.transaction),o=e.computed(()=>{var n;return p.formatDateTimeShort((n=t.booking.transaction)==null?void 0:n.transaction_time)});return(n,m)=>e.unref(c)?(e.openBlock(),e.createElementBlock("div",i,[a,e.createElementVNode("span",null,e.toDisplayString(n.$t("psc.test_result_booking_payment_successful")),1),e.unref(o)?(e.openBlock(),e.createElementBlock("span",l,e.toDisplayString(e.unref(o)),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}});module.exports=u;
|
|
2
|
+
//# sourceMappingURL=PaymentSuccessLabel.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentSuccessLabel.vue.js","sources":["../../../../src/components/BookingDetail/PaymentSuccessLabel.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"psc-flex psc-items-center psc-gap-2 psc-rounded-lg psc-bg-green-lighten-1 psc-px-4 psc-py-3 psc-font-semibold psc-text-green-darken-2\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"i\", { class: \"dgic-circle-check psc-text-xl\" }, null, -1)\nconst _hoisted_3 = {\n key: 0,\n class: \"psc-ml-auto psc-text-sm psc-font-normal\"\n}\n\nimport { SOURCE_TYPES_PAID_ONLINE_BY_PATIENT } from '@/constants/Common';\nimport { formatDateTimeShort } from '@/helpers/DateHelper';\nimport type { Booking } from '@/types';\nimport { computed } from 'vue';\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'PaymentSuccessLabel',\n props: {\n booking: null\n },\n setup(__props: any) {\n\nconst props = __props as { booking: Booking };\n\n\n\n/**\n * Data\n */\n// A booking the patient pays online themselves, once it has its transaction\n// (the counterpart of pat--booking--be Booking::isWaitingPayment).\nconst isPaidOnline = computed(\n () =>\n !!props.booking.source_type &&\n SOURCE_TYPES_PAID_ONLINE_BY_PATIENT.includes(props.booking.source_type) &&\n !!props.booking.transaction\n);\nconst paidAt = computed(() =>\n formatDateTimeShort(props.booking.transaction?.transaction_time)\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(isPaidOnline))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _hoisted_2,\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('psc.test_result_booking_payment_successful')), 1),\n (_unref(paidAt))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, _toDisplayString(_unref(paidAt)), 1))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","props","isPaidOnline","computed","SOURCE_TYPES_PAID_ONLINE_BY_PATIENT","paidAt","formatDateTimeShort","_a","_ctx","_cache","_unref","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createCommentVNode"],"mappings":"oHAGMA,EAAa,CACjB,IAAK,EACL,MAAO,uIACT,EACMC,uBAA8C,IAAK,CAAE,MAAO,iCAAmC,KAAM,EAAE,EACvGC,EAAa,CACjB,IAAK,EACL,MAAO,yCACT,EAc4BC,EAAiBC,kBAAA,CAC3C,OAAQ,sBACR,MAAO,CACL,QAAS,IACX,EACA,MAAMC,EAAc,CAEtB,MAAMC,EAAQD,EASRE,EAAeC,EAAA,SACnB,IACE,CAAC,CAACF,EAAM,QAAQ,aAChBG,EAAA,oCAAoC,SAASH,EAAM,QAAQ,WAAW,GACtE,CAAC,CAACA,EAAM,QAAQ,WAAA,EAEdI,EAASF,EAAA,SAAS,IAAA,OACtBG,OAAAA,EAAA,qBAAoBC,EAAAN,EAAM,QAAQ,cAAd,YAAAM,EAA2B,gBAAgB,EAAA,EAG1D,MAAA,CAACC,EAAUC,IACRC,EAAAA,MAAOR,CAAY,GACtBS,EAAAA,UAAc,EAAAC,EAAA,mBAAoB,MAAOjB,EAAY,CACpDC,EACAiB,qBAAoB,OAAQ,KAAMC,EAAA,gBAAiBN,EAAK,GAAG,4CAA4C,CAAC,EAAG,CAAC,EAC3GE,QAAOL,CAAM,GACTM,EAAAA,UAAW,EAAGC,qBAAoB,OAAQf,EAAYiB,EAAAA,gBAAiBJ,EAAAA,MAAOL,CAAM,CAAC,EAAG,CAAC,GAC1FU,EAAA,mBAAoB,GAAI,EAAI,CACjC,CAAA,GACDA,EAAoB,mBAAA,GAAI,EAAI,CAElC,CAEA,CAAC"}
|