@openmrs/esm-appointments-app 5.1.1-pre.2199 → 5.1.1-pre.2203
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
CHANGED
|
@@ -18,8 +18,8 @@ orphan modules 3.64 MiB [1m[33m[orphan][39m[22m 757 modules
|
|
|
18
18
|
runtime modules 38 KiB 28 modules
|
|
19
19
|
built modules 6.27 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.78 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 500 KiB
|
|
22
|
+
modules by path [1m./src/[39m[22m 467 KiB 45 modules
|
|
23
23
|
modules by path [1m./translations/[39m[22m 33.3 KiB 8 modules
|
|
24
24
|
provide-module modules 168 bytes
|
|
25
25
|
[1mprovide shared module (default) @openmrs/esm-framework@5.1.1-pre.1025 = ../../no...(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
|
212.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 65463 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 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__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__actionLink___QLns3{margin:-1rem}.-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:0 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}html[dir=rtl] .-esm-appointments__appointments-list__seeAllLink___N_0lD{left:-22rem}',"",{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,CAIA,gEACE,oBAAA,CAGF,iEACE,aAAA,CAGF,+EACE,wBCTM,CDYR,0HACE,YAAA,CACA,SAAA,CAGF,iIACE,WEpBS,CFqBT,oBE9CS,CFkDb,4DACE,YAA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A,CACA,eAAA,CACA,iBAAA,CAEA,iIAEE,wBCtLM,CDuLN,UAAA,CACA,oBAAA,CACA,UAAA,CACA,iBAAA,CACA,qBAAA,CACA,SAAA,CAGF,iEACE,WExNS,CFyNT,gBAAA,CAGF,gEACE,UE7NS,CF8NT,iBAAA,CAIJ,0DACE,YAAA,CAGF,2DACE,YAAA,CACA,kBAAA,CACA,mBAAA,CAGF,4DACE,oBAAA,CAGF,wDACE,cAAA,CAGF,0DACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,eEpOW,CFqOX,aEzPW,CF4Pb,oEACE,YAAA,CAGF,2DACE,qBC5JQ,CD6JR,mBAAA,CACA,kBEzPW,CF0PX,kBEpQW,CFqQX,kEACE,qBCjKM,CDqKV,kEACE,iBAAA,CAGF,uDACE,SAAA,CACA,WEtQW,CFuQX,aC3PQ,CD4PR,aAAA,CAGF,4DACE,gCAAA,CAKA,6EACE,4BAAA,CACA,iFACE,aAAA,CACA,kBE/RO,CFiST,gFACE,gBAAA,CAMA,2FACE,aAAA,CACA,iBEhSK,CFmSL,2GACE,iBAAA,CACA,8CAAA,CAMF,0GACE,gBAAA,CAGJ,2FACE,qBAAA,CACA,gBEjTK,CFoTL,+GACE,+CAAA,CAEF,sGACE,oBAAA,CAON,mFACE,gBAAA,CAEF,+EACE,gBAAA,CACA,2IACE,cAAA,CACA,iBEhVK,CFkVP,sFACE,0BAAA,CACA,gBAAA,CAKN,wEACE,WAAA",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",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",actionLink:"-esm-appointments__appointments-list__actionLink___QLns3",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),H=n(3263),G={};G.styleTagTransform=F(),G.setAttributes=w(),G.insert=b().bind(null,"head"),G.domAPI=E(),G.insertStyleElement=B(),f()(H.Z,G);const W=H.Z&&H.Z.locals?H.Z.locals:void 0;var P=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)))},U=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 Y=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"))},K=function(){var e=(0,m.useConfig)(),t=e.useBahmniAppointmentsUI,n=e.bahmniAppointmentsUiBaseUrl,a=(0,s.useTranslation)().t;return i().createElement("div",null,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")))},V=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"))},J=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,J.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("div",{className:W.actionLink},i().createElement(K,null))),i().createElement(U,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(V,null),i().createElement("span",{className:W.divider},"|"),i().createElement(K,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(P,{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(K,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(Y,null))};var ee={errorRetryCount:3};const te=function(){return i().createElement(o.J$,{value:ee},i().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 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,'.-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__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__actionLink___QLns3{margin:-1rem}.-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:0 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}html[dir=rtl] .-esm-appointments__appointments-list__seeAllLink___N_0lD{left:-22rem}',"",{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,CAIA,gEACE,oBAAA,CAGF,iEACE,aAAA,CAGF,+EACE,wBCTM,CDYR,0HACE,YAAA,CACA,SAAA,CAGF,iIACE,WEpBS,CFqBT,oBE9CS,CFkDb,4DACE,YAAA,CACA,SAAA,CAGF,yDACE,eAAA,CACA,kBEpDW,CFuDb,6DACE,YAAA,CAGF,gEACE,YAAA,CACA,kBAAA,CACA,iBAAA,CAGF,0DACE,eAAA,CAGF,4DACE,eAAA,CACA,0BAAA,CAGF,4DACE,iBAAA,CACA,kBE5EW,CF6EX,UEnEW,CFoEX,WEpEW,CFqEX,wBC5CS,CD+CX,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,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,CD6JR,mBAAA,CACA,kBEzPW,CF0PX,kBEpQW,CFqQX,kEACE,qBCjKM,CDqKV,kEACE,iBAAA,CAGF,uDACE,SAAA,CACA,WEtQW,CFuQX,aC3PQ,CD4PR,aAAA,CAGF,4DACE,gCAAA,CAKA,6EACE,4BAAA,CACA,iFACE,aAAA,CACA,kBE/RO,CFiST,gFACE,gBAAA,CAMA,2FACE,aAAA,CACA,iBEhSK,CFmSL,2GACE,iBAAA,CACA,8CAAA,CAMF,0GACE,gBAAA,CAGJ,2FACE,qBAAA,CACA,gBEjTK,CFoTL,+GACE,+CAAA,CAEF,sGACE,oBAAA,CAON,mFACE,gBAAA,CAEF,+EACE,gBAAA,CACA,2IACE,cAAA,CACA,iBEhVK,CFkVP,sFACE,0BAAA,CACA,gBAAA,CAKN,wEACE,WAAA",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",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",actionLink:"-esm-appointments__appointments-list__actionLink___QLns3",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 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(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 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 T(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 L(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 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=L((0,i.useState)(t.location),2),d=A[0],h=A[1],f=L((0,i.useState)(""),2),g=f[0],E=f[1],v=(0,C.zF)().currentAppointmentDate,b=L((0,i.useState)(!1),2),y=b[0],w=b[1];(0,i.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,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 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,i){var a=k.apply(e,t);function o(e){T(a,n,i,o,s,"next",e)}function s(e){T(a,n,i,o,s,"throw",e)}o(void 0)}))},function(){return B.apply(this,arguments)});return a().createElement("div",{className:N.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:g,className:N.inputContainer,labelText:n("reasonForChanges","Reason For Changes"),onChange:function(e){return E(e.target.value)}})),a().createElement("div",{className:N.buttonContainer},a().createElement(r.zxk,{onClick:function(){return(0,c.Km)()},kind:"secondary"},n("discard","Discard")),a().createElement(r.zxk,{onClick:D,disabled:y,kind:"primary",type:"submit"},n("cancelAppointment","Cancel Appointment"))))};var M=n(328),H=n(3263),G={};G.styleTagTransform=F(),G.setAttributes=w(),G.insert=b().bind(null,"head"),G.domAPI=E(),G.insertStyleElement=B(),f()(H.Z,G);const W=H.Z&&H.Z.locals?H.Z.locals:void 0;var P=function(e){var t=e.appointment,n=e.useBahmniUI,i=(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?a().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:i("editAppointment","Edit Appointment")},i("editAppointment","Edit Appointment")):a().createElement(r.laM,{className:W.menuItem,id:"#editAppointment",onClick:function(){(0,m.navigate)({to:"".concat(_.JB)}),(0,c.I8)(i("editAppointment","Edit Appointment"),a().createElement(d.Z,{appointment:t,context:"editing"}))},itemText:i("editAppointment","Edit Appointment")},i("editAppointment","Edit Appointment"))},g=function(){return n?a().createElement(r.laM,{className:W.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:W.menuItem,id:"#createAppointment",onClick:function(){(0,m.navigate)({to:"".concat(_.JB)}),(0,c.I8)(i("search","Search"),a().createElement(M.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:m.isDesktop?"sm":"lg",flipped:!0},a().createElement(f,null),a().createElement(r.laM,{className:W.menuItem,disabled:"CheckedIn"===u||C,id:"#checkInAppointment",onClick:function(){return(0,A.O4)(t.id)},itemText:i("checkIn","Check In")},i("checkIn","Check In")),a().createElement(r.laM,{className:W.menuItem,id:"#completeAppointment",disabled:h||C,onClick:function(){return(0,A.bO)(t.id,l,i)},itemText:i("complete","Complete")},i("complete","Complete")),a().createElement(r.laM,{className:W.menuItem,disabled:C,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,A.tf)("Missed",t.id,e,a,n,o,l,i)},itemText:i("missed","Missed")},i("missed","Missed")),a().createElement(r.laM,{className:W.menuItem,id:"#cancelAppointment",disabled:C,onClick:function(){(0,m.navigate)({to:"".concat(_.JB)}),(0,c.I8)(i("cancelAppointment","Cancel Appointment"),a().createElement(z,{appointment:t}))},itemText:i("cancel","Cancel")},i("cancel","Cancel")),a().createElement(g,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),K=n(9884);function R(){return R=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},R.apply(this,arguments)}var O=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:W.seeAllLink,size:"md",target:"_blank",href:"".concat(n,"/#/home/manage/appointments/list")},i("seeAllAppointments","See all appointments")):a().createElement(r.zxk,{kind:"ghost",className:W.seeAllLink,onClick:function(){return(0,m.navigate)({to:"".concat(_.JB,"/appointments")})}},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",null,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,R({size:16},e))}},i("add","Add")):a().createElement(r.zxk,{kind:"ghost",renderIcon:function(e){return a().createElement(j.mm,R({size:16},e))},onClick:function(){(0,m.navigate)({to:"".concat(_.JB,"/appointments")}),(0,c.I8)(i("search","Search"),a().createElement(M.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,{className:W.viewCalendarButton,kind:"ghost",size:"md",target:"_blank",href:"".concat(n,"/#/home/manage/appointments/calendar")},i("viewCalendar","View Calendar")):a().createElement(r.zxk,{className:W.viewCalendarButton,kind:"ghost",onClick:function(){return(0,m.navigate)({to:"".concat(_.JB,"/appointments/calendar")})},renderIcon:function(e){return a().createElement(K.f,R({size:16},e))},"data-floating-menu-primary-focus":!0,iconDescription:i("viewCalendar","View Calendar")},i("viewCalendar","View Calendar"))},J=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:W.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:W.completeIcon},n("completed","Completed"),a().createElement(l.Wz,{size:16}));case"Missed":return a().createElement("div",{className:W.missedIcon},n("missed","Missed"),a().createElement(p.Wf,{size:16}));case"Cancelled":return a().createElement("div",{className:W.cancelIcon},n("cancelled","Cancelled"),a().createElement(l.eL,{size:16}));case"CheckedIn":return a().createElement(r.zxk,{kind:"ghost",className:W.actionButton,onClick:function(){return(0,A.bO)(i,o,n)}},n("complete","Complete"));default:return a().createElement(r.zxk,{size:"sm",kind:"ghost",className:W.actionButton,disabled:"CheckedIn"===t,onClick:function(){return(0,A.O4)(i)}},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,J.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,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.")}()),b=v[0],y=v[1],w=(0,m.usePagination)(g,b),k=w.goTo,B=w.results,D=w.currentPage,F=(0,i.useMemo)((function(){return[{id:0,header:l("dateTime","Date and time"),key:"dateTime",isSortable:!0},{id:1,header:l("name","Patient Name"),key:"name",isSortable:!0},{id:2,header:l("identifier","Identifier"),key:"identifier",isSortable:!0},{id:3,header:l("location","Location"),key:"location",isSortable:!0},{id:4,header:l("service","Service"),key:"service",isSortable:!0},{id:5,header:l("actions","Actions"),key:"actionButton",isSortable:!1}]}),[l]),x=null==B?void 0:B.map((function(e){return{id:e.id,dateTime:{content:a().createElement("span",{className:W.statusContainer},a().createElement("span",{className:W.startTime},e.dateTime),e.duration),sortKey:e.dateTime},name:{content:a().createElement("div",{className:W.nameContainer},a().createElement(m.ConfigurableLink,{to:"${openmrsSpaBase}/patient/".concat(e.patientUuid,"/chart")},e.name)),sortKey:e.name},identifier:{content:a().createElement("div",{className:W.nameContainer},a().createElement("span",{className:W.identifier},e.identifier)),sortKey:e.identifier},location:{content:a().createElement("span",{className:W.statusContainer},e.location),sortKey:e.location},service:{content:a().createElement("span",{className:W.serviceContainer},a().createElement(Q,{color:e.serviceColor}),e.serviceType),sortKey:e.serviceType},actionButton:{content:a().createElement("span",{className:W.serviceContainer},a().createElement(X,{status:e.status,appointmentUuid:e.id,t:l,mutate:h}))}}}));return C?a().createElement("div",{className:W.loadingContainer},a().createElement(r.gqd,{role:"progressbar"})):0===(null==u?void 0:u.length)?a().createElement(r.mh4,{className:W.container},a().createElement(r.n9L,{className:W.tile},a().createElement("div",{className:(0,m.isDesktop)(n)?W.desktopHeading:W.tabletHeading},a().createElement("h4",null,l("todaysAppointments","Today's Appointments")),a().createElement("div",{className:W.actionLink},a().createElement(Y,null))),a().createElement(U,null),a().createElement("p",{className:W.content},l("noAppointmentsScheduledForTodayToDisplay","There are no appointments scheduled for today to display for this location"),"."))):a().createElement(a().Fragment,null,a().createElement("div",{className:W.container},a().createElement("div",{className:W.headerContainer},a().createElement("div",{className:(0,m.isDesktop)(n)?W.desktopHeading:W.tabletHeading},a().createElement("h4",null,l("todaysAppointments","Today's Appointments"))),a().createElement("div",{className:W.actionLinks},a().createElement(V,null),a().createElement("span",{className:W.divider},"|"),a().createElement(Y,null))),a().createElement(r.wQF,{"data-floating-menu-container":!0,headers:F,sortRow:function(e,t,n){var i,a,o,s,r=n.sortDirection,l=n.sortStates;return r===l.NONE?0:r===l.ASC?null!==(a=null==e||null===(i=e.sortKey)||void 0===i?void 0:i.localeCompare(null==t?void 0:t.sortKey))&&void 0!==a?a:0:r===l.DESC?null!==(s=null==t||null===(o=t.sortKey)||void 0===o?void 0:o.localeCompare(null==e?void 0:e.sortKey))&&void 0!==s?s:0:void 0},overflowMenuOnHover:(0,m.isDesktop)(n),rows:x,size:(0,m.isDesktop)(n)?"md":"lg",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:W.tableContainer},a().createElement(r.iA_,q({},o(),{className:W.appointmentsTable}),a().createElement(r.ssF,null,a().createElement(r.SCH,null,n.map((function(e){return a().createElement(r.xDH,q({},i({header:e,isSortable:e.isSortable}),{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 ".concat(W.overflowMenu)},a().createElement(P,{appointment:null==g?void 0:g[t],useBahmniUI:c}))))})))),0===t.length?a().createElement("div",{className:W.tileContainer},a().createElement(r.mh4,null,a().createElement(r.n9L,{className:W.tile},a().createElement("div",{className:W.tileContent},a().createElement("p",{className:W.content},l("noAppointmentsToDisplay","No appointments to display")),a().createElement("p",{className:W.helper},l("checkFilters","Check the filters above"))),a().createElement("p",{className:W.separator},l("or","or")),a().createElement(Y,null)))):null,a().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)}}))}))),a().createElement(O,null))};var ee={errorRetryCount:3};const te=function(){return a().createElement(o.J$,{value:ee},a().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,k7RAAm7R,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,2DAA2D,2DAA2D,6EAA6E,iEAAiE,MAAQ,GAAG,SAAW,irEAAirE,WAAa,MAE/8WH,EAAwBI,OAAS,CAChC,UAAa,0DACb,iBAAoB,iEACpB,gBAAmB,gEACnB,gCAAmC,gFACnC,eAAkB,+DAClB,UAAa,0DACb,aAAgB,6DAChB,oBAAuB,oEACvB,UAAa,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AAO2H,MACtB,kBAAC7H,MAAAA,CAAIC,UAAWC,EAAO4J,aACrB,kBAAC5B,IAAAA,CAAEjI,UAAWC,EAAO0G,SAAUtM,EAAE,0BAA2B,+BAC5D,kBAAC4N,IAAAA,CAAEjI,UAAWC,EAAO6J,QAASzP,EAAE,eAAgB,6BAElD,kBAAC4N,IAAAA,CAAEjI,UAAWC,EAAO8J,WAAY1P,EAAE,KAAM,OACzC,kBAAC2J,EAAkBA,SAIvB,KACJ,kBAACgG,EAAAA,IAAUA,CACTC,YAAY,YACZC,aAAa,gBACbC,KAAM/D,EACNgE,SAAUpE,EACVD,UAAWA,EACXsE,WAAYxE,EAAqB4B,OACjCzH,UAAWC,EAAOqK,WAClB3J,SAAU,Y,IAAGyJ,EAAAA,EAAAA,SAAUD,EAAAA,EAAAA,KACjBC,IAAapE,GACfC,EAAYmE,GAEVD,IAAS/D,GACXD,EAAKgE,EAET,I,KAMV,kBAACtG,EAAsBA,MAG7B,EC3TA,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","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","actionLink","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":""}
|
|
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,k7RAAm7R,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,2DAA2D,2DAA2D,6EAA6E,iEAAiE,MAAQ,GAAG,SAAW,irEAAirE,WAAa,MAE/8WH,EAAwBI,OAAS,CAChC,UAAa,0DACb,iBAAoB,iEACpB,gBAAmB,gEACnB,gCAAmC,gFACnC,eAAkB,+DAClB,UAAa,0DACb,aAAgB,6DAChB,oB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AAA,EAAAA,SAAUD,EAAAA,EAAAA,KACjBC,IAAa/E,GACfC,EAAY8E,GAEVD,IAAS1E,GACXD,EAAK2E,EAET,IAIR,KAGJ,kBAACjH,EAAsBA,MAG7B,ECjWA,IAAMqH,GAAmB,CACvBC,gBAAiB,GAWnB,SARyB,WACvB,OACE,kBAACC,EAAAA,GAASA,CAAC5K,MAAO0K,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","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","isSortable","tableRows","paginatedAppointments","dateTime","content","span","statusContainer","startTime","duration","sortKey","nameContainer","ConfigurableLink","identifier","service","serviceContainer","serviceType","loadingContainer","DataTableSkeleton","role","length","container","Tile","tile","desktopHeading","tabletHeading","h4","actionLink","p","headerContainer","actionLinks","divider","DataTable","data-floating-menu-container","sortRow","cellA","cellB","sortDirection","sortStates","NONE","ASC","localeCompare","DESC","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":""}
|
|
@@ -204,9 +204,9 @@
|
|
|
204
204
|
"initial": false,
|
|
205
205
|
"entry": false,
|
|
206
206
|
"recorded": false,
|
|
207
|
-
"size":
|
|
207
|
+
"size": 76028,
|
|
208
208
|
"sizes": {
|
|
209
|
-
"javascript":
|
|
209
|
+
"javascript": 76028
|
|
210
210
|
},
|
|
211
211
|
"names": [],
|
|
212
212
|
"idHints": [],
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"auxiliaryFiles": [
|
|
221
221
|
"381.js.map"
|
|
222
222
|
],
|
|
223
|
-
"hash": "
|
|
223
|
+
"hash": "d8a1a4609ad82991",
|
|
224
224
|
"childrenByOrder": {}
|
|
225
225
|
},
|
|
226
226
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"}},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"}],"version":"5.1.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"}},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"}],"version":"5.1.1-pre.2203"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-appointments-app",
|
|
3
|
-
"version": "5.1.1-pre.
|
|
3
|
+
"version": "5.1.1-pre.2203",
|
|
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": "326dfbb66417b46ec4e5f653c8277405bc973519"
|
|
52
52
|
}
|
|
@@ -122,31 +122,37 @@ const AppointmentsBaseTable = () => {
|
|
|
122
122
|
id: 0,
|
|
123
123
|
header: t('dateTime', 'Date and time'),
|
|
124
124
|
key: 'dateTime',
|
|
125
|
+
isSortable: true,
|
|
125
126
|
},
|
|
126
127
|
{
|
|
127
128
|
id: 1,
|
|
128
129
|
header: t('name', 'Patient Name'),
|
|
129
130
|
key: 'name',
|
|
131
|
+
isSortable: true,
|
|
130
132
|
},
|
|
131
133
|
{
|
|
132
134
|
id: 2,
|
|
133
135
|
header: t('identifier', 'Identifier'),
|
|
134
136
|
key: 'identifier',
|
|
137
|
+
isSortable: true,
|
|
135
138
|
},
|
|
136
139
|
{
|
|
137
140
|
id: 3,
|
|
138
141
|
header: t('location', 'Location'),
|
|
139
142
|
key: 'location',
|
|
143
|
+
isSortable: true,
|
|
140
144
|
},
|
|
141
145
|
{
|
|
142
146
|
id: 4,
|
|
143
147
|
header: t('service', 'Service'),
|
|
144
148
|
key: 'service',
|
|
149
|
+
isSortable: true,
|
|
145
150
|
},
|
|
146
151
|
{
|
|
147
152
|
id: 5,
|
|
148
153
|
header: t('actions', 'Actions'),
|
|
149
154
|
key: 'actionButton',
|
|
155
|
+
isSortable: false,
|
|
150
156
|
},
|
|
151
157
|
],
|
|
152
158
|
[t],
|
|
@@ -161,6 +167,7 @@ const AppointmentsBaseTable = () => {
|
|
|
161
167
|
{appointment.duration}
|
|
162
168
|
</span>
|
|
163
169
|
),
|
|
170
|
+
sortKey: appointment.dateTime,
|
|
164
171
|
},
|
|
165
172
|
name: {
|
|
166
173
|
content: (
|
|
@@ -170,6 +177,7 @@ const AppointmentsBaseTable = () => {
|
|
|
170
177
|
</ConfigurableLink>
|
|
171
178
|
</div>
|
|
172
179
|
),
|
|
180
|
+
sortKey: appointment.name,
|
|
173
181
|
},
|
|
174
182
|
identifier: {
|
|
175
183
|
content: (
|
|
@@ -177,9 +185,11 @@ const AppointmentsBaseTable = () => {
|
|
|
177
185
|
<span className={styles.identifier}>{appointment.identifier}</span>
|
|
178
186
|
</div>
|
|
179
187
|
),
|
|
188
|
+
sortKey: appointment.identifier,
|
|
180
189
|
},
|
|
181
190
|
location: {
|
|
182
191
|
content: <span className={styles.statusContainer}>{appointment.location}</span>,
|
|
192
|
+
sortKey: appointment.location,
|
|
183
193
|
},
|
|
184
194
|
service: {
|
|
185
195
|
content: (
|
|
@@ -188,6 +198,7 @@ const AppointmentsBaseTable = () => {
|
|
|
188
198
|
{appointment.serviceType}
|
|
189
199
|
</span>
|
|
190
200
|
),
|
|
201
|
+
sortKey: appointment.serviceType,
|
|
191
202
|
},
|
|
192
203
|
actionButton: {
|
|
193
204
|
content: (
|
|
@@ -198,6 +209,30 @@ const AppointmentsBaseTable = () => {
|
|
|
198
209
|
},
|
|
199
210
|
}));
|
|
200
211
|
|
|
212
|
+
const handleSorting = (
|
|
213
|
+
cellA: { content: JSX.Element; sortKey: string },
|
|
214
|
+
cellB: { content: JSX.Element; sortKey: string },
|
|
215
|
+
{
|
|
216
|
+
sortDirection,
|
|
217
|
+
sortStates,
|
|
218
|
+
}: {
|
|
219
|
+
sortDirection: 'ASC' | 'DESC' | 'NONE';
|
|
220
|
+
sortStates: { ASC: 'ASC'; DESC: 'DESC'; NONE: 'NONE' };
|
|
221
|
+
},
|
|
222
|
+
) => {
|
|
223
|
+
if (sortDirection === sortStates.NONE) {
|
|
224
|
+
return 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (sortDirection === sortStates.ASC) {
|
|
228
|
+
return cellA?.sortKey?.localeCompare(cellB?.sortKey) ?? 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (sortDirection === sortStates.DESC) {
|
|
232
|
+
return cellB?.sortKey?.localeCompare(cellA?.sortKey) ?? 0;
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
201
236
|
if (isLoading) {
|
|
202
237
|
return (
|
|
203
238
|
<div className={styles.loadingContainer}>
|
|
@@ -245,74 +280,77 @@ const AppointmentsBaseTable = () => {
|
|
|
245
280
|
<DataTable
|
|
246
281
|
data-floating-menu-container
|
|
247
282
|
headers={tableHeaders}
|
|
283
|
+
sortRow={handleSorting}
|
|
248
284
|
overflowMenuOnHover={isDesktop(layout)}
|
|
249
285
|
rows={tableRows}
|
|
250
|
-
size={isDesktop(layout) ? '
|
|
286
|
+
size={isDesktop(layout) ? 'md' : 'lg'}
|
|
251
287
|
useZebraStyles={true}>
|
|
252
|
-
{({ rows, headers, getHeaderProps, getTableProps, getRowProps }) =>
|
|
253
|
-
|
|
254
|
-
<
|
|
255
|
-
<
|
|
256
|
-
<
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
{header.header}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<
|
|
269
|
-
{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
<
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
<
|
|
286
|
-
<
|
|
287
|
-
<
|
|
288
|
-
<
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
288
|
+
{({ rows, headers, getHeaderProps, getTableProps, getRowProps }) => {
|
|
289
|
+
return (
|
|
290
|
+
<TableContainer className={styles.tableContainer}>
|
|
291
|
+
<Table {...getTableProps()} className={styles.appointmentsTable}>
|
|
292
|
+
<TableHead>
|
|
293
|
+
<TableRow>
|
|
294
|
+
{headers.map((header) => (
|
|
295
|
+
<TableHeader {...getHeaderProps({ header, isSortable: header.isSortable })} key={header.id}>
|
|
296
|
+
{header.header}
|
|
297
|
+
</TableHeader>
|
|
298
|
+
))}
|
|
299
|
+
</TableRow>
|
|
300
|
+
</TableHead>
|
|
301
|
+
<TableBody>
|
|
302
|
+
{rows.map((row, index) => {
|
|
303
|
+
return (
|
|
304
|
+
<React.Fragment key={row.id}>
|
|
305
|
+
<TableRow {...getRowProps({ row })}>
|
|
306
|
+
{row.cells.map((cell) => (
|
|
307
|
+
<TableCell key={cell.id}>{cell.value?.content ?? cell.value}</TableCell>
|
|
308
|
+
))}
|
|
309
|
+
{fullView && (
|
|
310
|
+
<TableCell className={`cds--table-column-menu ${styles.overflowMenu}`}>
|
|
311
|
+
<ActionsMenu appointment={filteredAppointments?.[index]} useBahmniUI={useBahmniUI} />
|
|
312
|
+
</TableCell>
|
|
313
|
+
)}
|
|
314
|
+
</TableRow>
|
|
315
|
+
</React.Fragment>
|
|
316
|
+
);
|
|
317
|
+
})}
|
|
318
|
+
</TableBody>
|
|
319
|
+
</Table>
|
|
320
|
+
{rows.length === 0 ? (
|
|
321
|
+
<div className={styles.tileContainer}>
|
|
322
|
+
<Layer>
|
|
323
|
+
<Tile className={styles.tile}>
|
|
324
|
+
<div className={styles.tileContent}>
|
|
325
|
+
<p className={styles.content}>{t('noAppointmentsToDisplay', 'No appointments to display')}</p>
|
|
326
|
+
<p className={styles.helper}>{t('checkFilters', 'Check the filters above')}</p>
|
|
327
|
+
</div>
|
|
328
|
+
<p className={styles.separator}>{t('or', 'or')}</p>
|
|
329
|
+
<AddAppointmentLink />
|
|
330
|
+
</Tile>
|
|
331
|
+
</Layer>
|
|
332
|
+
</div>
|
|
333
|
+
) : null}
|
|
334
|
+
<Pagination
|
|
335
|
+
forwardText="Next page"
|
|
336
|
+
backwardText="Previous page"
|
|
337
|
+
page={currentPage}
|
|
338
|
+
pageSize={currentPageSize}
|
|
339
|
+
pageSizes={pageSizes}
|
|
340
|
+
totalItems={filteredAppointments.length}
|
|
341
|
+
className={styles.pagination}
|
|
342
|
+
onChange={({ pageSize, page }) => {
|
|
343
|
+
if (pageSize !== currentPageSize) {
|
|
344
|
+
setPageSize(pageSize);
|
|
345
|
+
}
|
|
346
|
+
if (page !== currentPage) {
|
|
347
|
+
goTo(page);
|
|
348
|
+
}
|
|
349
|
+
}}
|
|
350
|
+
/>
|
|
351
|
+
</TableContainer>
|
|
352
|
+
);
|
|
353
|
+
}}
|
|
316
354
|
</DataTable>
|
|
317
355
|
</div>
|
|
318
356
|
<SeeAllAppointmentsLink />
|