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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./src/assets/styles/main.scss.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./src/assets/styles/main.scss.js");const _=require("./src/components/RemindRecommendation/v2/RemindRecommendation.vue.js"),t=require("./src/constants/Common.js"),e=require("./src/constants/Enums.js"),u=require("./src/constants/SurveyKeys.js"),s=require("./src/composables/useSurveyConfig.js"),r=require("./src/locales/vi.json.js"),o=require("./src/locales/en.json.js"),n=require("./plugin.js"),i=require("./src/components/BookingDetail/BookingDetail.vue.js"),p=require("./src/components/BookingDetail/BookingDetailDesktop.vue.js"),l=require("./src/components/Shared/NoItemsFound.vue.js"),a=require("./src/components/TestResult/Shared/CallUsFilledButton.vue.js"),c=require("./src/components/TestResult/Shared/PatientFullInfo.vue.js");require("./src/components/TestResult/Shared/PatientFullInfo.vue2.js");const y=require("./src/components/TestResult/Shared/ResultReport.vue.js"),v=require("./src/components/TestResult/BookAppointmentModal/BookAppointmentModal.vue.js");require("./src/components/TestResult/BookAppointmentModal/BookAppointmentModal.vue2.js");const R=require("./src/components/TestResult/BookAppointmentModal/BookAppointmentModalMessage.vue.js");require("./src/components/TestResult/BookAppointmentModal/BookAppointmentModalMessage.vue2.js");const T=require("./src/components/TestResult/Mobile/BookingTab/BookingList.vue.js"),g=require("./src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.js"),m=require("./src/components/TestResult/Mobile/ResultTab/TestResultList.vue.js"),S=require("./src/components/TestResult/Mobile/MyProfile.vue.js");require("./src/components/TestResult/Mobile/MyProfile.vue2.js");const q=require("./src/components/TestResult/Desktop/CallUsTextButton.vue.js");require("./src/components/TestResult/Desktop/CallUsTextButton.vue2.js");const d=require("./src/components/TestResult/Desktop/ResultReady.vue.js");require("./src/components/TestResult/Desktop/ResultReady.vue2.js");const B=require("./src/components/TestResult/Desktop/TestResultDetailDesktop.vue.js"),k=require("./src/components/RemindRecommendation/RemindRecommendation.vue.js"),E=require("./src/components/WebsiteHeader/WebsiteHeader.vue.js"),D=require("./src/components/Shared/LoadingSkeleton.vue.js"),C=require("./src/components/Shared/CtaButton.vue.js"),L=require("./src/components/TestResult/Shared/RejectedResult.vue.js"),P=require("./src/components/TestResult/BookAppointmentModal/BookAppointment/BookAppointment.vue.js"),A=require("./src/components/TestResult/Mobile/BookingTab/BookingListItem.vue.js"),I=require("./src/components/TestResult/Shared/TakeSurvey.vue.js"),N=require("./src/components/TestResult/Mobile/ResultTab/TestResultListItem.vue.js"),U=require("./src/directives/clickOutside.js");exports.RemindRecommendationV2=_;exports.CookieName=t.CookieName;exports.DayPartDuration=t.DayPartDuration;exports.EventBusName=t.EventBusName;exports.EventType=t.EventType;exports.LsKey=t.LsKey;exports.SOURCE_TYPES_PAID_ONLINE_BY_PATIENT=t.SOURCE_TYPES_PAID_ONLINE_BY_PATIENT;exports.SURVEY_BASE_URL=t.SURVEY_BASE_URL;exports.SURVEY_FORCE_ENABLE=t.SURVEY_FORCE_ENABLE;exports.SupportEmail=t.SupportEmail;exports.SupportPhone=t.SupportPhone;exports.AccountSegment=e.AccountSegment;exports.BookingSourceType=e.BookingSourceType;exports.BookingStatus=e.BookingStatus;exports.BottomCursedType=e.BottomCursedType;exports.DayPartType=e.DayPartType;exports.DocumentType=e.DocumentType;exports.Gender=e.Gender;exports.PaymentStatus=e.PaymentStatus;exports.ResultSegmentNormalType=e.ResultSegmentNormalType;exports.ResultSegmentValueOPR=e.ResultSegmentValueOPR;exports.ResultType=e.ResultType;exports.ServiceType=e.ServiceType;exports.TestMoreType=e.TestMoreType;exports.TestResultConclusion=e.TestResultConclusion;exports.TestResultStatus=e.TestResultStatus;exports.TestResultTemplate=e.TestResultTemplate;exports.TestStatus=e.TestStatus;exports.DEFAULT_SURVEY_LIST=u.DEFAULT_SURVEY_LIST;exports.SurveyKey=u.SurveyKey;exports.fetchSurveyConfig=s.fetchSurveyConfig;exports.useSurveyConfig=s.useSurveyConfig;exports.vi=r.default;exports.en=o.default;exports.default=n;exports.BookingDetail=i;exports.BookingDetailDesktop=p;exports.NoItemsFound=l;exports.CallUsFilledButton=a;exports.PatientFullInfo=c;exports.ResultReport=y;exports.BookAppointmentModal=v;exports.BookAppointmentModalMessage=R;exports.BookingList=T;exports.TestResultDetail=g;exports.TestResultList=m;exports.MyProfile=S;exports.CallUsTextButton=q;exports.ResultReady=d;exports.TestResultDetailDesktop=B;exports.RemindRecommendation=k;exports.WebsiteHeader=E;exports.LoadingSkeleton=D;exports.CtaButton=C;exports.RejectedResult=L;exports.BookAppointment=P;exports.BookingListItem=A;exports.TakeSurvey=I;exports.TestResultListItem=N;exports.clickOutside=U.clickOutside;
|
|
2
2
|
//# sourceMappingURL=pat-shared-components.js.map
|
|
@@ -1,101 +1,103 @@
|
|
|
1
1
|
import "./src/assets/styles/main.scss.mjs";
|
|
2
2
|
import { default as m } from "./src/components/RemindRecommendation/v2/RemindRecommendation.vue.mjs";
|
|
3
|
-
import { CookieName as d, DayPartDuration as i, EventBusName as n, EventType as x, LsKey as R,
|
|
4
|
-
import { AccountSegment as g,
|
|
5
|
-
import { DEFAULT_SURVEY_LIST as
|
|
6
|
-
import { fetchSurveyConfig as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
3
|
+
import { CookieName as d, DayPartDuration as i, EventBusName as n, EventType as x, LsKey as R, SOURCE_TYPES_PAID_ONLINE_BY_PATIENT as T, SURVEY_BASE_URL as S, SURVEY_FORCE_ENABLE as y, SupportEmail as B, SupportPhone as k } from "./src/constants/Common.mjs";
|
|
4
|
+
import { AccountSegment as g, BookingSourceType as c, BookingStatus as D, BottomCursedType as L, DayPartType as _, DocumentType as C, Gender as P, PaymentStatus as A, ResultSegmentNormalType as v, ResultSegmentValueOPR as I, ResultType as N, ServiceType as U, TestMoreType as F, TestResultConclusion as M, TestResultStatus as O, TestResultTemplate as V, TestStatus as Y } from "./src/constants/Enums.mjs";
|
|
5
|
+
import { DEFAULT_SURVEY_LIST as K, SurveyKey as b } from "./src/constants/SurveyKeys.mjs";
|
|
6
|
+
import { fetchSurveyConfig as G, useSurveyConfig as H } from "./src/composables/useSurveyConfig.mjs";
|
|
7
|
+
import { default as q } from "./src/locales/vi.json.mjs";
|
|
8
|
+
import { default as z } from "./src/locales/en.json.mjs";
|
|
9
|
+
import { default as Q } from "./plugin.mjs";
|
|
10
|
+
import { default as Z } from "./src/components/BookingDetail/BookingDetail.vue.mjs";
|
|
11
|
+
import { default as ee } from "./src/components/BookingDetail/BookingDetailDesktop.vue.mjs";
|
|
12
|
+
import { default as oe } from "./src/components/Shared/NoItemsFound.vue.mjs";
|
|
13
|
+
import { default as ae } from "./src/components/TestResult/Shared/CallUsFilledButton.vue.mjs";
|
|
14
|
+
import { default as fe } from "./src/components/TestResult/Shared/PatientFullInfo.vue.mjs";
|
|
15
15
|
import "./src/components/TestResult/Shared/PatientFullInfo.vue2.mjs";
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
16
|
+
import { default as le } from "./src/components/TestResult/Shared/ResultReport.vue.mjs";
|
|
17
|
+
import { default as pe } from "./src/components/TestResult/BookAppointmentModal/BookAppointmentModal.vue.mjs";
|
|
18
18
|
import "./src/components/TestResult/BookAppointmentModal/BookAppointmentModal.vue2.mjs";
|
|
19
|
-
import { default as
|
|
19
|
+
import { default as ie } from "./src/components/TestResult/BookAppointmentModal/BookAppointmentModalMessage.vue.mjs";
|
|
20
20
|
import "./src/components/TestResult/BookAppointmentModal/BookAppointmentModalMessage.vue2.mjs";
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
21
|
+
import { default as xe } from "./src/components/TestResult/Mobile/BookingTab/BookingList.vue.mjs";
|
|
22
|
+
import { default as Te } from "./src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.mjs";
|
|
23
|
+
import { default as ye } from "./src/components/TestResult/Mobile/ResultTab/TestResultList.vue.mjs";
|
|
24
|
+
import { default as ke } from "./src/components/TestResult/Mobile/MyProfile.vue.mjs";
|
|
25
25
|
import "./src/components/TestResult/Mobile/MyProfile.vue2.mjs";
|
|
26
|
-
import { default as
|
|
26
|
+
import { default as ge } from "./src/components/TestResult/Desktop/CallUsTextButton.vue.mjs";
|
|
27
27
|
import "./src/components/TestResult/Desktop/CallUsTextButton.vue2.mjs";
|
|
28
|
-
import { default as
|
|
28
|
+
import { default as De } from "./src/components/TestResult/Desktop/ResultReady.vue.mjs";
|
|
29
29
|
import "./src/components/TestResult/Desktop/ResultReady.vue2.mjs";
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
30
|
+
import { default as _e } from "./src/components/TestResult/Desktop/TestResultDetailDesktop.vue.mjs";
|
|
31
|
+
import { default as Pe } from "./src/components/RemindRecommendation/RemindRecommendation.vue.mjs";
|
|
32
|
+
import { default as ve } from "./src/components/WebsiteHeader/WebsiteHeader.vue.mjs";
|
|
33
|
+
import { default as Ne } from "./src/components/Shared/LoadingSkeleton.vue.mjs";
|
|
34
34
|
import { default as Fe } from "./src/components/Shared/CtaButton.vue.mjs";
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { clickOutside as
|
|
35
|
+
import { default as Oe } from "./src/components/TestResult/Shared/RejectedResult.vue.mjs";
|
|
36
|
+
import { default as Ye } from "./src/components/TestResult/BookAppointmentModal/BookAppointment/BookAppointment.vue.mjs";
|
|
37
|
+
import { default as Ke } from "./src/components/TestResult/Mobile/BookingTab/BookingListItem.vue.mjs";
|
|
38
|
+
import { default as je } from "./src/components/TestResult/Shared/TakeSurvey.vue.mjs";
|
|
39
|
+
import { default as He } from "./src/components/TestResult/Mobile/ResultTab/TestResultListItem.vue.mjs";
|
|
40
|
+
import { clickOutside as qe } from "./src/directives/clickOutside.mjs";
|
|
41
41
|
export {
|
|
42
42
|
g as AccountSegment,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
c as
|
|
51
|
-
D as
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
Ye as BookAppointment,
|
|
44
|
+
pe as BookAppointmentModal,
|
|
45
|
+
ie as BookAppointmentModalMessage,
|
|
46
|
+
Z as BookingDetail,
|
|
47
|
+
ee as BookingDetailDesktop,
|
|
48
|
+
xe as BookingList,
|
|
49
|
+
Ke as BookingListItem,
|
|
50
|
+
c as BookingSourceType,
|
|
51
|
+
D as BookingStatus,
|
|
52
|
+
L as BottomCursedType,
|
|
53
|
+
ae as CallUsFilledButton,
|
|
54
|
+
ge as CallUsTextButton,
|
|
54
55
|
d as CookieName,
|
|
55
56
|
Fe as CtaButton,
|
|
56
|
-
|
|
57
|
+
K as DEFAULT_SURVEY_LIST,
|
|
57
58
|
i as DayPartDuration,
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
_ as DayPartType,
|
|
60
|
+
C as DocumentType,
|
|
60
61
|
n as EventBusName,
|
|
61
62
|
x as EventType,
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
P as Gender,
|
|
64
|
+
Ne as LoadingSkeleton,
|
|
64
65
|
R as LsKey,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
ke as MyProfile,
|
|
67
|
+
oe as NoItemsFound,
|
|
68
|
+
fe as PatientFullInfo,
|
|
69
|
+
A as PaymentStatus,
|
|
70
|
+
Oe as RejectedResult,
|
|
71
|
+
Pe as RemindRecommendation,
|
|
71
72
|
m as RemindRecommendationV2,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
T as
|
|
78
|
-
S as
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
B as
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
De as ResultReady,
|
|
74
|
+
le as ResultReport,
|
|
75
|
+
v as ResultSegmentNormalType,
|
|
76
|
+
I as ResultSegmentValueOPR,
|
|
77
|
+
N as ResultType,
|
|
78
|
+
T as SOURCE_TYPES_PAID_ONLINE_BY_PATIENT,
|
|
79
|
+
S as SURVEY_BASE_URL,
|
|
80
|
+
y as SURVEY_FORCE_ENABLE,
|
|
81
|
+
U as ServiceType,
|
|
82
|
+
B as SupportEmail,
|
|
83
|
+
k as SupportPhone,
|
|
84
|
+
b as SurveyKey,
|
|
85
|
+
je as TakeSurvey,
|
|
84
86
|
F as TestMoreType,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
87
|
+
M as TestResultConclusion,
|
|
88
|
+
Te as TestResultDetail,
|
|
89
|
+
_e as TestResultDetailDesktop,
|
|
90
|
+
ye as TestResultList,
|
|
91
|
+
He as TestResultListItem,
|
|
92
|
+
O as TestResultStatus,
|
|
93
|
+
V as TestResultTemplate,
|
|
94
|
+
Y as TestStatus,
|
|
95
|
+
ve as WebsiteHeader,
|
|
96
|
+
qe as clickOutside,
|
|
97
|
+
Q as default,
|
|
98
|
+
z as en,
|
|
99
|
+
G as fetchSurveyConfig,
|
|
100
|
+
H as useSurveyConfig,
|
|
101
|
+
q as vi
|
|
100
102
|
};
|
|
101
103
|
//# sourceMappingURL=pat-shared-components.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),
|
|
1
|
+
"use strict";const t=require("vue"),p=require("../../constants/Enums.js"),b=require("vue-i18n"),r=require("./CtaButton.vue.js"),d={key:0,class:"psc-space-y-4"},k={key:0,class:"psc-space-y-2"},g={key:0,class:"psc-text-sm psc-text-red-darken-1"},f=t.defineComponent({__name:"BookingCtaButtons",props:{booking:null,payOnlineLoading:{type:Boolean,default:!1},payOnlineFailed:{type:Boolean,default:!1}},emits:["click:find-location","click:pay-online"],setup(_,{emit:c}){const e=_,{t:n}=b.useI18n(),l=t.computed(()=>{var o,u,a;let s={visible:!1};return e.booking.booking_status===p.BookingStatus.Created&&((u=(o=e.booking.data)==null?void 0:o.supportingInformation)!=null&&u.appointmentSampleCollectionPlace?s={visible:!1}:s=(a=e.booking.data)!=null&&a.is_hbc?{icon:"dgic-support-thick",subtitile:n("psc.test_result_booking_diag_contact_you_and_check"),visible:!0}:{icon:"dgic-pin-map-thick",subtitile:n("psc.test_result_find_nearest_diag_branch"),visible:!0,buttonText:n("psc.test_result_booking_find_location_center")}),s}),i=t.computed(()=>({icon:"dgic-credit-card-fill",title:n("psc.test_result_booking_pay_online_title"),subtitile:n("psc.test_result_booking_pay_online_subtitle"),visible:!!e.booking.is_waiting_payment,buttonText:e.payOnlineLoading?n("psc.test_result_booking_pay_online_creating"):n("psc.test_result_booking_pay_online_button"),buttonDisabled:e.payOnlineLoading}));return(s,o)=>t.unref(i).visible||t.unref(l).visible?(t.openBlock(),t.createElementBlock("div",d,[t.unref(i).visible?(t.openBlock(),t.createElementBlock("div",k,[t.createVNode(r,{title:t.unref(i).title||"",subtitle:t.unref(i).subtitile,icon:t.unref(i).icon||"","button-text":t.unref(i).buttonText,"button-disabled":t.unref(i).buttonDisabled,"onClick:button":o[0]||(o[0]=u=>c("click:pay-online"))},null,8,["title","subtitle","icon","button-text","button-disabled"]),e.payOnlineFailed&&!e.payOnlineLoading?(t.openBlock(),t.createElementBlock("div",g,t.toDisplayString(s.$t("psc.test_result_booking_pay_online_failed")),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.unref(l).visible?(t.openBlock(),t.createBlock(r,{key:1,title:s.$t("psc.test_result_booking_next_step"),subtitle:t.unref(l).subtitile,icon:t.unref(l).icon||"","button-text":t.unref(l).buttonText,"onClick:button":o[1]||(o[1]=u=>c("click:find-location"))},null,8,["title","subtitle","icon","button-text"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)}});module.exports=f;
|
|
2
2
|
//# sourceMappingURL=BookingCtaButtons.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingCtaButtons.vue.js","sources":["../../../../src/components/BookingDetail/BookingCtaButtons.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock,
|
|
1
|
+
{"version":3,"file":"BookingCtaButtons.vue.js","sources":["../../../../src/components/BookingDetail/BookingCtaButtons.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"psc-space-y-4\"\n}\nconst _hoisted_2 = {\n key: 0,\n class: \"psc-space-y-2\"\n}\nconst _hoisted_3 = {\n key: 0,\n class: \"psc-text-sm psc-text-red-darken-1\"\n}\n\nimport { BookingStatus } from '@/constants/Enums';\nimport type { Booking } from '@/types';\nimport { computed } from 'vue';\nimport { useI18n } from 'vue-i18n';\nimport CtaButton from './CtaButton.vue';\n\nexport interface CtaButtonType {\n icon?: string;\n title?: string;\n subtitile?: string;\n visible: boolean;\n buttonText?: string;\n buttonDisabled?: boolean;\n}\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n // The host is creating the payment url (after click:pay-online).\n payOnlineLoading?: boolean;\n // The host failed to create the payment url.\n payOnlineFailed?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BookingCtaButtons',\n props: {\n booking: null,\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, payOnlineLoading: boolean, payOnlineFailed: boolean };\n\n\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst { t } = useI18n();\nconst nextStepButton = computed<CtaButtonType>(() => {\n let result: CtaButtonType = {\n visible: false,\n };\n\n if (props.booking.booking_status === BookingStatus.Created) {\n if (\n props.booking.data?.supportingInformation\n ?.appointmentSampleCollectionPlace\n ) {\n result = {\n visible: false,\n };\n } else {\n result = props.booking.data?.is_hbc\n ? {\n icon: 'dgic-support-thick',\n subtitile: t('psc.test_result_booking_diag_contact_you_and_check'),\n visible: true,\n }\n : {\n icon: 'dgic-pin-map-thick',\n subtitile: t('psc.test_result_find_nearest_diag_branch'),\n visible: true,\n buttonText: t('psc.test_result_booking_find_location_center'),\n };\n }\n }\n\n return result;\n});\nconst payOnlineButton = computed<CtaButtonType>(() => ({\n icon: 'dgic-credit-card-fill',\n title: t('psc.test_result_booking_pay_online_title'),\n subtitile: t('psc.test_result_booking_pay_online_subtitle'),\n visible: !!props.booking.is_waiting_payment,\n buttonText: props.payOnlineLoading\n ? t('psc.test_result_booking_pay_online_creating')\n : t('psc.test_result_booking_pay_online_button'),\n buttonDisabled: props.payOnlineLoading,\n}));\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(payOnlineButton).visible || _unref(nextStepButton).visible)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(payOnlineButton).visible)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createVNode(CtaButton, {\n title: _unref(payOnlineButton).title || '',\n subtitle: _unref(payOnlineButton).subtitile,\n icon: _unref(payOnlineButton).icon || '',\n \"button-text\": _unref(payOnlineButton).buttonText,\n \"button-disabled\": _unref(payOnlineButton).buttonDisabled,\n \"onClick:button\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:pay-online')))\n }, null, 8, [\"title\", \"subtitle\", \"icon\", \"button-text\", \"button-disabled\"]),\n (props.payOnlineFailed && !props.payOnlineLoading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, _toDisplayString(_ctx.$t('psc.test_result_booking_pay_online_failed')), 1))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true),\n (_unref(nextStepButton).visible)\n ? (_openBlock(), _createBlock(CtaButton, {\n key: 1,\n title: _ctx.$t('psc.test_result_booking_next_step'),\n subtitle: _unref(nextStepButton).subtitile,\n icon: _unref(nextStepButton).icon || '',\n \"button-text\": _unref(nextStepButton).buttonText,\n \"onClick:button\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:find-location')))\n }, null, 8, [\"title\", \"subtitle\", \"icon\", \"button-text\"]))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","emit","props","t","useI18n","nextStepButton","computed","result","BookingStatus","_b","_a","_c","payOnlineButton","_ctx","_cache","_unref","_openBlock","_createElementBlock","_createVNode","CtaButton","$event","_toDisplayString","_createCommentVNode","_createBlock"],"mappings":"gIAGMA,EAAa,CACjB,IAAK,EACL,MAAO,eACT,EACMC,EAAa,CACjB,IAAK,EACL,MAAO,eACT,EACMC,EAAa,CACjB,IAAK,EACL,MAAO,mCACT,EA4B4BC,EAAiBC,kBAAA,CAC3C,OAAQ,oBACR,MAAO,CACL,QAAS,KACT,iBAAkB,CAAE,KAAM,QAAS,QAAS,EAAM,EAClD,gBAAiB,CAAE,KAAM,QAAS,QAAS,EAAM,CACnD,EACA,MAAO,CAAC,sBAAuB,kBAAkB,EACjD,MAAMC,EAAc,CAAE,KAAAC,GAAQ,CAEhC,MAAMC,EAAQF,EAYR,CAAE,EAAAG,GAAMC,EAAAA,UACRC,EAAiBC,EAAAA,SAAwB,IAAM,WACnD,IAAIC,EAAwB,CAC1B,QAAS,EAAA,EAGX,OAAIL,EAAM,QAAQ,iBAAmBM,EAAAA,cAAc,WAE/CC,GAAAC,EAAAR,EAAM,QAAQ,OAAd,YAAAQ,EAAoB,wBAApB,MAAAD,EACI,iCAEKF,EAAA,CACP,QAAS,EAAA,EAGFA,GAAAI,EAAAT,EAAM,QAAQ,OAAd,MAAAS,EAAoB,OACzB,CACE,KAAM,qBACN,UAAWR,EAAE,oDAAoD,EACjE,QAAS,EAAA,EAEX,CACE,KAAM,qBACN,UAAWA,EAAE,0CAA0C,EACvD,QAAS,GACT,WAAYA,EAAE,8CAA8C,CAAA,GAK/DI,CAAA,CACR,EACKK,EAAkBN,EAAAA,SAAwB,KAAO,CACrD,KAAM,wBACN,MAAOH,EAAE,0CAA0C,EACnD,UAAWA,EAAE,6CAA6C,EAC1D,QAAS,CAAC,CAACD,EAAM,QAAQ,mBACzB,WAAYA,EA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AA,KAAM,EAAG,CAAC,QAAS,WAAY,OAAQ,aAAa,CAAC,GACxDqB,qBAAoB,GAAI,EAAI,CACjC,CAAA,GACDA,EAAoB,mBAAA,GAAI,EAAI,CAElC,CAEA,CAAC"}
|
|
@@ -1,48 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { BookingStatus as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as g, computed as r, unref as t, openBlock as c, createElementBlock as _, createVNode as y, toDisplayString as f, createCommentVNode as u, createBlock as m } from "vue";
|
|
2
|
+
import { BookingStatus as v } from "../../constants/Enums.mjs";
|
|
3
|
+
import { useI18n as x } from "vue-i18n";
|
|
4
|
+
import d from "./CtaButton.vue.mjs";
|
|
5
|
+
const B = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "psc-space-y-4"
|
|
8
|
-
},
|
|
8
|
+
}, C = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "psc-space-y-2"
|
|
11
|
+
}, O = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "psc-text-sm psc-text-red-darken-1"
|
|
14
|
+
}, T = /* @__PURE__ */ g({
|
|
9
15
|
__name: "BookingCtaButtons",
|
|
10
16
|
props: {
|
|
11
|
-
booking: null
|
|
17
|
+
booking: null,
|
|
18
|
+
payOnlineLoading: { type: Boolean, default: !1 },
|
|
19
|
+
payOnlineFailed: { type: Boolean, default: !1 }
|
|
12
20
|
},
|
|
13
|
-
emits: ["click:find-location"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
var o,
|
|
17
|
-
let
|
|
21
|
+
emits: ["click:find-location", "click:pay-online"],
|
|
22
|
+
setup(k, { emit: p }) {
|
|
23
|
+
const e = k, { t: i } = x(), l = r(() => {
|
|
24
|
+
var o, a, b;
|
|
25
|
+
let s = {
|
|
18
26
|
visible: !1
|
|
19
27
|
};
|
|
20
|
-
return
|
|
28
|
+
return e.booking.booking_status === v.Created && ((a = (o = e.booking.data) == null ? void 0 : o.supportingInformation) != null && a.appointmentSampleCollectionPlace ? s = {
|
|
21
29
|
visible: !1
|
|
22
|
-
} :
|
|
30
|
+
} : s = (b = e.booking.data) != null && b.is_hbc ? {
|
|
23
31
|
icon: "dgic-support-thick",
|
|
24
|
-
subtitile:
|
|
32
|
+
subtitile: i("psc.test_result_booking_diag_contact_you_and_check"),
|
|
25
33
|
visible: !0
|
|
26
34
|
} : {
|
|
27
35
|
icon: "dgic-pin-map-thick",
|
|
28
|
-
subtitile:
|
|
36
|
+
subtitile: i("psc.test_result_find_nearest_diag_branch"),
|
|
29
37
|
visible: !0,
|
|
30
|
-
buttonText:
|
|
31
|
-
}),
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
i(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
buttonText: i("psc.test_result_booking_find_location_center")
|
|
39
|
+
}), s;
|
|
40
|
+
}), n = r(() => ({
|
|
41
|
+
icon: "dgic-credit-card-fill",
|
|
42
|
+
title: i("psc.test_result_booking_pay_online_title"),
|
|
43
|
+
subtitile: i("psc.test_result_booking_pay_online_subtitle"),
|
|
44
|
+
visible: !!e.booking.is_waiting_payment,
|
|
45
|
+
buttonText: e.payOnlineLoading ? i("psc.test_result_booking_pay_online_creating") : i("psc.test_result_booking_pay_online_button"),
|
|
46
|
+
buttonDisabled: e.payOnlineLoading
|
|
47
|
+
}));
|
|
48
|
+
return (s, o) => t(n).visible || t(l).visible ? (c(), _("div", B, [
|
|
49
|
+
t(n).visible ? (c(), _("div", C, [
|
|
50
|
+
y(d, {
|
|
51
|
+
title: t(n).title || "",
|
|
52
|
+
subtitle: t(n).subtitile,
|
|
53
|
+
icon: t(n).icon || "",
|
|
54
|
+
"button-text": t(n).buttonText,
|
|
55
|
+
"button-disabled": t(n).buttonDisabled,
|
|
56
|
+
"onClick:button": o[0] || (o[0] = (a) => p("click:pay-online"))
|
|
57
|
+
}, null, 8, ["title", "subtitle", "icon", "button-text", "button-disabled"]),
|
|
58
|
+
e.payOnlineFailed && !e.payOnlineLoading ? (c(), _("div", O, f(s.$t("psc.test_result_booking_pay_online_failed")), 1)) : u("", !0)
|
|
59
|
+
])) : u("", !0),
|
|
60
|
+
t(l).visible ? (c(), m(d, {
|
|
61
|
+
key: 1,
|
|
62
|
+
title: s.$t("psc.test_result_booking_next_step"),
|
|
63
|
+
subtitle: t(l).subtitile,
|
|
64
|
+
icon: t(l).icon || "",
|
|
65
|
+
"button-text": t(l).buttonText,
|
|
66
|
+
"onClick:button": o[1] || (o[1] = (a) => p("click:find-location"))
|
|
41
67
|
}, null, 8, ["title", "subtitle", "icon", "button-text"])) : u("", !0)
|
|
42
68
|
])) : u("", !0);
|
|
43
69
|
}
|
|
44
70
|
});
|
|
45
71
|
export {
|
|
46
|
-
|
|
72
|
+
T as default
|
|
47
73
|
};
|
|
48
74
|
//# sourceMappingURL=BookingCtaButtons.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingCtaButtons.vue.mjs","sources":["../../../../src/components/BookingDetail/BookingCtaButtons.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock,
|
|
1
|
+
{"version":3,"file":"BookingCtaButtons.vue.mjs","sources":["../../../../src/components/BookingDetail/BookingCtaButtons.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"psc-space-y-4\"\n}\nconst _hoisted_2 = {\n key: 0,\n class: \"psc-space-y-2\"\n}\nconst _hoisted_3 = {\n key: 0,\n class: \"psc-text-sm psc-text-red-darken-1\"\n}\n\nimport { BookingStatus } from '@/constants/Enums';\nimport type { Booking } from '@/types';\nimport { computed } from 'vue';\nimport { useI18n } from 'vue-i18n';\nimport CtaButton from './CtaButton.vue';\n\nexport interface CtaButtonType {\n icon?: string;\n title?: string;\n subtitile?: string;\n visible: boolean;\n buttonText?: string;\n buttonDisabled?: boolean;\n}\n\n/**\n * Props\n */\nexport interface Props {\n booking: Booking;\n // The host is creating the payment url (after click:pay-online).\n payOnlineLoading?: boolean;\n // The host failed to create the payment url.\n payOnlineFailed?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BookingCtaButtons',\n props: {\n booking: null,\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, payOnlineLoading: boolean, payOnlineFailed: boolean };\n\n\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst { t } = useI18n();\nconst nextStepButton = computed<CtaButtonType>(() => {\n let result: CtaButtonType = {\n visible: false,\n };\n\n if (props.booking.booking_status === BookingStatus.Created) {\n if (\n props.booking.data?.supportingInformation\n ?.appointmentSampleCollectionPlace\n ) {\n result = {\n visible: false,\n };\n } else {\n result = props.booking.data?.is_hbc\n ? {\n icon: 'dgic-support-thick',\n subtitile: t('psc.test_result_booking_diag_contact_you_and_check'),\n visible: true,\n }\n : {\n icon: 'dgic-pin-map-thick',\n subtitile: t('psc.test_result_find_nearest_diag_branch'),\n visible: true,\n buttonText: t('psc.test_result_booking_find_location_center'),\n };\n }\n }\n\n return result;\n});\nconst payOnlineButton = computed<CtaButtonType>(() => ({\n icon: 'dgic-credit-card-fill',\n title: t('psc.test_result_booking_pay_online_title'),\n subtitile: t('psc.test_result_booking_pay_online_subtitle'),\n visible: !!props.booking.is_waiting_payment,\n buttonText: props.payOnlineLoading\n ? t('psc.test_result_booking_pay_online_creating')\n : t('psc.test_result_booking_pay_online_button'),\n buttonDisabled: props.payOnlineLoading,\n}));\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(payOnlineButton).visible || _unref(nextStepButton).visible)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(payOnlineButton).visible)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createVNode(CtaButton, {\n title: _unref(payOnlineButton).title || '',\n subtitle: _unref(payOnlineButton).subtitile,\n icon: _unref(payOnlineButton).icon || '',\n \"button-text\": _unref(payOnlineButton).buttonText,\n \"button-disabled\": _unref(payOnlineButton).buttonDisabled,\n \"onClick:button\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:pay-online')))\n }, null, 8, [\"title\", \"subtitle\", \"icon\", \"button-text\", \"button-disabled\"]),\n (props.payOnlineFailed && !props.payOnlineLoading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, _toDisplayString(_ctx.$t('psc.test_result_booking_pay_online_failed')), 1))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true),\n (_unref(nextStepButton).visible)\n ? (_openBlock(), _createBlock(CtaButton, {\n key: 1,\n title: _ctx.$t('psc.test_result_booking_next_step'),\n subtitle: _unref(nextStepButton).subtitile,\n icon: _unref(nextStepButton).icon || '',\n \"button-text\": _unref(nextStepButton).buttonText,\n \"onClick:button\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:find-location')))\n }, null, 8, [\"title\", \"subtitle\", \"icon\", \"button-text\"]))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","emit","props","t","useI18n","nextStepButton","computed","result","BookingStatus","_b","_a","_c","payOnlineButton","_ctx","_cache","_unref","_openBlock","_createElementBlock","_createVNode","CtaButton","$event","_toDisplayString","_createCommentVNode","_createBlock"],"mappings":";;;;AAGA,MAAMA,IAAa;AAAA,EACjB,KAAK;AAAA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,IAAI,EAAI;AAAA,IACjC,CAAA,KACDA,EAAoB,IAAI,EAAI;AAAA,EAElC;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),m=require("../Shared/BookingBasicInfo.vue.js"),
|
|
1
|
+
"use strict";const e=require("vue"),m=require("../Shared/BookingBasicInfo.vue.js"),b=require("./BookingNote.vue.js"),v=require("../Shared/BookingNumber.vue.js"),B=require("./TestList.vue.js"),f=require("./TotalPayment.vue.js"),N=require("./DiagSupport.vue.js"),_=require("./SampleCollectionInfo.vue.js"),V=require("../Shared/PatientName.vue.js"),q=require("./BookingResultStatus.vue.js"),h=require("../Shared/BottomCurved.vue.js"),C=require("../../composables/BookingDetail.js"),S=require("../Shared/SectionTitle.vue.js"),E=require("../../constants/Enums.js"),x=require("./BookingCtaButtons.vue.js"),D=require("./PaymentSuccessLabel.vue.js"),L=require("../Shared/BookingDetailSkeleton.vue.js"),O=require("./BookingAttachment.vue.js"),T=require("./AppointmentBookingList.vue.js"),$={class:"psc-space-y-11 psc-px-4 psc-pb-4"},F={class:"psc-space-y-6"},P={class:"psc-space-y-1"},w={class:"psc-space-y-4"},A={class:"psc-rounded-lg psc-shadow"},I={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"},j=e.defineComponent({__name:"BookingDetail",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(k,{emit:s}){const t=k,o=e.computed(()=>t.booking),i=e.computed(()=>t.booking.booking_status===E.BookingStatus.Created),{patient:g,doctor:d}=C.useBookingDetail(o);return(a,n)=>{var c,r,u,l,p;return e.openBlock(),e.createElementBlock("div",$,[t.loading?(e.openBlock(),e.createBlock(L,{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",F,[e.createElementVNode("div",P,[e.createVNode(V,{"first-name":t.booking.first_name},null,8,["first-name"]),e.createVNode(q,{"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.createVNode(D,{booking:t.booking},null,8,["booking"]),e.createVNode(x,{booking:t.booking,"pay-online-loading":t.payOnlineLoading,"pay-online-failed":t.payOnlineFailed,"onClick:findLocation":n[0]||(n[0]=y=>s("click:find-location")),"onClick:payOnline":n[1]||(n[1]=y=>s("click:pay-online"))},null,8,["booking","pay-online-loading","pay-online-failed"])]),e.unref(i)?(e.openBlock(),e.createBlock(_,{key:0,booking:t.booking},null,8,["booking"])):e.createCommentVNode("",!0),e.createElementVNode("div",w,[e.createVNode(S,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("psc.test_result_booking_booking_details")),1)]),_:1}),e.createElementVNode("div",A,[e.createVNode(m,{patient:e.unref(g),doctor:e.unref(d),class:"psc-px-4 psc-py-4 lg:psc-px-6"},null,8,["patient","doctor"]),e.createVNode(h),e.createElementVNode("div",I,[e.createVNode(v,{"booking-code":t.booking.booking_code,"booking-status":t.booking.booking_status,"payment-status":((c=t.booking.data)==null?void 0:c.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(B,{key:0,services:e.unref(o).services,"booking-type":((u=(r=t.booking)==null?void 0:r.data)==null?void 0:u.type)||""},null,8,["services","booking-type"])):e.createCommentVNode("",!0),e.unref(o).total_amount?(e.openBlock(),e.createBlock(f,{key:1,"total-amount":e.unref(o).total_amount},null,8,["total-amount"])):e.createCommentVNode("",!0),e.unref(o).note?(e.openBlock(),e.createBlock(b,{key:2,note:e.unref(o).note},null,8,["note"])):e.createCommentVNode("",!0),(l=e.unref(o).data)!=null&&l.attachment_urls&&e.unref(o).data.attachment_urls.length?(e.openBlock(),e.createBlock(O,{key:3,attachments:e.unref(o).data.attachment_urls},null,8,["attachments"])):e.createCommentVNode("",!0),e.createElementVNode("div",R,e.toDisplayString(a.$t("psc.disclaimer")),1),(p=e.unref(o).appointment_bookings)!=null&&p.length?(e.openBlock(),e.createBlock(T,{key:4,appointments:e.unref(o).appointment_bookings,"is-desktop":!1},null,8,["appointments"])):e.createCommentVNode("",!0)])])]),e.unref(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:1,booking:t.booking},null,8,["booking"])),t.hideSupport?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N,{key:2}))],64))])}}});module.exports=j;
|
|
2
2
|
//# sourceMappingURL=BookingDetail.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingDetail.vue.js","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":"iuBAGMA,EAAa,CAAE,MAAO,oCACtBC,EAAa,CAAE,MAAO,iBACtBC,EAAa,CAAE,MAAO,iBACtBC,EAAa,CAAE,MAAO,iBACtBC,EAAa,CAAE,MAAO,6BACtBC,EAAa,CAAE,MAAO,4DACtBC,EAAa,CAAE,MAAO,8DA+BAC,EAAiBC,kBAAA,CAC3C,OAAQ,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A2B,EAAa,CAAE,IAAK,CAAE,CAAC,IAEtD,EAAE,EAAA,CACV,CAAA,CAEH,CAEA,CAAC"}
|
|
1
|
+
{"version":3,"file":"BookingDetail.vue.js","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":"2wBAGMA,EAAa,CAAE,MAAO,oCACtBC,EAAa,CAAE,MAAO,iBACtBC,EAAa,CAAE,MAAO,iBACtBC,EAAa,CAAE,MAAO,iBACtBC,EAAa,CAAE,MAAO,6BACtBC,EAAa,CAAE,MAAO,4DACtBC,EAAa,CAAE,MAAO,8DAkCAC,EAAiBC,kBAAA,CAC3C,O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