pat-shared-components 1.3.4 → 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.
Files changed (53) hide show
  1. package/dist/pat-shared-components.js +1 -1
  2. package/dist/pat-shared-components.mjs +82 -80
  3. package/dist/src/components/BookingDetail/BookingCtaButtons.vue.js +1 -1
  4. package/dist/src/components/BookingDetail/BookingCtaButtons.vue.js.map +1 -1
  5. package/dist/src/components/BookingDetail/BookingCtaButtons.vue.mjs +54 -28
  6. package/dist/src/components/BookingDetail/BookingCtaButtons.vue.mjs.map +1 -1
  7. package/dist/src/components/BookingDetail/BookingDetail.vue.js +1 -1
  8. package/dist/src/components/BookingDetail/BookingDetail.vue.js.map +1 -1
  9. package/dist/src/components/BookingDetail/BookingDetail.vue.mjs +68 -59
  10. package/dist/src/components/BookingDetail/BookingDetail.vue.mjs.map +1 -1
  11. package/dist/src/components/BookingDetail/BookingDetailDesktop.vue.js +1 -1
  12. package/dist/src/components/BookingDetail/BookingDetailDesktop.vue.js.map +1 -1
  13. package/dist/src/components/BookingDetail/BookingDetailDesktop.vue.mjs +71 -62
  14. package/dist/src/components/BookingDetail/BookingDetailDesktop.vue.mjs.map +1 -1
  15. package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue.js +2 -0
  16. package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue.js.map +1 -0
  17. package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue.mjs +34 -0
  18. package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue.mjs.map +1 -0
  19. package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue2.js +2 -0
  20. package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue2.js.map +1 -0
  21. package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue2.mjs +5 -0
  22. package/dist/src/components/BookingDetail/PaymentSuccessLabel.vue2.mjs.map +1 -0
  23. package/dist/src/components/TestResult/Desktop/TestResultDetailDesktop.vue.js +1 -1
  24. package/dist/src/components/TestResult/Desktop/TestResultDetailDesktop.vue.js.map +1 -1
  25. package/dist/src/components/TestResult/Desktop/TestResultDetailDesktop.vue.mjs +32 -34
  26. package/dist/src/components/TestResult/Desktop/TestResultDetailDesktop.vue.mjs.map +1 -1
  27. package/dist/src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.js +1 -1
  28. package/dist/src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.js.map +1 -1
  29. package/dist/src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.mjs +34 -36
  30. package/dist/src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.mjs.map +1 -1
  31. package/dist/src/constants/Common.js +1 -1
  32. package/dist/src/constants/Common.js.map +1 -1
  33. package/dist/src/constants/Common.mjs +22 -17
  34. package/dist/src/constants/Common.mjs.map +1 -1
  35. package/dist/src/constants/Enums.js +1 -1
  36. package/dist/src/constants/Enums.js.map +1 -1
  37. package/dist/src/constants/Enums.mjs +16 -15
  38. package/dist/src/constants/Enums.mjs.map +1 -1
  39. package/dist/src/locales/en.json.js +1 -1
  40. package/dist/src/locales/en.json.mjs +6 -0
  41. package/dist/src/locales/en.json.mjs.map +1 -1
  42. package/dist/src/locales/vi.json.js +1 -1
  43. package/dist/src/locales/vi.json.mjs +6 -0
  44. package/dist/src/locales/vi.json.mjs.map +1 -1
  45. package/dist/style.css +1 -1
  46. package/dist/types/components/BookingDetail/BookingCtaButtons.vue.d.ts +14 -2
  47. package/dist/types/components/BookingDetail/BookingDetail.vue.d.ts +10 -1
  48. package/dist/types/components/BookingDetail/BookingDetailDesktop.vue.d.ts +10 -1
  49. package/dist/types/components/BookingDetail/PaymentSuccessLabel.vue.d.ts +23 -0
  50. package/dist/types/constants/Common.d.ts +3 -0
  51. package/dist/types/constants/Enums.d.ts +17 -0
  52. package/dist/types/types/Booking.d.ts +3 -1
  53. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ import { defineComponent as _, computed as n, unref as s, openBlock as c, createElementBlock as p, createElementVNode as a, toDisplayString as r, createCommentVNode as i } from "vue";
