@openmrs/esm-appointments-app 5.0.1-pre.2055 → 5.0.1-pre.2064
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 +3 -3
- package/dist/381.js +1 -1
- package/dist/381.js.map +1 -1
- package/dist/openmrs-esm-appointments-app.js.buildmanifest.json +3 -3
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/home-appointments/appointment-actions.component.tsx +11 -7
- package/src/home-appointments/appointments-list.component.tsx +16 -6
- package/src/home-appointments/appointments-list.scss +84 -65
- package/src/home-appointments/links.component.tsx +6 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -18,8 +18,8 @@ orphan modules 3.65 MiB [1m[33m[orphan][39m[22m 760 modules
|
|
|
18
18
|
runtime modules 38 KiB 28 modules
|
|
19
19
|
built modules 5.99 MiB (javascript) 168 bytes (share-init) 168 bytes (consume-shared) [1m[33m[built][39m[22m
|
|
20
20
|
modules by path [1m../../node_modules/[39m[22m 5.5 MiB 93 modules
|
|
21
|
-
modules by path [1m./[39m[22m
|
|
22
|
-
modules by path [1m./src/[39m[22m
|
|
21
|
+
modules by path [1m./[39m[22m 506 KiB
|
|
22
|
+
modules by path [1m./src/[39m[22m 477 KiB 44 modules
|
|
23
23
|
modules by path [1m./translations/[39m[22m 29.5 KiB 7 modules
|
|
24
24
|
provide-module modules 168 bytes
|
|
25
25
|
[1mprovide shared module (default) @openmrs/esm-framework@5.1.1-pre.922 = ../../nod...(truncated)[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
@@ -37,4 +37,4 @@ Assets:
|
|
|
37
37
|
738.js (489 KiB)
|
|
38
38
|
813.js (310 KiB)[39m[22m
|
|
39
39
|
|
|
40
|
-
webpack 5.86.0 compiled with [1m[33m1 warning[39m[22m in
|
|
40
|
+
webpack 5.86.0 compiled with [1m[33m1 warning[39m[22m in 195272 ms
|
package/dist/381.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[381],{9200:(e,t,n)=>{n.d(t,{Z:()=>r});var i=n(272),a=n.n(i),o=n(2609),s=n.n(o)()(a());s.push([e.id,".-esm-appointments__cancel-appointment__formContainer___NYD2I{margin:1rem}.-esm-appointments__cancel-appointment__inputContainer___ve8WF{margin:1rem}.-esm-appointments__cancel-appointment__buttonContainer___IvL9y{display:flex}.-esm-appointments__cancel-appointment__buttonContainer___IvL9y>button{width:50%;height:4rem;display:flex;align-items:flex-start}","",{version:3,sources:["webpack://./src/appointments/forms/cancel-form/cancel-appointment.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAEA,8DACE,WC4BW,CDzBb,+DACE,WCwBW,CDrBb,gEACE,YAAA,CACA,uEACE,SAAA,CACA,WC0CS,CDzCT,YAAA,CACA,sBAAA",sourceRoot:""}]),s.locals={formContainer:"-esm-appointments__cancel-appointment__formContainer___NYD2I",inputContainer:"-esm-appointments__cancel-appointment__inputContainer___ve8WF",buttonContainer:"-esm-appointments__cancel-appointment__buttonContainer___IvL9y"};const r=s},3263:(e,t,n)=>{n.d(t,{Z:()=>r});var i=n(272),a=n.n(i),o=n(2609),s=n.n(o)()(a());s.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-appointments__appointments-list__productiveHeading01___tBr9b{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-appointments__appointments-list__productiveHeading02___V9uUM{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-appointments__appointments-list__productiveHeading03___yQYg9{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0)}.-esm-appointments__appointments-list__productiveHeading04___QsvJI{font-size:var(--cds-heading-04-font-size, 1.75rem);font-weight:var(--cds-heading-04-font-weight, 400);line-height:var(--cds-heading-04-line-height, 1.28572);letter-spacing:var(--cds-heading-04-letter-spacing, 0)}.-esm-appointments__appointments-list__bodyLong01___KKoQt{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-appointments__appointments-list__bodyShort01___yO5Kx{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-appointments__appointments-list__bodyShort02___tdaxB{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0)}.-esm-appointments__appointments-list__text02___zc1iD{color:#525252}.-esm-appointments__appointments-list__label01___hjf1c{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-appointments__appointments-list__modal___VBWrl{position:fixed;width:100vw;height:100vh;display:grid;background-color:rgba(0,0,0,.5);z-index:9000;justify-items:center;align-items:center}.-esm-appointments__appointments-list__container___Cdkl0,.-esm-appointments__appointments-list__loadingContainer___mdI4g{background-color:#fff;border:1px solid #e0e0e0;width:100%;margin:0 auto;max-width:95vw;margin-top:3rem;margin-bottom:6rem}.-esm-appointments__appointments-list__loadingContainer___mdI4g{border:none}.-esm-appointments__appointments-list__headerContainer___jN28T{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-appointments__appointments-list__backgroundDataFetchingIndicator___SAIYO{align-items:center;display:flex;flex:1 1 0%;justify-content:center}.-esm-appointments__appointments-list__tableContainer___oowoL section{position:relative}.-esm-appointments__appointments-list__hiddenRow___tbW6x{display:none}.-esm-appointments__appointments-list__addButtonContainer___xc9zL{margin:-1rem}.-esm-appointments__appointments-list__tableContainer___oowoL a{text-decoration:none}.-esm-appointments__appointments-list__tableContainer___oowoL th{color:#525252}.-esm-appointments__appointments-list__tableContainer___oowoL .cds--data-table{background-color:#e0e0e0}.-esm-appointments__appointments-list__tableContainer___oowoL .cds--table-column-menu button{position:static}.-esm-appointments__appointments-list__tableContainer___oowoL .-esm-appointments__appointments-list__tableToolbar___d1Da4{min-height:0;top:-22px}.-esm-appointments__appointments-list__tableContainer___oowoL .-esm-appointments__appointments-list__tableToolbarContent___V8Auw{height:2rem;margin-bottom:.25rem}.-esm-appointments__appointments-list__tableToolbar___d1Da4{min-height:0;top:-22px}.-esm-appointments__appointments-list__startTime___DBQZz{font-weight:700;margin-right:.5rem}.-esm-appointments__appointments-list__nameContainer___ttfjm{display:flex}.-esm-appointments__appointments-list__serviceContainer___mEHFl{display:flex;align-items:center;width:max-content}.-esm-appointments__appointments-list__identifier___nsbyW{font-weight:700}.-esm-appointments__appointments-list__actionButton___GWxy2{position:static;padding:.5rem 1rem .5rem 0}.-esm-appointments__appointments-list__serviceColor___Fqhay{border-radius:50%;margin-right:.5rem;width:1rem;height:1rem;background-color:#24a148}.-esm-appointments__appointments-list__pagination___Wlifz{overflow:hidden}.-esm-appointments__appointments-list__pagination___Wlifz.cds--pagination{border-top:none}.-esm-appointments__appointments-list__hiddenRow___tbW6x{display:none}.-esm-appointments__appointments-list__emptyRow___ksEX2{padding:0 1rem;display:flex;align-items:center}.-esm-appointments__appointments-list__expandedAppointmentsRow___T58zp>td>div{max-height:max-content}.-esm-appointments__appointments-list__expandedAppointmentsRow___T58zp td{padding:0 2rem}.-esm-appointments__appointments-list__expandedAppointmentsRow___T58zp th[colspan] td[colspan]>div:first-child{padding:0 1rem}.-esm-appointments__appointments-list__completeIcon___UeKAp,.-esm-appointments__appointments-list__missedIcon___o516w,.-esm-appointments__appointments-list__cancelIcon___MFd9j{width:8rem;padding:.5rem 1rem .5rem 0;display:flex;align-items:center;height:3rem}.-esm-appointments__appointments-list__completeIcon___UeKAp svg,.-esm-appointments__appointments-list__missedIcon___o516w svg,.-esm-appointments__appointments-list__cancelIcon___MFd9j svg{margin-left:.5rem}.-esm-appointments__appointments-list__completeIcon___UeKAp{color:#24a148}.-esm-appointments__appointments-list__completeIcon___UeKAp svg{fill:#24a148}.-esm-appointments__appointments-list__missedIcon___o516w{color:#fa4d56}.-esm-appointments__appointments-list__missedIcon___o516w svg{fill:#fa4d56}.-esm-appointments__appointments-list__tabletHeading___NjvMS h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-appointments__appointments-list__desktopHeading____elsd,.-esm-appointments__appointments-list__tabletHeading___NjvMS{display:flex;justify-content:space-between;text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-appointments__appointments-list__desktopHeading____elsd h4,.-esm-appointments__appointments-list__tabletHeading___NjvMS h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-appointments__appointments-list__desktopHeading____elsd h4:after,.-esm-appointments__appointments-list__tabletHeading___NjvMS h4:after{content:"";display:block;width:2rem;padding-top:3px;border-bottom:.375rem solid;border-bottom-color:#007d79;border-bottom-color:var(--brand-03)}.-esm-appointments__appointments-list__tileContainer___JGthb{background-color:#fff;border-top:1px solid #e0e0e0;padding:5rem 0}.-esm-appointments__appointments-list__tile___KKZF7{text-align:center}.-esm-appointments__appointments-list__tileContent___g8HHF{display:flex;flex-direction:column;align-items:center}.-esm-appointments__appointments-list__content___hy10p{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.5rem}.-esm-appointments__appointments-list__helper___oVBsR{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);color:#525252}.-esm-appointments__appointments-list__separator___cEPgp{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0);color:#525252;width:80%;margin:1.5rem auto;overflow:hidden;text-align:center}.-esm-appointments__appointments-list__separator___cEPgp::before,.-esm-appointments__appointments-list__separator___cEPgp::after{background-color:#a8a8a8;content:"";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.-esm-appointments__appointments-list__separator___cEPgp::before{right:.5rem;margin-left:-50%}.-esm-appointments__appointments-list__separator___cEPgp::after{left:.5rem;margin-right:-50%}.-esm-appointments__appointments-list__menuItemLink___xHvCJ{text-decoration:none}.-esm-appointments__appointments-list__seeAllLink___N_0lD{position:relative;left:22rem;top:-8.5rem;min-height:2rem;padding:.5rem}.-esm-appointments__appointments-list__filterLabelContainer___eiHjk{display:flex}.-esm-appointments__appointments-list__filterLabel___sI3eO{background-color:#fff;padding:.02rem 1rem;border-radius:1rem;margin-right:.5rem}.-esm-appointments__appointments-list__filterLabel___sI3eO :hover{background-color:#fff}html[dir=rtl] .-esm-appointments__appointments-list__headerContainer___jN28T{padding:.75rem 1rem .75rem 0}html[dir=rtl] .-esm-appointments__appointments-list__headerContainer___jN28T svg{margin-left:0;margin-right:.5rem}html[dir=rtl] .-esm-appointments__appointments-list__headerContainer___jN28T h4{text-align:right}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(1)>span{margin-left:0;margin-right:1rem}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(1)>:nth-child(2) select{border-right:none;border-left:1px solid var(--cds-border-subtle)}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(2)>:first-child select{border-left:none}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(2)>span{margin-right:.0625rem;margin-left:1rem}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(2)>:last-child>:first-child{border-right:1px solid var(--cds-border-subtle)}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(2)>:last-child svg{transform:scaleX(-1)}html[dir=rtl] .-esm-appointments__appointments-list__tableContainer___oowoL th>div{text-align:right}html[dir=rtl] .-esm-appointments__appointments-list__tableContainer___oowoL td{text-align:right}html[dir=rtl] .-esm-appointments__appointments-list__tableContainer___oowoL td .-esm-appointments__appointments-list__serviceColor___Fqhay{margin-right:0;margin-left:.5rem}html[dir=rtl] .-esm-appointments__appointments-list__tableContainer___oowoL td button{padding:.5rem 0 .5rem 1rem;text-align:right}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/home-appointments/appointments-list.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,mECs0BI,2DAAA,CAAA,0DA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iEACE,WClOS,CDmOT,gBAAA,CAGF,gEACE,UCvOS,CDwOT,iBAAA,CAIJ,4DACE,oBAAA,CAGF,0DACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,eChOW,CDiOX,aCrPW,CDwPb,oEACE,YAAA,CAGF,2DACE,qBHjRM,CGkRN,mBAAA,CACA,kBCrPW,CDsPX,kBChQW,CDiQX,kEACE,qBHtRI,CG4RN,6EACE,4BAAA,CACA,iFACE,aAAA,CACA,kBC5QO,CD8QT,gFACE,gBAAA,CAKA,2FACE,aAAA,CACA,iBC5QK,CD+QL,2GACE,iBAAA,CACA,8CAAA,CAMF,0GACE,gBAAA,CAGJ,2FACE,qBAAA,CACA,gBC7RK,CDgSL,+GACE,+CAAA,CAEF,sGACE,oBAAA,CAMN,mFACE,gBAAA,CAEF,+EACE,gBAAA,CACA,2IACE,cAAA,CACA,iBC3TK,CD6TP,sFACE,0BAAA,CACA,gBAAA",sourceRoot:""}]),s.locals={productiveHeading01:"-esm-appointments__appointments-list__productiveHeading01___tBr9b",productiveHeading02:"-esm-appointments__appointments-list__productiveHeading02___V9uUM",productiveHeading03:"-esm-appointments__appointments-list__productiveHeading03___yQYg9",productiveHeading04:"-esm-appointments__appointments-list__productiveHeading04___QsvJI",bodyLong01:"-esm-appointments__appointments-list__bodyLong01___KKoQt",bodyShort01:"-esm-appointments__appointments-list__bodyShort01___yO5Kx",bodyShort02:"-esm-appointments__appointments-list__bodyShort02___tdaxB",text02:"-esm-appointments__appointments-list__text02___zc1iD",label01:"-esm-appointments__appointments-list__label01___hjf1c",modal:"-esm-appointments__appointments-list__modal___VBWrl",container:"-esm-appointments__appointments-list__container___Cdkl0",loadingContainer:"-esm-appointments__appointments-list__loadingContainer___mdI4g",headerContainer:"-esm-appointments__appointments-list__headerContainer___jN28T",backgroundDataFetchingIndicator:"-esm-appointments__appointments-list__backgroundDataFetchingIndicator___SAIYO",tableContainer:"-esm-appointments__appointments-list__tableContainer___oowoL",hiddenRow:"-esm-appointments__appointments-list__hiddenRow___tbW6x",addButtonContainer:"-esm-appointments__appointments-list__addButtonContainer___xc9zL",tableToolbar:"-esm-appointments__appointments-list__tableToolbar___d1Da4",tableToolbarContent:"-esm-appointments__appointments-list__tableToolbarContent___V8Auw",startTime:"-esm-appointments__appointments-list__startTime___DBQZz",nameContainer:"-esm-appointments__appointments-list__nameContainer___ttfjm",serviceContainer:"-esm-appointments__appointments-list__serviceContainer___mEHFl",identifier:"-esm-appointments__appointments-list__identifier___nsbyW",actionButton:"-esm-appointments__appointments-list__actionButton___GWxy2",serviceColor:"-esm-appointments__appointments-list__serviceColor___Fqhay",pagination:"-esm-appointments__appointments-list__pagination___Wlifz",emptyRow:"-esm-appointments__appointments-list__emptyRow___ksEX2",expandedAppointmentsRow:"-esm-appointments__appointments-list__expandedAppointmentsRow___T58zp",completeIcon:"-esm-appointments__appointments-list__completeIcon___UeKAp",missedIcon:"-esm-appointments__appointments-list__missedIcon___o516w",cancelIcon:"-esm-appointments__appointments-list__cancelIcon___MFd9j",tabletHeading:"-esm-appointments__appointments-list__tabletHeading___NjvMS",desktopHeading:"-esm-appointments__appointments-list__desktopHeading____elsd",tileContainer:"-esm-appointments__appointments-list__tileContainer___JGthb",tile:"-esm-appointments__appointments-list__tile___KKZF7",tileContent:"-esm-appointments__appointments-list__tileContent___g8HHF",content:"-esm-appointments__appointments-list__content___hy10p",helper:"-esm-appointments__appointments-list__helper___oVBsR",separator:"-esm-appointments__appointments-list__separator___cEPgp",menuItemLink:"-esm-appointments__appointments-list__menuItemLink___xHvCJ",seeAllLink:"-esm-appointments__appointments-list__seeAllLink___N_0lD",filterLabelContainer:"-esm-appointments__appointments-list__filterLabelContainer___eiHjk",filterLabel:"-esm-appointments__appointments-list__filterLabel___sI3eO"};const r=s},4690:(e,t,n)=>{n.d(t,{E0:()=>h,LW:()=>C,WN:()=>d});var i=n(268),a=n(3255),o=n(8879),s=n.n(o),r=n(4924),l=n(2870),p=n(1027),m=n(8179);function c(e,t,n,i,a,o,s){try{var r=e[o](s),l=r.value}catch(e){return void n(e)}r.done?t(l):Promise.resolve(l).then(i,a)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function s(e){c(o,i,a,s,r,"next",e)}function r(e){c(o,i,a,s,r,"throw",e)}s(void 0)}))}}var A=function(e,t){var n,i,a,o,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(o){return function(r){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(a=2&o[0]?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}};function d(){var e=(0,r.useTranslation)().t,t=(0,p.zF)().currentAppointmentDate,n="/ws/rest/v1/appointment/all?forDate=".concat(t),o=(0,a.ZP)(t?n:null,l.openmrsFetch),s=o.data,m=o.error,c=o.isLoading,_=o.isValidating,A=o.mutate,d=(0,i.useMemo)((function(){var t,n;return{appointments:null!==(n=null==s||null===(t=s.data)||void 0===t?void 0:t.map((function(t){return(0,p.df)(t,e)})))&&void 0!==n?n:[],isLoading:c,isError:m,isValidating:_,mutate:A}}),[null==s?void 0:s.data,m,c,_,A,e]);return d}var u,C=(u=_((function(e,t){var n,i,a,o;return A(this,(function(r){switch(r.label){case 0:return n=new AbortController,i=Intl.DateTimeFormat().resolvedOptions().timeZone,a=s()(new Date).format(m.J$),o="/ws/rest/v1/appointments/".concat(t,"/status-change"),[4,(0,l.openmrsFetch)(o,{body:{toStatus:e,onDate:a,timeZone:i},method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal})];case 1:return[2,r.sent()]}}))})),function(e,t){return u.apply(this,arguments)}),h=function(){var e=_((function(e){var t,n;return A(this,(function(i){switch(i.label){case 0:return t=new AbortController,n="/ws/rest/v1/appointment/undoStatusChange/".concat(e),[4,(0,l.openmrsFetch)(n,{method:"POST",headers:{"Content-Type":"application/json"},signal:t.signal})];case 1:return[2,i.sent()]}}))}));return function(t){return e.apply(this,arguments)}}()},2649:(e,t,n)=>{n.d(t,{NL:()=>m,O4:()=>p,bO:()=>_,tf:()=>c});var i=n(2870),a=n(4690);function o(e,t,n,i,a,o,s){try{var r=e[o](s),l=r.value}catch(e){return void n(e)}r.done?t(l):Promise.resolve(l).then(i,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var s=e.apply(t,n);function r(e){o(s,i,a,r,l,"next",e)}function l(e){o(s,i,a,r,l,"throw",e)}r(void 0)}))}}var r,l=function(e,t){var n,i,a,o,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(o){return function(r){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(a=2&o[0]?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}},p=function(e){var t=(0,i.showModal)("check-in-appointment-modal",{closeCheckInModal:function(){return t()},appointmentUuid:e})},m=(r=s((function(e,t){return l(this,(function(n){switch(n.label){case 0:return new AbortController,[4,(0,a.E0)(e)];case 1:return 200===n.sent().status?t("/ws/rest/v1/appointment/appointment/all"):(0,i.showNotification)({title:"Error Undoing",kind:"error",critical:!0,description:"Error reverting status"}),[2]}}))})),function(e,t){return r.apply(this,arguments)}),c=function(){var e=s((function(e,t,n,o,s,r,p,c){return l(this,(function(l){switch(l.label){case 0:return new AbortController,[4,(0,a.LW)(e,t)];case 1:return 200===l.sent().status?((0,i.showActionableNotification)({critical:!0,kind:"success",subtitle:n,title:s,actionButtonLabel:c("undo","Undo"),progressActionLabel:c("revertingAppointmentStatus","Reverting appointment status"),onActionButtonClick:function(){return m(t,p)}}),p("/ws/rest/v1/appointment/appointment/all")):(0,i.showNotification)({title:r,kind:"error",critical:!0,description:o}),[2]}}))}));return function(t,n,i,a,o,s,r,l){return e.apply(this,arguments)}}(),_=function(e,t,n){var i=n("appointmentMarkedAsCompleted","It has been successfully marked as Completed"),a=n("appointmentCompleted","Appointment Completed"),o=n("appointmentCompleted","Appointment Completed"),s=n("appointmentCompletedError","Error marking appointment as Completed");return c("Completed",e,i,o,a,s,t,n)}},4381:(e,t,n)=>{n.r(t),n.d(t,{default:()=>te});var i=n(268),a=n.n(i),o=n(3255),s=n(4924),r=n(3504),l=n(2074),p=n(6039),m=n(2870),c=n(328),_=n(1723),A=n(1354),d=n.n(A),u=n(1583),C=n.n(u),h=n(7378),g=n.n(h),f=n(5993),v=n.n(f),b=n(4154),E=n.n(b),y=n(8141),w=n.n(y),k=n(3263),D={};D.styleTagTransform=w(),D.setAttributes=v(),D.insert=g().bind(null,"head"),D.domAPI=C(),D.insertStyleElement=E(),d()(k.Z,D);const B=k.Z&&k.Z.locals?k.Z.locals:void 0;var I=n(8179),x=n(2649),z=n(4546),N=n(1027),F=n(9200),T={};T.styleTagTransform=w(),T.setAttributes=v(),T.insert=g().bind(null,"head"),T.domAPI=C(),T.insertStyleElement=E(),d()(F.Z,T);const H=F.Z&&F.Z.locals?F.Z.locals:void 0;function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function L(e,t,n,i,a,o,s){try{var r=e[o](s),l=r.value}catch(e){return void n(e)}r.done?t(l):Promise.resolve(l).then(i,a)}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,a,o=[],s=!0,r=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){r=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(r)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return S(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)?S(e,t):void 0}}(e,t)||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.")}()}const G=function(e){var t=e.appointment,n=(0,s.useTranslation)().t,l=(0,o.kY)().mutate,p=(0,m.usePatient)(t.patientUuid).patient,c=(0,m.useSession)(),A=M((0,i.useState)(t.location),2),d=A[0],u=A[1],C=M((0,i.useState)(""),2),h=C[0],g=C[1],f=(0,N.zF)().currentAppointmentDate,v=M((0,i.useState)(!1),2),b=v[0],E=v[1];(0,i.useEffect)((function(){var e,t;d&&(null==c||null===(e=c.sessionLocation)||void 0===e?void 0:e.uuid)&&u(null==c||null===(t=c.sessionLocation)||void 0===t?void 0:t.uuid)}),[d,c]);var y,w,k=(y=function(){return function(e,t){var n,i,a,o,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(o){return function(r){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(a=2&o[0]?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}}(this,(function(e){switch(e.label){case 0:return E(!0),[4,(0,z.v1)("Cancelled",t.id)];case 1:return 200===e.sent().status?((0,m.showToast)({critical:!0,kind:"success",description:n("appointmentNowVisible","It has been cancelled successfully"),title:n("appointmentCancelled","Appointment cancelled")}),l("/ws/rest/v1/appointment/appointmentStatus?forDate=".concat(f,"&status=Scheduled")),l("/ws/rest/v1/appointment/appointmentStatus?forDate=".concat(f,"&status=Cancelled")),(0,_.Km)()):((0,m.showNotification)({title:n("appointmentCancelError","Error cancelling appointment"),kind:"error",critical:!0,description:n("errorMessage","Error cancelling the appointment")}),E(!1)),[2]}}))},w=function(){var e=this,t=arguments;return new Promise((function(n,i){var a=y.apply(e,t);function o(e){L(a,n,i,o,s,"next",e)}function s(e){L(a,n,i,o,s,"throw",e)}o(void 0)}))},function(){return w.apply(this,arguments)});return a().createElement("div",{className:H.formContainer},p&&a().createElement(m.ExtensionSlot,{name:"patient-header-slot",state:{patient:p,patientUuid:t.patientUuid}}),a().createElement(r.mh4,null,a().createElement(r.Kx8,{id:"reason",value:h,className:H.inputContainer,labelText:n("reasonForChanges","Reason For Changes"),onChange:function(e){return g(e.target.value)}})),a().createElement("div",{className:H.buttonContainer},a().createElement(r.zxk,{onClick:function(){return(0,_.Km)()},kind:"secondary"},n("discard","Discard")),a().createElement(r.zxk,{onClick:k,disabled:b,kind:"primary",type:"submit"},n("cancelAppointment","Cancel Appointment"))))};var W=n(7202),j=function(e){var t=e.appointment,n=e.useBahmniUI,i=(0,s.useTranslation)().t,l=(0,o.kY)().mutate,p=(0,m.useConfig)().bahmniAppointmentsUiBaseUrl,A=t.status,d="Completed"===A||"Missed"===A||"Cancelled"===A,u="Scheduled"===A||"Requested"===A,C=function(){return n?a().createElement(r.laM,{className:B.menuItemLink,id:"#editAppointment",target:"_blank",href:"".concat(p,"/#/home/manage/appointments/calendar/").concat(t.id,"?isRecurring=").concat(t.recurring),itemText:i("editAppointment","Edit Appointment")},i("editAppointment","Edit Appointment")):a().createElement(r.laM,{className:B.menuItem,id:"#editAppointment",onClick:function(){(0,m.navigate)({to:"".concat(I.JB)}),(0,_.I8)(i("editAppointment","Edit Appointment"),a().createElement(W.Z,{appointment:t,context:"editing"}))},itemText:i("editAppointment","Edit Appointment")},i("editAppointment","Edit Appointment"))},h=function(){return n?a().createElement(r.laM,{className:B.menuItemLink,id:"#createAppointment",target:"_blank",href:"".concat(p,"/#/home/manage/appointments/calendar/new"),itemText:i("addNewAppointment","Add new appointment")},i("addNewAppointment","Add new appointment")):a().createElement(r.laM,{className:B.menuItem,id:"#createAppointment",onClick:function(){(0,m.navigate)({to:"".concat(I.JB)}),(0,_.I8)(i("search","Search"),a().createElement(c.Z,null))},itemText:i("addNewAppointment","Add new appointment")},i("addNewAppointment","Add new appointment"))};return a().createElement(r.mh4,null,a().createElement(r.PQB,{ariaLabel:"Edit appointment",selectorPrimaryFocus:"#editPatientDetails",size:"sm",flipped:!0},a().createElement(C,null),a().createElement(r.laM,{className:B.menuItem,disabled:"CheckedIn"===A||d,id:"#checkInAppointment",onClick:function(){return(0,x.O4)(t.id)},itemText:i("checkIn","Check In")},i("checkIn","Check In")),a().createElement(r.laM,{className:B.menuItem,id:"#completeAppointment",disabled:u||d,onClick:function(){return(0,x.bO)(t.id,l,i)},itemText:i("complete","Complete")},i("complete","Complete")),a().createElement(r.laM,{className:B.menuItem,disabled:d,id:"#missedAppointment",onClick:function(){var e=i("appointmentMarkedAsMissed","It has been successfully marked as Missed"),n=i("appointmentMissed","Appointment Missed"),a=i("appointmentMissed","Appointment Missed"),o=i("appointmentMissedError","Error marking appointment as Missed");return(0,x.tf)("Missed",t.id,e,a,n,o,l,i)},itemText:i("missed","Missed")},i("missed","Missed")),a().createElement(r.laM,{className:B.menuItem,id:"#cancelAppointment",disabled:d,onClick:function(){(0,m.navigate)({to:"".concat(I.JB)}),(0,_.I8)(i("cancelAppointment","Cancel Appointment"),a().createElement(G,{appointment:t}))},itemText:i("cancel","Cancel")},i("cancel","Cancel")),a().createElement(h,null)))},U=function(e){var t=e.width,n=void 0===t?"64":t,i=e.height,o=void 0===i?"64":i;return a().createElement("svg",{width:n,height:o,viewBox:"0 0 64 64"},a().createElement("title",null,"Empty data illustration"),a().createElement("g",{fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),a().createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),a().createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),a().createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))},J=n(6759),O=n(9884);function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},P.apply(this,arguments)}var R=function(){var e=(0,m.useConfig)(),t=e.useBahmniAppointmentsUI,n=e.bahmniAppointmentsUiBaseUrl,i=(0,s.useTranslation)().t;return t?a().createElement(r.zxk,{kind:"ghost",className:B.seeAllLink,size:"md",target:"_blank",href:"".concat(n,"/#/home/manage/appointments/list")},i("seeAllAppointments","See all appointments")):a().createElement(r.zxk,{kind:"ghost",className:B.seeAllLink,onClick:function(){return(0,m.navigate)({to:"".concat(I.JB)})}},i("seeAllAppointments","See all appointments"))},Y=function(){var e=(0,m.useConfig)(),t=e.useBahmniAppointmentsUI,n=e.bahmniAppointmentsUiBaseUrl,i=(0,s.useTranslation)().t;return a().createElement("div",{className:B.addButtonContainer},t?a().createElement(r.zxk,{target:"_blank",kind:"ghost",href:"".concat(n,"/#/home/manage/appointments/calendar/new"),renderIcon:function(e){return a().createElement(J.mm,P({size:16},e,{className:"cds--btn__icon"}))}},i("add","Add")):a().createElement(r.zxk,{kind:"ghost",renderIcon:function(e){return a().createElement(J.mm,P({size:16},e))},onClick:function(){(0,m.navigate)({to:"".concat(I.JB,"/appointments")}),(0,_.I8)(i("search","Search"),a().createElement(c.Z,null))}},i("add","Add")))},V=function(){var e=(0,m.useConfig)(),t=e.useBahmniAppointmentsUI,n=e.bahmniAppointmentsUiBaseUrl,i=(0,s.useTranslation)().t;return t?a().createElement(r.zxk,{kind:"ghost",size:"md",target:"_blank",className:"cds--btn cds--btn--ghost",href:"".concat(n,"/#/home/manage/appointments/calendar"),renderIcon:function(e){return a().createElement(O.f,P({size:16},e,{className:"cds--btn__icon"}))}},i("viewCalendar","View Calendar")):a().createElement(r.zxk,{className:B.calendarButton,kind:"ghost",onClick:function(){return(0,m.navigate)({to:"".concat(I.JB,"/calendar")})},renderIcon:function(e){return a().createElement(O.f,P({size:16},e))},"data-floating-menu-primary-focus":!0,iconDescription:i("viewCalendar","View Calendar")},i("viewCalendar","View Calendar"))},K=n(4690);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Q(){return Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Q.apply(this,arguments)}var q=function(e){var t=e.color;return a().createElement("div",{className:B.serviceColor,style:{backgroundColor:"".concat(t)}})},X=function(e){var t=e.status,n=e.t,i=e.appointmentUuid,o=e.mutate;switch(t){case"Completed":return a().createElement("div",{className:B.completeIcon},n("completed","Completed"),a().createElement(l.Wz,{size:16}));case"Missed":return a().createElement("div",{className:B.missedIcon},n("missed","Missed"),a().createElement(p.Wf,{size:16}));case"Cancelled":return a().createElement("div",{className:B.cancelIcon},n("cancelled","Cancelled"),a().createElement(l.eL,{size:16}));case"CheckedIn":return a().createElement(r.zxk,{kind:"ghost",className:B.actionButton,onClick:function(){return(0,x.bO)(i,o,n)}},n("complete","Complete"));default:return a().createElement(r.zxk,{kind:"ghost",className:B.actionButton,disabled:"CheckedIn"===t,onClick:function(){return(0,x.O4)(i)}},n("checkIn","Check In"))}};const $=function(){var e,t,n=(0,m.useLayoutType)(),l=(0,m.useSession)().user,p=(0,s.useTranslation)().t,c=(0,o.kY)().mutate,_=(0,m.useConfig)(),A=_.useBahmniAppointmentsUI,d=_.useFullViewPrivilege,u=_.fullViewPrivilege,C=(0,K.WN)(),h=C.appointments,g=C.isLoading,f=(C.isValidating,(0,m.userHasAccess)(u,l)||!d),v=f?h:h.filter((function(e){return"Scheduled"===e.status})),b=[10,20,30,40,50],E=(e=(0,i.useState)(10),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,a,o=[],s=!0,r=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){r=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(r)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Z(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)?Z(e,t):void 0}}(e,t)||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.")}()),y=E[0],w=E[1],k=(0,m.usePagination)(v,y),D=k.goTo,I=k.results,x=k.currentPage,z=(0,i.useMemo)((function(){return[{id:0,header:p("dateTime","Date and time"),key:"dateTime"},{id:1,header:p("name","Patient Name"),key:"name"},{id:2,header:p("identifier","Identifier"),key:"identifier"},{id:3,header:p("location","Location"),key:"location"},{id:4,header:p("service","Service"),key:"service"},{id:5,header:p("actions","Actions"),key:"actionButton"}]}),[p]),N=null==I?void 0:I.map((function(e){return{id:e.id,dateTime:{content:a().createElement("span",{className:B.statusContainer},a().createElement("span",{className:B.startTime},e.dateTime),e.duration)},name:{content:a().createElement("div",{className:B.nameContainer},a().createElement(m.ConfigurableLink,{to:"${openmrsSpaBase}/patient/".concat(e.patientUuid,"/chart")},e.name))},identifier:{content:a().createElement("div",{className:B.nameContainer},a().createElement("span",{className:B.identifier},e.identifier))},location:{content:a().createElement("span",{className:B.statusContainer},e.location)},service:{content:a().createElement("span",{className:B.serviceContainer},a().createElement(q,{color:e.serviceColor}),e.serviceType)},actionButton:{content:a().createElement("span",{className:B.serviceContainer},a().createElement(X,{status:e.status,appointmentUuid:e.id,t:p,mutate:c}))}}}));return g?a().createElement("div",{className:B.loadingContainer},a().createElement(r.gqd,{role:"progressbar"})):0===(null==h?void 0:h.length)?a().createElement(r.mh4,{className:B.container},a().createElement(r.n9L,{className:B.tile},a().createElement("div",{className:(0,m.isDesktop)(n)?B.desktopHeading:B.tabletHeading},a().createElement("h4",null,p("todaysAppointments","Today's Appointments")),a().createElement(Y,null)),a().createElement(U,null),a().createElement("p",{className:B.content},p("noAppointmentsScheduledForTodayToDisplay","There are no appointments scheduled for today to display for this location"),"."))):a().createElement(a().Fragment,null,a().createElement("div",{className:B.container},a().createElement("div",{className:B.headerContainer},a().createElement("div",{className:(0,m.isDesktop)(n)?B.desktopHeading:B.tabletHeading},a().createElement("h4",null,p("todaysAppointments","Today's Appointments"))),a().createElement("div",{className:B.actionLinks},a().createElement(V,null),a().createElement(Y,null))),a().createElement(r.wQF,{"data-floating-menu-container":!0,headers:z,overflowMenuOnHover:(0,m.isDesktop)(n),rows:N,size:(0,m.isDesktop)(n)?"xs":"md",useZebraStyles:!0},(function(e){var t=e.rows,n=e.headers,i=e.getHeaderProps,o=e.getTableProps,s=e.getRowProps;return a().createElement(r.xJi,{className:B.tableContainer},a().createElement(r.iA_,Q({},o(),{className:B.appointmentsTable}),a().createElement(r.ssF,null,a().createElement(r.SCH,null,n.map((function(e){return a().createElement(r.xDH,Q({},i({header:e}),{key:e.id}),e.header)})))),a().createElement(r.RMI,null,t.map((function(e,t){var n;return a().createElement(a().Fragment,{key:e.id},a().createElement(r.SCH,Q({},s({row:e})),e.cells.map((function(e){var t;return a().createElement(r.pj1,{key:e.id},null!==(n=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==n?n:e.value)})),f&&a().createElement(r.pj1,{className:"cds--table-column-menu"},a().createElement(j,{appointment:null==v?void 0:v[t],useBahmniUI:A}))))})))),0===t.length?a().createElement("div",{className:B.tileContainer},a().createElement(r.mh4,null,a().createElement(r.n9L,{className:B.tile},a().createElement("div",{className:B.tileContent},a().createElement("p",{className:B.content},p("noAppointmentsToDisplay","No appointments to display")),a().createElement("p",{className:B.helper},p("checkFilters","Check the filters above"))),a().createElement("p",{className:B.separator},p("or","or")),a().createElement(Y,null)))):null,a().createElement(r.tlE,{forwardText:"Next page",backwardText:"Previous page",page:x,pageSize:y,pageSizes:b,totalItems:v.length,className:B.pagination,onChange:function(e){var t=e.pageSize,n=e.page;t!==y&&w(t),n!==x&&D(n)}}))}))),a().createElement(R,null))};var ee={errorRetryCount:3};const te=function(){return a().createElement(o.J$,{value:ee},a().createElement($,null))}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[381],{9200:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(272),i=n.n(a),o=n(2609),s=n.n(o)()(i());s.push([e.id,".-esm-appointments__cancel-appointment__formContainer___NYD2I{margin:1rem}.-esm-appointments__cancel-appointment__inputContainer___ve8WF{margin:1rem}.-esm-appointments__cancel-appointment__buttonContainer___IvL9y{display:flex}.-esm-appointments__cancel-appointment__buttonContainer___IvL9y>button{width:50%;height:4rem;display:flex;align-items:flex-start}","",{version:3,sources:["webpack://./src/appointments/forms/cancel-form/cancel-appointment.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAEA,8DACE,WC4BW,CDzBb,+DACE,WCwBW,CDrBb,gEACE,YAAA,CACA,uEACE,SAAA,CACA,WC0CS,CDzCT,YAAA,CACA,sBAAA",sourceRoot:""}]),s.locals={formContainer:"-esm-appointments__cancel-appointment__formContainer___NYD2I",inputContainer:"-esm-appointments__cancel-appointment__inputContainer___ve8WF",buttonContainer:"-esm-appointments__cancel-appointment__buttonContainer___IvL9y"};const r=s},3263:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(272),i=n.n(a),o=n(2609),s=n.n(o)()(i());s.push([e.id,'.-esm-appointments__appointments-list__container___Cdkl0,.-esm-appointments__appointments-list__loadingContainer___mdI4g{background-color:#fff;border:1px solid #e0e0e0;width:100%;margin:0 auto;max-width:95vw;margin-top:3rem;margin-bottom:6rem}.-esm-appointments__appointments-list__loadingContainer___mdI4g{border:none}.-esm-appointments__appointments-list__headerContainer___jN28T{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-appointments__appointments-list__backgroundDataFetchingIndicator___SAIYO{align-items:center;display:flex;flex:1 1 0%;justify-content:center}.-esm-appointments__appointments-list__tableContainer___oowoL section{position:relative}.-esm-appointments__appointments-list__hiddenRow___tbW6x{display:none}.-esm-appointments__appointments-list__addButtonContainer___xc9zL{margin-left:1.25rem}.-esm-appointments__appointments-list__tableContainer___oowoL a{text-decoration:none}.-esm-appointments__appointments-list__tableContainer___oowoL th{color:#525252}.-esm-appointments__appointments-list__tableContainer___oowoL .cds--data-table{background-color:#e0e0e0}.-esm-appointments__appointments-list__tableContainer___oowoL .-esm-appointments__appointments-list__tableToolbar___d1Da4{min-height:0;top:-22px}.-esm-appointments__appointments-list__tableContainer___oowoL .-esm-appointments__appointments-list__tableToolbarContent___V8Auw{height:2rem;margin-bottom:.25rem}.-esm-appointments__appointments-list__tableToolbar___d1Da4{min-height:0;top:-22px}.-esm-appointments__appointments-list__startTime___DBQZz{font-weight:700;margin-right:.5rem}.-esm-appointments__appointments-list__nameContainer___ttfjm{display:flex}.-esm-appointments__appointments-list__serviceContainer___mEHFl{display:flex;align-items:center;width:max-content}.-esm-appointments__appointments-list__identifier___nsbyW{font-weight:700}.-esm-appointments__appointments-list__actionButton___GWxy2{position:static;padding:.5rem 1rem .5rem 0}.-esm-appointments__appointments-list__serviceColor___Fqhay{border-radius:50%;margin-right:.5rem;width:1rem;height:1rem;background-color:#24a148}.-esm-appointments__appointments-list__pagination___Wlifz{overflow:hidden}.-esm-appointments__appointments-list__pagination___Wlifz.cds--pagination{border-top:none}.-esm-appointments__appointments-list__hiddenRow___tbW6x{display:none}.-esm-appointments__appointments-list__emptyRow___ksEX2{padding:0 1rem;display:flex;align-items:center}.-esm-appointments__appointments-list__expandedAppointmentsRow___T58zp>td>div{max-height:max-content}.-esm-appointments__appointments-list__expandedAppointmentsRow___T58zp td{padding:0 2rem}.-esm-appointments__appointments-list__expandedAppointmentsRow___T58zp th[colspan] td[colspan]>div:first-child{padding:0 1rem}.-esm-appointments__appointments-list__completeIcon___UeKAp,.-esm-appointments__appointments-list__missedIcon___o516w,.-esm-appointments__appointments-list__cancelIcon___MFd9j{width:8rem;padding:.5rem 1rem .5rem 0;display:flex;align-items:center;height:3rem}.-esm-appointments__appointments-list__completeIcon___UeKAp svg,.-esm-appointments__appointments-list__missedIcon___o516w svg,.-esm-appointments__appointments-list__cancelIcon___MFd9j svg{margin-left:.5rem}.-esm-appointments__appointments-list__completeIcon___UeKAp{color:#24a148}.-esm-appointments__appointments-list__completeIcon___UeKAp svg{fill:#24a148}.-esm-appointments__appointments-list__missedIcon___o516w{color:#fa4d56}.-esm-appointments__appointments-list__missedIcon___o516w svg{fill:#fa4d56}.-esm-appointments__appointments-list__tabletHeading___NjvMS h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-appointments__appointments-list__desktopHeading____elsd,.-esm-appointments__appointments-list__tabletHeading___NjvMS{display:flex;justify-content:space-between;text-align:left;text-transform:capitalize}.-esm-appointments__appointments-list__desktopHeading____elsd h4,.-esm-appointments__appointments-list__tabletHeading___NjvMS h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-appointments__appointments-list__desktopHeading____elsd h4:after,.-esm-appointments__appointments-list__tabletHeading___NjvMS h4:after{content:"";display:block;width:2rem;padding-top:3px;border-bottom:.375rem solid var(--brand-03)}.-esm-appointments__appointments-list__tileContainer___JGthb{background-color:#fff;border-top:1px solid #e0e0e0;padding:5rem 0}.-esm-appointments__appointments-list__tile___KKZF7{text-align:center}.-esm-appointments__appointments-list__tileContent___g8HHF{display:flex;flex-direction:column;align-items:center}.-esm-appointments__appointments-list__content___hy10p{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.5rem}.-esm-appointments__appointments-list__helper___oVBsR{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);color:#525252}.-esm-appointments__appointments-list__separator___cEPgp{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0);color:#525252;width:80%;margin:1.5rem auto;overflow:hidden;text-align:center}.-esm-appointments__appointments-list__separator___cEPgp::before,.-esm-appointments__appointments-list__separator___cEPgp::after{background-color:#a8a8a8;content:"";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.-esm-appointments__appointments-list__separator___cEPgp::before{right:.5rem;margin-left:-50%}.-esm-appointments__appointments-list__separator___cEPgp::after{left:.5rem;margin-right:-50%}.-esm-appointments__appointments-list__actionLinks___ZNzmS{display:flex;align-items:center;margin-top:-0.75rem}.-esm-appointments__appointments-list__menuItemLink___xHvCJ{text-decoration:none}.-esm-appointments__appointments-list__menuItem___GgauJ{max-width:none}.-esm-appointments__appointments-list__seeAllLink___N_0lD{position:relative;left:22rem;top:-8.5rem;min-height:2rem;padding:.5rem}.-esm-appointments__appointments-list__filterLabelContainer___eiHjk{display:flex}.-esm-appointments__appointments-list__filterLabel___sI3eO{background-color:#fff;padding:.02rem 1rem;border-radius:1rem;margin-right:.5rem}.-esm-appointments__appointments-list__filterLabel___sI3eO :hover{background-color:#fff}.-esm-appointments__appointments-list__viewCalendarButton___vTgXJ{margin:-1.25rem 0}.-esm-appointments__appointments-list__divider___N559L{width:1px;height:1rem;color:#e0e0e0;margin-left:1rem}.-esm-appointments__appointments-list__overflowMenu___uYUG7{vertical-align:middle !important}html[dir=rtl] .-esm-appointments__appointments-list__headerContainer___jN28T{padding:.75rem 1rem .75rem 0}html[dir=rtl] .-esm-appointments__appointments-list__headerContainer___jN28T svg{margin-left:0;margin-right:.5rem}html[dir=rtl] .-esm-appointments__appointments-list__headerContainer___jN28T h4{text-align:right}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(1)>span{margin-left:0;margin-right:1rem}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(1)>:nth-child(2) select{border-right:none;border-left:1px solid var(--cds-border-subtle)}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(2)>:first-child select{border-left:none}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(2)>span{margin-right:.0625rem;margin-left:1rem}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(2)>:last-child>:first-child{border-right:1px solid var(--cds-border-subtle)}html[dir=rtl] .-esm-appointments__appointments-list__pagination___Wlifz>:nth-child(2)>:last-child svg{transform:scaleX(-1)}html[dir=rtl] .-esm-appointments__appointments-list__tableContainer___oowoL th>div{text-align:right}html[dir=rtl] .-esm-appointments__appointments-list__tableContainer___oowoL td{text-align:right}html[dir=rtl] .-esm-appointments__appointments-list__tableContainer___oowoL td .-esm-appointments__appointments-list__serviceColor___Fqhay{margin-right:0;margin-left:.5rem}html[dir=rtl] .-esm-appointments__appointments-list__tableContainer___oowoL td button{padding:.5rem 0 .5rem 1rem;text-align:right}',"",{version:3,sources:["webpack://./src/home-appointments/appointments-list.scss","webpack://./../../node_modules/@carbon/colors/index.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAIA,yHACE,qBCqHQ,CDpHR,wBAAA,CACA,UAAA,CACA,aAAA,CACA,cAAA,CACA,eEyCW,CFxCX,kBEuDW,CFpDb,gEAEE,WAAA,CAGF,+DACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CACA,qBCkGQ,CD/FV,+EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,sBAAA,CAGF,sEACE,iBAAA,CAGF,yDACE,YAAA,CAGF,kEACE,mBAAA,CAIA,gEACE,oBAAA,CAGF,iEACE,aCJM,CDOR,+EACE,wBCbM,CDgBR,0HACE,YAAA,CACA,SAAA,CAGF,iIACE,WExBS,CFyBT,oBElDS,CFsDb,4DACE,YAAA,CACA,SAAA,CAGF,yDACE,eAAA,CACA,kBExDW,CF2Db,6DACE,YAAA,CAGF,gEACE,YAAA,CACA,kBAAA,CACA,iBAAA,CAGF,0DACE,eAAA,CAGF,4DACE,eAAA,CACA,0BAAA,CAGF,4DACE,iBAAA,CACA,kBEhFW,CFiFX,UEvEW,CFwEX,WExEW,CFyEX,wBChDS,CDmDX,0DACE,eAAA,CAEA,0EACE,eAAA,CAIJ,yDACE,YAAA,CAGF,wDACE,cAAA,CACA,YAAA,CACA,kBAAA,CAGF,8EACE,sBAAA,CAGF,0EACE,cAAA,CAGF,+GACE,cAAA,CAGF,gLAGE,UAAA,CACA,0BAAA,CACA,YAAA,CACA,kBAAA,CACA,WE7FW,CF+FX,4LACE,iBE9HS,CFkIb,4DACE,aChGS,CDiGT,gEACE,YClG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ExQW,CF2Qb,4DACE,gCAAA,CAKA,6EACE,4BAAA,CACA,iFACE,aAAA,CACA,kBE/RO,CFiST,gFACE,gBAAA,CAKA,2FACE,aAAA,CACA,iBE/RK,CFkSL,2GACE,iBAAA,CACA,8CAAA,CAMF,0GACE,gBAAA,CAGJ,2FACE,qBAAA,CACA,gBEhTK,CFmTL,+GACE,+CAAA,CAEF,sGACE,oBAAA,CAMN,mFACE,gBAAA,CAEF,+EACE,gBAAA,CACA,2IACE,cAAA,CACA,iBE9UK,CFgVP,sFACE,0BAAA,CACA,gBAAA",sourceRoot:""}]),s.locals={container:"-esm-appointments__appointments-list__container___Cdkl0",loadingContainer:"-esm-appointments__appointments-list__loadingContainer___mdI4g",headerContainer:"-esm-appointments__appointments-list__headerContainer___jN28T",backgroundDataFetchingIndicator:"-esm-appointments__appointments-list__backgroundDataFetchingIndicator___SAIYO",tableContainer:"-esm-appointments__appointments-list__tableContainer___oowoL",hiddenRow:"-esm-appointments__appointments-list__hiddenRow___tbW6x",addButtonContainer:"-esm-appointments__appointments-list__addButtonContainer___xc9zL",tableToolbar:"-esm-appointments__appointments-list__tableToolbar___d1Da4",tableToolbarContent:"-esm-appointments__appointments-list__tableToolbarContent___V8Auw",startTime:"-esm-appointments__appointments-list__startTime___DBQZz",nameContainer:"-esm-appointments__appointments-list__nameContainer___ttfjm",serviceContainer:"-esm-appointments__appointments-list__serviceContainer___mEHFl",identifier:"-esm-appointments__appointments-list__identifier___nsbyW",actionButton:"-esm-appointments__appointments-list__actionButton___GWxy2",serviceColor:"-esm-appointments__appointments-list__serviceColor___Fqhay",pagination:"-esm-appointments__appointments-list__pagination___Wlifz",emptyRow:"-esm-appointments__appointments-list__emptyRow___ksEX2",expandedAppointmentsRow:"-esm-appointments__appointments-list__expandedAppointmentsRow___T58zp",completeIcon:"-esm-appointments__appointments-list__completeIcon___UeKAp",missedIcon:"-esm-appointments__appointments-list__missedIcon___o516w",cancelIcon:"-esm-appointments__appointments-list__cancelIcon___MFd9j",tabletHeading:"-esm-appointments__appointments-list__tabletHeading___NjvMS",desktopHeading:"-esm-appointments__appointments-list__desktopHeading____elsd",tileContainer:"-esm-appointments__appointments-list__tileContainer___JGthb",tile:"-esm-appointments__appointments-list__tile___KKZF7",tileContent:"-esm-appointments__appointments-list__tileContent___g8HHF",content:"-esm-appointments__appointments-list__content___hy10p",helper:"-esm-appointments__appointments-list__helper___oVBsR",separator:"-esm-appointments__appointments-list__separator___cEPgp",actionLinks:"-esm-appointments__appointments-list__actionLinks___ZNzmS",menuItemLink:"-esm-appointments__appointments-list__menuItemLink___xHvCJ",menuItem:"-esm-appointments__appointments-list__menuItem___GgauJ",seeAllLink:"-esm-appointments__appointments-list__seeAllLink___N_0lD",filterLabelContainer:"-esm-appointments__appointments-list__filterLabelContainer___eiHjk",filterLabel:"-esm-appointments__appointments-list__filterLabel___sI3eO",viewCalendarButton:"-esm-appointments__appointments-list__viewCalendarButton___vTgXJ",divider:"-esm-appointments__appointments-list__divider___N559L",overflowMenu:"-esm-appointments__appointments-list__overflowMenu___uYUG7"};const r=s},4690:(e,t,n)=>{n.d(t,{E0:()=>h,LW:()=>C,WN:()=>d});var a=n(268),i=n(3255),o=n(8879),s=n.n(o),r=n(4924),l=n(2870),p=n(1027),m=n(8179);function c(e,t,n,a,i,o,s){try{var r=e[o](s),l=r.value}catch(e){return void n(e)}r.done?t(l):Promise.resolve(l).then(a,i)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function s(e){c(o,a,i,s,r,"next",e)}function r(e){c(o,a,i,s,r,"throw",e)}s(void 0)}))}}var A=function(e,t){var n,a,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(o){return function(r){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,a&&(i=2&o[0]?a.return:o[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;switch(a=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,a=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],a=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}};function d(){var e=(0,r.useTranslation)().t,t=(0,p.zF)().currentAppointmentDate,n="/ws/rest/v1/appointment/all?forDate=".concat(t),o=(0,i.ZP)(t?n:null,l.openmrsFetch),s=o.data,m=o.error,c=o.isLoading,_=o.isValidating,A=o.mutate,d=(0,a.useMemo)((function(){var t,n;return{appointments:null!==(n=null==s||null===(t=s.data)||void 0===t?void 0:t.map((function(t){return(0,p.df)(t,e)})))&&void 0!==n?n:[],isLoading:c,isError:m,isValidating:_,mutate:A}}),[null==s?void 0:s.data,m,c,_,A,e]);return d}var u,C=(u=_((function(e,t){var n,a,i,o;return A(this,(function(r){switch(r.label){case 0:return n=new AbortController,a=Intl.DateTimeFormat().resolvedOptions().timeZone,i=s()(new Date).format(m.J$),o="/ws/rest/v1/appointments/".concat(t,"/status-change"),[4,(0,l.openmrsFetch)(o,{body:{toStatus:e,onDate:i,timeZone:a},method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal})];case 1:return[2,r.sent()]}}))})),function(e,t){return u.apply(this,arguments)}),h=function(){var e=_((function(e){var t,n;return A(this,(function(a){switch(a.label){case 0:return t=new AbortController,n="/ws/rest/v1/appointment/undoStatusChange/".concat(e),[4,(0,l.openmrsFetch)(n,{method:"POST",headers:{"Content-Type":"application/json"},signal:t.signal})];case 1:return[2,a.sent()]}}))}));return function(t){return e.apply(this,arguments)}}()},2649:(e,t,n)=>{n.d(t,{NL:()=>m,O4:()=>p,bO:()=>_,tf:()=>c});var a=n(2870),i=n(4690);function o(e,t,n,a,i,o,s){try{var r=e[o](s),l=r.value}catch(e){return void n(e)}r.done?t(l):Promise.resolve(l).then(a,i)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var s=e.apply(t,n);function r(e){o(s,a,i,r,l,"next",e)}function l(e){o(s,a,i,r,l,"throw",e)}r(void 0)}))}}var r,l=function(e,t){var n,a,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(o){return function(r){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,a&&(i=2&o[0]?a.return:o[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;switch(a=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,a=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],a=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}},p=function(e){var t=(0,a.showModal)("check-in-appointment-modal",{closeCheckInModal:function(){return t()},appointmentUuid:e})},m=(r=s((function(e,t){return l(this,(function(n){switch(n.label){case 0:return new AbortController,[4,(0,i.E0)(e)];case 1:return 200===n.sent().status?t("/ws/rest/v1/appointment/appointment/all"):(0,a.showNotification)({title:"Error Undoing",kind:"error",critical:!0,description:"Error reverting status"}),[2]}}))})),function(e,t){return r.apply(this,arguments)}),c=function(){var e=s((function(e,t,n,o,s,r,p,c){return l(this,(function(l){switch(l.label){case 0:return new AbortController,[4,(0,i.LW)(e,t)];case 1:return 200===l.sent().status?((0,a.showActionableNotification)({critical:!0,kind:"success",subtitle:n,title:s,actionButtonLabel:c("undo","Undo"),progressActionLabel:c("revertingAppointmentStatus","Reverting appointment status"),onActionButtonClick:function(){return m(t,p)}}),p("/ws/rest/v1/appointment/appointment/all")):(0,a.showNotification)({title:r,kind:"error",critical:!0,description:o}),[2]}}))}));return function(t,n,a,i,o,s,r,l){return e.apply(this,arguments)}}(),_=function(e,t,n){var a=n("appointmentMarkedAsCompleted","It has been successfully marked as Completed"),i=n("appointmentCompleted","Appointment Completed"),o=n("appointmentCompleted","Appointment Completed"),s=n("appointmentCompletedError","Error marking appointment as Completed");return c("Completed",e,a,o,i,s,t,n)}},4381:(e,t,n)=>{n.r(t),n.d(t,{default:()=>te});var a=n(268),i=n.n(a),o=n(3255),s=n(4924),r=n(3504),l=n(2074),p=n(6039),m=n(2870),c=n(1723),_=n(8179),A=n(2649),d=n(7202),u=n(4546),C=n(1027),h=n(1354),f=n.n(h),g=n(1583),E=n.n(g),v=n(7378),b=n.n(v),y=n(5993),w=n.n(y),k=n(4154),B=n.n(k),D=n(8141),F=n.n(D),x=n(9200),I={};I.styleTagTransform=F(),I.setAttributes=w(),I.insert=b().bind(null,"head"),I.domAPI=E(),I.insertStyleElement=B(),f()(x.Z,I);const N=x.Z&&x.Z.locals?x.Z.locals:void 0;function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function L(e,t,n,a,i,o,s){try{var r=e[o](s),l=r.value}catch(e){return void n(e)}r.done?t(l):Promise.resolve(l).then(a,i)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,o=[],s=!0,r=!1;try{for(n=n.call(e);!(s=(a=n.next()).done)&&(o.push(a.value),!t||o.length!==t);s=!0);}catch(e){r=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(r)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(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)?T(e,t):void 0}}(e,t)||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.")}()}const z=function(e){var t=e.appointment,n=(0,s.useTranslation)().t,l=(0,o.kY)().mutate,p=(0,m.usePatient)(t.patientUuid).patient,_=(0,m.useSession)(),A=S((0,a.useState)(t.location),2),d=A[0],h=A[1],f=S((0,a.useState)(""),2),g=f[0],E=f[1],v=(0,C.zF)().currentAppointmentDate,b=S((0,a.useState)(!1),2),y=b[0],w=b[1];(0,a.useEffect)((function(){var e,t;d&&(null==_||null===(e=_.sessionLocation)||void 0===e?void 0:e.uuid)&&h(null==_||null===(t=_.sessionLocation)||void 0===t?void 0:t.uuid)}),[d,_]);var k,B,D=(k=function(){return function(e,t){var n,a,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(o){return function(r){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,a&&(i=2&o[0]?a.return:o[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;switch(a=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,a=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],a=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}}(this,(function(e){switch(e.label){case 0:return w(!0),[4,(0,u.v1)("Cancelled",t.id)];case 1:return 200===e.sent().status?((0,m.showToast)({critical:!0,kind:"success",description:n("appointmentNowVisible","It has been cancelled successfully"),title:n("appointmentCancelled","Appointment cancelled")}),l("/ws/rest/v1/appointment/appointmentStatus?forDate=".concat(v,"&status=Scheduled")),l("/ws/rest/v1/appointment/appointmentStatus?forDate=".concat(v,"&status=Cancelled")),(0,c.Km)()):((0,m.showNotification)({title:n("appointmentCancelError","Error cancelling appointment"),kind:"error",critical:!0,description:n("errorMessage","Error cancelling the appointment")}),w(!1)),[2]}}))},B=function(){var e=this,t=arguments;return new Promise((function(n,a){var i=k.apply(e,t);function o(e){L(i,n,a,o,s,"next",e)}function s(e){L(i,n,a,o,s,"throw",e)}o(void 0)}))},function(){return B.apply(this,arguments)});return i().createElement("div",{className:N.formContainer},p&&i().createElement(m.ExtensionSlot,{name:"patient-header-slot",state:{patient:p,patientUuid:t.patientUuid}}),i().createElement(r.mh4,null,i().createElement(r.Kx8,{id:"reason",value:g,className:N.inputContainer,labelText:n("reasonForChanges","Reason For Changes"),onChange:function(e){return E(e.target.value)}})),i().createElement("div",{className:N.buttonContainer},i().createElement(r.zxk,{onClick:function(){return(0,c.Km)()},kind:"secondary"},n("discard","Discard")),i().createElement(r.zxk,{onClick:D,disabled:y,kind:"primary",type:"submit"},n("cancelAppointment","Cancel Appointment"))))};var M=n(328),G=n(3263),H={};H.styleTagTransform=F(),H.setAttributes=w(),H.insert=b().bind(null,"head"),H.domAPI=E(),H.insertStyleElement=B(),f()(G.Z,H);const W=G.Z&&G.Z.locals?G.Z.locals:void 0;var U=function(e){var t=e.appointment,n=e.useBahmniUI,a=(0,s.useTranslation)().t,l=(0,o.kY)().mutate,p=(0,m.useConfig)().bahmniAppointmentsUiBaseUrl,u=t.status,C="Completed"===u||"Missed"===u||"Cancelled"===u,h="Scheduled"===u||"Requested"===u,f=function(){return n?i().createElement(r.laM,{className:W.menuItemLink,id:"#editAppointment",target:"_blank",href:"".concat(p,"/#/home/manage/appointments/calendar/").concat(t.id,"?isRecurring=").concat(t.recurring),itemText:a("editAppointment","Edit Appointment")},a("editAppointment","Edit Appointment")):i().createElement(r.laM,{className:W.menuItem,id:"#editAppointment",onClick:function(){(0,m.navigate)({to:"".concat(_.JB)}),(0,c.I8)(a("editAppointment","Edit Appointment"),i().createElement(d.Z,{appointment:t,context:"editing"}))},itemText:a("editAppointment","Edit Appointment")},a("editAppointment","Edit Appointment"))},g=function(){return n?i().createElement(r.laM,{className:W.menuItemLink,id:"#createAppointment",target:"_blank",href:"".concat(p,"/#/home/manage/appointments/calendar/new"),itemText:a("addNewAppointment","Add new appointment")},a("addNewAppointment","Add new appointment")):i().createElement(r.laM,{className:W.menuItem,id:"#createAppointment",onClick:function(){(0,m.navigate)({to:"".concat(_.JB)}),(0,c.I8)(a("search","Search"),i().createElement(M.Z,null))},itemText:a("addNewAppointment","Add new appointment")},a("addNewAppointment","Add new appointment"))};return i().createElement(r.mh4,null,i().createElement(r.PQB,{ariaLabel:"Edit appointment",selectorPrimaryFocus:"#editPatientDetails",size:m.isDesktop?"sm":"lg",flipped:!0},i().createElement(f,null),i().createElement(r.laM,{className:W.menuItem,disabled:"CheckedIn"===u||C,id:"#checkInAppointment",onClick:function(){return(0,A.O4)(t.id)},itemText:a("checkIn","Check In")},a("checkIn","Check In")),i().createElement(r.laM,{className:W.menuItem,id:"#completeAppointment",disabled:h||C,onClick:function(){return(0,A.bO)(t.id,l,a)},itemText:a("complete","Complete")},a("complete","Complete")),i().createElement(r.laM,{className:W.menuItem,disabled:C,id:"#missedAppointment",onClick:function(){var e=a("appointmentMarkedAsMissed","It has been successfully marked as Missed"),n=a("appointmentMissed","Appointment Missed"),i=a("appointmentMissed","Appointment Missed"),o=a("appointmentMissedError","Error marking appointment as Missed");return(0,A.tf)("Missed",t.id,e,i,n,o,l,a)},itemText:a("missed","Missed")},a("missed","Missed")),i().createElement(r.laM,{className:W.menuItem,id:"#cancelAppointment",disabled:C,onClick:function(){(0,m.navigate)({to:"".concat(_.JB)}),(0,c.I8)(a("cancelAppointment","Cancel Appointment"),i().createElement(z,{appointment:t}))},itemText:a("cancel","Cancel")},a("cancel","Cancel")),i().createElement(g,null)))},P=function(e){var t=e.width,n=void 0===t?"64":t,a=e.height,o=void 0===a?"64":a;return i().createElement("svg",{width:n,height:o,viewBox:"0 0 64 64"},i().createElement("title",null,"Empty data illustration"),i().createElement("g",{fill:"none",fillRule:"evenodd"},i().createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#F4F4F4"}),i().createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),i().createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),i().createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),i().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),i().createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#F4F4F4"}),i().createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),i().createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),i().createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),i().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))},j=n(6759),R=n(9884);function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},O.apply(this,arguments)}var K=function(){var e=(0,m.useConfig)(),t=e.useBahmniAppointmentsUI,n=e.bahmniAppointmentsUiBaseUrl,a=(0,s.useTranslation)().t;return t?i().createElement(r.zxk,{kind:"ghost",className:W.seeAllLink,size:"md",target:"_blank",href:"".concat(n,"/#/home/manage/appointments/list")},a("seeAllAppointments","See all appointments")):i().createElement(r.zxk,{kind:"ghost",className:W.seeAllLink,onClick:function(){return(0,m.navigate)({to:"".concat(_.JB,"/appointments")})}},a("seeAllAppointments","See all appointments"))},Y=function(){var e=(0,m.useConfig)(),t=e.useBahmniAppointmentsUI,n=e.bahmniAppointmentsUiBaseUrl,a=(0,s.useTranslation)().t;return i().createElement("div",{className:W.addButtonContainer},t?i().createElement(r.zxk,{target:"_blank",kind:"ghost",href:"".concat(n,"/#/home/manage/appointments/calendar/new"),renderIcon:function(e){return i().createElement(j.mm,O({size:16},e))}},a("add","Add")):i().createElement(r.zxk,{kind:"ghost",renderIcon:function(e){return i().createElement(j.mm,O({size:16},e))},onClick:function(){(0,m.navigate)({to:"".concat(_.JB,"/appointments")}),(0,c.I8)(a("search","Search"),i().createElement(M.Z,null))}},a("add","Add")))},J=function(){var e=(0,m.useConfig)(),t=e.useBahmniAppointmentsUI,n=e.bahmniAppointmentsUiBaseUrl,a=(0,s.useTranslation)().t;return t?i().createElement(r.zxk,{className:W.viewCalendarButton,kind:"ghost",size:"md",target:"_blank",href:"".concat(n,"/#/home/manage/appointments/calendar")},a("viewCalendar","View Calendar")):i().createElement(r.zxk,{className:W.viewCalendarButton,kind:"ghost",onClick:function(){return(0,m.navigate)({to:"".concat(_.JB,"/appointments/calendar")})},renderIcon:function(e){return i().createElement(R.f,O({size:16},e))},"data-floating-menu-primary-focus":!0,iconDescription:a("viewCalendar","View Calendar")},a("viewCalendar","View Calendar"))},V=n(4690);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function q(){return q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},q.apply(this,arguments)}var Q=function(e){var t=e.color;return i().createElement("div",{className:W.serviceColor,style:{backgroundColor:"".concat(t)}})},X=function(e){var t=e.status,n=e.t,a=e.appointmentUuid,o=e.mutate;switch(t){case"Completed":return i().createElement("div",{className:W.completeIcon},n("completed","Completed"),i().createElement(l.Wz,{size:16}));case"Missed":return i().createElement("div",{className:W.missedIcon},n("missed","Missed"),i().createElement(p.Wf,{size:16}));case"Cancelled":return i().createElement("div",{className:W.cancelIcon},n("cancelled","Cancelled"),i().createElement(l.eL,{size:16}));case"CheckedIn":return i().createElement(r.zxk,{kind:"ghost",className:W.actionButton,onClick:function(){return(0,A.bO)(a,o,n)}},n("complete","Complete"));default:return i().createElement(r.zxk,{size:"sm",kind:"ghost",className:W.actionButton,disabled:"CheckedIn"===t,onClick:function(){return(0,A.O4)(a)}},n("checkIn","Check In"))}};const $=function(){var e,t,n=(0,m.useLayoutType)(),o=(0,m.useSession)().user,l=(0,s.useTranslation)().t,p=(0,m.useConfig)(),c=p.useBahmniAppointmentsUI,_=p.useFullViewPrivilege,A=p.fullViewPrivilege,d=(0,V.WN)(),u=d.appointments,C=d.isLoading,h=d.mutate,f=(0,m.userHasAccess)(A,o)||!_,g=f?u:u.filter((function(e){return"Scheduled"===e.status})),E=[10,20,30,40,50],v=(e=(0,a.useState)(10),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,o=[],s=!0,r=!1;try{for(n=n.call(e);!(s=(a=n.next()).done)&&(o.push(a.value),!t||o.length!==t);s=!0);}catch(e){r=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(r)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Z(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)?Z(e,t):void 0}}(e,t)||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.")}()),b=v[0],y=v[1],w=(0,m.usePagination)(g,b),k=w.goTo,B=w.results,D=w.currentPage,F=(0,a.useMemo)((function(){return[{id:0,header:l("dateTime","Date and time"),key:"dateTime"},{id:1,header:l("name","Patient Name"),key:"name"},{id:2,header:l("identifier","Identifier"),key:"identifier"},{id:3,header:l("location","Location"),key:"location"},{id:4,header:l("service","Service"),key:"service"},{id:5,header:l("actions","Actions"),key:"actionButton"}]}),[l]),x=null==B?void 0:B.map((function(e){return{id:e.id,dateTime:{content:i().createElement("span",{className:W.statusContainer},i().createElement("span",{className:W.startTime},e.dateTime),e.duration)},name:{content:i().createElement("div",{className:W.nameContainer},i().createElement(m.ConfigurableLink,{to:"${openmrsSpaBase}/patient/".concat(e.patientUuid,"/chart")},e.name))},identifier:{content:i().createElement("div",{className:W.nameContainer},i().createElement("span",{className:W.identifier},e.identifier))},location:{content:i().createElement("span",{className:W.statusContainer},e.location)},service:{content:i().createElement("span",{className:W.serviceContainer},i().createElement(Q,{color:e.serviceColor}),e.serviceType)},actionButton:{content:i().createElement("span",{className:W.serviceContainer},i().createElement(X,{status:e.status,appointmentUuid:e.id,t:l,mutate:h}))}}}));return C?i().createElement("div",{className:W.loadingContainer},i().createElement(r.gqd,{role:"progressbar"})):0===(null==u?void 0:u.length)?i().createElement(r.mh4,{className:W.container},i().createElement(r.n9L,{className:W.tile},i().createElement("div",{className:(0,m.isDesktop)(n)?W.desktopHeading:W.tabletHeading},i().createElement("h4",null,l("todaysAppointments","Today's Appointments")),i().createElement(Y,null)),i().createElement(P,null),i().createElement("p",{className:W.content},l("noAppointmentsScheduledForTodayToDisplay","There are no appointments scheduled for today to display for this location"),"."))):i().createElement(i().Fragment,null,i().createElement("div",{className:W.container},i().createElement("div",{className:W.headerContainer},i().createElement("div",{className:(0,m.isDesktop)(n)?W.desktopHeading:W.tabletHeading},i().createElement("h4",null,l("todaysAppointments","Today's Appointments"))),i().createElement("div",{className:W.actionLinks},i().createElement(J,null),i().createElement("span",{className:W.divider},"|"),i().createElement(Y,null))),i().createElement(r.wQF,{"data-floating-menu-container":!0,headers:F,overflowMenuOnHover:(0,m.isDesktop)(n),rows:x,size:(0,m.isDesktop)(n)?"xs":"md",useZebraStyles:!0},(function(e){var t=e.rows,n=e.headers,a=e.getHeaderProps,o=e.getTableProps,s=e.getRowProps;return i().createElement(r.xJi,{className:W.tableContainer},i().createElement(r.iA_,q({},o(),{className:W.appointmentsTable}),i().createElement(r.ssF,null,i().createElement(r.SCH,null,n.map((function(e){return i().createElement(r.xDH,q({},a({header:e}),{key:e.id}),e.header)})))),i().createElement(r.RMI,null,t.map((function(e,t){var n;return i().createElement(i().Fragment,{key:e.id},i().createElement(r.SCH,q({},s({row:e})),e.cells.map((function(e){var t;return i().createElement(r.pj1,{key:e.id},null!==(n=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==n?n:e.value)})),f&&i().createElement(r.pj1,{className:"cds--table-column-menu ".concat(W.overflowMenu)},i().createElement(U,{appointment:null==g?void 0:g[t],useBahmniUI:c}))))})))),0===t.length?i().createElement("div",{className:W.tileContainer},i().createElement(r.mh4,null,i().createElement(r.n9L,{className:W.tile},i().createElement("div",{className:W.tileContent},i().createElement("p",{className:W.content},l("noAppointmentsToDisplay","No appointments to display")),i().createElement("p",{className:W.helper},l("checkFilters","Check the filters above"))),i().createElement("p",{className:W.separator},l("or","or")),i().createElement(Y,null)))):null,i().createElement(r.tlE,{forwardText:"Next page",backwardText:"Previous page",page:D,pageSize:b,pageSizes:E,totalItems:g.length,className:W.pagination,onChange:function(e){var t=e.pageSize,n=e.page;t!==b&&y(t),n!==D&&k(n)}}))}))),i().createElement(K,null))};var ee={errorRetryCount:3};const te=function(){return i().createElement(o.J$,{value:ee},i().createElement($,null))}}}]);
|
package/dist/381.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"381.js","mappings":"0MAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,sWAAuW,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,yEAAyE,8EAA8E,MAAQ,GAAG,SAAW,uGAAuG,WAAa,MAE5sBH,EAAwBI,OAAS,CAChC,cAAiB,+DACjB,eAAkB,gEAClB,gBAAmB,kEAEpB,S,kECTIJ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,2nWAA4nW,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,4BAA4B,gEAAgE,2DAA2D,8EAA8E,MAAQ,GAAG,SAAW,mpFAAmpF,WAAa,MAEnqcH,EAAwBI,OAAS,CAChC,oBAAuB,oEACvB,oBAAuB,oEACvB,oBAAuB,oEACvB,oBAAuB,oEACvB,WAAc,2DACd,YAAe,4DACf,YAAe,4DACf,OAAU,uDACV,QAAW,wDACX,MAAS,sDACT,UAAa,0DACb,iBAAoB,iEACpB,gBAAmB,gEACnB,gCAAmC,gFACnC,eAAkB,+DAClB,UAAa,0DACb,mBAAsB,mEACtB,aAAgB,6DAChB,oBAAuB,oEACvB,UAAa,0DACb,cAAiB,8DACjB,iBAAoB,iEACpB,WAAc,2DACd,aAAgB,6DAChB,aAAgB,6DAChB,WAAc,2DACd,SAAY,yDACZ,wBAA2B,wEAC3B,aAAgB,6DAChB,WAAc,2DACd,WAAc,2DACd,cAAiB,8DACjB,eAAkB,+DAClB,cAAiB,8DACjB,KAAQ,qDACR,YAAe,4DACf,QAAW,wDACX,OAAU,uDACV,UAAa,0DACb,aAAgB,6DAChB,WAAc,2DACd,qBAAwB,qEACxB,YAAe,6DAEhB,S,uICpDA,0B,60CASO,SAASC,IACd,IAAM,GAAQC,EAAAA,EAA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AAOmK,WAClBzJ,SAAU,Y,IAAGuJ,EAAAA,EAAAA,SAAUD,EAAAA,EAAAA,KACjBC,IAAalE,GACfC,EAAYiE,GAEVD,IAAS7D,GACXD,EAAK8D,EAET,I,KAMV,kBAACrG,EAAsBA,MAG7B,EC/SA,IAAMyG,GAAmB,CACvBC,gBAAiB,GAWnB,SARyB,WACvB,OACE,kBAACC,EAAAA,GAASA,CAAC/J,MAAO6J,IAChB,kBAACG,EAAqBA,MAG5B,C","sources":["webpack://@openmrs/esm-appointments-app/./src/appointments/forms/cancel-form/cancel-appointment.scss","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointments-list.scss","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointments-table.resource.ts","webpack://@openmrs/esm-appointments-app/./src/home-appointments/common.ts","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointments-list.scss?e22d","webpack://@openmrs/esm-appointments-app/./src/appointments/forms/cancel-form/cancel-appointment.scss?efdb","webpack://@openmrs/esm-appointments-app/./src/appointments/forms/cancel-form/cancel-appointment.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointment-actions.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/empty-data-illustration.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/links.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointments-list.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/index.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","useTodaysAppointments","useTranslation","t","useAppointmentDate","currentAppointmentDate","apiUrl","useSWR","openmrsFetch","data","error","isLoading","isValidating","mutate","results","useMemo","appointments","map","appointment","mapAppointmentProperties","isError","updateAppointmentStatus","toStatus","appointmentUuid","abortController","timeZone","statusChangeTime","url","AbortController","Intl","DateTimeFormat","resolvedOptions","dayjs","Date","format","omrsDateFormat","body","onDate","method","headers","signal","undoAppointmentStatus","launchCheckInAppointmentModal","dispose","showModal","closeCheckInModal","handleUndoAction","status","showNotification","title","kind","critical","description","handleUpdateStatus","successDescription","errorDescription","successTitle","errorTitle","showActionableNotification","subtitle","actionButtonLabel","progressActionLabel","onActionButtonClick","handleComplete","appointmentId","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","useSWRConfig","usePatient","patientUuid","patient","session","useSession","useState","location","selectedLocation","setSelectedLocation","reason","setReason","isSubmitting","setIsSubmitting","useEffect","sessionLocation","uuid","handleSubmit","cancelAppointment","showToast","closeOverlay","div","className","styles","formContainer","ExtensionSlot","name","state","Layer","TextArea","value","inputContainer","labelText","onChange","event","target","buttonContainer","Button","onClick","disabled","type","ActionsMenu","useBahmniUI","useConfig","bahmniAppointmentsUiBaseUrl","disableActions","isScheduled","EditOverflowItem","OverflowMenuItem","menuItemLink","href","recurring","itemText","menuItem","navigate","to","spaBasePath","launchOverlay","AppointmentForm","context","AddOverflowItem","PatientSearch","OverflowMenu","ariaLabel","selectorPrimaryFocus","size","flipped","CancelAppointment","EmptyDataIllustration","width","height","svg","viewBox","g","fill","fillRule","path","d","circle","cx","cy","r","SeeAllAppointmentsLink","useBahmniAppointmentsUI","seeAllLink","AddAppointmentLink","addButtonContainer","renderIcon","props","Add","ViewCalendarLink","Calendar","calendarButton","data-floating-menu-primary-focus","iconDescription","ServiceColor","color","serviceColor","style","backgroundColor","RenderStatus","completeIcon","CheckmarkOutline","missedIcon","SubtractAlt","cancelIcon","CloseOutline","actionButton","layout","useLayoutType","user","useFullViewPrivilege","fullViewPrivilege","fullView","userHasAccess","filteredAppointments","filter","pageSizes","currentPageSize","setPageSize","usePagination","goTo","currentPage","tableHeaders","header","key","tableRows","paginatedAppointments","dateTime","content","span","statusContainer","startTime","duration","nameContainer","ConfigurableLink","identifier","service","serviceContainer","serviceType","loadingContainer","DataTableSkeleton","role","length","container","Tile","tile","isDesktop","desktopHeading","tabletHeading","h4","p","headerContainer","actionLinks","DataTable","data-floating-menu-container","overflowMenuOnHover","rows","useZebraStyles","getHeaderProps","getTableProps","getRowProps","TableContainer","tableContainer","Table","appointmentsTable","TableHead","TableRow","TableHeader","TableBody","row","index","cell","React","cells","TableCell","tileContainer","tileContent","helper","separator","Pagination","forwardText","backwardText","page","pageSize","totalItems","pagination","swrConfiguration","errorRetryCount","SWRConfig","AppointmentsBaseTable"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"381.js","mappings":"0MAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,sWAAuW,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,yEAAyE,8EAA8E,MAAQ,GAAG,SAAW,uGAAuG,WAAa,MAE5sBH,EAAwBI,OAAS,CAChC,cAAiB,+DACjB,eAAkB,gEAClB,gBAAmB,kEAEpB,S,kECTIJ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,g3RAAi3R,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,2DAA2D,2DAA2D,6EAA6E,iEAAiE,MAAQ,GAAG,SAAW,sqEAAsqE,WAAa,MAEl4WH,EAAwBI,OAAS,CAChC,UAAa,0DACb,iBAAoB,iEACpB,gBAAmB,gEACnB,gCAAmC,gFACnC,eAAkB,+DAClB,UAAa,0DACb,mBAAsB,mEACtB,aAAgB,6DAChB,oBAAuB,oEACvB,UAAa,0DACb,cAAiB,8DACjB,iBAAoB,iEACpB,WAAc,2DACd,aAAgB,6DAChB,aAAgB,6DAChB,WAAc,2DACd,SAAY,yDACZ,wBAA2B,wEAC3B,aAAgB,6DAChB,WAAc,2DACd,WAAc,2DACd,cAAiB,8DACjB,eAAkB,+DAClB,cAAiB,8DACjB,KAAQ,qDACR,YAAe,4DACf,QAAW,wDACX,OAAU,uDACV,UAAa,0DACb,YAAe,4DACf,aAAgB,6DAChB,SAAY,yDACZ,WAAc,2DACd,qBAAwB,qEACxB,YAAe,4DACf,mBAAsB,mEACtB,QAAW,wDACX,aAAgB,8DAEjB,S,uIC/CA,0B,60CASO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AAOqK,WAClB3J,SAAU,Y,IAAGyJ,EAAAA,EAAAA,SAAUD,EAAAA,EAAAA,KACjBC,IAAanE,GACfC,EAAYkE,GAEVD,IAAS9D,GACXD,EAAK+D,EAET,I,KAMV,kBAACtG,EAAsBA,MAG7B,ECzTA,IAAM0G,GAAmB,CACvBC,gBAAiB,GAWnB,SARyB,WACvB,OACE,kBAACC,EAAAA,GAASA,CAACjK,MAAO+J,IAChB,kBAACG,EAAqBA,MAG5B,C","sources":["webpack://@openmrs/esm-appointments-app/./src/appointments/forms/cancel-form/cancel-appointment.scss","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointments-list.scss","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointments-table.resource.ts","webpack://@openmrs/esm-appointments-app/./src/home-appointments/common.ts","webpack://@openmrs/esm-appointments-app/./src/appointments/forms/cancel-form/cancel-appointment.scss?efdb","webpack://@openmrs/esm-appointments-app/./src/appointments/forms/cancel-form/cancel-appointment.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointments-list.scss?e22d","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointment-actions.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/empty-data-illustration.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/links.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/appointments-list.component.tsx","webpack://@openmrs/esm-appointments-app/./src/home-appointments/index.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","useTodaysAppointments","useTranslation","t","useAppointmentDate","currentAppointmentDate","apiUrl","useSWR","openmrsFetch","data","error","isLoading","isValidating","mutate","results","useMemo","appointments","map","appointment","mapAppointmentProperties","isError","updateAppointmentStatus","toStatus","appointmentUuid","abortController","timeZone","statusChangeTime","url","AbortController","Intl","DateTimeFormat","resolvedOptions","dayjs","Date","format","omrsDateFormat","body","onDate","method","headers","signal","undoAppointmentStatus","launchCheckInAppointmentModal","dispose","showModal","closeCheckInModal","handleUndoAction","status","showNotification","title","kind","critical","description","handleUpdateStatus","successDescription","errorDescription","successTitle","errorTitle","showActionableNotification","subtitle","actionButtonLabel","progressActionLabel","onActionButtonClick","handleComplete","appointmentId","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","useSWRConfig","usePatient","patientUuid","patient","session","useSession","useState","location","selectedLocation","setSelectedLocation","reason","setReason","isSubmitting","setIsSubmitting","useEffect","sessionLocation","uuid","handleSubmit","cancelAppointment","showToast","closeOverlay","div","className","styles","formContainer","ExtensionSlot","name","state","Layer","TextArea","value","inputContainer","labelText","onChange","event","target","buttonContainer","Button","onClick","disabled","type","ActionsMenu","useBahmniUI","useConfig","bahmniAppointmentsUiBaseUrl","disableActions","isScheduled","EditOverflowItem","OverflowMenuItem","menuItemLink","href","recurring","itemText","menuItem","navigate","to","spaBasePath","launchOverlay","AppointmentForm","context","AddOverflowItem","PatientSearch","OverflowMenu","ariaLabel","selectorPrimaryFocus","size","isDesktop","flipped","CancelAppointment","EmptyDataIllustration","width","height","svg","viewBox","g","fill","fillRule","path","d","circle","cx","cy","r","SeeAllAppointmentsLink","useBahmniAppointmentsUI","seeAllLink","AddAppointmentLink","addButtonContainer","renderIcon","props","Add","ViewCalendarLink","viewCalendarButton","Calendar","data-floating-menu-primary-focus","iconDescription","ServiceColor","color","serviceColor","style","backgroundColor","RenderStatus","completeIcon","CheckmarkOutline","missedIcon","SubtractAlt","cancelIcon","CloseOutline","actionButton","layout","useLayoutType","user","useFullViewPrivilege","fullViewPrivilege","fullView","userHasAccess","filteredAppointments","filter","pageSizes","currentPageSize","setPageSize","usePagination","goTo","currentPage","tableHeaders","header","key","tableRows","paginatedAppointments","dateTime","content","span","statusContainer","startTime","duration","nameContainer","ConfigurableLink","identifier","service","serviceContainer","serviceType","loadingContainer","DataTableSkeleton","role","length","container","Tile","tile","desktopHeading","tabletHeading","h4","p","headerContainer","actionLinks","divider","DataTable","data-floating-menu-container","overflowMenuOnHover","rows","useZebraStyles","getHeaderProps","getTableProps","getRowProps","TableContainer","tableContainer","Table","appointmentsTable","TableHead","TableRow","TableHeader","TableBody","row","index","cell","React","cells","TableCell","overflowMenu","tileContainer","tileContent","helper","separator","Pagination","forwardText","backwardText","page","pageSize","totalItems","pagination","swrConfiguration","errorRetryCount","SWRConfig","AppointmentsBaseTable"],"sourceRoot":""}
|
|
@@ -176,9 +176,9 @@
|
|
|
176
176
|
"initial": false,
|
|
177
177
|
"entry": false,
|
|
178
178
|
"recorded": false,
|
|
179
|
-
"size":
|
|
179
|
+
"size": 74463,
|
|
180
180
|
"sizes": {
|
|
181
|
-
"javascript":
|
|
181
|
+
"javascript": 74463
|
|
182
182
|
},
|
|
183
183
|
"names": [],
|
|
184
184
|
"idHints": [],
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"auxiliaryFiles": [
|
|
193
193
|
"381.js.map"
|
|
194
194
|
],
|
|
195
|
-
"hash": "
|
|
195
|
+
"hash": "4697bbde13e6f544",
|
|
196
196
|
"childrenByOrder": {}
|
|
197
197
|
},
|
|
198
198
|
{
|
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"}},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot","component":"appointmentsDashboard"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"}],"pages":[],"version":"5.0.1-pre.
|
|
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"}},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot","component":"appointmentsDashboard"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"}],"pages":[],"version":"5.0.1-pre.2064"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-appointments-app",
|
|
3
|
-
"version": "5.0.1-pre.
|
|
3
|
+
"version": "5.0.1-pre.2064",
|
|
4
4
|
"description": "Appointments front-end module for the OpenMRS SPA",
|
|
5
5
|
"browser": "dist/openmrs-esm-appointments-app.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"webpack": "^5.74.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "16622d0634a8ec07e970e53bccaae3a01d640de9"
|
|
52
52
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { useSWRConfig } from 'swr';
|
|
3
4
|
import { Layer, OverflowMenu, OverflowMenuItem } from '@carbon/react';
|
|
4
|
-
import { navigate, useConfig } from '@openmrs/esm-framework';
|
|
5
|
-
import { MappedAppointment } from '../types';
|
|
6
|
-
import PatientSearch from '../patient-search/patient-search.component';
|
|
5
|
+
import { isDesktop, navigate, useConfig } from '@openmrs/esm-framework';
|
|
6
|
+
import type { MappedAppointment } from '../types';
|
|
7
7
|
import { launchOverlay } from '../hooks/useOverlay';
|
|
8
|
-
import styles from './appointments-list.scss';
|
|
9
8
|
import { spaBasePath } from '../constants';
|
|
10
9
|
import { launchCheckInAppointmentModal, handleUpdateStatus, handleComplete } from './common';
|
|
11
|
-
import { useSWRConfig } from 'swr';
|
|
12
|
-
import CancelAppointment from '../appointments/forms/cancel-form/cancel-appointment.component';
|
|
13
10
|
import AppointmentForm from '../appointments/forms/create-edit-form/appointments-form.component';
|
|
11
|
+
import CancelAppointment from '../appointments/forms/cancel-form/cancel-appointment.component';
|
|
12
|
+
import PatientSearch from '../patient-search/patient-search.component';
|
|
13
|
+
import styles from './appointments-list.scss';
|
|
14
14
|
|
|
15
15
|
interface ActionMenuProps {
|
|
16
16
|
appointment: MappedAppointment;
|
|
@@ -95,7 +95,11 @@ export const ActionsMenu = ({ appointment, useBahmniUI }: ActionMenuProps) => {
|
|
|
95
95
|
|
|
96
96
|
return (
|
|
97
97
|
<Layer>
|
|
98
|
-
<OverflowMenu
|
|
98
|
+
<OverflowMenu
|
|
99
|
+
ariaLabel="Edit appointment"
|
|
100
|
+
selectorPrimaryFocus={'#editPatientDetails'}
|
|
101
|
+
size={isDesktop ? 'sm' : 'lg'}
|
|
102
|
+
flipped>
|
|
99
103
|
<EditOverflowItem />
|
|
100
104
|
<OverflowMenuItem
|
|
101
105
|
className={styles.menuItem}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
|
+
import type { KeyedMutator } from 'swr';
|
|
2
3
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { useSWRConfig } from 'swr';
|
|
4
4
|
import {
|
|
5
5
|
Button,
|
|
6
6
|
DataTable,
|
|
@@ -30,7 +30,7 @@ import { ActionsMenu } from './appointment-actions.component';
|
|
|
30
30
|
import { EmptyDataIllustration } from './empty-data-illustration.component';
|
|
31
31
|
import { launchCheckInAppointmentModal, handleComplete } from './common';
|
|
32
32
|
import { SeeAllAppointmentsLink, AddAppointmentLink, ViewCalendarLink } from './links.component';
|
|
33
|
-
import { MappedHomeAppointment } from '../types';
|
|
33
|
+
import { Appointment, MappedHomeAppointment } from '../types';
|
|
34
34
|
import { useTodaysAppointments } from './appointments-table.resource';
|
|
35
35
|
import styles from './appointments-list.scss';
|
|
36
36
|
|
|
@@ -42,7 +42,16 @@ interface PaginationData {
|
|
|
42
42
|
|
|
43
43
|
const ServiceColor = ({ color }) => <div className={styles.serviceColor} style={{ backgroundColor: `${color}` }} />;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
type RenderStatusProps = {
|
|
46
|
+
status: string;
|
|
47
|
+
t: (key: string, fallback: string) => string;
|
|
48
|
+
appointmentUuid: string;
|
|
49
|
+
mutate: KeyedMutator<{
|
|
50
|
+
data: Array<Appointment>;
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const RenderStatus = ({ status, t, appointmentUuid, mutate }: RenderStatusProps) => {
|
|
46
55
|
switch (status) {
|
|
47
56
|
case 'Completed':
|
|
48
57
|
return (
|
|
@@ -74,6 +83,7 @@ const RenderStatus = ({ status, t, appointmentUuid, mutate }) => {
|
|
|
74
83
|
default:
|
|
75
84
|
return (
|
|
76
85
|
<Button
|
|
86
|
+
size="sm"
|
|
77
87
|
kind="ghost"
|
|
78
88
|
className={styles.actionButton}
|
|
79
89
|
disabled={status === 'CheckedIn'}
|
|
@@ -88,9 +98,8 @@ const AppointmentsBaseTable = () => {
|
|
|
88
98
|
const layout = useLayoutType();
|
|
89
99
|
const { user } = useSession();
|
|
90
100
|
const { t } = useTranslation();
|
|
91
|
-
const { mutate } = useSWRConfig();
|
|
92
101
|
const { useBahmniAppointmentsUI: useBahmniUI, useFullViewPrivilege, fullViewPrivilege } = useConfig();
|
|
93
|
-
const { appointments, isLoading,
|
|
102
|
+
const { appointments, isLoading, mutate } = useTodaysAppointments();
|
|
94
103
|
|
|
95
104
|
const fullView = userHasAccess(fullViewPrivilege, user) || !useFullViewPrivilege;
|
|
96
105
|
|
|
@@ -227,6 +236,7 @@ const AppointmentsBaseTable = () => {
|
|
|
227
236
|
</div>
|
|
228
237
|
<div className={styles.actionLinks}>
|
|
229
238
|
<ViewCalendarLink />
|
|
239
|
+
<span className={styles.divider}>|</span>
|
|
230
240
|
<AddAppointmentLink />
|
|
231
241
|
</div>
|
|
232
242
|
</div>
|
|
@@ -258,7 +268,7 @@ const AppointmentsBaseTable = () => {
|
|
|
258
268
|
<TableCell key={cell.id}>{cell.value?.content ?? cell.value}</TableCell>
|
|
259
269
|
))}
|
|
260
270
|
{fullView && (
|
|
261
|
-
<TableCell className=
|
|
271
|
+
<TableCell className={`cds--table-column-menu ${styles.overflowMenu}`}>
|
|
262
272
|
<ActionsMenu appointment={filteredAppointments?.[index]} useBahmniUI={useBahmniUI} />
|
|
263
273
|
</TableCell>
|
|
264
274
|
)}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
1
|
+
@use '@carbon/colors';
|
|
2
|
+
@use '@carbon/layout';
|
|
3
|
+
@use '@carbon/type';
|
|
4
4
|
|
|
5
5
|
.container {
|
|
6
|
-
background-color:
|
|
7
|
-
border: 1px solid
|
|
6
|
+
background-color: colors.$white-0;
|
|
7
|
+
border: 1px solid colors.$gray-20;
|
|
8
8
|
width: 100%;
|
|
9
9
|
margin: 0 auto;
|
|
10
10
|
max-width: 95vw;
|
|
11
|
-
margin-top:
|
|
12
|
-
margin-bottom:
|
|
11
|
+
margin-top: layout.$spacing-09;
|
|
12
|
+
margin-bottom: layout.$spacing-12;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.loadingContainer {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
display: flex;
|
|
22
22
|
justify-content: space-between;
|
|
23
23
|
align-items: center;
|
|
24
|
-
padding:
|
|
25
|
-
background-color:
|
|
24
|
+
padding: layout.$spacing-04 0 layout.$spacing-04 layout.$spacing-05;
|
|
25
|
+
background-color: colors.$white-0;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.backgroundDataFetchingIndicator {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.addButtonContainer {
|
|
44
|
-
margin:
|
|
44
|
+
margin-left: 1.25rem;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.tableContainer {
|
|
@@ -50,25 +50,21 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
th {
|
|
53
|
-
color:
|
|
53
|
+
color: colors.$gray-70;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
:global(.cds--data-table) {
|
|
57
|
-
background-color:
|
|
57
|
+
background-color: colors.$gray-20;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
:global(.cds--table-column-menu) {
|
|
61
|
-
button {
|
|
62
|
-
position: static;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
60
|
.tableToolbar {
|
|
66
61
|
min-height: 0;
|
|
67
62
|
top: -22px;
|
|
68
63
|
}
|
|
64
|
+
|
|
69
65
|
.tableToolbarContent {
|
|
70
|
-
height:
|
|
71
|
-
margin-bottom:
|
|
66
|
+
height: layout.$spacing-07;
|
|
67
|
+
margin-bottom: layout.$spacing-02;
|
|
72
68
|
}
|
|
73
69
|
}
|
|
74
70
|
|
|
@@ -79,7 +75,7 @@
|
|
|
79
75
|
|
|
80
76
|
.startTime {
|
|
81
77
|
font-weight: 700;
|
|
82
|
-
margin-right:
|
|
78
|
+
margin-right: layout.$spacing-03;
|
|
83
79
|
}
|
|
84
80
|
|
|
85
81
|
.nameContainer {
|
|
@@ -98,15 +94,15 @@
|
|
|
98
94
|
|
|
99
95
|
.actionButton {
|
|
100
96
|
position: static;
|
|
101
|
-
padding:
|
|
97
|
+
padding: layout.$spacing-03 layout.$spacing-05 layout.$spacing-03 0;
|
|
102
98
|
}
|
|
103
99
|
|
|
104
100
|
.serviceColor {
|
|
105
101
|
border-radius: 50%;
|
|
106
|
-
margin-right:
|
|
107
|
-
width:
|
|
108
|
-
height:
|
|
109
|
-
background-color:
|
|
102
|
+
margin-right: layout.$spacing-03;
|
|
103
|
+
width: layout.$spacing-05;
|
|
104
|
+
height: layout.$spacing-05;
|
|
105
|
+
background-color: colors.$green-50;
|
|
110
106
|
}
|
|
111
107
|
|
|
112
108
|
.pagination {
|
|
@@ -122,7 +118,7 @@
|
|
|
122
118
|
}
|
|
123
119
|
|
|
124
120
|
.emptyRow {
|
|
125
|
-
padding: 0
|
|
121
|
+
padding: 0 layout.$spacing-05;
|
|
126
122
|
display: flex;
|
|
127
123
|
align-items: center;
|
|
128
124
|
}
|
|
@@ -132,45 +128,45 @@
|
|
|
132
128
|
}
|
|
133
129
|
|
|
134
130
|
.expandedAppointmentsRow td {
|
|
135
|
-
padding: 0
|
|
131
|
+
padding: 0 layout.$spacing-07;
|
|
136
132
|
}
|
|
137
133
|
|
|
138
134
|
.expandedAppointmentsRow th[colspan] td[colspan] > div:first-child {
|
|
139
|
-
padding: 0
|
|
135
|
+
padding: 0 layout.$spacing-05;
|
|
140
136
|
}
|
|
141
137
|
|
|
142
138
|
.completeIcon,
|
|
143
139
|
.missedIcon,
|
|
144
140
|
.cancelIcon {
|
|
145
141
|
width: 8rem;
|
|
146
|
-
padding:
|
|
142
|
+
padding: layout.$spacing-03 layout.$spacing-05 layout.$spacing-03 0;
|
|
147
143
|
display: flex;
|
|
148
144
|
align-items: center;
|
|
149
|
-
height:
|
|
145
|
+
height: layout.$spacing-09;
|
|
150
146
|
|
|
151
147
|
svg {
|
|
152
|
-
margin-left:
|
|
148
|
+
margin-left: layout.$spacing-03;
|
|
153
149
|
}
|
|
154
150
|
}
|
|
155
151
|
|
|
156
152
|
.completeIcon {
|
|
157
|
-
color:
|
|
153
|
+
color: colors.$green-50;
|
|
158
154
|
svg {
|
|
159
|
-
fill:
|
|
155
|
+
fill: colors.$green-50;
|
|
160
156
|
}
|
|
161
157
|
}
|
|
162
158
|
|
|
163
159
|
.missedIcon {
|
|
164
|
-
color:
|
|
160
|
+
color: colors.$red-50;
|
|
165
161
|
svg {
|
|
166
|
-
fill:
|
|
162
|
+
fill: colors.$red-50;
|
|
167
163
|
}
|
|
168
164
|
}
|
|
169
165
|
|
|
170
166
|
.tabletHeading {
|
|
171
167
|
h4 {
|
|
172
168
|
@include type.type-style('heading-03');
|
|
173
|
-
color:
|
|
169
|
+
color: colors.$gray-70;
|
|
174
170
|
}
|
|
175
171
|
}
|
|
176
172
|
|
|
@@ -180,27 +176,25 @@
|
|
|
180
176
|
justify-content: space-between;
|
|
181
177
|
text-align: left;
|
|
182
178
|
text-transform: capitalize;
|
|
183
|
-
margin-bottom: spacing.$spacing-05;
|
|
184
179
|
|
|
185
180
|
h4 {
|
|
186
181
|
@include type.type-style('heading-compact-02');
|
|
187
|
-
color:
|
|
182
|
+
color: colors.$gray-70;
|
|
188
183
|
|
|
189
184
|
&:after {
|
|
190
185
|
content: '';
|
|
191
186
|
display: block;
|
|
192
187
|
width: 2rem;
|
|
193
188
|
padding-top: 3px;
|
|
194
|
-
border-bottom: 0.375rem solid;
|
|
195
|
-
@include brand-03(border-bottom-color);
|
|
189
|
+
border-bottom: 0.375rem solid var(--brand-03);
|
|
196
190
|
}
|
|
197
191
|
}
|
|
198
192
|
}
|
|
199
193
|
|
|
200
194
|
.tileContainer {
|
|
201
|
-
background-color:
|
|
202
|
-
border-top: 1px solid
|
|
203
|
-
padding:
|
|
195
|
+
background-color: colors.$white-0;
|
|
196
|
+
border-top: 1px solid colors.$gray-20;
|
|
197
|
+
padding: layout.$spacing-11 0;
|
|
204
198
|
}
|
|
205
199
|
|
|
206
200
|
.tile {
|
|
@@ -215,27 +209,27 @@
|
|
|
215
209
|
|
|
216
210
|
.content {
|
|
217
211
|
@include type.type-style('heading-compact-01');
|
|
218
|
-
color:
|
|
219
|
-
margin-top:
|
|
220
|
-
margin-bottom:
|
|
212
|
+
color: colors.$gray-70;
|
|
213
|
+
margin-top: layout.$spacing-05;
|
|
214
|
+
margin-bottom: layout.$spacing-03;
|
|
221
215
|
}
|
|
222
216
|
|
|
223
217
|
.helper {
|
|
224
218
|
@include type.type-style('body-compact-01');
|
|
225
|
-
color:
|
|
219
|
+
color: colors.$gray-70;
|
|
226
220
|
}
|
|
227
221
|
|
|
228
222
|
.separator {
|
|
229
223
|
@include type.type-style('body-compact-02');
|
|
230
|
-
color:
|
|
224
|
+
color: colors.$gray-70;
|
|
231
225
|
width: 80%;
|
|
232
|
-
margin:
|
|
226
|
+
margin: layout.$spacing-06 auto;
|
|
233
227
|
overflow: hidden;
|
|
234
228
|
text-align: center;
|
|
235
229
|
|
|
236
230
|
&::before,
|
|
237
231
|
&::after {
|
|
238
|
-
background-color:
|
|
232
|
+
background-color: colors.$gray-40;
|
|
239
233
|
content: '';
|
|
240
234
|
display: inline-block;
|
|
241
235
|
height: 1px;
|
|
@@ -245,26 +239,36 @@
|
|
|
245
239
|
}
|
|
246
240
|
|
|
247
241
|
&::before {
|
|
248
|
-
right:
|
|
242
|
+
right: layout.$spacing-03;
|
|
249
243
|
margin-left: -50%;
|
|
250
244
|
}
|
|
251
245
|
|
|
252
246
|
&::after {
|
|
253
|
-
left:
|
|
247
|
+
left: layout.$spacing-03;
|
|
254
248
|
margin-right: -50%;
|
|
255
249
|
}
|
|
256
250
|
}
|
|
257
251
|
|
|
252
|
+
.actionLinks {
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
margin-top: -0.75rem;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
258
|
.menuItemLink {
|
|
259
259
|
text-decoration: none;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
.menuItem {
|
|
263
|
+
max-width: none;
|
|
264
|
+
}
|
|
265
|
+
|
|
262
266
|
.seeAllLink {
|
|
263
267
|
position: relative;
|
|
264
268
|
left: 22rem;
|
|
265
269
|
top: -8.5rem;
|
|
266
|
-
min-height:
|
|
267
|
-
padding:
|
|
270
|
+
min-height: layout.$spacing-07;
|
|
271
|
+
padding: layout.$spacing-03;
|
|
268
272
|
}
|
|
269
273
|
|
|
270
274
|
.filterLabelContainer {
|
|
@@ -272,22 +276,37 @@
|
|
|
272
276
|
}
|
|
273
277
|
|
|
274
278
|
.filterLabel {
|
|
275
|
-
background-color:
|
|
276
|
-
padding: 0.02rem
|
|
277
|
-
border-radius:
|
|
278
|
-
margin-right:
|
|
279
|
+
background-color: colors.$white-0;
|
|
280
|
+
padding: 0.02rem layout.$spacing-05;
|
|
281
|
+
border-radius: layout.$spacing-05;
|
|
282
|
+
margin-right: layout.$spacing-03;
|
|
279
283
|
:hover {
|
|
280
|
-
background-color:
|
|
284
|
+
background-color: colors.$white-0;
|
|
281
285
|
}
|
|
282
286
|
}
|
|
283
287
|
|
|
288
|
+
.viewCalendarButton {
|
|
289
|
+
margin: -1.25rem 0;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.divider {
|
|
293
|
+
width: 1px;
|
|
294
|
+
height: layout.$spacing-05;
|
|
295
|
+
color: colors.$gray-20;
|
|
296
|
+
margin-left: layout.$spacing-05;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.overflowMenu {
|
|
300
|
+
vertical-align: middle !important;
|
|
301
|
+
}
|
|
302
|
+
|
|
284
303
|
// Overriding styles for RTL support
|
|
285
304
|
html[dir='rtl'] {
|
|
286
305
|
.headerContainer {
|
|
287
|
-
padding:
|
|
306
|
+
padding: layout.$spacing-04 layout.$spacing-05 layout.$spacing-04 0;
|
|
288
307
|
svg {
|
|
289
308
|
margin-left: 0;
|
|
290
|
-
margin-right:
|
|
309
|
+
margin-right: layout.$spacing-03;
|
|
291
310
|
}
|
|
292
311
|
h4 {
|
|
293
312
|
text-align: right;
|
|
@@ -297,7 +316,7 @@ html[dir='rtl'] {
|
|
|
297
316
|
& > :nth-child(1) {
|
|
298
317
|
& > span {
|
|
299
318
|
margin-left: 0;
|
|
300
|
-
margin-right:
|
|
319
|
+
margin-right: layout.$spacing-05;
|
|
301
320
|
}
|
|
302
321
|
& > :nth-child(2) {
|
|
303
322
|
select {
|
|
@@ -314,7 +333,7 @@ html[dir='rtl'] {
|
|
|
314
333
|
}
|
|
315
334
|
& > span {
|
|
316
335
|
margin-right: 0.0625rem;
|
|
317
|
-
margin-left:
|
|
336
|
+
margin-left: layout.$spacing-05;
|
|
318
337
|
}
|
|
319
338
|
& > :last-child {
|
|
320
339
|
& > :first-child {
|
|
@@ -334,10 +353,10 @@ html[dir='rtl'] {
|
|
|
334
353
|
text-align: right;
|
|
335
354
|
.serviceColor {
|
|
336
355
|
margin-right: 0;
|
|
337
|
-
margin-left:
|
|
356
|
+
margin-left: layout.$spacing-03;
|
|
338
357
|
}
|
|
339
358
|
button {
|
|
340
|
-
padding:
|
|
359
|
+
padding: layout.$spacing-03 0 layout.$spacing-03 layout.$spacing-05;
|
|
341
360
|
text-align: right;
|
|
342
361
|
}
|
|
343
362
|
}
|
|
@@ -23,7 +23,7 @@ const SeeAllAppointmentsLink = () => {
|
|
|
23
23
|
{t('seeAllAppointments', 'See all appointments')}
|
|
24
24
|
</Button>
|
|
25
25
|
) : (
|
|
26
|
-
<Button kind="ghost" className={styles.seeAllLink} onClick={() => navigate({ to: `${spaBasePath}` })}>
|
|
26
|
+
<Button kind="ghost" className={styles.seeAllLink} onClick={() => navigate({ to: `${spaBasePath}/appointments` })}>
|
|
27
27
|
{t('seeAllAppointments', 'See all appointments')}
|
|
28
28
|
</Button>
|
|
29
29
|
);
|
|
@@ -41,7 +41,7 @@ const AddAppointmentLink = () => {
|
|
|
41
41
|
target="_blank"
|
|
42
42
|
kind="ghost"
|
|
43
43
|
href={`${bahmniAppointmentsUiBaseUrl}/#/home/manage/appointments/calendar/new`}
|
|
44
|
-
renderIcon={(props) => <Add size={16} {...props}
|
|
44
|
+
renderIcon={(props) => <Add size={16} {...props} />}>
|
|
45
45
|
{t('add', 'Add')}
|
|
46
46
|
</Button>
|
|
47
47
|
) : (
|
|
@@ -66,19 +66,18 @@ const ViewCalendarLink = () => {
|
|
|
66
66
|
|
|
67
67
|
return useBahmniUI ? (
|
|
68
68
|
<Button
|
|
69
|
+
className={styles.viewCalendarButton}
|
|
69
70
|
kind="ghost"
|
|
70
71
|
size="md"
|
|
71
72
|
target="_blank"
|
|
72
|
-
|
|
73
|
-
href={`${bahmniAppointmentsUiBaseUrl}/#/home/manage/appointments/calendar`}
|
|
74
|
-
renderIcon={(props) => <Calendar size={16} {...props} className="cds--btn__icon" />}>
|
|
73
|
+
href={`${bahmniAppointmentsUiBaseUrl}/#/home/manage/appointments/calendar`}>
|
|
75
74
|
{t('viewCalendar', 'View Calendar')}
|
|
76
75
|
</Button>
|
|
77
76
|
) : (
|
|
78
77
|
<Button
|
|
79
|
-
className={styles.
|
|
78
|
+
className={styles.viewCalendarButton}
|
|
80
79
|
kind="ghost"
|
|
81
|
-
onClick={() => navigate({ to: `${spaBasePath}/calendar` })}
|
|
80
|
+
onClick={() => navigate({ to: `${spaBasePath}/appointments/calendar` })}
|
|
82
81
|
renderIcon={(props) => <Calendar size={16} {...props} />}
|
|
83
82
|
data-floating-menu-primary-focus
|
|
84
83
|
iconDescription={t('viewCalendar', 'View Calendar')}>
|