pat-shared-components 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/TestResult/Desktop/TestResultDetailDesktop.vue.js +1 -1
- package/dist/src/components/TestResult/Desktop/TestResultDetailDesktop.vue.js.map +1 -1
- package/dist/src/components/TestResult/Desktop/TestResultDetailDesktop.vue.mjs +111 -92
- package/dist/src/components/TestResult/Desktop/TestResultDetailDesktop.vue.mjs.map +1 -1
- package/dist/src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.js +1 -1
- package/dist/src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.js.map +1 -1
- package/dist/src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.mjs +102 -83
- package/dist/src/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.mjs.map +1 -1
- package/dist/src/components/TestResult/Shared/ResultInsightCards.vue.js +1 -1
- package/dist/src/components/TestResult/Shared/ResultInsightCards.vue.js.map +1 -1
- package/dist/src/components/TestResult/Shared/ResultInsightCards.vue.mjs +15 -21
- package/dist/src/components/TestResult/Shared/ResultInsightCards.vue.mjs.map +1 -1
- package/dist/types/components/TestResult/Desktop/TestResultDetailDesktop.vue.d.ts +3 -0
- package/dist/types/components/TestResult/Mobile/ResultTab/TestResultDetail.vue.d.ts +3 -0
- package/dist/types/components/TestResult/Shared/ResultInsightCards.vue.d.ts +6 -26
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),g=require("../../../composables/TestResult.js"),
|
|
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;
|
|
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 } 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\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 \"show-book-appointment\": __props.testResult.is_free_consultant,\n \"onClick:report\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:result-report'))),\n \"onClick:book\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:book-appointment')))\n }, null, 8, [\"show-book-appointment\"]))\n : (__props.testResult.is_free_consultant)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n _createVNode(BookAppointment, {\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","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createBlock","TestResultDetailDesktopSkeleton","_createElementBlock","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","ResultInsightCards","$event","BookAppointment","_createSlots","_renderSlot","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,SAA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../../../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,EACrC,gBAAiBS,EAAAA,MAAMT,EAAO,iBAAiB,EAC/C,YAAaS,EAAAA,MAAMT,EAAO,aAAa,CAAA,CACxC,EAEK,CAAE,aAAAU,GAAiBC,EAAAA,kBAEnBC,EAAgBC,MAAI,EAAK,EAEzBC,EAA0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
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { buildTestResultSurveyContext as
|
|
16
|
-
import { useSurveyConfig as
|
|
17
|
-
const
|
|
1
|
+
import { defineComponent 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";
|
|
2
|
+
import { useTestResult as G } from "../../../composables/TestResult.mjs";
|
|
3
|
+
import H from "../../Shared/PatientName.vue.mjs";
|
|
4
|
+
import J from "../Shared/ResultReadyV2.vue.mjs";
|
|
5
|
+
import K from "../Shared/RejectedResult.vue.mjs";
|
|
6
|
+
import S from "../Shared/BookAppointment.vue.mjs";
|
|
7
|
+
import L from "../Shared/ResultInsightCards.vue.mjs";
|
|
8
|
+
import M from "../HealthSummary/HealthSummary.vue.mjs";
|
|
9
|
+
import p from "../Shared/TestResultSection.vue.mjs";
|
|
10
|
+
import O from "../Shared/CallUsFilledButton.vue.mjs";
|
|
11
|
+
import Q from "../Shared/DoctorNote.vue.mjs";
|
|
12
|
+
import U from "../Shared/DoctorNoteDetail.vue.mjs";
|
|
13
|
+
import W from "../Shared/UpcomingAppointment.vue.mjs";
|
|
14
|
+
import X from "../Shared/TestResultDetailSkeleton/TestResultDetailDesktopSkeleton.vue.mjs";
|
|
15
|
+
import { buildTestResultSurveyContext as $, getSurveySlug as Y, isSurveyEnabledForTestResult as Z, isTeledocSurveyEnabled as tt } from "../../../helpers/SurveyHelper.mjs";
|
|
16
|
+
import { useSurveyConfig as et } from "../../../composables/useSurveyConfig.mjs";
|
|
17
|
+
const ot = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "psc-flex psc-items-start"
|
|
20
|
-
},
|
|
20
|
+
}, st = { class: "-psc-ml-4 psc-mr-16 psc-w-[480px] psc-shrink-0 psc-grow-0" }, nt = { class: "psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto" }, lt = { class: "psc-min-w-0 psc-flex-1" }, it = { class: "psc-sticky psc-top-[154px] psc-max-h-[calc(100vh-154px)] psc-overflow-y-auto" }, St = /* @__PURE__ */ I({
|
|
21
21
|
__name: "TestResultDetailDesktop",
|
|
22
22
|
props: {
|
|
23
23
|
testResult: null,
|
|
@@ -34,134 +34,153 @@ const Z = {
|
|
|
34
34
|
"click:appointment-booking",
|
|
35
35
|
"click:result-report"
|
|
36
36
|
],
|
|
37
|
-
setup(
|
|
38
|
-
const t =
|
|
37
|
+
setup(k, { emit: m }) {
|
|
38
|
+
const t = k, g = P(
|
|
39
39
|
() => import("../Shared/TakeSurvey.vue2.mjs")
|
|
40
|
-
), { healthSummaryItems:
|
|
40
|
+
), { healthSummaryItems: B, hideContent: C, isViewable: w, visible: d } = G({
|
|
41
41
|
testResult: v(t, "testResult"),
|
|
42
42
|
hidePatientInfo: v(t, "hidePatientInfo"),
|
|
43
43
|
hideSummary: v(t, "hideSummary")
|
|
44
|
-
}), { surveyConfig:
|
|
45
|
-
() =>
|
|
46
|
-
),
|
|
47
|
-
() =>
|
|
44
|
+
}), { surveyConfig: y } = et(), b = j(!1), T = a(
|
|
45
|
+
() => $(t.testResult, "doctor-note")
|
|
46
|
+
), E = a(
|
|
47
|
+
() => Y(
|
|
48
48
|
t.testResult.collection_channel,
|
|
49
49
|
t.testResult.is_free_consultant,
|
|
50
|
-
|
|
50
|
+
y.value
|
|
51
51
|
)
|
|
52
|
-
),
|
|
53
|
-
() =>
|
|
54
|
-
),
|
|
52
|
+
), N = a(
|
|
53
|
+
() => $(t.testResult)
|
|
54
|
+
), V = a(
|
|
55
55
|
() => !!t.testResult.doctor_note_detail && t.testResult.doctor_note_detail.length > 0
|
|
56
|
-
),
|
|
57
|
-
() =>
|
|
56
|
+
), A = a(
|
|
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
|
-
),
|
|
64
|
-
() =>
|
|
63
|
+
), D = q(), R = a(
|
|
64
|
+
() => !!t.testResult.is_free_consultant || !!D["book-appointment-box"]
|
|
65
|
+
), F = a(
|
|
66
|
+
() => tt(
|
|
65
67
|
t.testResult.nps_doctor_consult,
|
|
66
|
-
|
|
68
|
+
y.value
|
|
67
69
|
)
|
|
68
70
|
);
|
|
69
|
-
return (
|
|
70
|
-
e(
|
|
71
|
-
f("div",
|
|
72
|
-
f("div",
|
|
73
|
-
e(d).patientName ? (o(), s(
|
|
71
|
+
return (n, i) => t.loading ? (o(), s(X, { key: 0 })) : (o(), h(z, { key: 1 }, [
|
|
72
|
+
e(w) ? (o(), h("div", ot, [
|
|
73
|
+
f("div", st, [
|
|
74
|
+
f("div", nt, [
|
|
75
|
+
e(d).patientName ? (o(), s(H, {
|
|
74
76
|
key: 0,
|
|
75
77
|
"first-name": t.testResult.first_name,
|
|
76
78
|
class: "psc-px-4 psc-pb-2"
|
|
77
|
-
}, null, 8, ["first-name"])) :
|
|
78
|
-
|
|
79
|
+
}, null, 8, ["first-name"])) : r("", !0),
|
|
80
|
+
c(J, {
|
|
79
81
|
"test-result": t.testResult,
|
|
80
82
|
timeline: t.timeline,
|
|
81
83
|
"list-action-event": t.listActionEvent,
|
|
82
84
|
class: "psc-px-4 psc-pb-4"
|
|
83
85
|
}, null, 8, ["test-result", "timeline", "list-action-event"]),
|
|
84
|
-
e(d).healthSummary ? (o(), s(
|
|
85
|
-
default:
|
|
86
|
-
|
|
86
|
+
e(d).healthSummary ? (o(), s(p, { key: 1 }, {
|
|
87
|
+
default: l(() => [
|
|
88
|
+
c(M, { items: e(B) }, null, 8, ["items"])
|
|
87
89
|
]),
|
|
88
90
|
_: 1
|
|
89
|
-
})) :
|
|
90
|
-
t.showResultReport ? (o(), s(
|
|
91
|
+
})) : r("", !0),
|
|
92
|
+
t.showResultReport ? (o(), s(L, {
|
|
91
93
|
key: 2,
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
"onClick:report": i[1] || (i[1] = (_) => m("click:result-report"))
|
|
95
|
+
}, x({ _: 2 }, [
|
|
96
|
+
e(R) ? {
|
|
97
|
+
name: "book-appointment-box",
|
|
98
|
+
fn: l(() => [
|
|
99
|
+
n.$slots["book-appointment-box"] ? u(n.$slots, "book-appointment-box", {
|
|
100
|
+
key: 0,
|
|
101
|
+
compact: !0
|
|
102
|
+
}) : (o(), s(S, {
|
|
103
|
+
key: 1,
|
|
104
|
+
compact: "",
|
|
105
|
+
"onClick:book": i[0] || (i[0] = (_) => m("click:book-appointment"))
|
|
106
|
+
}))
|
|
107
|
+
]),
|
|
108
|
+
key: "0"
|
|
109
|
+
} : void 0
|
|
110
|
+
]), 1024)) : e(R) ? (o(), s(p, { key: 3 }, {
|
|
111
|
+
default: l(() => [
|
|
112
|
+
n.$slots["book-appointment-box"] ? u(n.$slots, "book-appointment-box", {
|
|
113
|
+
key: 0,
|
|
114
|
+
compact: !1
|
|
115
|
+
}) : (o(), s(S, {
|
|
116
|
+
key: 1,
|
|
117
|
+
"onClick:book": i[2] || (i[2] = () => {
|
|
118
|
+
b.value = !0, m("click:book-appointment");
|
|
100
119
|
})
|
|
101
|
-
},
|
|
102
|
-
|
|
120
|
+
}, x({ _: 2 }, [
|
|
121
|
+
k.enableBookingFeature && b.value ? {
|
|
103
122
|
name: "content",
|
|
104
|
-
fn:
|
|
105
|
-
|
|
123
|
+
fn: l(() => [
|
|
124
|
+
u(n.$slots, "book-appointment")
|
|
106
125
|
]),
|
|
107
126
|
key: "0"
|
|
108
127
|
} : void 0
|
|
109
|
-
]), 1024)
|
|
128
|
+
]), 1024))
|
|
110
129
|
]),
|
|
111
130
|
_: 3
|
|
112
|
-
})) :
|
|
113
|
-
e(d).doctorNote ? (o(), s(
|
|
114
|
-
default:
|
|
115
|
-
|
|
131
|
+
})) : r("", !0),
|
|
132
|
+
e(d).doctorNote ? (o(), s(p, { key: 4 }, {
|
|
133
|
+
default: l(() => [
|
|
134
|
+
c(Q, {
|
|
116
135
|
"doctor-note": t.testResult.doctor_note
|
|
117
136
|
}, null, 8, ["doctor-note"])
|
|
118
137
|
]),
|
|
119
138
|
_: 1
|
|
120
|
-
})) :
|
|
121
|
-
e(
|
|
122
|
-
default:
|
|
123
|
-
|
|
124
|
-
"doctor-note-detail":
|
|
125
|
-
"survey-context": e(
|
|
126
|
-
"onClick:appointmentBooking":
|
|
139
|
+
})) : r("", !0),
|
|
140
|
+
e(V) ? (o(), s(p, { key: 5 }, {
|
|
141
|
+
default: l(() => [
|
|
142
|
+
c(U, {
|
|
143
|
+
"doctor-note-detail": k.testResult.doctor_note_detail,
|
|
144
|
+
"survey-context": e(F) ? e(T) : void 0,
|
|
145
|
+
"onClick:appointmentBooking": i[3] || (i[3] = (_) => m("click:appointment-booking", _))
|
|
127
146
|
}, null, 8, ["doctor-note-detail", "survey-context"])
|
|
128
147
|
]),
|
|
129
148
|
_: 1
|
|
130
|
-
})) :
|
|
131
|
-
e(
|
|
132
|
-
default:
|
|
133
|
-
|
|
149
|
+
})) : r("", !0),
|
|
150
|
+
e(A) ? (o(), s(p, { key: 6 }, {
|
|
151
|
+
default: l(() => [
|
|
152
|
+
c(e(g), {
|
|
134
153
|
variant: "bar",
|
|
135
|
-
"survey-slug": e(
|
|
136
|
-
context: e(
|
|
137
|
-
text:
|
|
154
|
+
"survey-slug": e(E),
|
|
155
|
+
context: e(N),
|
|
156
|
+
text: n.$t("psc.test_result_take_survey_button")
|
|
138
157
|
}, null, 8, ["survey-slug", "context", "text"])
|
|
139
158
|
]),
|
|
140
159
|
_: 1
|
|
141
|
-
})) :
|
|
142
|
-
e(d).upcomingAppointment ? (o(), s(
|
|
143
|
-
default:
|
|
144
|
-
|
|
160
|
+
})) : r("", !0),
|
|
161
|
+
e(d).upcomingAppointment ? (o(), s(p, { key: 7 }, {
|
|
162
|
+
default: l(() => [
|
|
163
|
+
c(W, {
|
|
145
164
|
"time-slot": t.testResult.consult_time
|
|
146
165
|
}, null, 8, ["time-slot"])
|
|
147
166
|
]),
|
|
148
167
|
_: 1
|
|
149
|
-
})) :
|
|
168
|
+
})) : r("", !0)
|
|
150
169
|
])
|
|
151
170
|
]),
|
|
152
|
-
f("div",
|
|
153
|
-
f("div",
|
|
154
|
-
|
|
155
|
-
e(
|
|
156
|
-
|
|
171
|
+
f("div", lt, [
|
|
172
|
+
f("div", it, [
|
|
173
|
+
u(n.$slots, "header"),
|
|
174
|
+
e(C) ? r("", !0) : u(n.$slots, "default", { key: 0 }),
|
|
175
|
+
u(n.$slots, "footer")
|
|
157
176
|
])
|
|
158
177
|
])
|
|
159
|
-
])) : (o(), s(
|
|
178
|
+
])) : (o(), s(K, {
|
|
160
179
|
key: 1,
|
|
161
180
|
class: "psc-px-4"
|
|
162
181
|
}, {
|
|
163
|
-
"body-append":
|
|
164
|
-
|
|
182
|
+
"body-append": l(() => [
|
|
183
|
+
c(O, { class: "psc-mt-6" })
|
|
165
184
|
]),
|
|
166
185
|
_: 1
|
|
167
186
|
}))
|
|
@@ -169,6 +188,6 @@ const Z = {
|
|
|
169
188
|
}
|
|
170
189
|
});
|
|
171
190
|
export {
|
|
172
|
-
|
|
191
|
+
St as default
|
|
173
192
|
};
|
|
174
193
|
//# sourceMappingURL=TestResultDetailDesktop.vue.mjs.map
|
|
@@ -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 } 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\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 \"show-book-appointment\": __props.testResult.is_free_consultant,\n \"onClick:report\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:result-report'))),\n \"onClick:book\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:book-appointment')))\n }, null, 8, [\"show-book-appointment\"]))\n : (__props.testResult.is_free_consultant)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n _createVNode(BookAppointment, {\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","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createBlock","TestResultDetailDesktopSkeleton","_createElementBlock","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","ResultInsightCards","$event","BookAppointment","_createSlots","_renderSlot","DoctorNote","DoctorNoteDetail","UpcomingAppointment","RejectedResult","CallUsFilledButton"],"mappings":";;;;;;;;;;;;;;;;AAGA,MAAMA,IAAa;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,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,EAAO3B,CAAW,IAEhB8B,EAAoB,IAAI,EAAI,IAD5BU,EAAYpB,EAAK,QAAQ,WAAW,EAAE,KAAK,EAAG,CAAA;AAAA,YAElDoB,EAAYpB,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.\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,SAAS,OA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AAA,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,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
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;
|
|
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, createElementVNode as _createElementVNode, renderSlot as _renderSlot, 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 } 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\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 \"show-book-appointment\": _unref(visible).bookAppointment,\n \"onClick:report\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:result-report'))),\n \"onClick:book\": _cache[2] || (_cache[2] = ($event: any) => (emit('click:book-appointment')))\n }, null, 8, [\"show-book-appointment\"]))\n : (_unref(visible).bookAppointment)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n _createVNode(BookAppointment, {\n \"onClick:book\": _cache[3] || (_cache[3] = ($event: any) => (emit('click:book-appointment')))\n })\n ]),\n _: 1\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","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","TestResultDetailSkeleton","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","$event","ResultInsightCards","BookAppointment","DoctorNote","DoctorNoteDetail","UpcomingAppointment","_renderSlot","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,EAAaC,EAAA,qBACjB,IAAM,QAAO,QAAA,EAAA,KAAA,IAAAC,EAAA,QAAA,iCAA6B,CAAA,CAAA,CAAA,EAWtC,CAAE,mBAAAC,EAAoB,YAAAC,EAAa,WAAAC,EAAY,QAAAC,CAAA,EAAYC,EAAAA,cAAc,CAC7E,WAAYC,EAAAA,MAAMT,EAAO,YAAY,EACrC,gBAAiBS,EAAAA,MAAMT,EAAO,iBAAiB,EAC/C,YAAaS,EAAAA,MAAMT,EAAO,aAAa,CAAA,CACxC,EAEK,CAAE,aAAAU,GAAiBC,EAAAA,kBAEnBC,EAA0BC,EAAA,SAAS,IACvCC,+BAA6Bd,EAAM,WAAY,aAAa,CAAA,EAGxDe,EAAiBF,EAAA,SAAS,IAC9BG,EAAA,cACEhB,EAAM,WAAW,mBACjBA,EAAM,WAAW,mBACjBU,EAAa,KACf,CAAA,EAGIO,EAAoBJ,EAAA,SAAS,IACjCC,EAA6B,6BAAAd,EAAM,UAAU,CAAA,EAGzCkB,E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,UAAA,EAAGE,cAAamB,EAAgB,CAC1C,IAAK,EACL,MAAO,UAAA,EACN,CACD,cAAeT,UAAS,IAAM,CAC5BH,EAAAA,YAAaa,EAAoB,CAAE,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.\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","Upcom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CAAC,WAAW,CAAC,CAAA,CAC1B,EACD,EAAG,CAAA,CACJ,GACDoC,EAAAA,mBAAoB,GAAI,EAAI,CAAA,CACjC,EACDF,EAAA,mBAAoB,MAAOvC,EAAY,CACrCkD,aAAYnB,EAAK,OAAQ,QAAQ,EAC/BO,EAAA,MAAO5B,CAAW,EAEhB+B,EAAAA,mBAAoB,GAAI,EAAI,EAD5BS,EAAAA,WAAYnB,EAAK,OAAQ,UAAW,CAAE,IAAK,CAAG,CAAA,EAElDmB,aAAYnB,EAAK,OAAQ,QAAQ,CAAA,CAClC,CACF,CAAA,IACAE,EAAW,UAAA,EAAGE,cAAaoB,EAAgB,CAC1C,IAAK,EACL,MAAO,UAAA,EACN,CACD,cAAeV,UAAS,IAAM,CAC5BH,EAAAA,YAAac,EAAoB,CAAE,MAAO,WAAY,CAAA,CACvD,EACD,EAAG,CAAA,CACJ,IACJ,EAAE,EAAA,CACV,EAEH,CAEA,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { useTestResult as
|
|
15
|
-
import { buildTestResultSurveyContext as
|
|
16
|
-
import { useSurveyConfig as
|
|
17
|
-
const
|
|
1
|
+
import { defineComponent as I, defineAsyncComponent as D, toRef as y, computed as u, useSlots as P, openBlock as o, createElementBlock as _, createBlock as s, Fragment as F, unref as e, createElementVNode as R, createCommentVNode as i, createVNode as a, withCtx as r, createSlots as j, renderSlot as f } from "vue";
|
|
2
|
+
import q from "../../../Shared/PatientName.vue.mjs";
|
|
3
|
+
import z from "../../Shared/ResultReadyV2.vue.mjs";
|
|
4
|
+
import G from "../../Shared/RejectedResult.vue.mjs";
|
|
5
|
+
import S from "../../Shared/BookAppointment.vue.mjs";
|
|
6
|
+
import H from "../../Shared/ResultInsightCards.vue.mjs";
|
|
7
|
+
import J from "../../Shared/DoctorNote.vue.mjs";
|
|
8
|
+
import K from "../../Shared/DoctorNoteDetail.vue.mjs";
|
|
9
|
+
import L from "../../Shared/UpcomingAppointment.vue.mjs";
|
|
10
|
+
import M from "../../Shared/CallUsFilledButton.vue.mjs";
|
|
11
|
+
import O from "../../Shared/TestResultDetailSkeleton/TestResultDetailSkeleton.vue.mjs";
|
|
12
|
+
import Q from "../../HealthSummary/HealthSummary.vue.mjs";
|
|
13
|
+
import m from "../../Shared/TestResultSection.vue.mjs";
|
|
14
|
+
import { useTestResult as U } from "../../../../composables/TestResult.mjs";
|
|
15
|
+
import { buildTestResultSurveyContext as $, getSurveySlug as W, isSurveyEnabledForTestResult as X, isTeledocSurveyEnabled as Y } from "../../../../helpers/SurveyHelper.mjs";
|
|
16
|
+
import { useSurveyConfig as Z } from "../../../../composables/useSurveyConfig.mjs";
|
|
17
|
+
const tt = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "consumer-test-result__ready"
|
|
20
|
-
},
|
|
20
|
+
}, et = { class: "psc-px-4" }, vt = /* @__PURE__ */ I({
|
|
21
21
|
__name: "TestResultDetail",
|
|
22
22
|
props: {
|
|
23
23
|
testResult: null,
|
|
@@ -33,125 +33,144 @@ const W = {
|
|
|
33
33
|
"click:appointment-booking",
|
|
34
34
|
"click:result-report"
|
|
35
35
|
],
|
|
36
|
-
setup(v, { emit:
|
|
37
|
-
const t = v,
|
|
36
|
+
setup(v, { emit: c }) {
|
|
37
|
+
const t = v, g = D(
|
|
38
38
|
() => import("../../Shared/TakeSurvey.vue2.mjs")
|
|
39
|
-
), { healthSummaryItems:
|
|
40
|
-
testResult:
|
|
41
|
-
hidePatientInfo:
|
|
42
|
-
hideSummary:
|
|
43
|
-
}), { surveyConfig:
|
|
44
|
-
() =>
|
|
45
|
-
),
|
|
46
|
-
() =>
|
|
39
|
+
), { healthSummaryItems: x, hideContent: C, isViewable: h, visible: p } = U({
|
|
40
|
+
testResult: y(t, "testResult"),
|
|
41
|
+
hidePatientInfo: y(t, "hidePatientInfo"),
|
|
42
|
+
hideSummary: y(t, "hideSummary")
|
|
43
|
+
}), { surveyConfig: k } = Z(), B = u(
|
|
44
|
+
() => $(t.testResult, "doctor-note")
|
|
45
|
+
), T = u(
|
|
46
|
+
() => W(
|
|
47
47
|
t.testResult.collection_channel,
|
|
48
48
|
t.testResult.is_free_consultant,
|
|
49
|
-
|
|
49
|
+
k.value
|
|
50
50
|
)
|
|
51
|
-
),
|
|
52
|
-
() =>
|
|
53
|
-
),
|
|
51
|
+
), E = u(
|
|
52
|
+
() => $(t.testResult)
|
|
53
|
+
), N = u(
|
|
54
54
|
() => !!t.testResult.doctor_note_detail && t.testResult.doctor_note_detail.length > 0
|
|
55
|
-
),
|
|
56
|
-
() =>
|
|
55
|
+
), A = u(
|
|
56
|
+
() => X(
|
|
57
57
|
t.testResult.nps_test_result,
|
|
58
58
|
t.testResult.collection_channel,
|
|
59
59
|
t.testResult.is_free_consultant,
|
|
60
|
-
|
|
60
|
+
k.value
|
|
61
61
|
)
|
|
62
|
-
),
|
|
63
|
-
() =>
|
|
62
|
+
), V = P(), b = u(
|
|
63
|
+
() => p.value.bookAppointment || !!V["book-appointment-box"]
|
|
64
|
+
), w = u(
|
|
65
|
+
() => Y(
|
|
64
66
|
t.testResult.nps_doctor_consult,
|
|
65
|
-
|
|
67
|
+
k.value
|
|
66
68
|
)
|
|
67
69
|
);
|
|
68
|
-
return (
|
|
69
|
-
t.loading ? (o(),
|
|
70
|
-
e(
|
|
70
|
+
return (l, n) => (o(), _("div", null, [
|
|
71
|
+
t.loading ? (o(), s(O, { key: 0 })) : (o(), _(F, { key: 1 }, [
|
|
72
|
+
e(h) ? (o(), _("div", tt, [
|
|
71
73
|
R("div", null, [
|
|
72
|
-
e(
|
|
74
|
+
e(p).patientName ? (o(), s(q, {
|
|
73
75
|
key: 0,
|
|
74
76
|
"first-name": t.testResult.first_name,
|
|
75
77
|
class: "psc-px-4 psc-pb-2"
|
|
76
|
-
}, null, 8, ["first-name"])) :
|
|
77
|
-
|
|
78
|
+
}, null, 8, ["first-name"])) : i("", !0),
|
|
79
|
+
a(z, {
|
|
78
80
|
"test-result": t.testResult,
|
|
79
81
|
timeline: t.timeline,
|
|
80
82
|
"list-action-event": t.listActionEvent,
|
|
81
83
|
class: "psc-px-4 psc-pb-4"
|
|
82
84
|
}, null, 8, ["test-result", "timeline", "list-action-event"]),
|
|
83
|
-
e(
|
|
85
|
+
e(p).healthSummary ? (o(), s(m, { key: 1 }, {
|
|
84
86
|
default: r(() => [
|
|
85
|
-
|
|
86
|
-
items: e(
|
|
87
|
+
a(Q, {
|
|
88
|
+
items: e(x),
|
|
87
89
|
"cta-button": t.testResult.is_free_consultant,
|
|
88
|
-
"onClick:ctaButton":
|
|
90
|
+
"onClick:ctaButton": n[0] || (n[0] = (d) => c("click:book-appointment"))
|
|
89
91
|
}, null, 8, ["items", "cta-button"])
|
|
90
92
|
]),
|
|
91
93
|
_: 1
|
|
92
|
-
})) :
|
|
93
|
-
t.showResultReport ? (o(),
|
|
94
|
+
})) : i("", !0),
|
|
95
|
+
t.showResultReport ? (o(), s(H, {
|
|
94
96
|
key: 2,
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
"onClick:report": n[2] || (n[2] = (d) => c("click:result-report"))
|
|
98
|
+
}, j({ _: 2 }, [
|
|
99
|
+
e(b) ? {
|
|
100
|
+
name: "book-appointment-box",
|
|
101
|
+
fn: r(() => [
|
|
102
|
+
l.$slots["book-appointment-box"] ? f(l.$slots, "book-appointment-box", {
|
|
103
|
+
key: 0,
|
|
104
|
+
compact: !0
|
|
105
|
+
}) : (o(), s(S, {
|
|
106
|
+
key: 1,
|
|
107
|
+
compact: "",
|
|
108
|
+
"onClick:book": n[1] || (n[1] = (d) => c("click:book-appointment"))
|
|
109
|
+
}))
|
|
110
|
+
]),
|
|
111
|
+
key: "0"
|
|
112
|
+
} : void 0
|
|
113
|
+
]), 1024)) : e(b) ? (o(), s(m, { key: 3 }, {
|
|
99
114
|
default: r(() => [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
l.$slots["book-appointment-box"] ? f(l.$slots, "book-appointment-box", {
|
|
116
|
+
key: 0,
|
|
117
|
+
compact: !1
|
|
118
|
+
}) : (o(), s(S, {
|
|
119
|
+
key: 1,
|
|
120
|
+
"onClick:book": n[3] || (n[3] = (d) => c("click:book-appointment"))
|
|
121
|
+
}))
|
|
103
122
|
]),
|
|
104
|
-
_:
|
|
105
|
-
})) :
|
|
106
|
-
e(
|
|
123
|
+
_: 3
|
|
124
|
+
})) : i("", !0),
|
|
125
|
+
e(p).doctorNote ? (o(), s(m, { key: 4 }, {
|
|
107
126
|
default: r(() => [
|
|
108
|
-
|
|
127
|
+
a(J, {
|
|
109
128
|
"doctor-note": t.testResult.doctor_note
|
|
110
129
|
}, null, 8, ["doctor-note"])
|
|
111
130
|
]),
|
|
112
131
|
_: 1
|
|
113
|
-
})) :
|
|
114
|
-
e(
|
|
132
|
+
})) : i("", !0),
|
|
133
|
+
e(N) ? (o(), s(m, { key: 5 }, {
|
|
115
134
|
default: r(() => [
|
|
116
|
-
|
|
135
|
+
a(K, {
|
|
117
136
|
"doctor-note-detail": v.testResult.doctor_note_detail,
|
|
118
|
-
"survey-context": e(
|
|
119
|
-
"onClick:appointmentBooking":
|
|
137
|
+
"survey-context": e(w) ? e(B) : void 0,
|
|
138
|
+
"onClick:appointmentBooking": n[4] || (n[4] = (d) => c("click:appointment-booking", d))
|
|
120
139
|
}, null, 8, ["doctor-note-detail", "survey-context"])
|
|
121
140
|
]),
|
|
122
141
|
_: 1
|
|
123
|
-
})) :
|
|
124
|
-
e(
|
|
142
|
+
})) : i("", !0),
|
|
143
|
+
e(A) ? (o(), s(m, { key: 6 }, {
|
|
125
144
|
default: r(() => [
|
|
126
|
-
|
|
145
|
+
a(e(g), {
|
|
127
146
|
variant: "bar",
|
|
128
|
-
"survey-slug": e(
|
|
129
|
-
context: e(
|
|
130
|
-
text:
|
|
147
|
+
"survey-slug": e(T),
|
|
148
|
+
context: e(E),
|
|
149
|
+
text: l.$t("psc.test_result_take_survey_button")
|
|
131
150
|
}, null, 8, ["survey-slug", "context", "text"])
|
|
132
151
|
]),
|
|
133
152
|
_: 1
|
|
134
|
-
})) :
|
|
135
|
-
e(
|
|
153
|
+
})) : i("", !0),
|
|
154
|
+
e(p).upcomingAppointment ? (o(), s(m, { key: 7 }, {
|
|
136
155
|
default: r(() => [
|
|
137
|
-
|
|
156
|
+
a(L, {
|
|
138
157
|
"time-slot": t.testResult.consult_time
|
|
139
158
|
}, null, 8, ["time-slot"])
|
|
140
159
|
]),
|
|
141
160
|
_: 1
|
|
142
|
-
})) :
|
|
161
|
+
})) : i("", !0)
|
|
143
162
|
]),
|
|
144
|
-
R("div",
|
|
145
|
-
|
|
146
|
-
e(
|
|
147
|
-
|
|
163
|
+
R("div", et, [
|
|
164
|
+
f(l.$slots, "header"),
|
|
165
|
+
e(C) ? i("", !0) : f(l.$slots, "default", { key: 0 }),
|
|
166
|
+
f(l.$slots, "footer")
|
|
148
167
|
])
|
|
149
|
-
])) : (o(),
|
|
168
|
+
])) : (o(), s(G, {
|
|
150
169
|
key: 1,
|
|
151
170
|
class: "psc-px-4"
|
|
152
171
|
}, {
|
|
153
172
|
"body-append": r(() => [
|
|
154
|
-
|
|
173
|
+
a(M, { class: "psc-mt-6" })
|
|
155
174
|
]),
|
|
156
175
|
_: 1
|
|
157
176
|
}))
|
|
@@ -160,6 +179,6 @@ const W = {
|
|
|
160
179
|
}
|
|
161
180
|
});
|
|
162
181
|
export {
|
|
163
|
-
|
|
182
|
+
vt as default
|
|
164
183
|
};
|
|
165
184
|
//# sourceMappingURL=TestResultDetail.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestResultDetail.vue.mjs","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, createElementVNode as _createElementVNode, renderSlot as _renderSlot, 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 } 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\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 \"show-book-appointment\": _unref(visible).bookAppointment,\n \"onClick:report\": _cache[1] || (_cache[1] = ($event: any) => (emit('click:result-report'))),\n \"onClick:book\": _cache[2] || (_cache[2] = ($event: any) => (emit('click:book-appointment')))\n }, null, 8, [\"show-book-appointment\"]))\n : (_unref(visible).bookAppointment)\n ? (_openBlock(), _createBlock(TestResultSection, { key: 3 }, {\n default: _withCtx(() => [\n _createVNode(BookAppointment, {\n \"onClick:book\": _cache[3] || (_cache[3] = ($event: any) => (emit('click:book-appointment')))\n })\n ]),\n _: 1\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","healthSummaryItems","hideContent","isViewable","visible","useTestResult","toRef","surveyConfig","useSurveyConfig","doctorNoteSurveyContext","computed","buildTestResultSurveyContext","testSurveySlug","getSurveySlug","testSurveyContext","hasDoctorNoteDetail","isSurveyEnabled","isSurveyEnabledForTestResult","isTeledocSurveyVisible","isTeledocSurveyEnabled","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","TestResultDetailSkeleton","_Fragment","_unref","_createElementVNode","PatientName","_createCommentVNode","_createVNode","ResultReadyV2","TestResultSection","_withCtx","HealthSummary","$event","ResultInsightCards","BookAppointment","DoctorNote","DoctorNoteDetail","UpcomingAppointment","_renderSlot","RejectedResult","CallUsFilledButton"],"mappings":";;;;;;;;;;;;;;;;AAGA,MAAMA,IAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GACMC,IAAa,EAAE,OAAO,cAwCAC,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,UAAU,EAAE,SAAS,OAAU;AAAA,IAC/B,iBAAiB,EAAE,SAAS,OAAU;AAAA,IACtC,kBAAkB,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,EACpD;AAAA,EACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACE,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAEhC,UAAMC,IAAQF,GAIRG,IAAaC;AAAA,MACjB,MAAM,OAAO,kCAA6B;AAAA,IAAA,GAWtC,EAAE,oBAAAC,GAAoB,aAAAC,GAAa,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAc;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C;AAAA,gBAAA,GACjD,MAAM,GAAG,CAAC,eAAe,WAAW,MAAM,CAAC;AAAA,cAAA,CAC/C;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDU,EAAoB,IAAI,EAAI;AAAA,YAC/BH,EAAOvB,CAAO,EAAE,uBACZkB,EAAA,GAAcE,EAAaS,GAAmB,EAAE,KAAK,KAAK;AAAA,cACzD,SAASC,EAAS,MAAM;AAAA,gBACtBH,EAAaU,GAAqB;AAAA,kBAChC,aAAa3C,EAAM,WAAW;AAAA,gBAC7B,GAAA,MAAM,GAAG,CAAC,WAAW,CAAC;AAAA,cAAA,CAC1B;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDgC,EAAoB,IAAI,EAAI;AAAA,UAAA,CACjC;AAAA,UACDF,EAAoB,OAAOnC,GAAY;AAAA,YACrCiD,EAAYtB,EAAK,QAAQ,QAAQ;AAAA,YAC/BO,EAAOzB,CAAW,IAEhB4B,EAAoB,IAAI,EAAI,IAD5BY,EAAYtB,EAAK,QAAQ,WAAW,EAAE,KAAK,EAAG,CAAA;AAAA,YAElDsB,EAAYtB,EAAK,QAAQ,QAAQ;AAAA,UAAA,CAClC;AAAA,QACF,CAAA,MACAE,EAAW,GAAGE,EAAamB,GAAgB;AAAA,UAC1C,KAAK;AAAA,UACL,OAAO;AAAA,QAAA,GACN;AAAA,UACD,eAAeT,EAAS,MAAM;AAAA,YAC5BH,EAAaa,GAAoB,EAAE,OAAO,YAAY;AAAA,UAAA,CACvD;AAAA,UACD,GAAG;AAAA,QAAA,CACJ;AAAA,SACJ,EAAE;AAAA,IAAA,CACV;AAAA,EAEH;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"TestResultDetail.vue.mjs","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","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":";;;;;;;;;;;;;;;;AAGA,MAAMA,KAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GACMC,KAAa,EAAE,OAAO,cAwCAC,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,UAAU,EAAE,SAAS,OAAU;AAAA,IAC/B,iBAAiB,EAAE,SAAS,OAAU;A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AahD,EAAM,WAAW;AAAA,gBAC7B,GAAA,MAAM,GAAG,CAAC,WAAW,CAAC;AAAA,cAAA,CAC1B;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDmC,EAAoB,IAAI,EAAI;AAAA,UAAA,CACjC;AAAA,UACDF,EAAoB,OAAOtC,IAAY;AAAA,YACrCiD,EAAYnB,EAAK,QAAQ,QAAQ;AAAA,YAC/BO,EAAO5B,CAAW,IAEhB+B,EAAoB,IAAI,EAAI,IAD5BS,EAAYnB,EAAK,QAAQ,WAAW,EAAE,KAAK,EAAG,CAAA;AAAA,YAElDmB,EAAYnB,EAAK,QAAQ,QAAQ;AAAA,UAAA,CAClC;AAAA,QACF,CAAA,MACAE,EAAW,GAAGE,EAAaoB,GAAgB;AAAA,UAC1C,KAAK;AAAA,UACL,OAAO;AAAA,QAAA,GACN;AAAA,UACD,eAAeV,EAAS,MAAM;AAAA,YAC5BH,EAAac,GAAoB,EAAE,OAAO,YAAY;AAAA,UAAA,CACvD;AAAA,UACD,GAAG;AAAA,QAAA,CACJ;AAAA,SACJ,EAAE;AAAA,IAAA,CACV;AAAA,EAEH;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),r=require("./
|
|
1
|
+
"use strict";const e=require("vue"),r=require("./ResultReport.vue.js"),p=e.defineComponent({__name:"ResultInsightCards",emits:["click:report"],setup(n,{emit:s}){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["psc-mb-4 psc-grid psc-w-full psc-gap-2 psc-px-4",t.$slots["book-appointment-box"]?"psc-grid-cols-2":"psc-grid-cols-1"])},[e.createVNode(r,{tile:!!t.$slots["book-appointment-box"],"onClick:report":o[0]||(o[0]=l=>s("click:report"))},null,8,["tile"]),e.renderSlot(t.$slots,"book-appointment-box")],2))}});module.exports=p;
|
|
2
2
|
//# sourceMappingURL=ResultInsightCards.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultInsightCards.vue.js","sources":["../../../../../src/components/TestResult/Shared/ResultInsightCards.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode,
|
|
1
|
+
{"version":3,"file":"ResultInsightCards.vue.js","sources":["../../../../../src/components/TestResult/Shared/ResultInsightCards.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport ResultReport from './ResultReport.vue';\n\n/**\n * \"Báo cáo kết quả\" tile, with an optional second cell next to it.\n *\n * Slots\n * - book-appointment-box: the second cell of the grid. Passed → 2 columns and the report\n * shrinks to a tile; not passed → the report alone. What goes in it is decided\n * by the parent (TestResultDetail / TestResultDetailDesktop).\n */\n\n/**\n * Events\n */\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ResultInsightCards',\n emits: ['click:report'],\n setup(__props, { emit }) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"psc-mb-4 psc-grid psc-w-full psc-gap-2 psc-px-4\", \n _ctx.$slots['book-appointment-box'] ? 'psc-grid-cols-2' : 'psc-grid-cols-1'\n ])\n }, [\n _createVNode(ResultReport, {\n tile: !!_ctx.$slots['book-appointment-box'],\n \"onClick:report\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:report')))\n }, null, 8, [\"tile\"]),\n _renderSlot(_ctx.$slots, \"book-appointment-box\")\n ], 2))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createVNode","ResultReport","$event","_renderSlot"],"mappings":"uEAkB4BA,EAAiBC,kBAAA,CAC3C,OAAQ,qBACR,MAAO,CAAC,cAAc,EACtB,MAAMC,EAAS,CAAE,KAAAC,GAAQ,CAIpB,MAAA,CAACC,EAAUC,KACRC,EAAA,UAAA,EAAcC,EAAA,mBAAoB,MAAO,CAC/C,MAAOC,EAAAA,eAAgB,CAAC,kDACtBJ,EAAK,OAAO,sBAAsB,EAAI,kBAAoB,iBAAA,CAC3D,CAAA,EACA,CACDK,EAAAA,YAAaC,EAAc,CACzB,KAAM,CAAC,CAACN,EAAK,OAAO,sBAAsB,EAC1C,iBAAkBC,EAAO,CAAC,IAAMA,EAAO,CAAC,EAAKM,GAAiBR,EAAK,cAAc,EAChF,EAAA,KAAM,EAAG,CAAC,MAAM,CAAC,EACpBS,aAAYR,EAAK,OAAQ,sBAAsB,GAC9C,CAAC,EAEN,CAEA,CAAC"}
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const _ = /* @__PURE__ */ c({
|
|
1
|
+
import { defineComponent as t, openBlock as p, createElementBlock as r, normalizeClass as l, createVNode as n, renderSlot as i } from "vue";
|
|
2
|
+
import c from "./ResultReport.vue.mjs";
|
|
3
|
+
const b = /* @__PURE__ */ t({
|
|
5
4
|
__name: "ResultInsightCards",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class: l(["psc-mb-4 psc-grid psc-w-full psc-gap-2 psc-px-4", e.showBookAppointment ? "psc-grid-cols-2" : "psc-grid-cols-1"])
|
|
5
|
+
emits: ["click:report"],
|
|
6
|
+
setup(m, { emit: s }) {
|
|
7
|
+
return (o, e) => (p(), r("div", {
|
|
8
|
+
class: l([
|
|
9
|
+
"psc-mb-4 psc-grid psc-w-full psc-gap-2 psc-px-4",
|
|
10
|
+
o.$slots["book-appointment-box"] ? "psc-grid-cols-2" : "psc-grid-cols-1"
|
|
11
|
+
])
|
|
14
12
|
}, [
|
|
15
|
-
|
|
16
|
-
tile:
|
|
17
|
-
"onClick:report":
|
|
13
|
+
n(c, {
|
|
14
|
+
tile: !!o.$slots["book-appointment-box"],
|
|
15
|
+
"onClick:report": e[0] || (e[0] = (a) => s("click:report"))
|
|
18
16
|
}, null, 8, ["tile"]),
|
|
19
|
-
|
|
20
|
-
key: 0,
|
|
21
|
-
compact: "",
|
|
22
|
-
"onClick:book": o[1] || (o[1] = (n) => t("click:book"))
|
|
23
|
-
})) : k("", !0)
|
|
17
|
+
i(o.$slots, "book-appointment-box")
|
|
24
18
|
], 2));
|
|
25
19
|
}
|
|
26
20
|
});
|
|
27
21
|
export {
|
|
28
|
-
|
|
22
|
+
b as default
|
|
29
23
|
};
|
|
30
24
|
//# sourceMappingURL=ResultInsightCards.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultInsightCards.vue.mjs","sources":["../../../../../src/components/TestResult/Shared/ResultInsightCards.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode,
|
|
1
|
+
{"version":3,"file":"ResultInsightCards.vue.mjs","sources":["../../../../../src/components/TestResult/Shared/ResultInsightCards.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport ResultReport from './ResultReport.vue';\n\n/**\n * \"Báo cáo kết quả\" tile, with an optional second cell next to it.\n *\n * Slots\n * - book-appointment-box: the second cell of the grid. Passed → 2 columns and the report\n * shrinks to a tile; not passed → the report alone. What goes in it is decided\n * by the parent (TestResultDetail / TestResultDetailDesktop).\n */\n\n/**\n * Events\n */\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ResultInsightCards',\n emits: ['click:report'],\n setup(__props, { emit }) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"psc-mb-4 psc-grid psc-w-full psc-gap-2 psc-px-4\", \n _ctx.$slots['book-appointment-box'] ? 'psc-grid-cols-2' : 'psc-grid-cols-1'\n ])\n }, [\n _createVNode(ResultReport, {\n tile: !!_ctx.$slots['book-appointment-box'],\n \"onClick:report\": _cache[0] || (_cache[0] = ($event: any) => (emit('click:report')))\n }, null, 8, [\"tile\"]),\n _renderSlot(_ctx.$slots, \"book-appointment-box\")\n ], 2))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createVNode","ResultReport","$event","_renderSlot"],"mappings":";;AAkBA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO,CAAC,cAAc;AAAA,EACtB,MAAMC,GAAS,EAAE,MAAAC,KAAQ;AAIpB,WAAA,CAACC,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,OAAOC,EAAgB;AAAA,QAAC;AAAA,QACtBJ,EAAK,OAAO,sBAAsB,IAAI,oBAAoB;AAAA,MAAA,CAC3D;AAAA,IAAA,GACA;AAAA,MACDK,EAAaC,GAAc;AAAA,QACzB,MAAM,CAAC,CAACN,EAAK,OAAO,sBAAsB;AAAA,QAC1C,kBAAkBC,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI,CAACM,MAAiBR,EAAK,cAAc;AAAA,MAChF,GAAA,MAAM,GAAG,CAAC,MAAM,CAAC;AAAA,MACpBS,EAAYR,EAAK,QAAQ,sBAAsB;AAAA,OAC9C,CAAC;AAAA,EAEN;AAEA,CAAC;"}
|
|
@@ -36,6 +36,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
36
36
|
showResultReport: boolean;
|
|
37
37
|
enableBookingFeature: boolean;
|
|
38
38
|
}>, {
|
|
39
|
+
'book-appointment-box': (_: {
|
|
40
|
+
compact: boolean;
|
|
41
|
+
}) => any;
|
|
39
42
|
'book-appointment': (_: {}) => any;
|
|
40
43
|
header: (_: {}) => any;
|
|
41
44
|
default: (_: {}) => any;
|
|
@@ -35,6 +35,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
35
35
|
hideSummary: boolean;
|
|
36
36
|
showResultReport: boolean;
|
|
37
37
|
}>, {
|
|
38
|
+
'book-appointment-box': (_: {
|
|
39
|
+
compact: boolean;
|
|
40
|
+
}) => any;
|
|
38
41
|
header: (_: {}) => any;
|
|
39
42
|
default: (_: {}) => any;
|
|
40
43
|
footer: (_: {}) => any;
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* Props
|
|
3
|
-
*/
|
|
4
|
-
export interface Props {
|
|
5
|
-
showBookAppointment?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
8
|
-
showBookAppointment: boolean;
|
|
9
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click:report" | "click:book")[], "click:report" | "click:book", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
10
|
-
showBookAppointment: boolean;
|
|
11
|
-
}>>> & {
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click:report"[], "click:report", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
12
2
|
"onClick:report"?: ((...args: any[]) => any) | undefined;
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
showBookAppointment: boolean;
|
|
3
|
+
}, {}>, {
|
|
4
|
+
'book-appointment-box': (_: {}) => any;
|
|
16
5
|
}>;
|
|
17
6
|
export default _default;
|
|
18
|
-
declare type
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
-
} : {
|
|
23
|
-
type: import('vue').PropType<T[K]>;
|
|
24
|
-
required: true;
|
|
7
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
25
10
|
};
|
|
26
11
|
};
|
|
27
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
28
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
29
|
-
default: D[K];
|
|
30
|
-
} : P[K];
|
|
31
|
-
};
|