@openmrs/esm-appointments-app 6.1.1-pre.3184 → 6.1.1-pre.3202
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 +10 -10
- package/dist/309.js +1 -0
- package/dist/309.js.map +1 -0
- package/dist/4.js +1 -1
- package/dist/4.js.map +1 -1
- package/dist/{719.js → 520.js} +1 -1
- package/dist/{719.js.map → 520.js.map} +1 -1
- package/dist/574.js +1 -1
- 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 +57 -33
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/appointments/common-components/appointments-actions.component.tsx +9 -8
- package/src/appointments/common-components/appointments-actions.test.tsx +8 -3
- package/src/appointments/common-components/end-appointment-modal.component.tsx +104 -0
- package/src/appointments/common-components/end-appointment-modal.test.tsx +80 -0
- package/src/index.ts +5 -0
- package/src/patient-appointments/patient-appointments-cancel-modal.component.tsx +2 -2
- package/src/patient-appointments/patient-appointments.resource.ts +1 -1
- package/src/routes.json +6 -0
- package/src/types/index.ts +17 -11
- package/translations/en.json +8 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -12,17 +12,17 @@ assets by path [1m[32m*.js[39m[22m 3.13 MiB
|
|
|
12
12
|
asset [1m[32m588.js[39m[22m 19 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
13
13
|
asset [1m[32m729.js[39m[22m 6.16 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
14
14
|
asset [1m[32m255.js[39m[22m 4.84 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 2 related assets
|
|
15
|
-
+
|
|
16
|
-
assets by path [1m[32m*.json[39m[22m
|
|
17
|
-
asset [1m[32mopenmrs-esm-appointments-app.js.buildmanifest.json[39m[22m 13.
|
|
18
|
-
asset [1m[32mroutes.json[39m[22m 2.
|
|
19
|
-
orphan modules 7.26 MiB [1m[33m[orphan][39m[22m
|
|
15
|
+
+ 17 assets
|
|
16
|
+
assets by path [1m[32m*.json[39m[22m 16.3 KiB
|
|
17
|
+
asset [1m[32mopenmrs-esm-appointments-app.js.buildmanifest.json[39m[22m 13.9 KiB [1m[32m[emitted][39m[22m
|
|
18
|
+
asset [1m[32mroutes.json[39m[22m 2.44 KiB [1m[32m[emitted][39m[22m [from: src/routes.json] [1m[32m[copied][39m[22m
|
|
19
|
+
orphan modules 7.26 MiB [1m[33m[orphan][39m[22m 1148 modules
|
|
20
20
|
runtime modules 41 KiB 28 modules
|
|
21
|
-
built modules 7.
|
|
21
|
+
built modules 7.78 MiB (javascript) 336 bytes (consume-shared) 294 bytes (share-init) [1m[33m[built][39m[22m
|
|
22
22
|
modules by path [1m../../node_modules/[39m[22m 7.3 MiB 117 modules
|
|
23
|
-
modules by path [1m./[39m[22m
|
|
24
|
-
modules by path [1m./src/[39m[22m
|
|
25
|
-
modules by path [1m./translations/[39m[22m
|
|
23
|
+
modules by path [1m./[39m[22m 494 KiB
|
|
24
|
+
modules by path [1m./src/[39m[22m 452 KiB 38 modules
|
|
25
|
+
modules by path [1m./translations/[39m[22m 42.5 KiB 10 modules
|
|
26
26
|
consume-shared-module modules 336 bytes 8 modules
|
|
27
27
|
provide-module modules 294 bytes
|
|
28
28
|
modules by path [1mprovide shared module (default) @openmrs/[39m[22m 84 bytes 2 modules
|
|
@@ -43,4 +43,4 @@ Entrypoints:
|
|
|
43
43
|
main.js
|
|
44
44
|
[39m[22m
|
|
45
45
|
|
|
46
|
-
webpack 5.86.0 compiled with [1m[33m2 warnings[39m[22m in
|
|
46
|
+
webpack 5.86.0 compiled with [1m[33m2 warnings[39m[22m in 128866 ms
|
package/dist/309.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[309],{5309:(t,e,n)=>{n.r(e),n.d(e,{default:()=>r});var i=n(268),o=n.n(i),s=n(4924),a=n(2870),l=n(4971),p=n(8527),c=n(3291);const r=function(t){var e=t.patientUuid,n=t.appointmentUuid,i=t.closeModal,r=(0,a.useVisit)(e),u=r.activeVisit,d=r.mutate,m=(0,s.useTranslation)().t,h=(0,c.EJ)().mutateAppointments;return o().createElement("div",null,o().createElement(l.xBx,{closeModal:i,title:m("endAppointmentConfirmation","Are you sure you want to check the patient out for this appointment?")}),o().createElement(l.fef,null,o().createElement("p",null,u?m("endAppointmentAndVisitConfirmationMessage","Checking the patient out will mark the appointment as complete, and close out the active visit for this patient."):m("endAppointmentConfirmationMessage","Checking the patient out will mark the appointment as complete."))),o().createElement(l.mzw,null,o().createElement(l.zxk,{kind:"secondary",onClick:i},m("cancel","Cancel")),o().createElement(l.zxk,{kind:"danger",onClick:function(){return(0,p.q)("Completed",n).then((function(){if(h(),u){var t=new AbortController,e={location:u.location.uuid,startDatetime:(0,a.parseDate)(u.startDatetime),visitType:u.visitType.uuid,stopDatetime:new Date};(0,a.updateVisit)(u.uuid,e,t).toPromise().then((function(){d(),(0,a.showSnackbar)({title:m("appointmentEnded","Appointment ended"),subtitle:m("appointmentEndedAndVisitClosedSuccessfully","Appointment successfully ended and visit successfully closed."),isLowContrast:!0,kind:"success"}),i()})).catch((function(t){i(),(0,a.showSnackbar)({title:m("appointmentEndedButVisitNotClosedError","Appointment ended, but error closing visit"),subtitle:null==t?void 0:t.message,kind:"error",isLowContrast:!0})}))}else i(),(0,a.showSnackbar)({title:m("appointmentEnded","Appointment ended"),subtitle:m("appointmentEndedSuccessfully","Appointment successfully ended."),isLowContrast:!0,kind:"success"})})).catch((function(t){i(),(0,a.showSnackbar)({title:m("appointmentEndError","Error ending appointment"),subtitle:null==t?void 0:t.message,kind:"error",isLowContrast:!0})}))}},m("checkOut","Check Out"))))}}}]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AAA,EAAAA,EAAKC,QACfrB,KAAM,QACNkB,eAAe,GAEnB,GACJ,MACEjC,KACA+B,EAAAA,EAAAA,cAAa,CACXrB,MAAOL,EAAE,mBAAoB,qBAC7B2B,SAAU3B,EAAE,+BAAgC,mCAC5C4B,eAAe,EACflB,KAAM,WAGZ,IACCmB,OAAM,SAACC,GACNnC,KACA+B,EAAAA,EAAAA,cAAa,CACXrB,MAAOL,EAAE,sBAAuB,4BAChC2B,SAAUG,aAAAA,EAAAA,EAAKC,QACfrB,KAAM,QACNkB,eAAe,GAEnB,GACJ,GAuBS5B,EAAE,WAAY,eAKzB,C","sources":["webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/end-appointment-modal.component.tsx"],"names":["patientUuid","appointmentUuid","closeModal","useVisit","activeVisit","mutate","useTranslation","t","useMutateAppointments","mutateAppointments","div","ModalHeader","title","ModalBody","p","ModalFooter","Button","kind","onClick","changeAppointmentStatus","then","abortController","AbortController","endVisitPayload","location","uuid","startDatetime","parseDate","visitType","stopDatetime","Date","updateVisit","toPromise","showSnackbar","subtitle","isLowContrast","catch","err","message"],"sourceRoot":""}
|
package/dist/4.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[4],{4:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(268),o=n.n(r),a=n(4924),l=n(4971),i=n(2870),c=n(8527);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.
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[4],{4:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(268),o=n.n(r),a=n(4924),l=n(4971),i=n(2870),c=n(8527);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.q)("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/4.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4.js","mappings":"gPAAA,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,
|
|
1
|
+
{"version":3,"file":"4.js","mappings":"gPAAA,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,GAAwB,YAAab,GAClCc,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-appointments/patient-appointments-cancel-modal.component.tsx"],"names":["closeCancelModal","appointmentUuid","patientUuid","useTranslation","t","usePatientAppointments","Date","toUTCString","AbortController","mutate","useState","isSubmitting","setIsSubmitting","handleCancel","changeAppointmentStatus","then","status","showSnackbar","isLowContrast","kind","subtitle","title","catch","err","message","div","ModalHeader","closeModal","ModalBody","p","ModalFooter","Button","onClick","disabled"],"sourceRoot":""}
|