2
+ import { SOURCE_TYPES_PAID_ONLINE_BY_PATIENT as u } from "../../constants/Common.mjs";
3
+ import { formatDateTimeShort as d } from "../../helpers/DateHelper.mjs";
4
+ const g = {
5
+ key: 0,
6
+ 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"
7
+ }, f = /* @__PURE__ */ a("i", { class: "dgic-circle-check psc-text-xl" }, null, -1), k = {
8
+ key: 0,
9
+ class: "psc-ml-auto psc-text-sm psc-font-normal"
10
+ }, E = /* @__PURE__ */ _({
11
+ __name: "PaymentSuccessLabel",
12
+ props: {
13
+ booking: null
14
+ },
15
+ setup(l) {
16
+ const e = l, m = n(
17
+ () => !!e.booking.source_type && u.includes(e.booking.source_type) && !!e.booking.transaction
18
+ ), o = n(
19
+ () => {
20
+ var t;
21
+ return d((t = e.booking.transaction) == null ? void 0 : t.transaction_time);
22
+ }
23
+ );
24
+ return (t, b) => s(m) ? (c(), p("div", g, [
25
+ f,
26
+ a("span", null, r(t.$t("psc.test_result_booking_payment_successful")), 1),
27
+ s(o) ? (c(), p("span", k, r(s(o)), 1)) : i("", !0)
28
+ ])) : i("", !0);
29
+ }
30
+ });
31
+ export {
32
+ E as default
33
+ };
34
+ //# sourceMappingURL=PaymentSuccessLabel.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentSuccessLabel.vue.mjs","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":";;;AAGA,MAAMA,IAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GACMC,sBAA8C,KAAK,EAAE,OAAO,mCAAmC,MAAM,EAAE,GACvGC,IAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GAc4BC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,SAAS;AAAA,EACX;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GASRE,IAAeC;AAAA,MACnB,MACE,CAAC,CAACF,EAAM,QAAQ,eAChBG,EAAoC,SAASH,EAAM,QAAQ,WAAW,KACtE,CAAC,CAACA,EAAM,QAAQ;AAAA,IAAA,GAEdI,IAASF;AAAA,MAAS,MAAA;;AACtB,eAAAG,GAAoBC,IAAAN,EAAM,QAAQ,gBAAd,gBAAAM,EAA2B,gBAAgB;AAAA;AAAA,IAAA;AAG1D,WAAA,CAACC,GAAUC,MACRC,EAAOR,CAAY,KACtBS,EAAc,GAAAC,EAAoB,OAAOjB,GAAY;AAAA,MACpDC;AAAA,MACAiB,EAAoB,QAAQ,MAAMC,EAAiBN,EAAK,GAAG,4CAA4C,CAAC,GAAG,CAAC;AAAA,MAC3GE,EAAOL,CAAM,KACTM,EAAW,GAAGC,EAAoB,QAAQf,GAAYiB,EAAiBJ,EAAOL,CAAM,CAAC,GAAG,CAAC,KAC1FU,EAAoB,IAAI,EAAI;AAAA,IACjC,CAAA,KACDA,EAAoB,IAAI,EAAI;AAAA,EAElC;AAEA,CAAC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("./PaymentSuccessLabel.vue.js");module.exports=e;
2
+ //# sourceMappingURL=PaymentSuccessLabel.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentSuccessLabel.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import f from "./PaymentSuccessLabel.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
5
+ //# sourceMappingURL=PaymentSuccessLabel.vue2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentSuccessLabel.vue2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),g=require("../../../composables/TestResult.js"),x=require("../../Shared/PatientName.vue.js"),N=require("../Shared/ResultReadyV2.vue.js"),V=require("../Shared/RejectedResult.vue.js"),_=require("../Shared/BookAppointment.vue.js"),w=require("../Shared/ResultInsightCards.vue.js"),q=require("../HealthSummary/HealthSummary.vue.js"),n=require("../Shared/TestResultSection.vue.js"),T=require("../Shared/CallUsFilledButton.vue.js"),D=require("../Shared/DoctorNote.vue.js"),E=require("../Shared/DoctorNoteDetail.vue.js"),$=require("../Shared/UpcomingAppointment.vue.js"),A=require("../Shared/TestResultDetailSkeleton/TestResultDetailDesktopSkeleton.vue.js"),r=require("../../../helpers/SurveyHelper.js"),P=require("../../../composables/useSurveyConfig.js"),F=l=>Object.freeze(Object.defineProperty({__proto__:null,default:l},Symbol.toStringTag,{value:"Module"})),I={key:0,class:"psc-flex psc-items-start"},j={class:"-psc-ml-4 psc-mr-16 psc-w-[480px] psc-shrink-0 psc-grow-0"},O={class:"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto"},H={class:"psc-min-w-0 psc-flex-1"},U={class:"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto"},z=e.defineComponent({__name:"TestResultDetailDesktop",props:{testResult:null,loading:{type:Boolean},hidePatientInfo:{type:Boolean,default:!1},hideSummary:{type:Boolean,default:!1},enableBookingFeature:{type:Boolean,default:!1},timeline:{default:void 0},listActionEvent:{default:void 0},showResultReport:{type:Boolean,default:!1}},emits:["click:book-appointment","click:appointment-booking","click:result-report"],setup(l,{emit:u}){const t=l,m=e.defineAsyncComponent(()=>Promise.resolve().then(()=>F(require("../Shared/TakeSurvey.vue2.js")))),{healthSummaryItems:k,hideContent:y,isViewable:v,visible:c}=g.useTestResult({testResult:e.toRef(t,"testResult"),hidePatientInfo:e.toRef(t,"hidePatientInfo"),hideSummary:e.toRef(t,"hideSummary")}),{surveyConfig:i}=P.useSurveyConfig(),p=e.ref(!1),f=e.computed(()=>r.buildTestResultSurveyContext(t.testResult,"doctor-note")),B=e.computed(()=>r.getSurveySlug(t.testResult.collection_channel,t.testResult.is_free_consultant,i.value)),R=e.computed(()=>r.buildTestResultSurveyContext(t.testResult)),b=e.computed(()=>!!t.testResult.doctor_note_detail&&t.testResult.doctor_note_detail.length>0),S=e.computed(()=>r.isSurveyEnabledForTestResult(t.testResult.nps_test_result,t.testResult.collection_channel,t.testResult.is_free_consultant,i.value)),h=e.useSlots(),d=e.computed(()=>!!t.testResult.is_free_consultant||!!h["book-appointment-box"]),C=e.computed(()=>r.isTeledocSurveyEnabled(t.testResult.nps_doctor_consult,i.value));return(o,s)=>t.loading?(e.openBlock(),e.createBlock(A,{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(v)?(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("div",j,[e.createElementVNode("div",O,[e.unref(c).patientName?(e.openBlock(),e.createBlock(x,{key:0,"first-name":t.testResult.first_name,class:"psc-px-4 psc-pb-2"},null,8,["first-name"])):e.createCommentVNode("",!0),e.createVNode(N,{"test-result":t.testResult,timeline:t.timeline,"list-action-event":t.listActionEvent,class:"psc-px-4 psc-pb-4"},null,8,["test-result","timeline","list-action-event"]),e.unref(c).healthSummary?(e.openBlock(),e.createBlock(n,{key:1},{default:e.withCtx(()=>[e.createVNode(q,{items:e.unref(k)},null,8,["items"])]),_:1})):e.createCommentVNode("",!0),t.showResultReport?(e.openBlock(),e.createBlock(w,{key:2,"onClick:report":s[1]||(s[1]=a=>u("click:result-report"))},e.createSlots({_:2},[e.unref(d)?{name:"book-appointment-box",fn:e.withCtx(()=>[o.$slots["book-appointment-box"]?e.renderSlot(o.$slots,"book-appointment-box",{key:0,compact:!0}):(e.openBlock(),e.createBlock(_,{key:1,compact:"","onClick:book":s[0]||(s[0]=a=>u("click:book-appointment"))}))]),key:"0"}:void 0]),1024)):e.unref(d)?(e.openBlock(),e.createBlock(n,{key:3},{default:e.withCtx(()=>[o.$slots["book-appointment-box"]?e.renderSlot(o.$slots,"book-appointment-box",{key:0,compact:!1}):(e.openBlock(),e.createBlock(_,{key:1,"onClick:book":s[2]||(s[2]=()=>{p.value=!0,u("click:book-appointment")})},e.createSlots({_:2},[l.enableBookingFeature&&p.value?{name:"content",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"book-appointment")]),key:"0"}:void 0]),1024))]),_:3})):e.createCommentVNode("",!0),e.unref(c).doctorNote?(e.openBlock(),e.createBlock(n,{key:4},{default:e.withCtx(()=>[e.createVNode(D,{"doctor-note":t.testResult.doctor_note},null,8,["doctor-note"])]),_:1})):e.createCommentVNode("",!0),e.unref(b)?(e.openBlock(),e.createBlock(n,{key:5},{default:e.withCtx(()=>[e.createVNode(E,{"doctor-note-detail":l.testResult.doctor_note_detail,"survey-context":e.unref(C)?e.unref(f):void 0,"onClick:appointmentBooking":s[3]||(s[3]=a=>u("click:appointment-booking",a))},null,8,["doctor-note-detail","survey-context"])]),_:1})):e.createCommentVNode("",!0),e.unref(S)?(e.openBlock(),e.createBlock(n,{key:6},{default:e.withCtx(()=>[e.createVNode(e.unref(m),{variant:"bar","survey-slug":e.unref(B),context:e.unref(R),text:o.$t("psc.test_result_take_survey_button")},null,8,["survey-slug","context","text"])]),_:1})):e.createCommentVNode("",!0),e.unref(c).upcomingAppointment?(e.openBlock(),e.createBlock(n,{key:7},{default:e.withCtx(()=>[e.createVNode($,{"time-slot":t.testResult.consult_time},null,8,["time-slot"])]),_:1})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",H,[e.createElementVNode("div",U,[e.renderSlot(o.$slots,"header"),e.unref(y)?e.createCommentVNode("",!0):e.renderSlot(o.$slots,"default",{key:0}),e.renderSlot(o.$slots,"footer")])])])):(e.openBlock(),e.createBlock(V,{key:1,class:"psc-px-4"},{"body-append":e.withCtx(()=>[e.createVNode(T,{class:"psc-mt-6"})]),_:1}))],64))}});module.exports=z;
1
+ "use strict";const e=require("vue"),g=require("../../../composables/TestResult.js"),x=require("../../Shared/PatientName.vue.js"),N=require("../Shared/ResultReadyV2.vue.js"),V=require("../Shared/RejectedResult.vue.js"),_=require("../Shared/BookAppointment.vue.js"),w=require("../Shared/ResultInsightCards.vue.js"),q=require("../HealthSummary/HealthSummary.vue.js"),n=require("../Shared/TestResultSection.vue.js"),T=require("../Shared/CallUsFilledButton.vue.js"),D=require("../Shared/DoctorNote.vue.js"),E=require("../Shared/DoctorNoteDetail.vue.js"),$=require("../Shared/UpcomingAppointment.vue.js"),A=require("../Shared/TestResultDetailSkeleton/TestResultDetailDesktopSkeleton.vue.js"),r=require("../../../helpers/SurveyHelper.js"),P=require("../../../composables/useSurveyConfig.js"),F=l=>Object.freeze(Object.defineProperty({__proto__:null,default:l},Symbol.toStringTag,{value:"Module"})),I={key:0,class:"psc-flex psc-items-start"},j={class:"-psc-ml-4 psc-mr-16 psc-w-[480px] psc-shrink-0 psc-grow-0"},O={class:"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto"},H={class:"psc-min-w-0 psc-flex-1"},U={class:"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto"},z=e.defineComponent({__name:"TestResultDetailDesktop",props:{testResult:null,loading:{type:Boolean},hidePatientInfo:{type:Boolean,default:!1},hideSummary:{type:Boolean,default:!1},enableBookingFeature:{type:Boolean,default:!1},timeline:{default:void 0},listActionEvent:{default:void 0},showResultReport:{type:Boolean,default:!1}},emits:["click:book-appointment","click:appointment-booking","click:result-report"],setup(l,{emit:u}){const t=l,m=e.defineAsyncComponent(()=>Promise.resolve().then(()=>F(require("../Shared/TakeSurvey.vue2.js")))),{healthSummaryItems:k,hideContent:y,isViewable:v,visible:c}=g.useTestResult({testResult:e.toRef(t,"testResult"),hidePatientInfo:e.toRef(t,"hidePatientInfo"),hideSummary:e.toRef(t,"hideSummary")}),{surveyConfig:i}=P.useSurveyConfig(),p=e.ref(!1),f=e.computed(()=>r.buildTestResultSurveyContext(t.testResult,"doctor-note")),B=e.computed(()=>r.getSurveySlug(t.testResult.collection_channel,t.testResult.is_free_consultant,i.value)),R=e.computed(()=>r.buildTestResultSurveyContext(t.testResult)),b=e.computed(()=>!!t.testResult.doctor_note_detail&&t.testResult.doctor_note_detail.length>0),S=e.computed(()=>r.isSurveyEnabledForTestResult(t.testResult.nps_test_result,t.testResult.collection_channel,t.testResult.is_free_consultant,i.value)),h=e.useSlots(),d=()=>!!t.testResult.is_free_consultant||!!h["book-appointment-box"],C=e.computed(()=>r.isTeledocSurveyEnabled(t.testResult.nps_doctor_consult,i.value));return(o,s)=>t.loading?(e.openBlock(),e.createBlock(A,{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(v)?(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("div",j,[e.createElementVNode("div",O,[e.unref(c).patientName?(e.openBlock(),e.createBlock(x,{key:0,"first-name":t.testResult.first_name,class:"psc-px-4 psc-pb-2"},null,8,["first-name"])):e.createCommentVNode("",!0),e.createVNode(N,{"test-result":t.testResult,timeline:t.timeline,"list-action-event":t.listActionEvent,class:"psc-px-4 psc-pb-4"},null,8,["test-result","timeline","list-action-event"]),e.unref(c).healthSummary?(e.openBlock(),e.createBlock(n,{key:1},{default:e.withCtx(()=>[e.createVNode(q,{items:e.unref(k)},null,8,["items"])]),_:1})):e.createCommentVNode("",!0),t.showResultReport?(e.openBlock(),e.createBlock(w,{key:2,"onClick:report":s[1]||(s[1]=a=>u("click:result-report"))},e.createSlots({_:2},[d()?{name:"book-appointment-box",fn:e.withCtx(()=>[o.$slots["book-appointment-box"]?e.renderSlot(o.$slots,"book-appointment-box",{key:0,compact:!0}):(e.openBlock(),e.createBlock(_,{key:1,compact:"","onClick:book":s[0]||(s[0]=a=>u("click:book-appointment"))}))]),key:"0"}:void 0]),1024)):d()?(e.openBlock(),e.createBlock(n,{key:3},{default:e.withCtx(()=>[o.$slots["book-appointment-box"]?e.renderSlot(o.$slots,"book-appointment-box",{key:0,compact:!1}):(e.openBlock(),e.createBlock(_,{key:1,"onClick:book":s[2]||(s[2]=()=>{p.value=!0,u("click:book-appointment")})},e.createSlots({_:2},[l.enableBookingFeature&&p.value?{name:"content",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"book-appointment")]),key:"0"}:void 0]),1024))]),_:3})):e.createCommentVNode("",!0),e.unref(c).doctorNote?(e.openBlock(),e.createBlock(n,{key:4},{default:e.withCtx(()=>[e.createVNode(D,{"doctor-note":t.testResult.doctor_note},null,8,["doctor-note"])]),_:1})):e.createCommentVNode("",!0),e.unref(b)?(e.openBlock(),e.createBlock(n,{key:5},{default:e.withCtx(()=>[e.createVNode(E,{"doctor-note-detail":l.testResult.doctor_note_detail,"survey-context":e.unref(C)?e.unref(f):void 0,"onClick:appointmentBooking":s[3]||(s[3]=a=>u("click:appointment-booking",a))},null,8,["doctor-note-detail","survey-context"])]),_:1})):e.createCommentVNode("",!0),e.unref(S)?(e.openBlock(),e.createBlock(n,{key:6},{default:e.withCtx(()=>[e.createVNode(e.unref(m),{variant:"bar","survey-slug":e.unref(B),context:e.unref(R),text:o.$t("psc.test_result_take_survey_button")},null,8,["survey-slug","context","text"])]),_:1})):e.createCommentVNode("",!0),e.unref(c).upcomingAppointment?(e.openBlock(),e.createBlock(n,{key:7},{default:e.withCtx(()=>[e.createVNode($,{"time-slot":t.testResult.consult_time},null,8,["time-slot"])]),_:1})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",H,[e.createElementVNode("div",U,[e.renderSlot(o.$slots,"header"),e.unref(y)?e.createCommentVNode("",!0):e.renderSlot(o.$slots,"default",{key:0}),e.renderSlot(o.$slots,"footer")])])])):(e.openBlock(),e.createBlock(V,{key:1,class:"psc-px-4"},{"body-append":e.withCtx(()=>[e.createVNode(T,{class:"psc-mt-6"})]),_:1}))],64))}});module.exports=z;
2
2
  //# sourceMappingURL=TestResultDetailDesktop.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TestResultDetailDesktop.vue.js","sources":["../../../../../src/components/TestResult/Desktop/TestResultDetailDesktop.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, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, renderSlot as _renderSlot, createSlots as _createSlots, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"psc-flex psc-items-start\"\n}\nconst _hoisted_2 = { class: \"-psc-ml-4 psc-mr-16 psc-w-[480px] psc-shrink-0 psc-grow-0\" }\nconst _hoisted_3 = { class: \"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto\" }\nconst _hoisted_4 = { class: \"psc-min-w-0 psc-flex-1\" }\nconst _hoisted_5 = { class: \"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto\" }\n\nimport { useTestResult } from '@/composables/TestResult';\nimport PatientName from '../../Shared/PatientName.vue';\nimport ResultReadyV2 from '../Shared/ResultReadyV2.vue';\nimport RejectedResult from '../Shared/RejectedResult.vue';\nimport BookAppointment from '../Shared/BookAppointment.vue';\nimport ResultInsightCards from '../Shared/ResultInsightCards.vue';\nimport HealthSummary from '../HealthSummary/HealthSummary.vue';\nimport TestResultSection from '../Shared/TestResultSection.vue';\nimport CallUsFilledButton from '../Shared/CallUsFilledButton.vue';\nimport DoctorNote from '../Shared/DoctorNote.vue';\nimport DoctorNoteDetail from '../Shared/DoctorNoteDetail.vue';\nimport type { TestResult } from '@/types';\nimport UpcomingAppointment from '../Shared/UpcomingAppointment.vue';\nimport { computed, defineAsyncComponent, ref, toRef, useSlots } from 'vue';\nimport TestResultDetailDesktopSkeleton from '../Shared/TestResultDetailSkeleton/TestResultDetailDesktopSkeleton.vue';\nimport type { TimelineEvent } from '../Shared/ResultReadyV2.vue';\nimport {\n buildTestResultSurveyContext,\n getSurveySlug,\n isSurveyEnabledForTestResult,\n isTeledocSurveyEnabled,\n} from '@/helpers/SurveyHelper';\nimport { useSurveyConfig } from '@/composables/useSurveyConfig';\n\nexport interface Props {\n testResult: TestResult;\n loading: boolean;\n hidePatientInfo?: boolean;\n hideSummary?: boolean;\n enableBookingFeature?: boolean;\n timeline?: TimelineEvent[];\n listActionEvent?: Record<string, string>;\n showResultReport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TestResultDetailDesktop',\n props: {\n testResult: null,\n loading: { type: Boolean },\n hidePatientInfo: { type: Boolean, default: false },\n hideSummary: { type: Boolean, default: false },\n enableBookingFeature: { type: Boolean, default: false },\n timeline: { default: undefined },\n listActionEvent: { default: undefined },\n showResultReport: { type: Boolean, default: false }\n },\n emits: [\n 'click:book-appointment',\n 'click:appointment-booking',\n 'click:result-report',\n],\n setup(__props: any, { emit }) {\n\nconst props = __props as { testResult: TestResult, loading: boolean, hidePatientInfo: boolean, hideSummary: boolean, enableBookingFeature: boolean, timeline: TimelineEvent[], listActionEvent: Record<string, string>, showResultReport: boolean };\n\n\n\nconst TakeSurvey = defineAsyncComponent(\n () => import('../Shared/TakeSurvey.vue')\n);\n\n\n\nconst { healthSummaryItems, hideContent, isViewable, visible } = useTestResult({\n testResult: toRef(props, 'testResult'),\n hidePatientInfo: toRef(props, 'hidePatientInfo'),\n hideSummary: toRef(props, 'hideSummary'),\n});\n\nconst { surveyConfig } = useSurveyConfig();\n\nconst isDisplayBook = ref(false);\n\nconst doctorNoteSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult, 'doctor-note')\n);\n\nconst testSurveySlug = computed(() =>\n getSurveySlug(\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\nconst testSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult)\n);\n\nconst hasDoctorNoteDetail = computed(\n () =>\n !!props.testResult.doctor_note_detail &&\n props.testResult.doctor_note_detail.length > 0\n);\n\nconst isSurveyEnabled = computed(() =>\n isSurveyEnabledForTestResult(\n props.testResult.nps_test_result,\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\n// DPT-8995: the host's `book-appointment-box` slot replaces BookAppointment and is not\n// gated by is_free_consultant.\nconst slots = useSlots();\nconst showBookAppointmentBox = computed(\n () => !!props.testResult.is_free_consultant || !!slots['book-appointment-box']\n);\n\nconst isTeledocSurveyVisible = computed(() =>\n isTeledocSurveyEnabled(\n props.testResult.nps_doctor_consult,\n surveyConfig.value\n )\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (props.loading)\n ? (_openBlock(), _createBlock(TestResultDetailDesktopSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n (_unref(isViewable))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n (_unref(visible).patientName)\n ? (_openBlock(), _createBlock(PatientName, {\n key: 0,\n \"first-name\": props.testResult.first_name,\n class: \"psc-px-4 psc-pb-2\"\n }, null, 8, [\"first-name\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(ResultReadyV2, {\n \"test-result\": props.testResult,\n timeline: props.timeline,\n \"list-action-event\": props.listActionEvent,\n class: \"psc-px-4 psc-pb-4\"\n }, null, 8, [\"test-result\", \"timeline\", \"list-action-event\"]),\n (_unref(visible).healthSummary)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 1 }, {\n default: _withCtx(() => [\n _createVNode(HealthSummary, { items: _unref(healthSummaryItems) }, null, 8, [\"items\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (props.showResultReport)\n ? (_openBlock(), _createBlock(ResultInsightCards, {\n key: 2,\n \"onClick:report\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:result-report')))\n }, _createSlots({ _: 2 }, [\n (_unref(showBookAppointmentBox))\n ? {\n name: \"book-appointment-box\",\n fn: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: true\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n compact: \"\",\n \"onClick:book\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:book-appointment')))\n }))\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n : (_unref(showBookAppointmentBox))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: false\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n \"onClick:book\": _cache[2] || (_cache[2] = \n () => {\n isDisplayBook.value = true;\n emit('click:book-appointment');\n }\n )\n }, _createSlots({ _: 2 }, [\n (__props.enableBookingFeature && isDisplayBook.value)\n ? {\n name: \"content\",\n fn: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"book-appointment\")\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n ]),\n _: 3\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).doctorNote)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 4 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNote, {\n \"doctor-note\": props.testResult.doctor_note\n }, null, 8, [\"doctor-note\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(hasDoctorNoteDetail))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 5 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNoteDetail, {\n \"doctor-note-detail\": __props.testResult.doctor_note_detail!,\n \"survey-context\": \n _unref(isTeledocSurveyVisible) ? _unref(doctorNoteSurveyContext) : undefined\n ,\n \"onClick:appointmentBooking\": _cache[3] || (_cache[3] = ($event: any) => (\n emit('click:appointment-booking', $event)\n ))\n }, null, 8, [\"doctor-note-detail\", \"survey-context\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(isSurveyEnabled))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 6 }, {\n default: _withCtx(() => [\n _createVNode(_unref(TakeSurvey), {\n variant: \"bar\",\n \"survey-slug\": _unref(testSurveySlug),\n context: _unref(testSurveyContext),\n text: _ctx.$t('psc.test_result_take_survey_button')\n }, null, 8, [\"survey-slug\", \"context\", \"text\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).upcomingAppointment)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 7 }, {\n default: _withCtx(() => [\n _createVNode(UpcomingAppointment, {\n \"time-slot\": props.testResult.consult_time!\n }, null, 8, [\"time-slot\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _renderSlot(_ctx.$slots, \"header\"),\n (!_unref(hideContent))\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"footer\")\n ])\n ])\n ]))\n : (_openBlock(), _createBlock(RejectedResult, {\n key: 1,\n class: \"psc-px-4\"\n }, {\n \"body-append\": _withCtx(() => [\n _createVNode(CallUsFilledButton, { class: \"psc-mt-6\" })\n ]),\n _: 1\n }))\n ], 64))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_sfc_main","_defineComponent","__props","emit","props","TakeSurvey","defineAsyncComponent","_interopNamespaceDefaultOnly","healthSummaryItems","hideContent","isViewable","visible","useTestResult","toRef","surveyConfig","useSurveyConfig","isDisplayBook","ref","doctorNoteSurveyContext","computed","buildTestResultSurveyContext","testSurveySlug","getSurveySlug","testSurveyContext","hasDoctorNoteDetail","isSurveyEnabled","isSurveyEnabledForTestResult","slots","useSlots","showBookAppointmentBox","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createBlock","TestResultDetailDesktopSkeleton","_createElementBlock","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","ResultInsightCards","$event","_createSlots","_renderSlot","BookAppointment","DoctorNote","DoctorNoteDetail","UpcomingAppointment","RejectedResult","CallUsFilledButton"],"mappings":"23BAGMA,EAAa,CACjB,IAAK,EACL,MAAO,0BACT,EACMC,EAAa,CAAE,MAAO,6DACtBC,EAAa,CAAE,MAAO,gFACtBC,EAAa,CAAE,MAAO,0BACtBC,EAAa,CAAE,MAAO,gFAqCAC,EAAiBC,kBAAA,CAC3C,OAAQ,0BACR,MAAO,CACL,WAAY,KACZ,QAAS,CAAE,KAAM,OAAQ,EACzB,gBAAiB,CAAE,KAAM,QAAS,QAAS,EAAM,EACjD,YAAa,CAAE,KAAM,QAAS,QAAS,EAAM,EAC7C,qBAAsB,CAAE,KAAM,QAAS,QAAS,EAAM,EACtD,SAAU,CAAE,QAAS,MAAU,EAC/B,gBAAiB,CAAE,QAAS,MAAU,EACtC,iBAAkB,CAAE,KAAM,QAAS,QAAS,EAAM,CACpD,EACA,MAAO,CACP,yBACA,4BACA,qBACF,EACE,MAAMC,EAAc,CAAE,KAAAC,GAAQ,CAEhC,MAAMC,EAAQF,EAIRG,EAAaC,EAAA,qBACjB,IAAM,QAAO,QAAA,EAAA,KAAA,IAAAC,EAAA,QAAA,8BAA0B,CAAA,CAAA,CAAA,EAKnC,CAAE,mBAAAC,EAAoB,YAAAC,EAAa,WAAAC,EAAY,QAAAC,CAAA,EAAYC,EAAAA,cAAc,CAC7E,WAAYC,EAAAA,MAAMT,EAAO,YAAY,EAC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AG,CAAA,CACJ,EAAA,EACJ,EAAE,EAEX,CAEA,CAAC"}
1
+ {"version":3,"file":"TestResultDetailDesktop.vue.js","sources":["../../../../../src/components/TestResult/Desktop/TestResultDetailDesktop.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, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, renderSlot as _renderSlot, createSlots as _createSlots, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"psc-flex psc-items-start\"\n}\nconst _hoisted_2 = { class: \"-psc-ml-4 psc-mr-16 psc-w-[480px] psc-shrink-0 psc-grow-0\" }\nconst _hoisted_3 = { class: \"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto\" }\nconst _hoisted_4 = { class: \"psc-min-w-0 psc-flex-1\" }\nconst _hoisted_5 = { class: \"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto\" }\n\nimport { useTestResult } from '@/composables/TestResult';\nimport PatientName from '../../Shared/PatientName.vue';\nimport ResultReadyV2 from '../Shared/ResultReadyV2.vue';\nimport RejectedResult from '../Shared/RejectedResult.vue';\nimport BookAppointment from '../Shared/BookAppointment.vue';\nimport ResultInsightCards from '../Shared/ResultInsightCards.vue';\nimport HealthSummary from '../HealthSummary/HealthSummary.vue';\nimport TestResultSection from '../Shared/TestResultSection.vue';\nimport CallUsFilledButton from '../Shared/CallUsFilledButton.vue';\nimport DoctorNote from '../Shared/DoctorNote.vue';\nimport DoctorNoteDetail from '../Shared/DoctorNoteDetail.vue';\nimport type { TestResult } from '@/types';\nimport UpcomingAppointment from '../Shared/UpcomingAppointment.vue';\nimport { computed, defineAsyncComponent, ref, toRef, useSlots } from 'vue';\nimport TestResultDetailDesktopSkeleton from '../Shared/TestResultDetailSkeleton/TestResultDetailDesktopSkeleton.vue';\nimport type { TimelineEvent } from '../Shared/ResultReadyV2.vue';\nimport {\n buildTestResultSurveyContext,\n getSurveySlug,\n isSurveyEnabledForTestResult,\n isTeledocSurveyEnabled,\n} from '@/helpers/SurveyHelper';\nimport { useSurveyConfig } from '@/composables/useSurveyConfig';\n\nexport interface Props {\n testResult: TestResult;\n loading: boolean;\n hidePatientInfo?: boolean;\n hideSummary?: boolean;\n enableBookingFeature?: boolean;\n timeline?: TimelineEvent[];\n listActionEvent?: Record<string, string>;\n showResultReport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TestResultDetailDesktop',\n props: {\n testResult: null,\n loading: { type: Boolean },\n hidePatientInfo: { type: Boolean, default: false },\n hideSummary: { type: Boolean, default: false },\n enableBookingFeature: { type: Boolean, default: false },\n timeline: { default: undefined },\n listActionEvent: { default: undefined },\n showResultReport: { type: Boolean, default: false }\n },\n emits: [\n 'click:book-appointment',\n 'click:appointment-booking',\n 'click:result-report',\n],\n setup(__props: any, { emit }) {\n\nconst props = __props as { testResult: TestResult, loading: boolean, hidePatientInfo: boolean, hideSummary: boolean, enableBookingFeature: boolean, timeline: TimelineEvent[], listActionEvent: Record<string, string>, showResultReport: boolean };\n\n\n\nconst TakeSurvey = defineAsyncComponent(\n () => import('../Shared/TakeSurvey.vue')\n);\n\n\n\nconst { healthSummaryItems, hideContent, isViewable, visible } = useTestResult({\n testResult: toRef(props, 'testResult'),\n hidePatientInfo: toRef(props, 'hidePatientInfo'),\n hideSummary: toRef(props, 'hideSummary'),\n});\n\nconst { surveyConfig } = useSurveyConfig();\n\nconst isDisplayBook = ref(false);\n\nconst doctorNoteSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult, 'doctor-note')\n);\n\nconst testSurveySlug = computed(() =>\n getSurveySlug(\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\nconst testSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult)\n);\n\nconst hasDoctorNoteDetail = computed(\n () =>\n !!props.testResult.doctor_note_detail &&\n props.testResult.doctor_note_detail.length > 0\n);\n\nconst isSurveyEnabled = computed(() =>\n isSurveyEnabledForTestResult(\n props.testResult.nps_test_result,\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\n// DPT-8995: the host's `book-appointment-box` slot replaces BookAppointment and is not\n// gated by is_free_consultant. A function, not a computed: slots are not reactive, so a\n// computed would keep `false` when the host passes the slot after the first render.\nconst slots = useSlots();\nconst showBookAppointmentBox = () =>\n !!props.testResult.is_free_consultant || !!slots['book-appointment-box'];\n\nconst isTeledocSurveyVisible = computed(() =>\n isTeledocSurveyEnabled(\n props.testResult.nps_doctor_consult,\n surveyConfig.value\n )\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (props.loading)\n ? (_openBlock(), _createBlock(TestResultDetailDesktopSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n (_unref(isViewable))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n (_unref(visible).patientName)\n ? (_openBlock(), _createBlock(PatientName, {\n key: 0,\n \"first-name\": props.testResult.first_name,\n class: \"psc-px-4 psc-pb-2\"\n }, null, 8, [\"first-name\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(ResultReadyV2, {\n \"test-result\": props.testResult,\n timeline: props.timeline,\n \"list-action-event\": props.listActionEvent,\n class: \"psc-px-4 psc-pb-4\"\n }, null, 8, [\"test-result\", \"timeline\", \"list-action-event\"]),\n (_unref(visible).healthSummary)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 1 }, {\n default: _withCtx(() => [\n _createVNode(HealthSummary, { items: _unref(healthSummaryItems) }, null, 8, [\"items\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (props.showResultReport)\n ? (_openBlock(), _createBlock(ResultInsightCards, {\n key: 2,\n \"onClick:report\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:result-report')))\n }, _createSlots({ _: 2 }, [\n (showBookAppointmentBox())\n ? {\n name: \"book-appointment-box\",\n fn: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: true\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n compact: \"\",\n \"onClick:book\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:book-appointment')))\n }))\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n : (showBookAppointmentBox())\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: false\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n \"onClick:book\": _cache[2] || (_cache[2] = \n () => {\n isDisplayBook.value = true;\n emit('click:book-appointment');\n }\n )\n }, _createSlots({ _: 2 }, [\n (__props.enableBookingFeature && isDisplayBook.value)\n ? {\n name: \"content\",\n fn: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"book-appointment\")\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n ]),\n _: 3\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).doctorNote)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 4 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNote, {\n \"doctor-note\": props.testResult.doctor_note\n }, null, 8, [\"doctor-note\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(hasDoctorNoteDetail))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 5 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNoteDetail, {\n \"doctor-note-detail\": __props.testResult.doctor_note_detail!,\n \"survey-context\": \n _unref(isTeledocSurveyVisible) ? _unref(doctorNoteSurveyContext) : undefined\n ,\n \"onClick:appointmentBooking\": _cache[3] || (_cache[3] = ($event: any) => (\n emit('click:appointment-booking', $event)\n ))\n }, null, 8, [\"doctor-note-detail\", \"survey-context\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(isSurveyEnabled))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 6 }, {\n default: _withCtx(() => [\n _createVNode(_unref(TakeSurvey), {\n variant: \"bar\",\n \"survey-slug\": _unref(testSurveySlug),\n context: _unref(testSurveyContext),\n text: _ctx.$t('psc.test_result_take_survey_button')\n }, null, 8, [\"survey-slug\", \"context\", \"text\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).upcomingAppointment)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 7 }, {\n default: _withCtx(() => [\n _createVNode(UpcomingAppointment, {\n \"time-slot\": props.testResult.consult_time!\n }, null, 8, [\"time-slot\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _renderSlot(_ctx.$slots, \"header\"),\n (!_unref(hideContent))\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"footer\")\n ])\n ])\n ]))\n : (_openBlock(), _createBlock(RejectedResult, {\n key: 1,\n class: \"psc-px-4\"\n }, {\n \"body-append\": _withCtx(() => [\n _createVNode(CallUsFilledButton, { class: \"psc-mt-6\" })\n ]),\n _: 1\n }))\n ], 64))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_sfc_main","_defineComponent","__props","emit","props","TakeSurvey","defineAsyncComponent","_interopNamespaceDefaultOnly","healthSummaryItems","hideContent","isViewable","visible","useTestResult","toRef","surveyConfig","useSurveyConfig","isDisplayBook","ref","doctorNoteSurveyContext","computed","buildTestResultSurveyContext","testSurveySlug","getSurveySlug","testSurveyContext","hasDoctorNoteDetail","isSurveyEnabled","isSurveyEnabledForTestResult","slots","useSlots","showBookAppointmentBox","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createBlock","TestResultDetailDesktopSkeleton","_createElementBlock","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","ResultInsightCards","$event","_createSlots","_renderSlot","BookAppointment","DoctorNote","DoctorNoteDetail","UpcomingAppointment","RejectedResult","CallUsFilledButton"],"mappings":"23BAGMA,EAAa,CACjB,IAAK,EACL,MAAO,0BACT,EACMC,EAAa,CAAE,MAAO,6DACtBC,EAAa,CAAE,MAAO,gFACtBC,EAAa,CAAE,MAAO,0BACtBC,EAAa,CAAE,MAAO,gFAqCAC,EAAiBC,kBAAA,CAC3C,OAAQ,0BACR,MAAO,CACL,WAAY,KACZ,QAAS,CAAE,KAAM,OAAQ,EACzB,gBAAiB,CAAE,KAAM,QAAS,QAAS,EAAM,EACjD,YAAa,CAAE,KAAM,QAAS,QAAS,EAAM,EAC7C,qBAAsB,CAAE,KAAM,QAAS,QAAS,EAAM,EACtD,SAAU,CAAE,QAAS,MAAU,EAC/B,gBAAiB,CAAE,QAAS,MAAU,EACtC,iBAAkB,CAAE,KAAM,QAAS,QAAS,EAAM,CACpD,EACA,MAAO,CACP,yBACA,4BACA,qBACF,EACE,MAAMC,EAAc,CAAE,KAAAC,GAAQ,CAEhC,MAAMC,EAAQF,EAIRG,EAAaC,EAAA,qBACjB,IAAM,QAAO,QAAA,EAAA,KAAA,IAAAC,EAAA,QAAA,8BAA0B,CAAA,CAAA,CAAA,EAKnC,CAAE,mBAAAC,EAAoB,YAAAC,EAAa,WAAAC,EAAY,QAAAC,CAAA,EAAYC,EAAAA,cAAc,CAC7E,WAAYC,EAAAA,MAAMT,EAAO,YAAY,EACrC,gBAAiBS,EAAAA,MAAMT,EAAO,iBAA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ponent as I, defineAsyncComponent as P, toRef as v, ref as j, computed as a, useSlots as q, openBlock as o, createBlock as s, createElementBlock as h, Fragment as z, unref as e, createElementVNode as f, createCommentVNode as r, createVNode as c, withCtx as l, createSlots as x, renderSlot as u } from "vue";
1
+ import { defineComponent as I, defineAsyncComponent as P, toRef as v, ref as j, computed as c, useSlots as q, openBlock as e, createBlock as s, createElementBlock as h, Fragment as z, unref as o, createElementVNode as f, createCommentVNode as r, createVNode as a, withCtx as l, createSlots as x, renderSlot as u } from "vue";
2
2
  import { useTestResult as G } from "../../../composables/TestResult.mjs";
3
3
  import H from "../../Shared/PatientName.vue.mjs";
4
4
  import J from "../Shared/ResultReadyV2.vue.mjs";
@@ -41,65 +41,63 @@ const ot = {
41
41
  testResult: v(t, "testResult"),
42
42
  hidePatientInfo: v(t, "hidePatientInfo"),
43
43
  hideSummary: v(t, "hideSummary")
44
- }), { surveyConfig: y } = et(), b = j(!1), T = a(
44
+ }), { surveyConfig: y } = et(), b = j(!1), T = c(
45
45
  () => $(t.testResult, "doctor-note")
46
- ), E = a(
46
+ ), E = c(
47
47
  () => Y(
48
48
  t.testResult.collection_channel,
49
49
  t.testResult.is_free_consultant,
50
50
  y.value
51
51
  )
52
- ), N = a(
52
+ ), N = c(
53
53
  () => $(t.testResult)
54
- ), V = a(
54
+ ), V = c(
55
55
  () => !!t.testResult.doctor_note_detail && t.testResult.doctor_note_detail.length > 0
56
- ), A = a(
56
+ ), A = c(
57
57
  () => Z(
58
58
  t.testResult.nps_test_result,
59
59
  t.testResult.collection_channel,
60
60
  t.testResult.is_free_consultant,
61
61
  y.value
62
62
  )
63
- ), D = q(), R = a(
64
- () => !!t.testResult.is_free_consultant || !!D["book-appointment-box"]
65
- ), F = a(
63
+ ), D = q(), R = () => !!t.testResult.is_free_consultant || !!D["book-appointment-box"], F = c(
66
64
  () => tt(
67
65
  t.testResult.nps_doctor_consult,
68
66
  y.value
69
67
  )
70
68
  );
71
- return (n, i) => t.loading ? (o(), s(X, { key: 0 })) : (o(), h(z, { key: 1 }, [
72
- e(w) ? (o(), h("div", ot, [
69
+ return (n, i) => t.loading ? (e(), s(X, { key: 0 })) : (e(), h(z, { key: 1 }, [
70
+ o(w) ? (e(), h("div", ot, [
73
71
  f("div", st, [
74
72
  f("div", nt, [
75
- e(d).patientName ? (o(), s(H, {
73
+ o(d).patientName ? (e(), s(H, {
76
74
  key: 0,
77
75
  "first-name": t.testResult.first_name,
78
76
  class: "psc-px-4 psc-pb-2"
79
77
  }, null, 8, ["first-name"])) : r("", !0),
80
- c(J, {
78
+ a(J, {
81
79
  "test-result": t.testResult,
82
80
  timeline: t.timeline,
83
81
  "list-action-event": t.listActionEvent,
84
82
  class: "psc-px-4 psc-pb-4"
85
83
  }, null, 8, ["test-result", "timeline", "list-action-event"]),
86
- e(d).healthSummary ? (o(), s(p, { key: 1 }, {
84
+ o(d).healthSummary ? (e(), s(p, { key: 1 }, {
87
85
  default: l(() => [
88
- c(M, { items: e(B) }, null, 8, ["items"])
86
+ a(M, { items: o(B) }, null, 8, ["items"])
89
87
  ]),
90
88
  _: 1
91
89
  })) : r("", !0),
92
- t.showResultReport ? (o(), s(L, {
90
+ t.showResultReport ? (e(), s(L, {
93
91
  key: 2,
94
92
  "onClick:report": i[1] || (i[1] = (_) => m("click:result-report"))
95
93
  }, x({ _: 2 }, [
96
- e(R) ? {
94
+ R() ? {
97
95
  name: "book-appointment-box",
98
96
  fn: l(() => [
99
97
  n.$slots["book-appointment-box"] ? u(n.$slots, "book-appointment-box", {
100
98
  key: 0,
101
99
  compact: !0
102
- }) : (o(), s(S, {
100
+ }) : (e(), s(S, {
103
101
  key: 1,
104
102
  compact: "",
105
103
  "onClick:book": i[0] || (i[0] = (_) => m("click:book-appointment"))
@@ -107,12 +105,12 @@ const ot = {
107
105
  ]),
108
106
  key: "0"
109
107
  } : void 0
110
- ]), 1024)) : e(R) ? (o(), s(p, { key: 3 }, {
108
+ ]), 1024)) : R() ? (e(), s(p, { key: 3 }, {
111
109
  default: l(() => [
112
110
  n.$slots["book-appointment-box"] ? u(n.$slots, "book-appointment-box", {
113
111
  key: 0,
114
112
  compact: !1
115
- }) : (o(), s(S, {
113
+ }) : (e(), s(S, {
116
114
  key: 1,
117
115
  "onClick:book": i[2] || (i[2] = () => {
118
116
  b.value = !0, m("click:book-appointment");
@@ -129,38 +127,38 @@ const ot = {
129
127
  ]),
130
128
  _: 3
131
129
  })) : r("", !0),
132
- e(d).doctorNote ? (o(), s(p, { key: 4 }, {
130
+ o(d).doctorNote ? (e(), s(p, { key: 4 }, {
133
131
  default: l(() => [
134
- c(Q, {
132
+ a(Q, {
135
133
  "doctor-note": t.testResult.doctor_note
136
134
  }, null, 8, ["doctor-note"])
137
135
  ]),
138
136
  _: 1
139
137
  })) : r("", !0),
140
- e(V) ? (o(), s(p, { key: 5 }, {
138
+ o(V) ? (e(), s(p, { key: 5 }, {
141
139
  default: l(() => [
142
- c(U, {
140
+ a(U, {
143
141
  "doctor-note-detail": k.testResult.doctor_note_detail,
144
- "survey-context": e(F) ? e(T) : void 0,
142
+ "survey-context": o(F) ? o(T) : void 0,
145
143
  "onClick:appointmentBooking": i[3] || (i[3] = (_) => m("click:appointment-booking", _))
146
144
  }, null, 8, ["doctor-note-detail", "survey-context"])
147
145
  ]),
148
146
  _: 1
149
147
  })) : r("", !0),
150
- e(A) ? (o(), s(p, { key: 6 }, {
148
+ o(A) ? (e(), s(p, { key: 6 }, {
151
149
  default: l(() => [
152
- c(e(g), {
150
+ a(o(g), {
153
151
  variant: "bar",
154
- "survey-slug": e(E),
155
- context: e(N),
152
+ "survey-slug": o(E),
153
+ context: o(N),
156
154
  text: n.$t("psc.test_result_take_survey_button")
157
155
  }, null, 8, ["survey-slug", "context", "text"])
158
156
  ]),
159
157
  _: 1
160
158
  })) : r("", !0),
161
- e(d).upcomingAppointment ? (o(), s(p, { key: 7 }, {
159
+ o(d).upcomingAppointment ? (e(), s(p, { key: 7 }, {
162
160
  default: l(() => [
163
- c(W, {
161
+ a(W, {
164
162
  "time-slot": t.testResult.consult_time
165
163
  }, null, 8, ["time-slot"])
166
164
  ]),
@@ -171,16 +169,16 @@ const ot = {
171
169
  f("div", lt, [
172
170
  f("div", it, [
173
171
  u(n.$slots, "header"),
174
- e(C) ? r("", !0) : u(n.$slots, "default", { key: 0 }),
172
+ o(C) ? r("", !0) : u(n.$slots, "default", { key: 0 }),
175
173
  u(n.$slots, "footer")
176
174
  ])
177
175
  ])
178
- ])) : (o(), s(K, {
176
+ ])) : (e(), s(K, {
179
177
  key: 1,
180
178
  class: "psc-px-4"
181
179
  }, {
182
180
  "body-append": l(() => [
183
- c(O, { class: "psc-mt-6" })
181
+ a(O, { class: "psc-mt-6" })
184
182
  ]),
185
183
  _: 1
186
184
  }))
@@ -1 +1 @@
1
- {"version":3,"file":"TestResultDetailDesktop.vue.mjs","sources":["../../../../../src/components/TestResult/Desktop/TestResultDetailDesktop.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, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, renderSlot as _renderSlot, createSlots as _createSlots, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"psc-flex psc-items-start\"\n}\nconst _hoisted_2 = { class: \"-psc-ml-4 psc-mr-16 psc-w-[480px] psc-shrink-0 psc-grow-0\" }\nconst _hoisted_3 = { class: \"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto\" }\nconst _hoisted_4 = { class: \"psc-min-w-0 psc-flex-1\" }\nconst _hoisted_5 = { class: \"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto\" }\n\nimport { useTestResult } from '@/composables/TestResult';\nimport PatientName from '../../Shared/PatientName.vue';\nimport ResultReadyV2 from '../Shared/ResultReadyV2.vue';\nimport RejectedResult from '../Shared/RejectedResult.vue';\nimport BookAppointment from '../Shared/BookAppointment.vue';\nimport ResultInsightCards from '../Shared/ResultInsightCards.vue';\nimport HealthSummary from '../HealthSummary/HealthSummary.vue';\nimport TestResultSection from '../Shared/TestResultSection.vue';\nimport CallUsFilledButton from '../Shared/CallUsFilledButton.vue';\nimport DoctorNote from '../Shared/DoctorNote.vue';\nimport DoctorNoteDetail from '../Shared/DoctorNoteDetail.vue';\nimport type { TestResult } from '@/types';\nimport UpcomingAppointment from '../Shared/UpcomingAppointment.vue';\nimport { computed, defineAsyncComponent, ref, toRef, useSlots } from 'vue';\nimport TestResultDetailDesktopSkeleton from '../Shared/TestResultDetailSkeleton/TestResultDetailDesktopSkeleton.vue';\nimport type { TimelineEvent } from '../Shared/ResultReadyV2.vue';\nimport {\n buildTestResultSurveyContext,\n getSurveySlug,\n isSurveyEnabledForTestResult,\n isTeledocSurveyEnabled,\n} from '@/helpers/SurveyHelper';\nimport { useSurveyConfig } from '@/composables/useSurveyConfig';\n\nexport interface Props {\n testResult: TestResult;\n loading: boolean;\n hidePatientInfo?: boolean;\n hideSummary?: boolean;\n enableBookingFeature?: boolean;\n timeline?: TimelineEvent[];\n listActionEvent?: Record<string, string>;\n showResultReport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TestResultDetailDesktop',\n props: {\n testResult: null,\n loading: { type: Boolean },\n hidePatientInfo: { type: Boolean, default: false },\n hideSummary: { type: Boolean, default: false },\n enableBookingFeature: { type: Boolean, default: false },\n timeline: { default: undefined },\n listActionEvent: { default: undefined },\n showResultReport: { type: Boolean, default: false }\n },\n emits: [\n 'click:book-appointment',\n 'click:appointment-booking',\n 'click:result-report',\n],\n setup(__props: any, { emit }) {\n\nconst props = __props as { testResult: TestResult, loading: boolean, hidePatientInfo: boolean, hideSummary: boolean, enableBookingFeature: boolean, timeline: TimelineEvent[], listActionEvent: Record<string, string>, showResultReport: boolean };\n\n\n\nconst TakeSurvey = defineAsyncComponent(\n () => import('../Shared/TakeSurvey.vue')\n);\n\n\n\nconst { healthSummaryItems, hideContent, isViewable, visible } = useTestResult({\n testResult: toRef(props, 'testResult'),\n hidePatientInfo: toRef(props, 'hidePatientInfo'),\n hideSummary: toRef(props, 'hideSummary'),\n});\n\nconst { surveyConfig } = useSurveyConfig();\n\nconst isDisplayBook = ref(false);\n\nconst doctorNoteSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult, 'doctor-note')\n);\n\nconst testSurveySlug = computed(() =>\n getSurveySlug(\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\nconst testSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult)\n);\n\nconst hasDoctorNoteDetail = computed(\n () =>\n !!props.testResult.doctor_note_detail &&\n props.testResult.doctor_note_detail.length > 0\n);\n\nconst isSurveyEnabled = computed(() =>\n isSurveyEnabledForTestResult(\n props.testResult.nps_test_result,\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\n// DPT-8995: the host's `book-appointment-box` slot replaces BookAppointment and is not\n// gated by is_free_consultant.\nconst slots = useSlots();\nconst showBookAppointmentBox = computed(\n () => !!props.testResult.is_free_consultant || !!slots['book-appointment-box']\n);\n\nconst isTeledocSurveyVisible = computed(() =>\n isTeledocSurveyEnabled(\n props.testResult.nps_doctor_consult,\n surveyConfig.value\n )\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (props.loading)\n ? (_openBlock(), _createBlock(TestResultDetailDesktopSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n (_unref(isViewable))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n (_unref(visible).patientName)\n ? (_openBlock(), _createBlock(PatientName, {\n key: 0,\n \"first-name\": props.testResult.first_name,\n class: \"psc-px-4 psc-pb-2\"\n }, null, 8, [\"first-name\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(ResultReadyV2, {\n \"test-result\": props.testResult,\n timeline: props.timeline,\n \"list-action-event\": props.listActionEvent,\n class: \"psc-px-4 psc-pb-4\"\n }, null, 8, [\"test-result\", \"timeline\", \"list-action-event\"]),\n (_unref(visible).healthSummary)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 1 }, {\n default: _withCtx(() => [\n _createVNode(HealthSummary, { items: _unref(healthSummaryItems) }, null, 8, [\"items\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (props.showResultReport)\n ? (_openBlock(), _createBlock(ResultInsightCards, {\n key: 2,\n \"onClick:report\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:result-report')))\n }, _createSlots({ _: 2 }, [\n (_unref(showBookAppointmentBox))\n ? {\n name: \"book-appointment-box\",\n fn: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: true\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n compact: \"\",\n \"onClick:book\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:book-appointment')))\n }))\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n : (_unref(showBookAppointmentBox))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: false\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n \"onClick:book\": _cache[2] || (_cache[2] = \n () => {\n isDisplayBook.value = true;\n emit('click:book-appointment');\n }\n )\n }, _createSlots({ _: 2 }, [\n (__props.enableBookingFeature && isDisplayBook.value)\n ? {\n name: \"content\",\n fn: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"book-appointment\")\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n ]),\n _: 3\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).doctorNote)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 4 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNote, {\n \"doctor-note\": props.testResult.doctor_note\n }, null, 8, [\"doctor-note\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(hasDoctorNoteDetail))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 5 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNoteDetail, {\n \"doctor-note-detail\": __props.testResult.doctor_note_detail!,\n \"survey-context\": \n _unref(isTeledocSurveyVisible) ? _unref(doctorNoteSurveyContext) : undefined\n ,\n \"onClick:appointmentBooking\": _cache[3] || (_cache[3] = ($event: any) => (\n emit('click:appointment-booking', $event)\n ))\n }, null, 8, [\"doctor-note-detail\", \"survey-context\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(isSurveyEnabled))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 6 }, {\n default: _withCtx(() => [\n _createVNode(_unref(TakeSurvey), {\n variant: \"bar\",\n \"survey-slug\": _unref(testSurveySlug),\n context: _unref(testSurveyContext),\n text: _ctx.$t('psc.test_result_take_survey_button')\n }, null, 8, [\"survey-slug\", \"context\", \"text\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).upcomingAppointment)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 7 }, {\n default: _withCtx(() => [\n _createVNode(UpcomingAppointment, {\n \"time-slot\": props.testResult.consult_time!\n }, null, 8, [\"time-slot\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _renderSlot(_ctx.$slots, \"header\"),\n (!_unref(hideContent))\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"footer\")\n ])\n ])\n ]))\n : (_openBlock(), _createBlock(RejectedResult, {\n key: 1,\n class: \"psc-px-4\"\n }, {\n \"body-append\": _withCtx(() => [\n _createVNode(CallUsFilledButton, { class: \"psc-mt-6\" })\n ]),\n _: 1\n }))\n ], 64))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_sfc_main","_defineComponent","__props","emit","props","TakeSurvey","defineAsyncComponent","healthSummaryItems","hideContent","isViewable","visible","useTestResult","toRef","surveyConfig","useSurveyConfig","isDisplayBook","ref","doctorNoteSurveyContext","computed","buildTestResultSurveyContext","testSurveySlug","getSurveySlug","testSurveyContext","hasDoctorNoteDetail","isSurveyEnabled","isSurveyEnabledForTestResult","slots","useSlots","showBookAppointmentBox","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createBlock","TestResultDetailDesktopSkeleton","_createElementBlock","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","ResultInsightCards","$event","_createSlots","_renderSlot","BookAppointment","DoctorNote","DoctorNoteDetail","UpcomingAppointment","RejectedResult","CallUsFilledButton"],"mappings":";;;;;;;;;;;;;;;;AAGA,MAAMA,KAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GACMC,KAAa,EAAE,OAAO,+DACtBC,KAAa,EAAE,OAAO,kFACtBC,KAAa,EAAE,OAAO,4BACtBC,KAAa,EAAE,OAAO,kFAqCAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY;AAAA,IACZ,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,iBAAiB,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IACjD,aAAa,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IAC7C,sBAAsB,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IACtD,UAAU,EAAE,S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AC/C;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDU,EAAoB,IAAI,EAAI;AAAA,YAC/BH,EAAO5B,CAAO,EAAE,uBACZuB,EAAA,GAAcC,EAAaU,GAAmB,EAAE,KAAK,KAAK;AAAA,cACzD,SAASC,EAAS,MAAM;AAAA,gBACtBH,EAAaY,GAAqB;AAAA,kBAChC,aAAalD,EAAM,WAAW;AAAA,gBAC7B,GAAA,MAAM,GAAG,CAAC,WAAW,CAAC;AAAA,cAAA,CAC1B;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDqC,EAAoB,IAAI,EAAI;AAAA,UAAA,CACjC;AAAA,QAAA,CACF;AAAA,QACDF,EAAoB,OAAOzC,IAAY;AAAA,UACrCyC,EAAoB,OAAOxC,IAAY;AAAA,YACrCmD,EAAYnB,EAAK,QAAQ,QAAQ;AAAA,YAC/BO,EAAO9B,CAAW,IAEhBiC,EAAoB,IAAI,EAAI,IAD5BS,EAAYnB,EAAK,QAAQ,WAAW,EAAE,KAAK,EAAG,CAAA;AAAA,YAElDmB,EAAYnB,EAAK,QAAQ,QAAQ;AAAA,UAAA,CAClC;AAAA,QAAA,CACF;AAAA,MACF,CAAA,MACAE,EAAW,GAAGC,EAAaqB,GAAgB;AAAA,QAC1C,KAAK;AAAA,QACL,OAAO;AAAA,MAAA,GACN;AAAA,QACD,eAAeV,EAAS,MAAM;AAAA,UAC5BH,EAAac,GAAoB,EAAE,OAAO,YAAY;AAAA,QAAA,CACvD;AAAA,QACD,GAAG;AAAA,MAAA,CACJ;AAAA,IAAA,GACJ,EAAE;AAAA,EAEX;AAEA,CAAC;"}
1
+ {"version":3,"file":"TestResultDetailDesktop.vue.mjs","sources":["../../../../../src/components/TestResult/Desktop/TestResultDetailDesktop.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, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, renderSlot as _renderSlot, createSlots as _createSlots, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"psc-flex psc-items-start\"\n}\nconst _hoisted_2 = { class: \"-psc-ml-4 psc-mr-16 psc-w-[480px] psc-shrink-0 psc-grow-0\" }\nconst _hoisted_3 = { class: \"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto\" }\nconst _hoisted_4 = { class: \"psc-min-w-0 psc-flex-1\" }\nconst _hoisted_5 = { class: \"psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto\" }\n\nimport { useTestResult } from '@/composables/TestResult';\nimport PatientName from '../../Shared/PatientName.vue';\nimport ResultReadyV2 from '../Shared/ResultReadyV2.vue';\nimport RejectedResult from '../Shared/RejectedResult.vue';\nimport BookAppointment from '../Shared/BookAppointment.vue';\nimport ResultInsightCards from '../Shared/ResultInsightCards.vue';\nimport HealthSummary from '../HealthSummary/HealthSummary.vue';\nimport TestResultSection from '../Shared/TestResultSection.vue';\nimport CallUsFilledButton from '../Shared/CallUsFilledButton.vue';\nimport DoctorNote from '../Shared/DoctorNote.vue';\nimport DoctorNoteDetail from '../Shared/DoctorNoteDetail.vue';\nimport type { TestResult } from '@/types';\nimport UpcomingAppointment from '../Shared/UpcomingAppointment.vue';\nimport { computed, defineAsyncComponent, ref, toRef, useSlots } from 'vue';\nimport TestResultDetailDesktopSkeleton from '../Shared/TestResultDetailSkeleton/TestResultDetailDesktopSkeleton.vue';\nimport type { TimelineEvent } from '../Shared/ResultReadyV2.vue';\nimport {\n buildTestResultSurveyContext,\n getSurveySlug,\n isSurveyEnabledForTestResult,\n isTeledocSurveyEnabled,\n} from '@/helpers/SurveyHelper';\nimport { useSurveyConfig } from '@/composables/useSurveyConfig';\n\nexport interface Props {\n testResult: TestResult;\n loading: boolean;\n hidePatientInfo?: boolean;\n hideSummary?: boolean;\n enableBookingFeature?: boolean;\n timeline?: TimelineEvent[];\n listActionEvent?: Record<string, string>;\n showResultReport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TestResultDetailDesktop',\n props: {\n testResult: null,\n loading: { type: Boolean },\n hidePatientInfo: { type: Boolean, default: false },\n hideSummary: { type: Boolean, default: false },\n enableBookingFeature: { type: Boolean, default: false },\n timeline: { default: undefined },\n listActionEvent: { default: undefined },\n showResultReport: { type: Boolean, default: false }\n },\n emits: [\n 'click:book-appointment',\n 'click:appointment-booking',\n 'click:result-report',\n],\n setup(__props: any, { emit }) {\n\nconst props = __props as { testResult: TestResult, loading: boolean, hidePatientInfo: boolean, hideSummary: boolean, enableBookingFeature: boolean, timeline: TimelineEvent[], listActionEvent: Record<string, string>, showResultReport: boolean };\n\n\n\nconst TakeSurvey = defineAsyncComponent(\n () => import('../Shared/TakeSurvey.vue')\n);\n\n\n\nconst { healthSummaryItems, hideContent, isViewable, visible } = useTestResult({\n testResult: toRef(props, 'testResult'),\n hidePatientInfo: toRef(props, 'hidePatientInfo'),\n hideSummary: toRef(props, 'hideSummary'),\n});\n\nconst { surveyConfig } = useSurveyConfig();\n\nconst isDisplayBook = ref(false);\n\nconst doctorNoteSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult, 'doctor-note')\n);\n\nconst testSurveySlug = computed(() =>\n getSurveySlug(\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\nconst testSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult)\n);\n\nconst hasDoctorNoteDetail = computed(\n () =>\n !!props.testResult.doctor_note_detail &&\n props.testResult.doctor_note_detail.length > 0\n);\n\nconst isSurveyEnabled = computed(() =>\n isSurveyEnabledForTestResult(\n props.testResult.nps_test_result,\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\n// DPT-8995: the host's `book-appointment-box` slot replaces BookAppointment and is not\n// gated by is_free_consultant. A function, not a computed: slots are not reactive, so a\n// computed would keep `false` when the host passes the slot after the first render.\nconst slots = useSlots();\nconst showBookAppointmentBox = () =>\n !!props.testResult.is_free_consultant || !!slots['book-appointment-box'];\n\nconst isTeledocSurveyVisible = computed(() =>\n isTeledocSurveyEnabled(\n props.testResult.nps_doctor_consult,\n surveyConfig.value\n )\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (props.loading)\n ? (_openBlock(), _createBlock(TestResultDetailDesktopSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n (_unref(isViewable))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n (_unref(visible).patientName)\n ? (_openBlock(), _createBlock(PatientName, {\n key: 0,\n \"first-name\": props.testResult.first_name,\n class: \"psc-px-4 psc-pb-2\"\n }, null, 8, [\"first-name\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(ResultReadyV2, {\n \"test-result\": props.testResult,\n timeline: props.timeline,\n \"list-action-event\": props.listActionEvent,\n class: \"psc-px-4 psc-pb-4\"\n }, null, 8, [\"test-result\", \"timeline\", \"list-action-event\"]),\n (_unref(visible).healthSummary)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 1 }, {\n default: _withCtx(() => [\n _createVNode(HealthSummary, { items: _unref(healthSummaryItems) }, null, 8, [\"items\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (props.showResultReport)\n ? (_openBlock(), _createBlock(ResultInsightCards, {\n key: 2,\n \"onClick:report\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:result-report')))\n }, _createSlots({ _: 2 }, [\n (showBookAppointmentBox())\n ? {\n name: \"book-appointment-box\",\n fn: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: true\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n compact: \"\",\n \"onClick:book\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:book-appointment')))\n }))\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n : (showBookAppointmentBox())\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: false\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n \"onClick:book\": _cache[2] || (_cache[2] = \n () => {\n isDisplayBook.value = true;\n emit('click:book-appointment');\n }\n )\n }, _createSlots({ _: 2 }, [\n (__props.enableBookingFeature && isDisplayBook.value)\n ? {\n name: \"content\",\n fn: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"book-appointment\")\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n ]),\n _: 3\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).doctorNote)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 4 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNote, {\n \"doctor-note\": props.testResult.doctor_note\n }, null, 8, [\"doctor-note\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(hasDoctorNoteDetail))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 5 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNoteDetail, {\n \"doctor-note-detail\": __props.testResult.doctor_note_detail!,\n \"survey-context\": \n _unref(isTeledocSurveyVisible) ? _unref(doctorNoteSurveyContext) : undefined\n ,\n \"onClick:appointmentBooking\": _cache[3] || (_cache[3] = ($event: any) => (\n emit('click:appointment-booking', $event)\n ))\n }, null, 8, [\"doctor-note-detail\", \"survey-context\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(isSurveyEnabled))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 6 }, {\n default: _withCtx(() => [\n _createVNode(_unref(TakeSurvey), {\n variant: \"bar\",\n \"survey-slug\": _unref(testSurveySlug),\n context: _unref(testSurveyContext),\n text: _ctx.$t('psc.test_result_take_survey_button')\n }, null, 8, [\"survey-slug\", \"context\", \"text\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).upcomingAppointment)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 7 }, {\n default: _withCtx(() => [\n _createVNode(UpcomingAppointment, {\n \"time-slot\": props.testResult.consult_time!\n }, null, 8, [\"time-slot\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _renderSlot(_ctx.$slots, \"header\"),\n (!_unref(hideContent))\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"footer\")\n ])\n ])\n ]))\n : (_openBlock(), _createBlock(RejectedResult, {\n key: 1,\n class: \"psc-px-4\"\n }, {\n \"body-append\": _withCtx(() => [\n _createVNode(CallUsFilledButton, { class: \"psc-mt-6\" })\n ]),\n _: 1\n }))\n ], 64))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_sfc_main","_defineComponent","__props","emit","props","TakeSurvey","defineAsyncComponent","healthSummaryItems","hideContent","isViewable","visible","useTestResult","toRef","surveyConfig","useSurveyConfig","isDisplayBook","ref","doctorNoteSurveyContext","computed","buildTestResultSurveyContext","testSurveySlug","getSurveySlug","testSurveyContext","hasDoctorNoteDetail","isSurveyEnabled","isSurveyEnabledForTestResult","slots","useSlots","showBookAppointmentBox","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createBlock","TestResultDetailDesktopSkeleton","_createElementBlock","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","ResultInsightCards","$event","_createSlots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AA,CACF;AAAA,MACF,CAAA,MACAE,EAAW,GAAGC,EAAaqB,GAAgB;AAAA,QAC1C,KAAK;AAAA,QACL,OAAO;AAAA,MAAA,GACN;AAAA,QACD,eAAeV,EAAS,MAAM;AAAA,UAC5BH,EAAac,GAAoB,EAAE,OAAO,YAAY;AAAA,QAAA,CACvD;AAAA,QACD,GAAG;AAAA,MAAA,CACJ;AAAA,IAAA,GACJ,EAAE;AAAA,EAEX;AAEA,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),g=require("../../../Shared/PatientName.vue.js"),N=require("../../Shared/ResultReadyV2.vue.js"),h=require("../../Shared/RejectedResult.vue.js"),d=require("../../Shared/BookAppointment.vue.js"),x=require("../../Shared/ResultInsightCards.vue.js"),V=require("../../Shared/DoctorNote.vue.js"),q=require("../../Shared/DoctorNoteDetail.vue.js"),w=require("../../Shared/UpcomingAppointment.vue.js"),T=require("../../Shared/CallUsFilledButton.vue.js"),$=require("../../Shared/TestResultDetailSkeleton/TestResultDetailSkeleton.vue.js"),E=require("../../HealthSummary/HealthSummary.vue.js"),s=require("../../Shared/TestResultSection.vue.js"),A=require("../../../../composables/TestResult.js"),c=require("../../../../helpers/SurveyHelper.js"),D=require("../../../../composables/useSurveyConfig.js"),P=i=>Object.freeze(Object.defineProperty({__proto__:null,default:i},Symbol.toStringTag,{value:"Module"})),I={key:0,class:"consumer-test-result__ready"},j={class:"psc-px-4"},F=e.defineComponent({__name:"TestResultDetail",props:{testResult:null,loading:{type:Boolean},hidePatientInfo:{type:Boolean,default:!1},hideSummary:{type:Boolean,default:!1},timeline:{default:void 0},listActionEvent:{default:void 0},showResultReport:{type:Boolean,default:!1}},emits:["click:book-appointment","click:appointment-booking","click:result-report"],setup(i,{emit:l}){const t=i,_=e.defineAsyncComponent(()=>Promise.resolve().then(()=>P(require("../../Shared/TakeSurvey.vue2.js")))),{healthSummaryItems:m,hideContent:k,isViewable:y,visible:u}=A.useTestResult({testResult:e.toRef(t,"testResult"),hidePatientInfo:e.toRef(t,"hidePatientInfo"),hideSummary:e.toRef(t,"hideSummary")}),{surveyConfig:a}=D.useSurveyConfig(),v=e.computed(()=>c.buildTestResultSurveyContext(t.testResult,"doctor-note")),f=e.computed(()=>c.getSurveySlug(t.testResult.collection_channel,t.testResult.is_free_consultant,a.value)),B=e.computed(()=>c.buildTestResultSurveyContext(t.testResult)),b=e.computed(()=>!!t.testResult.doctor_note_detail&&t.testResult.doctor_note_detail.length>0),R=e.computed(()=>c.isSurveyEnabledForTestResult(t.testResult.nps_test_result,t.testResult.collection_channel,t.testResult.is_free_consultant,a.value)),C=e.useSlots(),p=e.computed(()=>u.value.bookAppointment||!!C["book-appointment-box"]),S=e.computed(()=>c.isTeledocSurveyEnabled(t.testResult.nps_doctor_consult,a.value));return(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[t.loading?(e.openBlock(),e.createBlock($,{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(y)?(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("div",null,[e.unref(u).patientName?(e.openBlock(),e.createBlock(g,{key:0,"first-name":t.testResult.first_name,class:"psc-px-4 psc-pb-2"},null,8,["first-name"])):e.createCommentVNode("",!0),e.createVNode(N,{"test-result":t.testResult,timeline:t.timeline,"list-action-event":t.listActionEvent,class:"psc-px-4 psc-pb-4"},null,8,["test-result","timeline","list-action-event"]),e.unref(u).healthSummary?(e.openBlock(),e.createBlock(s,{key:1},{default:e.withCtx(()=>[e.createVNode(E,{items:e.unref(m),"cta-button":t.testResult.is_free_consultant,"onClick:ctaButton":o[0]||(o[0]=r=>l("click:book-appointment"))},null,8,["items","cta-button"])]),_:1})):e.createCommentVNode("",!0),t.showResultReport?(e.openBlock(),e.createBlock(x,{key:2,"onClick:report":o[2]||(o[2]=r=>l("click:result-report"))},e.createSlots({_:2},[e.unref(p)?{name:"book-appointment-box",fn:e.withCtx(()=>[n.$slots["book-appointment-box"]?e.renderSlot(n.$slots,"book-appointment-box",{key:0,compact:!0}):(e.openBlock(),e.createBlock(d,{key:1,compact:"","onClick:book":o[1]||(o[1]=r=>l("click:book-appointment"))}))]),key:"0"}:void 0]),1024)):e.unref(p)?(e.openBlock(),e.createBlock(s,{key:3},{default:e.withCtx(()=>[n.$slots["book-appointment-box"]?e.renderSlot(n.$slots,"book-appointment-box",{key:0,compact:!1}):(e.openBlock(),e.createBlock(d,{key:1,"onClick:book":o[3]||(o[3]=r=>l("click:book-appointment"))}))]),_:3})):e.createCommentVNode("",!0),e.unref(u).doctorNote?(e.openBlock(),e.createBlock(s,{key:4},{default:e.withCtx(()=>[e.createVNode(V,{"doctor-note":t.testResult.doctor_note},null,8,["doctor-note"])]),_:1})):e.createCommentVNode("",!0),e.unref(b)?(e.openBlock(),e.createBlock(s,{key:5},{default:e.withCtx(()=>[e.createVNode(q,{"doctor-note-detail":i.testResult.doctor_note_detail,"survey-context":e.unref(S)?e.unref(v):void 0,"onClick:appointmentBooking":o[4]||(o[4]=r=>l("click:appointment-booking",r))},null,8,["doctor-note-detail","survey-context"])]),_:1})):e.createCommentVNode("",!0),e.unref(R)?(e.openBlock(),e.createBlock(s,{key:6},{default:e.withCtx(()=>[e.createVNode(e.unref(_),{variant:"bar","survey-slug":e.unref(f),context:e.unref(B),text:n.$t("psc.test_result_take_survey_button")},null,8,["survey-slug","context","text"])]),_:1})):e.createCommentVNode("",!0),e.unref(u).upcomingAppointment?(e.openBlock(),e.createBlock(s,{key:7},{default:e.withCtx(()=>[e.createVNode(w,{"time-slot":t.testResult.consult_time},null,8,["time-slot"])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",j,[e.renderSlot(n.$slots,"header"),e.unref(k)?e.createCommentVNode("",!0):e.renderSlot(n.$slots,"default",{key:0}),e.renderSlot(n.$slots,"footer")])])):(e.openBlock(),e.createBlock(h,{key:1,class:"psc-px-4"},{"body-append":e.withCtx(()=>[e.createVNode(T,{class:"psc-mt-6"})]),_:1}))],64))]))}});module.exports=F;
1
+ "use strict";const e=require("vue"),g=require("../../../Shared/PatientName.vue.js"),N=require("../../Shared/ResultReadyV2.vue.js"),h=require("../../Shared/RejectedResult.vue.js"),d=require("../../Shared/BookAppointment.vue.js"),x=require("../../Shared/ResultInsightCards.vue.js"),V=require("../../Shared/DoctorNote.vue.js"),q=require("../../Shared/DoctorNoteDetail.vue.js"),w=require("../../Shared/UpcomingAppointment.vue.js"),T=require("../../Shared/CallUsFilledButton.vue.js"),$=require("../../Shared/TestResultDetailSkeleton/TestResultDetailSkeleton.vue.js"),E=require("../../HealthSummary/HealthSummary.vue.js"),s=require("../../Shared/TestResultSection.vue.js"),A=require("../../../../composables/TestResult.js"),c=require("../../../../helpers/SurveyHelper.js"),D=require("../../../../composables/useSurveyConfig.js"),P=i=>Object.freeze(Object.defineProperty({__proto__:null,default:i},Symbol.toStringTag,{value:"Module"})),I={key:0,class:"consumer-test-result__ready"},j={class:"psc-px-4"},F=e.defineComponent({__name:"TestResultDetail",props:{testResult:null,loading:{type:Boolean},hidePatientInfo:{type:Boolean,default:!1},hideSummary:{type:Boolean,default:!1},timeline:{default:void 0},listActionEvent:{default:void 0},showResultReport:{type:Boolean,default:!1}},emits:["click:book-appointment","click:appointment-booking","click:result-report"],setup(i,{emit:l}){const t=i,_=e.defineAsyncComponent(()=>Promise.resolve().then(()=>P(require("../../Shared/TakeSurvey.vue2.js")))),{healthSummaryItems:m,hideContent:k,isViewable:y,visible:r}=A.useTestResult({testResult:e.toRef(t,"testResult"),hidePatientInfo:e.toRef(t,"hidePatientInfo"),hideSummary:e.toRef(t,"hideSummary")}),{surveyConfig:a}=D.useSurveyConfig(),v=e.computed(()=>c.buildTestResultSurveyContext(t.testResult,"doctor-note")),f=e.computed(()=>c.getSurveySlug(t.testResult.collection_channel,t.testResult.is_free_consultant,a.value)),B=e.computed(()=>c.buildTestResultSurveyContext(t.testResult)),b=e.computed(()=>!!t.testResult.doctor_note_detail&&t.testResult.doctor_note_detail.length>0),R=e.computed(()=>c.isSurveyEnabledForTestResult(t.testResult.nps_test_result,t.testResult.collection_channel,t.testResult.is_free_consultant,a.value)),C=e.useSlots(),p=()=>r.value.bookAppointment||!!C["book-appointment-box"],S=e.computed(()=>c.isTeledocSurveyEnabled(t.testResult.nps_doctor_consult,a.value));return(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[t.loading?(e.openBlock(),e.createBlock($,{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(y)?(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("div",null,[e.unref(r).patientName?(e.openBlock(),e.createBlock(g,{key:0,"first-name":t.testResult.first_name,class:"psc-px-4 psc-pb-2"},null,8,["first-name"])):e.createCommentVNode("",!0),e.createVNode(N,{"test-result":t.testResult,timeline:t.timeline,"list-action-event":t.listActionEvent,class:"psc-px-4 psc-pb-4"},null,8,["test-result","timeline","list-action-event"]),e.unref(r).healthSummary?(e.openBlock(),e.createBlock(s,{key:1},{default:e.withCtx(()=>[e.createVNode(E,{items:e.unref(m),"cta-button":t.testResult.is_free_consultant,"onClick:ctaButton":o[0]||(o[0]=u=>l("click:book-appointment"))},null,8,["items","cta-button"])]),_:1})):e.createCommentVNode("",!0),t.showResultReport?(e.openBlock(),e.createBlock(x,{key:2,"onClick:report":o[2]||(o[2]=u=>l("click:result-report"))},e.createSlots({_:2},[p()?{name:"book-appointment-box",fn:e.withCtx(()=>[n.$slots["book-appointment-box"]?e.renderSlot(n.$slots,"book-appointment-box",{key:0,compact:!0}):(e.openBlock(),e.createBlock(d,{key:1,compact:"","onClick:book":o[1]||(o[1]=u=>l("click:book-appointment"))}))]),key:"0"}:void 0]),1024)):p()?(e.openBlock(),e.createBlock(s,{key:3},{default:e.withCtx(()=>[n.$slots["book-appointment-box"]?e.renderSlot(n.$slots,"book-appointment-box",{key:0,compact:!1}):(e.openBlock(),e.createBlock(d,{key:1,"onClick:book":o[3]||(o[3]=u=>l("click:book-appointment"))}))]),_:3})):e.createCommentVNode("",!0),e.unref(r).doctorNote?(e.openBlock(),e.createBlock(s,{key:4},{default:e.withCtx(()=>[e.createVNode(V,{"doctor-note":t.testResult.doctor_note},null,8,["doctor-note"])]),_:1})):e.createCommentVNode("",!0),e.unref(b)?(e.openBlock(),e.createBlock(s,{key:5},{default:e.withCtx(()=>[e.createVNode(q,{"doctor-note-detail":i.testResult.doctor_note_detail,"survey-context":e.unref(S)?e.unref(v):void 0,"onClick:appointmentBooking":o[4]||(o[4]=u=>l("click:appointment-booking",u))},null,8,["doctor-note-detail","survey-context"])]),_:1})):e.createCommentVNode("",!0),e.unref(R)?(e.openBlock(),e.createBlock(s,{key:6},{default:e.withCtx(()=>[e.createVNode(e.unref(_),{variant:"bar","survey-slug":e.unref(f),context:e.unref(B),text:n.$t("psc.test_result_take_survey_button")},null,8,["survey-slug","context","text"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).upcomingAppointment?(e.openBlock(),e.createBlock(s,{key:7},{default:e.withCtx(()=>[e.createVNode(w,{"time-slot":t.testResult.consult_time},null,8,["time-slot"])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",j,[e.renderSlot(n.$slots,"header"),e.unref(k)?e.createCommentVNode("",!0):e.renderSlot(n.$slots,"default",{key:0}),e.renderSlot(n.$slots,"footer")])])):(e.openBlock(),e.createBlock(h,{key:1,class:"psc-px-4"},{"body-append":e.withCtx(()=>[e.createVNode(T,{class:"psc-mt-6"})]),_:1}))],64))]))}});module.exports=F;
2
2
  //# sourceMappingURL=TestResultDetail.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TestResultDetail.vue.js","sources":["../../../../../../src/components/TestResult/Mobile/ResultTab/TestResultDetail.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, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, renderSlot as _renderSlot, createSlots as _createSlots, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"consumer-test-result__ready\"\n}\nconst _hoisted_2 = { class: \"psc-px-4\" }\n\nimport { computed, defineAsyncComponent, toRef, useSlots } from 'vue';\nimport PatientName from '../../../Shared/PatientName.vue';\nimport ResultReadyV2, {\n type TimelineEvent,\n} from '../../Shared/ResultReadyV2.vue';\nimport RejectedResult from '../../Shared/RejectedResult.vue';\nimport BookAppointment from '../../Shared/BookAppointment.vue';\nimport ResultInsightCards from '../../Shared/ResultInsightCards.vue';\nimport DoctorNote from '../../Shared/DoctorNote.vue';\nimport DoctorNoteDetail from '../../Shared/DoctorNoteDetail.vue';\nimport type { TestResult } from '@/types';\nimport UpcomingAppointment from '../../Shared/UpcomingAppointment.vue';\nimport CallUsFilledButton from '../../Shared/CallUsFilledButton.vue';\nimport TestResultDetailSkeleton from '../../Shared/TestResultDetailSkeleton/TestResultDetailSkeleton.vue';\nimport HealthSummary from '@/components/TestResult/HealthSummary/HealthSummary.vue';\nimport TestResultSection from '../../Shared/TestResultSection.vue';\nimport { useTestResult } from '@/composables/TestResult';\nimport {\n buildTestResultSurveyContext,\n getSurveySlug,\n isSurveyEnabledForTestResult,\n isTeledocSurveyEnabled,\n} from '@/helpers/SurveyHelper';\nimport { useSurveyConfig } from '@/composables/useSurveyConfig';\n\n/**\n * Props\n */\nexport interface Props {\n testResult: TestResult;\n loading: boolean;\n hidePatientInfo?: boolean;\n hideSummary?: boolean;\n timeline?: TimelineEvent[];\n listActionEvent?: Record<string, string>;\n showResultReport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TestResultDetail',\n props: {\n testResult: null,\n loading: { type: Boolean },\n hidePatientInfo: { type: Boolean, default: false },\n hideSummary: { type: Boolean, default: false },\n timeline: { default: undefined },\n listActionEvent: { default: undefined },\n showResultReport: { type: Boolean, default: false }\n },\n emits: [\n 'click:book-appointment',\n 'click:appointment-booking',\n 'click:result-report',\n],\n setup(__props: any, { emit }) {\n\nconst props = __props as { testResult: TestResult, loading: boolean, hidePatientInfo: boolean, hideSummary: boolean, timeline: TimelineEvent[], listActionEvent: Record<string, string>, showResultReport: boolean };\n\n\n\nconst TakeSurvey = defineAsyncComponent(\n () => import('../../Shared/TakeSurvey.vue')\n);\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst { healthSummaryItems, hideContent, isViewable, visible } = useTestResult({\n testResult: toRef(props, 'testResult'),\n hidePatientInfo: toRef(props, 'hidePatientInfo'),\n hideSummary: toRef(props, 'hideSummary'),\n});\n\nconst { surveyConfig } = useSurveyConfig();\n\nconst doctorNoteSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult, 'doctor-note')\n);\n\nconst testSurveySlug = computed(() =>\n getSurveySlug(\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\nconst testSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult)\n);\n\nconst hasDoctorNoteDetail = computed(\n () =>\n !!props.testResult.doctor_note_detail &&\n props.testResult.doctor_note_detail.length > 0\n);\n\nconst isSurveyEnabled = computed(() =>\n isSurveyEnabledForTestResult(\n props.testResult.nps_test_result,\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\n// DPT-8995: the host's `book-appointment-box` slot replaces BookAppointment and is not\n// gated by is_free_consultant.\nconst slots = useSlots();\nconst showBookAppointmentBox = computed(\n () => visible.value.bookAppointment || !!slots['book-appointment-box']\n);\n\nconst isTeledocSurveyVisible = computed(() =>\n isTeledocSurveyEnabled(\n props.testResult.nps_doctor_consult,\n surveyConfig.value\n )\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", null, [\n (props.loading)\n ? (_openBlock(), _createBlock(TestResultDetailSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n (_unref(isViewable))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", null, [\n (_unref(visible).patientName)\n ? (_openBlock(), _createBlock(PatientName, {\n key: 0,\n \"first-name\": props.testResult.first_name,\n class: \"psc-px-4 psc-pb-2\"\n }, null, 8, [\"first-name\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(ResultReadyV2, {\n \"test-result\": props.testResult,\n timeline: props.timeline,\n \"list-action-event\": props.listActionEvent,\n class: \"psc-px-4 psc-pb-4\"\n }, null, 8, [\"test-result\", \"timeline\", \"list-action-event\"]),\n (_unref(visible).healthSummary)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 1 }, {\n default: _withCtx(() => [\n _createVNode(HealthSummary, {\n items: _unref(healthSummaryItems),\n \"cta-button\": props.testResult.is_free_consultant,\n \"onClick:ctaButton\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:book-appointment')))\n }, null, 8, [\"items\", \"cta-button\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (props.showResultReport)\n ? (_openBlock(), _createBlock(ResultInsightCards, {\n key: 2,\n \"onClick:report\": _cache[2] || (_cache[2] = ($event: any) => (emit('click:result-report')))\n }, _createSlots({ _: 2 }, [\n (_unref(showBookAppointmentBox))\n ? {\n name: \"book-appointment-box\",\n fn: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: true\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n compact: \"\",\n \"onClick:book\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:book-appointment')))\n }))\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n : (_unref(showBookAppointmentBox))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: false\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n \"onClick:book\": _cache[3] || (_cache[3] = ($event: any) => (emit('click:book-appointment')))\n }))\n ]),\n _: 3\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).doctorNote)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 4 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNote, {\n \"doctor-note\": props.testResult.doctor_note\n }, null, 8, [\"doctor-note\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(hasDoctorNoteDetail))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 5 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNoteDetail, {\n \"doctor-note-detail\": __props.testResult.doctor_note_detail!,\n \"survey-context\": \n _unref(isTeledocSurveyVisible) ? _unref(doctorNoteSurveyContext) : undefined\n ,\n \"onClick:appointmentBooking\": _cache[4] || (_cache[4] = ($event: any) => (\n emit('click:appointment-booking', $event)\n ))\n }, null, 8, [\"doctor-note-detail\", \"survey-context\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(isSurveyEnabled))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 6 }, {\n default: _withCtx(() => [\n _createVNode(_unref(TakeSurvey), {\n variant: \"bar\",\n \"survey-slug\": _unref(testSurveySlug),\n context: _unref(testSurveyContext),\n text: _ctx.$t('psc.test_result_take_survey_button')\n }, null, 8, [\"survey-slug\", \"context\", \"text\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).upcomingAppointment)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 7 }, {\n default: _withCtx(() => [\n _createVNode(UpcomingAppointment, {\n \"time-slot\": props.testResult.consult_time!\n }, null, 8, [\"time-slot\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"header\"),\n (!_unref(hideContent))\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"footer\")\n ])\n ]))\n : (_openBlock(), _createBlock(RejectedResult, {\n key: 1,\n class: \"psc-px-4\"\n }, {\n \"body-append\": _withCtx(() => [\n _createVNode(CallUsFilledButton, { class: \"psc-mt-6\" })\n ]),\n _: 1\n }))\n ], 64))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","emit","props","TakeSurvey","defineAsyncComponent","_interopNamespaceDefaultOnly","healthSummaryItems","hideContent","isViewable","visible","useTestResult","toRef","surveyConfig","useSurveyConfig","doctorNoteSurveyContext","computed","buildTestResultSurveyContext","testSurveySlug","getSurveySlug","testSurveyContext","hasDoctorNoteDetail","isSurveyEnabled","isSurveyEnabledForTestResult","slots","useSlots","showBookAppointmentBox","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","TestResultDetailSkeleton","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","$event","ResultInsightCards","_createSlots","_renderSlot","BookAppointment","DoctorNote","DoctorNoteDetail","UpcomingAppointment","RejectedResult","CallUsFilledButton"],"mappings":"i6BAGMA,EAAa,CACjB,IAAK,EACL,MAAO,6BACT,EACMC,EAAa,CAAE,MAAO,YAwCAC,EAAiBC,kBAAA,CAC3C,OAAQ,mBACR,MAAO,CACL,WAAY,KACZ,QAAS,CAAE,KAAM,OAAQ,EACzB,gBAAiB,CAAE,KAAM,QAAS,QAAS,EAAM,EACjD,YAAa,CAAE,KAAM,QAAS,QAAS,EAAM,EAC7C,SAAU,CAAE,QAAS,MAAU,EAC/B,gBAAiB,CAAE,QAAS,MAAU,EACtC,iBAAkB,CAAE,KAAM,QAAS,QAAS,EAAM,CACpD,EACA,MAAO,CACP,yBACA,4BACA,qBACF,EACE,MAAMC,EAAc,CAAE,KAAAC,GAAQ,CAEhC,MAAMC,EAAQF,EAIRG,E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MAAO,WAAY,CAAA,CACvD,EACD,EAAG,CAAA,CACJ,IACJ,EAAE,EAAA,CACV,EAEH,CAEA,CAAC"}
1
+ {"version":3,"file":"TestResultDetail.vue.js","sources":["../../../../../../src/components/TestResult/Mobile/ResultTab/TestResultDetail.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, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, renderSlot as _renderSlot, createSlots as _createSlots, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"consumer-test-result__ready\"\n}\nconst _hoisted_2 = { class: \"psc-px-4\" }\n\nimport { computed, defineAsyncComponent, toRef, useSlots } from 'vue';\nimport PatientName from '../../../Shared/PatientName.vue';\nimport ResultReadyV2, {\n type TimelineEvent,\n} from '../../Shared/ResultReadyV2.vue';\nimport RejectedResult from '../../Shared/RejectedResult.vue';\nimport BookAppointment from '../../Shared/BookAppointment.vue';\nimport ResultInsightCards from '../../Shared/ResultInsightCards.vue';\nimport DoctorNote from '../../Shared/DoctorNote.vue';\nimport DoctorNoteDetail from '../../Shared/DoctorNoteDetail.vue';\nimport type { TestResult } from '@/types';\nimport UpcomingAppointment from '../../Shared/UpcomingAppointment.vue';\nimport CallUsFilledButton from '../../Shared/CallUsFilledButton.vue';\nimport TestResultDetailSkeleton from '../../Shared/TestResultDetailSkeleton/TestResultDetailSkeleton.vue';\nimport HealthSummary from '@/components/TestResult/HealthSummary/HealthSummary.vue';\nimport TestResultSection from '../../Shared/TestResultSection.vue';\nimport { useTestResult } from '@/composables/TestResult';\nimport {\n buildTestResultSurveyContext,\n getSurveySlug,\n isSurveyEnabledForTestResult,\n isTeledocSurveyEnabled,\n} from '@/helpers/SurveyHelper';\nimport { useSurveyConfig } from '@/composables/useSurveyConfig';\n\n/**\n * Props\n */\nexport interface Props {\n testResult: TestResult;\n loading: boolean;\n hidePatientInfo?: boolean;\n hideSummary?: boolean;\n timeline?: TimelineEvent[];\n listActionEvent?: Record<string, string>;\n showResultReport?: boolean;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TestResultDetail',\n props: {\n testResult: null,\n loading: { type: Boolean },\n hidePatientInfo: { type: Boolean, default: false },\n hideSummary: { type: Boolean, default: false },\n timeline: { default: undefined },\n listActionEvent: { default: undefined },\n showResultReport: { type: Boolean, default: false }\n },\n emits: [\n 'click:book-appointment',\n 'click:appointment-booking',\n 'click:result-report',\n],\n setup(__props: any, { emit }) {\n\nconst props = __props as { testResult: TestResult, loading: boolean, hidePatientInfo: boolean, hideSummary: boolean, timeline: TimelineEvent[], listActionEvent: Record<string, string>, showResultReport: boolean };\n\n\n\nconst TakeSurvey = defineAsyncComponent(\n () => import('../../Shared/TakeSurvey.vue')\n);\n\n/**\n * Events\n */\n\n\n/**\n * Data\n */\nconst { healthSummaryItems, hideContent, isViewable, visible } = useTestResult({\n testResult: toRef(props, 'testResult'),\n hidePatientInfo: toRef(props, 'hidePatientInfo'),\n hideSummary: toRef(props, 'hideSummary'),\n});\n\nconst { surveyConfig } = useSurveyConfig();\n\nconst doctorNoteSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult, 'doctor-note')\n);\n\nconst testSurveySlug = computed(() =>\n getSurveySlug(\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\nconst testSurveyContext = computed(() =>\n buildTestResultSurveyContext(props.testResult)\n);\n\nconst hasDoctorNoteDetail = computed(\n () =>\n !!props.testResult.doctor_note_detail &&\n props.testResult.doctor_note_detail.length > 0\n);\n\nconst isSurveyEnabled = computed(() =>\n isSurveyEnabledForTestResult(\n props.testResult.nps_test_result,\n props.testResult.collection_channel,\n props.testResult.is_free_consultant,\n surveyConfig.value\n )\n);\n\n// DPT-8995: the host's `book-appointment-box` slot replaces BookAppointment and is not\n// gated by is_free_consultant. A function, not a computed: slots are not reactive, so a\n// computed would keep `false` when the host passes the slot after the first render.\nconst slots = useSlots();\nconst showBookAppointmentBox = () =>\n visible.value.bookAppointment || !!slots['book-appointment-box'];\n\nconst isTeledocSurveyVisible = computed(() =>\n isTeledocSurveyEnabled(\n props.testResult.nps_doctor_consult,\n surveyConfig.value\n )\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", null, [\n (props.loading)\n ? (_openBlock(), _createBlock(TestResultDetailSkeleton, { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n (_unref(isViewable))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", null, [\n (_unref(visible).patientName)\n ? (_openBlock(), _createBlock(PatientName, {\n key: 0,\n \"first-name\": props.testResult.first_name,\n class: \"psc-px-4 psc-pb-2\"\n }, null, 8, [\"first-name\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(ResultReadyV2, {\n \"test-result\": props.testResult,\n timeline: props.timeline,\n \"list-action-event\": props.listActionEvent,\n class: \"psc-px-4 psc-pb-4\"\n }, null, 8, [\"test-result\", \"timeline\", \"list-action-event\"]),\n (_unref(visible).healthSummary)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 1 }, {\n default: _withCtx(() => [\n _createVNode(HealthSummary, {\n items: _unref(healthSummaryItems),\n \"cta-button\": props.testResult.is_free_consultant,\n \"onClick:ctaButton\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:book-appointment')))\n }, null, 8, [\"items\", \"cta-button\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (props.showResultReport)\n ? (_openBlock(), _createBlock(ResultInsightCards, {\n key: 2,\n \"onClick:report\": _cache[2] || (_cache[2] = ($event: any) => (emit('click:result-report')))\n }, _createSlots({ _: 2 }, [\n (showBookAppointmentBox())\n ? {\n name: \"book-appointment-box\",\n fn: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: true\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n compact: \"\",\n \"onClick:book\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:book-appointment')))\n }))\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1024))\n : (showBookAppointmentBox())\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n (_ctx.$slots['book-appointment-box'])\n ? _renderSlot(_ctx.$slots, \"book-appointment-box\", {\n key: 0,\n compact: false\n })\n : (_openBlock(), _createBlock(BookAppointment, {\n key: 1,\n \"onClick:book\": _cache[3] || (_cache[3] = ($event: any) => (emit('click:book-appointment')))\n }))\n ]),\n _: 3\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).doctorNote)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 4 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNote, {\n \"doctor-note\": props.testResult.doctor_note\n }, null, 8, [\"doctor-note\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(hasDoctorNoteDetail))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 5 }, {\n default: _withCtx(() => [\n _createVNode(DoctorNoteDetail, {\n \"doctor-note-detail\": __props.testResult.doctor_note_detail!,\n \"survey-context\": \n _unref(isTeledocSurveyVisible) ? _unref(doctorNoteSurveyContext) : undefined\n ,\n \"onClick:appointmentBooking\": _cache[4] || (_cache[4] = ($event: any) => (\n emit('click:appointment-booking', $event)\n ))\n }, null, 8, [\"doctor-note-detail\", \"survey-context\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(isSurveyEnabled))\n ? (_openBlock(), _createBlock(TestResultSection, { key: 6 }, {\n default: _withCtx(() => [\n _createVNode(_unref(TakeSurvey), {\n variant: \"bar\",\n \"survey-slug\": _unref(testSurveySlug),\n context: _unref(testSurveyContext),\n text: _ctx.$t('psc.test_result_take_survey_button')\n }, null, 8, [\"survey-slug\", \"context\", \"text\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(visible).upcomingAppointment)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 7 }, {\n default: _withCtx(() => [\n _createVNode(UpcomingAppointment, {\n \"time-slot\": props.testResult.consult_time!\n }, null, 8, [\"time-slot\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"header\"),\n (!_unref(hideContent))\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"footer\")\n ])\n ]))\n : (_openBlock(), _createBlock(RejectedResult, {\n key: 1,\n class: \"psc-px-4\"\n }, {\n \"body-append\": _withCtx(() => [\n _createVNode(CallUsFilledButton, { class: \"psc-mt-6\" })\n ]),\n _: 1\n }))\n ], 64))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","emit","props","TakeSurvey","defineAsyncComponent","_interopNamespaceDefaultOnly","healthSummaryItems","hideContent","isViewable","visible","useTestResult","toRef","surveyConfig","useSurveyConfig","doctorNoteSurveyContext","computed","buildTestResultSurveyContext","testSurveySlug","getSurveySlug","testSurveyContext","hasDoctorNoteDetail","isSurveyEnabled","isSurveyEnabledForTestResult","slots","useSlots","showBookAppointmentBox","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","TestResultDetailSkeleton","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","$event","ResultInsightCards","_createSlots","_renderSlot","BookAppointment","DoctorNote","DoctorNoteDetail","UpcomingAppointment","RejectedResult","CallUsFilledButton"],"mappings":"i6BAGMA,EAAa,CACjB,IAAK,EACL,MAAO,6BACT,EACMC,EAAa,CA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