@openmrs/esm-appointments-app 6.1.1-pre.2986 → 6.1.1-pre.3003
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/.turbo/turbo-build.log +9 -9
- package/dist/4.js +1 -0
- package/dist/4.js.map +1 -0
- package/dist/574.js +1 -1
- package/dist/989.js +1 -0
- package/dist/989.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-appointments-app.js +1 -1
- package/dist/openmrs-esm-appointments-app.js.buildmanifest.json +36 -36
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/hooks/patientAppointmentContext.ts +15 -0
- package/src/index.ts +4 -4
- package/src/{patient-chart → patient-appointments}/patient-appointments-action-menu.component.tsx +15 -6
- package/src/{patient-chart → patient-appointments}/patient-appointments-base.component.tsx +16 -5
- package/src/{patient-chart → patient-appointments}/patient-appointments-base.scss +3 -1
- package/src/{patient-chart → patient-appointments}/patient-appointments-detailed-summary.component.tsx +4 -1
- package/src/patient-appointments/patient-appointments-header.scss +27 -0
- package/src/patient-appointments/patient-appointments-header.tsx +42 -0
- package/src/patient-appointments/patient-appointments-overview.component.tsx +36 -0
- package/src/patient-appointments/patient-appointments-overview.scss +7 -0
- package/src/root.component.tsx +2 -0
- package/src/routes.json +0 -8
- package/translations/en.json +1 -2
- package/dist/842.js +0 -1
- package/dist/842.js.map +0 -1
- package/dist/968.js +0 -1
- package/dist/968.js.map +0 -1
- package/src/patient-chart/patient-appointments-overview.component.tsx +0 -13
- /package/src/{patient-chart → patient-appointments}/patient-appointments-action-menu.scss +0 -0
- /package/src/{patient-chart → patient-appointments}/patient-appointments-base.test.tsx +0 -0
- /package/src/{patient-chart → patient-appointments}/patient-appointments-cancel-modal.component.tsx +0 -0
- /package/src/{patient-chart → patient-appointments}/patient-appointments-table.scss +0 -0
- /package/src/{patient-chart → patient-appointments}/patient-appointments-table.tsx +0 -0
- /package/src/{patient-chart → patient-appointments}/patient-appointments.resource.ts +0 -0
- /package/src/{patient-chart → patient-appointments}/patient-upcoming-appointments-card.component.tsx +0 -0
- /package/src/{patient-chart → patient-appointments}/patient-upcoming-appointments-card.scss +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var _openmrs_esm_appointments_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,m,c,h,v,g,b={5605:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(255),t.e(262),t.e(337),t.e(268),t.e(325),t.e(894),t.e(
|
|
1
|
+
var _openmrs_esm_appointments_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,m,c,h,v,g,b={5605:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(255),t.e(262),t.e(337),t.e(268),t.e(325),t.e(894),t.e(989)]).then((()=>()=>t(6989)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},y={};function w(e){var r=y[e];if(void 0!==r)return r.exports;var t=y[e]={id:e,loaded:!1,exports:{}};return b[e].call(t.exports,t,t.exports,w),t.loaded=!0,t.exports}w.m=b,w.c=y,w.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return w.d(r,{a:r}),r},w.d=(e,r)=>{for(var t in r)w.o(r,t)&&!w.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},w.f={},w.e=e=>Promise.all(Object.keys(w.f).reduce(((r,t)=>(w.f[t](e,r),r)),[])),w.u=e=>e+".js",w.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),w.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-appointments-app:",w.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,w.nc&&i.setAttribute("nonce",w.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),l&&document.head.appendChild(i)}},w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},w.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{w.S={};var e={},r={};w.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];w.o(w.S,t)||(w.S[t]={});var a=w.S[t],i="@openmrs/esm-appointments-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","5.4.1-pre.1638",(()=>Promise.all([w.e(130),w.e(268)]).then((()=>()=>w(130))))),l("@openmrs/esm-patient-common-lib","6.1.1-pre.3580",(()=>Promise.all([w.e(255),w.e(390),w.e(262),w.e(268),w.e(325),w.e(894),w.e(81)]).then((()=>()=>w(390))))),l("react-i18next","11.18.6",(()=>Promise.all([w.e(588),w.e(268)]).then((()=>()=>w(6588))))),l("react-router-dom","6.4.3",(()=>Promise.all([w.e(591),w.e(268)]).then((()=>()=>w(6591))))),l("react","18.2.0",(()=>w.e(784).then((()=>()=>w(2784))))),l("swr/_internal","2.0.1",(()=>Promise.all([w.e(729),w.e(268)]).then((()=>()=>w(4729))))),l("swr/immutable","2.0.1",(()=>Promise.all([w.e(255),w.e(268),w.e(325),w.e(152)]).then((()=>()=>w(2303)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;w.g.importScripts&&(e=w.g.location+"");var r=w.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&!e;)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),w.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(l=e[a]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?i.pop()+" "+i.pop():o(l))}return s();function s(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,l=1,s=!0;;l++,i++){var u,p,f=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(p=(typeof(u=r[i]))[0]))return!s||("u"==f?l>n&&!o:""==f!=o);if("u"==p){if(!s||"u"!=f)return!1}else if(s)if(f==p)if(l<=n){if(u!=e[l])return!1}else{if(o?u>e[l]:u<e[l])return!1;u!=e[l]&&(s=!1)}else if("s"!=f&&"n"!=f){if(o||l<=n)return!1;s=!1,l--}else{if(l<=n||p<f!=o)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,l--)}}var d=[],m=d.pop.bind(d);for(i=1;i<e.length;i++){var c=e[i];d.push(1==c?m()|m():2==c?m()&m():c?a(c,r):!m())}return!!m()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},l=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",s=(e,r,t,n)=>{var o=i(e,t);return f(e[t][o])},u=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||p(l(e,t,o,n)),f(e[t][o])},p=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},f=e=>(e.loaded=1,e.get()),m=(d=e=>function(r,t,n,o){var a=w.I(r);return a&&a.then?a.then(e.bind(e,r,w.S[r],t,n,o)):e(r,w.S[r],t,n,o)})(((e,r,t,n)=>r&&w.o(r,t)?s(r,0,t):n())),c=d(((e,r,t,n,o)=>r&&w.o(r,t)?u(r,0,t,n):o())),h={},v={268:()=>c("default","react",[1,18],(()=>w.e(784).then((()=>()=>w(2784))))),3325:()=>c("default","swr/_internal",[1,2],(()=>w.e(729).then((()=>()=>w(4729))))),2870:()=>c("default","@openmrs/esm-framework",[1,5],(()=>w.e(130).then((()=>()=>w(130))))),4924:()=>c("default","react-i18next",[1,11],(()=>w.e(588).then((()=>()=>w(6588))))),5285:()=>c("default","@openmrs/esm-patient-common-lib",[1,7],(()=>Promise.all([w.e(390),w.e(81)]).then((()=>()=>w(390))))),8744:()=>c("default","react-router-dom",[1,6],(()=>w.e(591).then((()=>()=>w(6591))))),9198:()=>c("default","swr/immutable",[1,2],(()=>w.e(303).then((()=>()=>w(2303))))),6081:()=>m("default","@openmrs/esm-framework/src/internal",(()=>w.e(130).then((()=>()=>w(130)))))},g={81:[6081],268:[268],325:[3325],894:[2870,4924,5285,8744,9198]},w.f.consumes=(e,r)=>{w.o(g,e)&&g[e].forEach((e=>{if(w.o(h,e))return r.push(h[e]);var t=r=>{h[e]=0,w.m[e]=t=>{delete w.c[e],t.exports=r()}},n=r=>{delete h[e],w.m[e]=t=>{throw delete w.c[e],r}};try{var o=v[e]();o.then?r.push(h[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={529:0};w.f.j=(r,t)=>{var n=w.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(268|325|81|894)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=w.p+w.u(r),i=new Error;w.l(a,(t=>{if(w.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)w.o(i,n)&&(w.m[n]=i[n]);l&&l(w)}for(r&&r(t);s<a.length;s++)o=a[s],w.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),w.nc=void 0;var _=w(5605);_openmrs_esm_appointments_app=_})();
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"chunks": [
|
|
3
|
+
{
|
|
4
|
+
"rendered": true,
|
|
5
|
+
"initial": false,
|
|
6
|
+
"entry": false,
|
|
7
|
+
"recorded": false,
|
|
8
|
+
"size": 8402,
|
|
9
|
+
"sizes": {
|
|
10
|
+
"javascript": 8402
|
|
11
|
+
},
|
|
12
|
+
"names": [],
|
|
13
|
+
"idHints": [],
|
|
14
|
+
"runtime": [
|
|
15
|
+
"@openmrs/esm-appointments-app",
|
|
16
|
+
"main"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"4.js"
|
|
20
|
+
],
|
|
21
|
+
"auxiliaryFiles": [
|
|
22
|
+
"4.js.map"
|
|
23
|
+
],
|
|
24
|
+
"hash": "a86a6c5db72576e0",
|
|
25
|
+
"childrenByOrder": {}
|
|
26
|
+
},
|
|
3
27
|
{
|
|
4
28
|
"rendered": false,
|
|
5
29
|
"initial": false,
|
|
@@ -77,10 +101,10 @@
|
|
|
77
101
|
"initial": true,
|
|
78
102
|
"entry": true,
|
|
79
103
|
"recorded": false,
|
|
80
|
-
"size":
|
|
104
|
+
"size": 4854259,
|
|
81
105
|
"sizes": {
|
|
82
106
|
"consume-shared": 294,
|
|
83
|
-
"javascript":
|
|
107
|
+
"javascript": 4832418,
|
|
84
108
|
"share-init": 294,
|
|
85
109
|
"runtime": 21253
|
|
86
110
|
},
|
|
@@ -97,7 +121,7 @@
|
|
|
97
121
|
"auxiliaryFiles": [
|
|
98
122
|
"main.js.map"
|
|
99
123
|
],
|
|
100
|
-
"hash": "
|
|
124
|
+
"hash": "4bab027bbd49678e",
|
|
101
125
|
"childrenByOrder": {}
|
|
102
126
|
},
|
|
103
127
|
{
|
|
@@ -387,7 +411,7 @@
|
|
|
387
411
|
"auxiliaryFiles": [
|
|
388
412
|
"openmrs-esm-appointments-app.js.map"
|
|
389
413
|
],
|
|
390
|
-
"hash": "
|
|
414
|
+
"hash": "d3d7c03887fd18b3",
|
|
391
415
|
"childrenByOrder": {}
|
|
392
416
|
},
|
|
393
417
|
{
|
|
@@ -395,9 +419,9 @@
|
|
|
395
419
|
"initial": false,
|
|
396
420
|
"entry": false,
|
|
397
421
|
"recorded": false,
|
|
398
|
-
"size":
|
|
422
|
+
"size": 6349,
|
|
399
423
|
"sizes": {
|
|
400
|
-
"javascript":
|
|
424
|
+
"javascript": 6349
|
|
401
425
|
},
|
|
402
426
|
"names": [],
|
|
403
427
|
"idHints": [],
|
|
@@ -409,7 +433,7 @@
|
|
|
409
433
|
"574.js"
|
|
410
434
|
],
|
|
411
435
|
"auxiliaryFiles": [],
|
|
412
|
-
"hash": "
|
|
436
|
+
"hash": "b369f31c369e8e62",
|
|
413
437
|
"childrenByOrder": {}
|
|
414
438
|
},
|
|
415
439
|
{
|
|
@@ -627,30 +651,6 @@
|
|
|
627
651
|
"hash": "d064ad1eb75bf4da",
|
|
628
652
|
"childrenByOrder": {}
|
|
629
653
|
},
|
|
630
|
-
{
|
|
631
|
-
"rendered": true,
|
|
632
|
-
"initial": false,
|
|
633
|
-
"entry": false,
|
|
634
|
-
"recorded": false,
|
|
635
|
-
"size": 8402,
|
|
636
|
-
"sizes": {
|
|
637
|
-
"javascript": 8402
|
|
638
|
-
},
|
|
639
|
-
"names": [],
|
|
640
|
-
"idHints": [],
|
|
641
|
-
"runtime": [
|
|
642
|
-
"@openmrs/esm-appointments-app",
|
|
643
|
-
"main"
|
|
644
|
-
],
|
|
645
|
-
"files": [
|
|
646
|
-
"842.js"
|
|
647
|
-
],
|
|
648
|
-
"auxiliaryFiles": [
|
|
649
|
-
"842.js.map"
|
|
650
|
-
],
|
|
651
|
-
"hash": "cf8eeb4fcb78d81d",
|
|
652
|
-
"childrenByOrder": {}
|
|
653
|
-
},
|
|
654
654
|
{
|
|
655
655
|
"rendered": false,
|
|
656
656
|
"initial": false,
|
|
@@ -677,9 +677,9 @@
|
|
|
677
677
|
"initial": false,
|
|
678
678
|
"entry": false,
|
|
679
679
|
"recorded": false,
|
|
680
|
-
"size":
|
|
680
|
+
"size": 506059,
|
|
681
681
|
"sizes": {
|
|
682
|
-
"javascript":
|
|
682
|
+
"javascript": 506059
|
|
683
683
|
},
|
|
684
684
|
"names": [],
|
|
685
685
|
"idHints": [],
|
|
@@ -687,12 +687,12 @@
|
|
|
687
687
|
"@openmrs/esm-appointments-app"
|
|
688
688
|
],
|
|
689
689
|
"files": [
|
|
690
|
-
"
|
|
690
|
+
"989.js"
|
|
691
691
|
],
|
|
692
692
|
"auxiliaryFiles": [
|
|
693
|
-
"
|
|
693
|
+
"989.js.map"
|
|
694
694
|
],
|
|
695
|
-
"hash": "
|
|
695
|
+
"hash": "cb30e0b154487840",
|
|
696
696
|
"childrenByOrder": {}
|
|
697
697
|
}
|
|
698
698
|
]
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"}},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"early-appointments-panel","component":"earlyAppointments"},{"name":"patient-appointments-summary-dashboard","component":"patientAppointmentsSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-appointments-dashboard-slot","title":"Appointments","path":"Appointments"}},{"name":"patientAppointments-details-widget","component":"patientAppointmentsDetailedSummary","slot":"patient-chart-appointments-dashboard-slot","meta":{"columnSpan":1}},{"name":"patient-
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"}},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"early-appointments-panel","component":"earlyAppointments"},{"name":"patient-appointments-summary-dashboard","component":"patientAppointmentsSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-appointments-dashboard-slot","title":"Appointments","path":"Appointments"}},{"name":"patientAppointments-details-widget","component":"patientAppointmentsDetailedSummary","slot":"patient-chart-appointments-dashboard-slot","meta":{"columnSpan":1}},{"name":"patient-upcoming-appointment-widget","component":"patientUpcomingAppointmentsWidget","slot":"upcoming-appointment-slot"},{"name":"patient-appointment-cancel-confirmation-dialog","component":"patientAppointmentsCancelConfirmationDialog"}],"version":"6.1.1-pre.3003"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* When rendering the Patient Appointments view, let the view know if this is being rendered in the Patient Chart or the Appointments App
|
|
5
|
+
* (we need to know this to determine if we open the appointments form as part of the patient chart workspace or as an overlay in the appointments app)
|
|
6
|
+
*/
|
|
7
|
+
export enum PatientAppointmentContextTypes {
|
|
8
|
+
PATIENT_CHART,
|
|
9
|
+
APPOINTMENTS_APP,
|
|
10
|
+
}
|
|
11
|
+
const PatientAppointmentContext = createContext<PatientAppointmentContextTypes>(
|
|
12
|
+
PatientAppointmentContextTypes.PATIENT_CHART,
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export default PatientAppointmentContext;
|
package/src/index.ts
CHANGED
|
@@ -26,9 +26,9 @@ import appointmentsDashboardComponent from './appointments.component';
|
|
|
26
26
|
import homeAppointmentsComponent from './home';
|
|
27
27
|
import appointmentStatusComponent from './appointments/scheduled/appointments-by-status.component';
|
|
28
28
|
import earlyAppointmentsComponent from './appointments/scheduled/early-appointments.component';
|
|
29
|
-
import patientAppointmentsDetailedSummaryComponent from './patient-
|
|
30
|
-
import patientAppointmentsOverviewComponent from './patient-
|
|
31
|
-
import patientUpcomingAppointmentsComponent from './patient-
|
|
29
|
+
import patientAppointmentsDetailedSummaryComponent from './patient-appointments/patient-appointments-detailed-summary.component';
|
|
30
|
+
import patientAppointmentsOverviewComponent from './patient-appointments/patient-appointments-overview.component';
|
|
31
|
+
import patientUpcomingAppointmentsComponent from './patient-appointments/patient-upcoming-appointments-card.component';
|
|
32
32
|
|
|
33
33
|
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
|
|
34
34
|
|
|
@@ -100,7 +100,7 @@ export const patientAppointmentsOverview = getSyncLifecycle(patientAppointmentsO
|
|
|
100
100
|
export const patientUpcomingAppointmentsWidget = getSyncLifecycle(patientUpcomingAppointmentsComponent, options);
|
|
101
101
|
|
|
102
102
|
export const patientAppointmentsCancelConfirmationDialog = getAsyncLifecycle(
|
|
103
|
-
() => import('./patient-
|
|
103
|
+
() => import('./patient-appointments/patient-appointments-cancel-modal.component'),
|
|
104
104
|
options,
|
|
105
105
|
);
|
|
106
106
|
|
package/src/{patient-chart → patient-appointments}/patient-appointments-action-menu.component.tsx
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useContext } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
|
|
4
4
|
import { Layer, OverflowMenu, OverflowMenuItem } from '@carbon/react';
|
|
@@ -6,6 +6,9 @@ import { launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';
|
|
|
6
6
|
import { showModal, useLayoutType } from '@openmrs/esm-framework';
|
|
7
7
|
import type { Appointment } from '../types';
|
|
8
8
|
import styles from './patient-appointments-action-menu.scss';
|
|
9
|
+
import { closeOverlay, launchOverlay } from '../hooks/useOverlay';
|
|
10
|
+
import AppointmentForm from '../form/appointments-form.component';
|
|
11
|
+
import PatientAppointmentContext, { PatientAppointmentContextTypes } from '../hooks/patientAppointmentContext';
|
|
9
12
|
|
|
10
13
|
interface appointmentsActionMenuProps {
|
|
11
14
|
appointment: Appointment;
|
|
@@ -15,16 +18,22 @@ interface appointmentsActionMenuProps {
|
|
|
15
18
|
export const PatientAppointmentsActionMenu = ({ appointment, patientUuid }: appointmentsActionMenuProps) => {
|
|
16
19
|
const { t } = useTranslation();
|
|
17
20
|
const isTablet = useLayoutType() === 'tablet';
|
|
21
|
+
const patientAppointmentContext = useContext(PatientAppointmentContext);
|
|
18
22
|
|
|
19
|
-
const launchEditAppointmentForm = useCallback(
|
|
20
|
-
()
|
|
23
|
+
const launchEditAppointmentForm = useCallback(() => {
|
|
24
|
+
if (patientAppointmentContext === PatientAppointmentContextTypes.PATIENT_CHART) {
|
|
21
25
|
launchPatientWorkspace('appointments-form-workspace', {
|
|
22
26
|
workspaceTitle: t('editAppointment', 'Edit an appointment'),
|
|
23
27
|
appointment,
|
|
24
28
|
context: 'editing',
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
});
|
|
30
|
+
} else {
|
|
31
|
+
launchOverlay(
|
|
32
|
+
t('editAppointment', 'Edit Appointment'),
|
|
33
|
+
<AppointmentForm context="editing" appointment={appointment} closeWorkspace={closeOverlay} />,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}, [appointment, t]);
|
|
28
37
|
|
|
29
38
|
const launchCancelAppointmentDialog = () => {
|
|
30
39
|
const dispose = showModal('patient-appointment-cancel-confirmation-dialog', {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useContext, useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
|
-
import { Button,
|
|
4
|
+
import { Button, ContentSwitcher, DataTableSkeleton, InlineLoading, Layer, Switch, Tile } from '@carbon/react';
|
|
5
5
|
import { Add } from '@carbon/react/icons';
|
|
6
6
|
import { useLayoutType } from '@openmrs/esm-framework';
|
|
7
7
|
import { CardHeader, EmptyDataIllustration, ErrorState, launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';
|
|
8
8
|
import { usePatientAppointments } from './patient-appointments.resource';
|
|
9
9
|
import PatientAppointmentsTable from './patient-appointments-table';
|
|
10
10
|
import styles from './patient-appointments-base.scss';
|
|
11
|
+
import { closeOverlay, launchOverlay } from '../hooks/useOverlay';
|
|
12
|
+
import AppointmentForm from '../form/appointments-form.component';
|
|
13
|
+
import PatientAppointmentContext, { PatientAppointmentContextTypes } from '../hooks/patientAppointmentContext';
|
|
11
14
|
|
|
12
15
|
interface PatientAppointmentsBaseProps {
|
|
13
|
-
basePath?: string;
|
|
14
16
|
patientUuid: string;
|
|
15
17
|
}
|
|
16
18
|
|
|
@@ -24,7 +26,7 @@ const PatientAppointmentsBase: React.FC<PatientAppointmentsBaseProps> = ({ patie
|
|
|
24
26
|
const { t } = useTranslation();
|
|
25
27
|
const headerTitle = t('appointments', 'Appointments');
|
|
26
28
|
const isTablet = useLayoutType() === 'tablet';
|
|
27
|
-
|
|
29
|
+
const patientAppointmentContext = useContext(PatientAppointmentContext);
|
|
28
30
|
const [switchedView, setSwitchedView] = useState(false);
|
|
29
31
|
|
|
30
32
|
const [contentSwitcherValue, setContentSwitcherValue] = useState(0);
|
|
@@ -36,7 +38,16 @@ const PatientAppointmentsBase: React.FC<PatientAppointmentsBaseProps> = ({ patie
|
|
|
36
38
|
isValidating,
|
|
37
39
|
} = usePatientAppointments(patientUuid, startDate, new AbortController());
|
|
38
40
|
|
|
39
|
-
const launchAppointmentsForm = () =>
|
|
41
|
+
const launchAppointmentsForm = () => {
|
|
42
|
+
if (patientAppointmentContext === PatientAppointmentContextTypes.PATIENT_CHART) {
|
|
43
|
+
launchPatientWorkspace('appointments-form-workspace');
|
|
44
|
+
} else {
|
|
45
|
+
launchOverlay(
|
|
46
|
+
t('addAppointment', 'Add Appointment'),
|
|
47
|
+
<AppointmentForm context="creating" closeWorkspace={closeOverlay} patientUuid={patientUuid} />,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
40
51
|
|
|
41
52
|
if (isLoading) return <DataTableSkeleton role="progressbar" compact={!isTablet} zebra />;
|
|
42
53
|
if (isError) {
|
|
@@ -10,6 +10,9 @@ $color-blue-10: #edf5ff;
|
|
|
10
10
|
|
|
11
11
|
.widgetCard {
|
|
12
12
|
border: 1px solid $ui-03;
|
|
13
|
+
max-width: 60rem;
|
|
14
|
+
margin: auto;
|
|
15
|
+
margin-top: spacing.$spacing-05;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
.productiveHeading01 {
|
|
@@ -18,7 +21,6 @@ $color-blue-10: #edf5ff;
|
|
|
18
21
|
|
|
19
22
|
.contentSwitcherWrapper {
|
|
20
23
|
display: flex;
|
|
21
|
-
width: fit-content;
|
|
22
24
|
justify-content: flex-end;
|
|
23
25
|
align-items: center;
|
|
24
26
|
width: 60%;
|
|
@@ -4,7 +4,10 @@ import PatientAppointmentsBase from './patient-appointments-base.component';
|
|
|
4
4
|
interface PatientAppointmentsDetailedSummaryProps {
|
|
5
5
|
patientUuid: string;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* This component is wired in as an extension to render the patient appointments view (all appointments for a single patient) within of the context of the patient chart.
|
|
9
|
+
* It uses the PatientAppointmentsBase component to render the actual appointments data.
|
|
10
|
+
*/
|
|
8
11
|
const PatientAppointmentsDetailedSummary: React.FC<PatientAppointmentsDetailedSummaryProps> = ({ patientUuid }) => {
|
|
9
12
|
return <PatientAppointmentsBase patientUuid={patientUuid} />;
|
|
10
13
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/type';
|
|
2
|
+
@use '@carbon/colors';
|
|
3
|
+
@use '@carbon/layout';
|
|
4
|
+
|
|
5
|
+
.patientBanner {
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.patientAvatar {
|
|
10
|
+
width: 5rem;
|
|
11
|
+
height: 5rem;
|
|
12
|
+
margin: 1rem;
|
|
13
|
+
border-radius: 1px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.divider {
|
|
17
|
+
border: 0;
|
|
18
|
+
border-top: 0.075rem solid colors.$gray-20;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Overriding styles for RTL support
|
|
23
|
+
html[dir='rtl'] {
|
|
24
|
+
.titleContent {
|
|
25
|
+
margin-left: 1rem;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { ArrowLeft } from '@carbon/react/icons';
|
|
4
|
+
import { Button } from '@carbon/react';
|
|
5
|
+
import { useNavigate } from 'react-router-dom';
|
|
6
|
+
import styles from './patient-appointments-header.scss';
|
|
7
|
+
import { PatientBannerPatientInfo, PatientPhoto } from '@openmrs/esm-framework';
|
|
8
|
+
|
|
9
|
+
interface PatientAppointmentsHeaderProps {
|
|
10
|
+
patient: fhir.Patient;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const PatientAppointmentsHeader: React.FC<PatientAppointmentsHeaderProps> = ({ patient }) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const navigate = useNavigate();
|
|
16
|
+
const patientName = `${patient?.name?.[0]?.given?.join(' ')} ${patient?.name?.[0].family}`;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div>
|
|
20
|
+
<div className={styles.titleContainer}>
|
|
21
|
+
<Button
|
|
22
|
+
kind="ghost"
|
|
23
|
+
onClick={() => navigate(-1)}
|
|
24
|
+
renderIcon={ArrowLeft}
|
|
25
|
+
iconDescription={t('back', 'Back')}
|
|
26
|
+
size="lg">
|
|
27
|
+
<span>{t('back', 'Back')}</span>
|
|
28
|
+
</Button>
|
|
29
|
+
</div>
|
|
30
|
+
<div className={styles.divider}></div>
|
|
31
|
+
<div className={styles.patientBanner}>
|
|
32
|
+
<div className={styles.patientAvatar} role="img">
|
|
33
|
+
<PatientPhoto patientUuid={patient.id} patientName={patientName} />
|
|
34
|
+
</div>
|
|
35
|
+
<PatientBannerPatientInfo patient={patient}></PatientBannerPatientInfo>
|
|
36
|
+
</div>
|
|
37
|
+
<div className={styles.divider}></div>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default PatientAppointmentsHeader;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { usePatient, useLayoutType, isDesktop } from '@openmrs/esm-framework';
|
|
3
|
+
import PatientAppointmentsBase from './patient-appointments-base.component';
|
|
4
|
+
import { useParams } from 'react-router-dom';
|
|
5
|
+
import Overlay from '../overlay.component';
|
|
6
|
+
import PatientAppointmentContext, { PatientAppointmentContextTypes } from '../hooks/patientAppointmentContext';
|
|
7
|
+
import PatientAppointmentsHeader from './patient-appointments-header';
|
|
8
|
+
import { DataTableSkeleton } from '@carbon/react';
|
|
9
|
+
import styles from './patient-appointments-overview.scss';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* This component renders the patient appointments view (all appointments for a single patient) outside of the context of the patient chart.
|
|
13
|
+
* Currently, it is not linked directly within the Appointments app, but can be accessed via the home/appointments/patient/:patientUuid route,
|
|
14
|
+
* providing a means for other apps (or legacy O2 UIs) to link to the patient appointments overview.
|
|
15
|
+
* It uses the PatientAppointmentsBase component to render the actual appointments data.
|
|
16
|
+
* @constructor
|
|
17
|
+
*/
|
|
18
|
+
const PatientAppointmentsOverview: React.FC = () => {
|
|
19
|
+
let params = useParams();
|
|
20
|
+
const response = usePatient(params.patientUuid);
|
|
21
|
+
const layout = useLayoutType();
|
|
22
|
+
|
|
23
|
+
return response.isLoading ? (
|
|
24
|
+
<DataTableSkeleton role="progressbar" compact={isDesktop(layout)} zebra />
|
|
25
|
+
) : (
|
|
26
|
+
<PatientAppointmentContext.Provider value={PatientAppointmentContextTypes.APPOINTMENTS_APP}>
|
|
27
|
+
<div className={styles.patientAppointmentsOverview}>
|
|
28
|
+
<PatientAppointmentsHeader patient={response.patient} />
|
|
29
|
+
<PatientAppointmentsBase patientUuid={response.patient.id} />
|
|
30
|
+
<Overlay />
|
|
31
|
+
</div>
|
|
32
|
+
</PatientAppointmentContext.Provider>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default PatientAppointmentsOverview;
|
package/src/root.component.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
3
3
|
import AppointmentsCalendarView from './calendar/appointments-calendar-view.component';
|
|
4
4
|
import Appointments from './appointments.component';
|
|
5
|
+
import PatientAppointmentsOverview from './patient-appointments/patient-appointments-overview.component';
|
|
5
6
|
|
|
6
7
|
const RootComponent: React.FC = () => {
|
|
7
8
|
const appointmentsBasename = window.getOpenmrsSpaBase() + 'home/appointments';
|
|
@@ -15,6 +16,7 @@ const RootComponent: React.FC = () => {
|
|
|
15
16
|
<Route path="/:date/:serviceType" element={<Appointments />} />
|
|
16
17
|
<Route path="/calendar" element={<AppointmentsCalendarView />} />
|
|
17
18
|
<Route path="/calendar/:date" element={<AppointmentsCalendarView />} />
|
|
19
|
+
<Route path="/patient/:patientUuid" element={<PatientAppointmentsOverview />} />
|
|
18
20
|
</Routes>
|
|
19
21
|
</BrowserRouter>
|
|
20
22
|
</main>
|
package/src/routes.json
CHANGED
|
@@ -90,14 +90,6 @@
|
|
|
90
90
|
"columnSpan": 1
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
{
|
|
94
|
-
"name": "patient-appointments-overview-widget",
|
|
95
|
-
"component": "appointmentsOverview",
|
|
96
|
-
"order": 8,
|
|
97
|
-
"meta": {
|
|
98
|
-
"columnSpan": 4
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
93
|
{
|
|
102
94
|
"name": "patient-upcoming-appointment-widget",
|
|
103
95
|
"component": "patientUpcomingAppointmentsWidget",
|
package/translations/en.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"action": "Action",
|
|
3
3
|
"actions": "Actions",
|
|
4
4
|
"add": "Add",
|
|
5
|
+
"addAppointment": "Add Appointment",
|
|
5
6
|
"addNewAppointment": "Add new appointment",
|
|
6
7
|
"addPatientToQueue": "Add patient to queue",
|
|
7
8
|
"age": "Age",
|
|
@@ -97,7 +98,6 @@
|
|
|
97
98
|
"medications": "Medications",
|
|
98
99
|
"missed": "Missed",
|
|
99
100
|
"missingVisitType": "Missing visit type",
|
|
100
|
-
"monthly": "Monthly",
|
|
101
101
|
"name": "Name",
|
|
102
102
|
"no": "No",
|
|
103
103
|
"noAppointmentsScheduledForTodayToDisplay": "There are no appointments scheduled for today to display for this location",
|
|
@@ -168,6 +168,5 @@
|
|
|
168
168
|
"visitType": "Visit Type",
|
|
169
169
|
"vitals": "Vitals",
|
|
170
170
|
"week": "Week",
|
|
171
|
-
"weekly": "Weekly",
|
|
172
171
|
"yes": "Yes"
|
|
173
172
|
}
|
package/dist/842.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[842],{5842:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(268),o=n.n(r),a=n(4924),l=n(2352),i=n(2870),c=n(256);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}const p=function(e){var t,n,p,f,m=e.closeCancelModal,d=e.appointmentUuid,h=e.patientUuid,y=(0,a.useTranslation)().t,b=(0,c.W)(h,(new Date).toUTCString(),new AbortController).mutate,v=(p=(0,r.useState)(!1),f=2,function(e){if(Array.isArray(e))return e}(p)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(p,f)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(p,f)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=v[0],k=v[1],C=(t=function(){return function(e,t){var n,r,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=t.call(e,l)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}(this,(function(e){return k(!0),(0,c.v)("Cancelled",d).then((function(e){200===e.status&&(b(),m(),(0,i.showSnackbar)({isLowContrast:!0,kind:"success",subtitle:y("appointmentCancelledSuccessfully","Appointment cancelled successfully"),title:y("appointmentCancelled","Appointment cancelled")}))})).catch((function(e){(0,i.showSnackbar)({title:y("appointmentCancelError","Error cancelling appointment"),kind:"error",isLowContrast:!0,subtitle:null==e?void 0:e.message})})),[2]}))},n=function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function l(e){s(a,r,o,l,i,"next",e)}function i(e){s(a,r,o,l,i,"throw",e)}l(void 0)}))},function(){return n.apply(this,arguments)});return o().createElement("div",null,o().createElement(l.xBx,{closeModal:m,title:y("cancelAppointment","Cancel appointment")}),o().createElement(l.fef,null,o().createElement("p",null,y("cancelAppointmentModalConfirmationText","Are you sure you want to cancel this appointment?"))),o().createElement(l.mzw,null,o().createElement(l.zxk,{kind:"secondary",onClick:m},y("discard","Discard")),o().createElement(l.zxk,{kind:"danger",onClick:C,disabled:w},y("cancelAppointment","Cancel appointment"))))}}}]);
|
package/dist/842.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"842.js","mappings":"oPAAA,iB,kNAiEA,QArDoF,Y,YAClFA,EAAAA,EAAAA,iBACAC,EAAAA,EAAAA,gBACAC,EAAAA,EAAAA,YAEM,GAAQC,EAAAA,EAAAA,kBAANC,EACF,GAAaC,EAAAA,EAAAA,GAAuBH,GAAa,IAAII,MAAOC,cAAe,IAAIC,iBAA7EC,OACgCC,G,GAAAA,EAAAA,EAAAA,WAAS,G,EAAK,E,+zBAA/CC,EAAiCD,EAAAA,GAAnBE,EAAmBF,EAAAA,GAElCG,G,EAAe,W,qkCACnBD,GAAgB,IAEhBE,EAAAA,EAAAA,GAAkB,YAAab,GAC5Bc,MAAK,YACW,MADRC,EAAAA,SAELP,IACAT,KACAiB,EAAAA,EAAAA,cAAa,CACXC,eAAe,EACfC,KAAM,UACNC,SAAUhB,EAAE,mCAAoC,sCAChDiB,MAAOjB,EAAE,uBAAwB,2BAGvC,IACCkB,OAAM,SAACC,IACNN,EAAAA,EAAAA,cAAa,CACXI,MAAOjB,EAAE,yBAA0B,gCACnCe,KAAM,QACND,eAAe,EACfE,SAAUG,aAAAA,EAAAA,EAAKC,SAEnB,I,MACJ,E,4NAEA,OACE,kBAACC,MAAAA,KACC,kBAACC,EAAAA,IAAWA,CAACC,WAAY3B,EAAkBqB,MAAOjB,EAAE,oBAAqB,wBACzE,kBAACwB,EAAAA,IAASA,KACR,kBAACC,IAAAA,KAAGzB,EAAE,yCAA0C,uDAElD,kBAAC0B,EAAAA,IAAWA,KACV,kBAACC,EAAAA,IAAMA,CAACZ,KAAK,YAAYa,QAAShC,GAC/BI,EAAE,UAAW,YAEhB,kBAAC2B,EAAAA,IAAMA,CAACZ,KAAK,SAASa,QAASnB,EAAcoB,SAAUtB,GACpDP,EAAE,oBAAqB,wBAKlC,C","sources":["webpack://@openmrs/esm-appointments-app/./src/patient-chart/patient-appointments-cancel-modal.component.tsx"],"names":["closeCancelModal","appointmentUuid","patientUuid","useTranslation","t","usePatientAppointments","Date","toUTCString","AbortController","mutate","useState","isSubmitting","setIsSubmitting","handleCancel","cancelAppointment","then","status","showSnackbar","isLowContrast","kind","subtitle","title","catch","err","message","div","ModalHeader","closeModal","ModalBody","p","ModalFooter","Button","onClick","disabled"],"sourceRoot":""}
|