@openmrs/esm-billing-app 1.4.1-pre.2123 → 1.4.1-pre.2143
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/cache/8b4f4eaa63c04cd9-meta.json +1 -0
- package/.turbo/cache/8b4f4eaa63c04cd9.tar.zst +0 -0
- package/.turbo/turbo-build.log +1 -1
- package/dist/1899.css +1 -1
- package/dist/1899.css.map +1 -1
- package/dist/1899.js +1 -1
- package/dist/1899.js.map +1 -1
- package/dist/openmrs-esm-billing-app.js +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/billing-form/billing-form.scss +5 -0
- package/src/billing-form/billing-form.test.tsx +58 -1
- package/src/billing-form/billing-form.workspace.tsx +141 -133
- package/.turbo/cache/6e00959574e962d6-meta.json +0 -1
- package/.turbo/cache/6e00959574e962d6.tar.zst +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"hash":"8b4f4eaa63c04cd9","duration":15779}
|
|
Binary file
|
package/.turbo/turbo-build.log
CHANGED
package/dist/1899.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--brand-01:#005d5d;--brand-02:#004144;--brand-03:#007d79;--bottom-nav-height:4rem;--workspace-header-height:3rem;--tablet-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-billing__billing-form__tablet___MG9Xm{background-color:#fff;padding:1.5rem 1rem}.-esm-billing__billing-form__desktop___CL1X8{padding:0}.-esm-billing__billing-form__button___miCYp{align-content:flex-start;align-items:baseline;min-width:50%;height:4rem;display:flex}.-esm-billing__billing-form__button___miCYp .cds--inline-loading{min-height:1rem!important}.-esm-billing__billing-form__button___miCYp .cds--inline-loading__text{font-size:unset!important}.-esm-billing__billing-form__mt2___-Jwjw{margin-top:2rem}.-esm-billing__billing-form__searchContent___0uFpS{z-index:1;background-color:#fff;border:1px solid #ddd;width:92%;min-width:230px;position:absolute;overflow:auto}.-esm-billing__billing-form__searchItem___c\+ILG{cursor:pointer;border-bottom:.1rem solid silver}.-esm-billing__billing-form__invalidInput___9XsKm{border:2px solid red}.-esm-billing__billing-form__removeButton___rEw8m{color:#ee0909;cursor:pointer;right:20px}.-esm-billing__billing-form__form___ECl9X{flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem);display:flex}.omrs-breakpoint-lt-desktop .-esm-billing__billing-form__form___ECl9X{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-billing__billing-form__form___ECl9X{background-color:#fff}.-esm-billing__billing-form__grid___qXtbW{flex-direction:column;gap:1rem;margin:1rem;display:flex}.-esm-billing__billing-form__row___9-EZa{flex-flow:wrap;gap:1rem;margin:.5rem 0 0;display:flex}.-esm-billing__billing-form__spacer___Eicsm{margin-top:1rem}.-esm-billing__billing-form__existingItemsContainer___cfzXU{background-color:#f4f4f4;border:1px solid #e0e0e0;border-radius:.25rem;padding:1rem}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1{border-bottom:1px solid #e0e0e0;justify-content:space-between;align-items:center;padding:.5rem 0;display:flex}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1:last-of-type{border-bottom:none}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1 .-esm-billing__billing-form__existingItemName___md4qn{font-size:var(--cds-body-compact-01-font-size,.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,.16px);color:#525252;flex:1}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1 .-esm-billing__billing-form__existingItemDetail___uwWSZ{font-size:var(--cds-body-compact-01-font-size,.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,.16px);color:#525252;flex:none;margin:0 1rem}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1 .-esm-billing__billing-form__existingItemTotal___\+vdv7{font-size:var(--cds-heading-compact-01-font-size,.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,.16px);color:#525252;flex:none}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemsSubtotal___abWhv{font-size:var(--cds-body-compact-01-font-size,.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,.16px);text-align:right;color:#525252;border-top:1px solid #e0e0e0;margin-top:.5rem;padding-top:.75rem}.-esm-billing__billing-form__sectionHeading___f9Y8R{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;margin-bottom:.75rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA{background-color:#f4f4f4;border:1px solid #e0e0e0;border-radius:.25rem;margin-bottom:1rem;padding:1rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemHeader___FwNiq{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemHeader___FwNiq .-esm-billing__billing-form__itemName___jVlbU{color:#525252;font-size:1rem;font-weight:600}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m{flex-wrap:wrap;align-items:flex-end;gap:1rem;margin-top:.5rem;display:flex}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep{flex-direction:column;min-width:0;display:flex}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:first-child{flex:auto;min-width:250px}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:nth-child(2){flex:0 0 140px;width:140px}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:last-child{text-align:right;flex:0 0 180px;width:180px;margin-left:auto}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep label{color:#525252;white-space:nowrap;text-overflow:ellipsis;margin-bottom:.5rem;font-size:.875rem;font-weight:500;overflow:hidden}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--list-box,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--number,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--combo-box,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--list-box__wrapper,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--list-box__field{width:100%!important;min-width:0!important;max-width:100%!important}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .-esm-billing__billing-form__priceDisplay___2f6BZ,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .-esm-billing__billing-form__totalDisplay___RJjsD{color:#525252;word-break:break-word;padding:.5rem 0;font-size:.875rem;font-weight:600}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__grandTotal___eRlcF{text-align:right;color:#525252;background-color:#f4f4f4;border-top:2px solid #0f62fe;margin-top:1rem;padding:1rem;font-size:1.125rem;font-weight:600}@media (width<=1056px){.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:nth-child(2){flex:100%;width:100%}}@media (width<=768px){.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA{padding:.75rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m{flex-direction:column;gap:.5rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:first-child,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:nth-child(2),.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:last-child{flex:100%;width:100%;max-width:100%}}
|
|
1
|
+
:root{--brand-01:#005d5d;--brand-02:#004144;--brand-03:#007d79;--bottom-nav-height:4rem;--workspace-header-height:3rem;--tablet-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-billing__billing-form__tablet___MG9Xm{background-color:#fff;padding:1.5rem 1rem}.-esm-billing__billing-form__desktop___CL1X8{padding:0}.-esm-billing__billing-form__button___miCYp{align-content:flex-start;align-items:baseline;min-width:50%;height:4rem;display:flex}.-esm-billing__billing-form__button___miCYp .cds--inline-loading{min-height:1rem!important}.-esm-billing__billing-form__button___miCYp .cds--inline-loading__text{font-size:unset!important}.-esm-billing__billing-form__mt2___-Jwjw{margin-top:2rem}.-esm-billing__billing-form__searchContent___0uFpS{z-index:1;background-color:#fff;border:1px solid #ddd;width:92%;min-width:230px;position:absolute;overflow:auto}.-esm-billing__billing-form__searchItem___c\+ILG{cursor:pointer;border-bottom:.1rem solid silver}.-esm-billing__billing-form__invalidInput___9XsKm{border:2px solid red}.-esm-billing__billing-form__removeButton___rEw8m{color:#ee0909;cursor:pointer;right:20px}.-esm-billing__billing-form__form___ECl9X{flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem);display:flex}.omrs-breakpoint-lt-desktop .-esm-billing__billing-form__form___ECl9X{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-billing__billing-form__form___ECl9X{background-color:#fff}.-esm-billing__billing-form__formContent___lxLnY{flex-direction:column;display:flex}.-esm-billing__billing-form__grid___qXtbW{flex-direction:column;gap:1rem;margin:1rem;display:flex}.-esm-billing__billing-form__row___9-EZa{flex-flow:wrap;gap:1rem;margin:.5rem 0 0;display:flex}.-esm-billing__billing-form__spacer___Eicsm{margin-top:1rem}.-esm-billing__billing-form__existingItemsContainer___cfzXU{background-color:#f4f4f4;border:1px solid #e0e0e0;border-radius:.25rem;padding:1rem}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1{border-bottom:1px solid #e0e0e0;justify-content:space-between;align-items:center;padding:.5rem 0;display:flex}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1:last-of-type{border-bottom:none}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1 .-esm-billing__billing-form__existingItemName___md4qn{font-size:var(--cds-body-compact-01-font-size,.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,.16px);color:#525252;flex:1}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1 .-esm-billing__billing-form__existingItemDetail___uwWSZ{font-size:var(--cds-body-compact-01-font-size,.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,.16px);color:#525252;flex:none;margin:0 1rem}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemRow___RMcu1 .-esm-billing__billing-form__existingItemTotal___\+vdv7{font-size:var(--cds-heading-compact-01-font-size,.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,.16px);color:#525252;flex:none}.-esm-billing__billing-form__existingItemsContainer___cfzXU .-esm-billing__billing-form__existingItemsSubtotal___abWhv{font-size:var(--cds-body-compact-01-font-size,.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,.16px);text-align:right;color:#525252;border-top:1px solid #e0e0e0;margin-top:.5rem;padding-top:.75rem}.-esm-billing__billing-form__sectionHeading___f9Y8R{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;margin-bottom:.75rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA{background-color:#f4f4f4;border:1px solid #e0e0e0;border-radius:.25rem;margin-bottom:1rem;padding:1rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemHeader___FwNiq{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemHeader___FwNiq .-esm-billing__billing-form__itemName___jVlbU{color:#525252;font-size:1rem;font-weight:600}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m{flex-wrap:wrap;align-items:flex-end;gap:1rem;margin-top:.5rem;display:flex}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep{flex-direction:column;min-width:0;display:flex}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:first-child{flex:auto;min-width:250px}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:nth-child(2){flex:0 0 140px;width:140px}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:last-child{text-align:right;flex:0 0 180px;width:180px;margin-left:auto}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep label{color:#525252;white-space:nowrap;text-overflow:ellipsis;margin-bottom:.5rem;font-size:.875rem;font-weight:500;overflow:hidden}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--list-box,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--number,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--combo-box,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--list-box__wrapper,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .cds--list-box__field{width:100%!important;min-width:0!important;max-width:100%!important}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .-esm-billing__billing-form__priceDisplay___2f6BZ,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep .-esm-billing__billing-form__totalDisplay___RJjsD{color:#525252;word-break:break-word;padding:.5rem 0;font-size:.875rem;font-weight:600}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__grandTotal___eRlcF{text-align:right;color:#525252;background-color:#f4f4f4;border-top:2px solid #0f62fe;margin-top:1rem;padding:1rem;font-size:1.125rem;font-weight:600}@media (width<=1056px){.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:nth-child(2){flex:100%;width:100%}}@media (width<=768px){.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA{padding:.75rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m{flex-direction:column;gap:.5rem}.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:first-child,.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:nth-child(2),.-esm-billing__billing-form__selectedItemsContainer___Wfu4P .-esm-billing__billing-form__itemCard___JpDpA .-esm-billing__billing-form__itemControls___zsB6m .-esm-billing__billing-form__controlSection___vBeep:last-child{flex:100%;width:100%;max-width:100%}}
|
package/dist/1899.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1899.css","sources":["webpack://@openmrs/esm-billing-app/./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss"],"names":[],"mappings":"AAsDA,sUClDA,sFAKA,uDAIA,iIAOE,2FAIA,iGAKF,yDAIA,mKAUA,iGAMA,uEAIA,0FAMA,qIAOA,+FAIA,2FAIA,kGAOA,+FAOA,4DAIA,gJAME,+NAOE,iJAIA,oaAMA,ubAOA,qbAOF,+bAUF,kUAMA,4EAGE,iNAOE,2OAME,qPAOA,uOAKA,+PAKE,sPAKA,wPAKA,wRAOA,oVAUA,8qCAUA,0lBAaN,iQAYF,uBAKU,mPAUV,sBAEI,yHAGE,4LAKI"}
|
|
1
|
+
{"version":3,"file":"1899.css","sources":["webpack://@openmrs/esm-billing-app/./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss"],"names":[],"mappings":"AAsDA,sUClDA,sFAKA,uDAIA,iIAOE,2FAIA,iGAKF,yDAIA,mKAUA,iGAMA,uEAIA,0FAMA,qIAOA,+FAIA,2FAIA,oFAKA,kGAOA,+FAOA,4DAIA,gJAME,+NAOE,iJAIA,oaAMA,ubAOA,qbAOF,+bAUF,kUAMA,4EAGE,iNAOE,2OAME,qPAOA,uOAKA,+PAKE,sPAKA,wPAKA,wRAOA,oVAUA,8qCAUA,0lBAaN,iQAYF,uBAKU,mPAUV,sBAEI,yHAGE,4LAKI"}
|
package/dist/1899.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([["1899"],{6994(e,t,i){i.d(t,{MH:()=>m,OS:()=>d,WJ:()=>o,bb:()=>c,cW:()=>_,j2:()=>u,ly:()=>s,vv:()=>b});var l=i(6335),a=i.n(l),n=i(9124),r=i(7003);let s=()=>{let e=`${r.B}billableService?v=custom:(uuid,name,shortName,serviceStatus,concept:(uuid,display,name:(name)),serviceType:(display,uuid),servicePrices:(uuid,name,price,paymentMode:(uuid,name)))`,{data:t,isLoading:i,isValidating:l,error:a,mutate:s}=(0,n.useOpenmrsFetchAll)(e);return{billableServices:t??[],isLoading:i,isValidating:l,error:a,mutate:s}};function m(){let{serviceTypes:e}=(0,n.useConfig)(),t=e.billableService,i=`${n.restBaseUrl}/concept/${t}?v=custom:(setMembers:(uuid,display))`,{data:l,error:r,isLoading:s}=a()(i,n.openmrsFetch);return{serviceTypes:l?.data.setMembers?[...l.data.setMembers].sort((e,t)=>e.display.localeCompare(t.display)):[],error:r,isLoadingServiceTypes:s}}let o=()=>{let e=`${r.B}paymentMode`,{data:t,error:i,isLoading:l,mutate:s}=a()(e,n.openmrsFetch);return{paymentModes:t?.data.results?[...t.data.results].sort((e,t)=>e.name.localeCompare(t.name)):[],error:i,isLoadingPaymentModes:l,mutate:s}};function c(e){let t=`${n.restBaseUrl}/conceptsearch?q=${e}`,{data:i,error:l,isLoading:r}=a()(e?t:null,n.openmrsFetch);return{searchResults:i?.data?.results??[],error:l,isSearching:r}}let u=async e=>{let t=`${r.B}api/billable-service`;return await (0,n.openmrsFetch)(t,{method:"POST",body:e,headers:{"Content-Type":"application/json"}})},d=async(e,t)=>{let i=`${r.B}billableService/${e}`;return await (0,n.openmrsFetch)(i,{method:"POST",body:t,headers:{"Content-Type":"application/json"}})},_=e=>{let t=`${n.restBaseUrl}/billing/paymentMode`;return(0,n.openmrsFetch)(t,{method:"POST",body:e,headers:{"Content-Type":"application/json"}})},b=(e,t)=>{let i=`${n.restBaseUrl}/billing/paymentMode/${e}`;return(0,n.openmrsFetch)(i,{method:"POST",body:t,headers:{"Content-Type":"application/json"}})}},662(e,t,i){i.r(t),i.d(t,{default:()=>y});var l=i(5275),a=i.n(l),n=i(8395),r=i(6335),s=i(1752),m=i(9124),o=i(6199),c=i(6994),u=i(7661),d=i(2373),_=i(5084);let b="-esm-billing__billing-form__button___miCYp",p="-esm-billing__billing-form__sectionHeading___f9Y8R",g="-esm-billing__billing-form__controlSection___vBeep",y=({workspaceProps:{patientUuid:e,onMutate:t,billUuid:i},closeWorkspace:y})=>{let h="tablet"===(0,m.useLayoutType)(),{t:v}=(0,n.useTranslation)(),{mutate:f}=(0,r.useSWRConfig)(),{defaultCurrency:E,postBilledItems:N}=(0,m.useConfig)(),[S,I]=(0,l.useState)(!1),[C,T]=(0,l.useState)([]),{data:P,error:B,isLoading:M}=(0,o.ly)(),{bill:k,isLoading:w,error:q}=(0,o.DX)(i),{billableServices:L,isLoading:F,error:$}=(0,c.ly)(),x=!!i&&!!k,{activeVisit:U}=(0,m.useVisit)(e),D=(0,l.useMemo)(()=>x?(0,d.Zz)(k.lineItems):0,[x,k?.lineItems]),A=(0,l.useMemo)(()=>{if(!P)return[];if(!x)return P;let e=new Set((k.lineItems??[]).flatMap(e=>[e.billableService,e.item].filter(Boolean)));return P.filter(t=>t.name&&!e.has(t.name))},[P,x,k?.lineItems]),O=async()=>{if(S||0===C.length||x&&(F||$)||!(()=>{if(0===C.length)return!1;for(let e of C){if(e.availablePaymentMethods&&e.availablePaymentMethods.length>1&&!e.selectedPaymentMethod)return(0,m.showSnackbar)({title:v("validationError","Validation error"),subtitle:v("paymentMethodRequired","Payment method is required for all items"),kind:"error"}),!1;if(!e.quantity||e.quantity<1)return!1}return!0})())return;I(!0);let i=C.map(e=>({quantity:e.quantity,price:e.price,lineItemOrder:0,status:_.zk.PENDING,billableService:e.uuid}));try{if(x){let e=k.lineItems.map(e=>{let t=(0,u.e)(L,e.billableService||e.item);if(!t)throw Error(v("serviceResolutionError",'Could not resolve service "{{service}}"',{service:e.billableService||e.item}));return{uuid:e.uuid,quantity:e.quantity,price:e.price,lineItemOrder:e.lineItemOrder,status:e.status,billableService:t,priceName:e.priceName,priceUuid:e.priceUuid}}),t={cashPoint:k.cashPointUuid,cashier:k.cashier.uuid,lineItems:[...e,...i],patient:k.patientUuid,status:k.status,uuid:k.uuid};await (0,o.FR)(t)}else{let t={cashPoint:N.cashPoint,cashier:N.cashier,lineItems:i,payments:[],patient:e,status:_.ih.PENDING,...U?.uuid&&{visit:U.uuid}};await (0,o.Xn)(t)}y({discardUnsavedChanges:!0}),t?.(),f((0,o.Z5)(e)),(0,m.showSnackbar)({title:x?v("itemsAddedToBill","Items added to bill"):v("billProcessed","Bill processed"),subtitle:x?v("itemsAddedToBillSuccessfully","Items have been added to the bill successfully"):v("billProcessedSuccessfully","Bill processed successfully"),kind:"success"})}catch(e){(0,m.showSnackbar)({title:v("billProcessingError","Bill processing error"),kind:"error",subtitle:e instanceof Error?e.message:v("unknownBillError","An unexpected error occurred")})}finally{I(!1)}};return a().createElement(m.Workspace2,{title:x?v("addItemsToBill","Add items to bill"):v("addBillItems","Add bill items"),hasUnsavedChanges:C.length>0},a().createElement(s.Form,{className:"-esm-billing__billing-form__form___ECl9X",onSubmit:e=>{e.preventDefault(),O()}},a().createElement("div",{className:"-esm-billing__billing-form__grid___qXtbW"},i&&w?a().createElement(s.InlineLoading,{description:(0,m.getCoreTranslation)("loading")+"..."}):i&&q?a().createElement(s.InlineNotification,{kind:"error",lowContrast:!0,title:v("errorLoadingBill","Error loading bill"),subtitle:q?.message}):x&&$?a().createElement(s.InlineNotification,{kind:"error",lowContrast:!0,title:v("errorLoadingBillableServices","Error loading billable services"),subtitle:$?.message}):a().createElement(a().Fragment,null,x&&a().createElement("div",{className:"-esm-billing__billing-form__existingItemsContainer___cfzXU"},a().createElement("h4",{className:p},v("existingItems","Existing items")),k.lineItems.map(e=>a().createElement("div",{key:e.uuid,className:"-esm-billing__billing-form__existingItemRow___RMcu1"},a().createElement("span",{className:"-esm-billing__billing-form__existingItemName___md4qn"},e.billableService||e.item||e.display),a().createElement("span",{className:"-esm-billing__billing-form__existingItemDetail___uwWSZ"},e.quantity," x ",(0,d.aL)(e.price,E)),a().createElement("span",{className:"-esm-billing__billing-form__existingItemTotal___+vdv7"},(0,d.aL)(e.price*e.quantity,E)))),a().createElement("div",{className:"-esm-billing__billing-form__existingItemsSubtotal___abWhv"},a().createElement("strong",null,v("subtotal","Subtotal"),": ",(0,d.aL)(D,E)))),x&&a().createElement("h4",{className:p},v("newItems","New items")),M?a().createElement(s.InlineLoading,{description:(0,m.getCoreTranslation)("loading")+"..."}):B?a().createElement(s.InlineNotification,{kind:"error",lowContrast:!0,title:v("errorLoadingBillableServices","Error loading billable services"),subtitle:B?.message}):a().createElement(s.ComboBox,{id:"searchItems",onChange:({selectedItem:e})=>(e=>{if(!e)return;let t=C.find(t=>t.uuid===e.uuid);if(t){let i={...t,quantity:t.quantity+1};T([...C].map(t=>t.uuid===e.uuid?i:t));return}let i=e.servicePrices||[],l=0,a=null;if(1===i.length){let e=i[0].price;l="number"==typeof e?e:parseFloat(e),a=i[0]}T([...C,{uuid:e.uuid,display:e.name,quantity:1,price:l,billableService:e.uuid,status:_.zk.PENDING,lineItemOrder:0,selectedPaymentMethod:a,availablePaymentMethods:i}])})(e),itemToString:e=>e?.name||"",items:A,titleText:v("searchItems","Search items and services")})),C&&C.length>0&&a().createElement("div",{className:"-esm-billing__billing-form__selectedItemsContainer___Wfu4P"},a().createElement("h4",{className:p},v("selectedItems","Selected items")),C.map(e=>a().createElement("div",{key:e.uuid,className:"-esm-billing__billing-form__itemCard___JpDpA"},a().createElement("div",{className:"-esm-billing__billing-form__itemHeader___FwNiq"},a().createElement("span",{className:"-esm-billing__billing-form__itemName___jVlbU"},e.display),a().createElement(s.IconButton,{align:"top-end",kind:"ghost",label:v("remove","Remove"),onClick:()=>{var t;return t=e.uuid,void T([...C].filter(e=>e.uuid!==t))}},a().createElement(m.TrashCanIcon,{size:16}))),a().createElement("div",{className:"-esm-billing__billing-form__itemControls___zsB6m"},e.availablePaymentMethods&&e.availablePaymentMethods.length>1?a().createElement("div",{className:g},a().createElement("label",null,v("selectPaymentMethod","Select payment method")),a().createElement(s.ComboBox,{id:`payment-method-${e.uuid}`,items:e.availablePaymentMethods,itemToString:e=>e?`${e.name} - ${(0,d.aL)("number"==typeof e.price?e.price:parseFloat(e.price),E)}`:"",selectedItem:e.selectedPaymentMethod,onChange:({selectedItem:t})=>{var i;t&&(i=e.uuid,T([...C].map(e=>e.uuid===i?{...e,selectedPaymentMethod:t,price:"number"==typeof t.price?t.price:parseFloat(t.price),priceName:t.name,priceUuid:t.uuid}:e)))},placeholder:v("selectPaymentMethod","Select payment method"),titleText:""})):a().createElement("div",{className:g},a().createElement("label",null,v("unitPrice","Unit price")),a().createElement("span",{className:"-esm-billing__billing-form__priceDisplay___2f6BZ"},(0,d.aL)(e.price,E))),a().createElement("div",{className:g},a().createElement("label",null,v("quantity","Quantity")),a().createElement(s.NumberInput,{allowEmpty:!0,disableWheel:!0,hideSteppers:!0,id:`quantity-${e.uuid}`,invalid:!e.quantity||e.quantity<1,invalidText:v("quantityMustBeAtLeastOne","Quantity must be at least 1"),onChange:(t,{value:i})=>{var l,a;let n=parseFloat(String(i));l=e.uuid,a=isNaN(n)?0:n,T([...C].map(e=>e.uuid===l?{...e,quantity:a}:e))},value:e.quantity||""})),a().createElement("div",{className:g},a().createElement("label",null,v("total","Total")),a().createElement("span",{className:"-esm-billing__billing-form__totalDisplay___RJjsD"},(0,d.aL)(e.price*e.quantity,E)))))),a().createElement("div",{className:"-esm-billing__billing-form__grandTotal___eRlcF"},a().createElement("strong",null,v("grandTotal","Grand total"),":"," ",(0,d.aL)(D+(0,d.Zz)(C),E))))),a().createElement(s.ButtonSet,{className:h?"-esm-billing__billing-form__tablet___MG9Xm":"-esm-billing__billing-form__desktop___CL1X8"},a().createElement(s.Button,{className:b,kind:"secondary",disabled:S,onClick:()=>y({discardUnsavedChanges:!1})},v("discard","Discard")),a().createElement(s.Button,{className:b,kind:"primary",disabled:S||0===C.length||x&&F,type:"submit"},S?a().createElement(s.InlineLoading,{description:v("saving","Saving")+"..."}):v("saveAndClose","Save and close")))))}},2373(e,t,i){i.d(t,{Zz:()=>a,aL:()=>n,o_:()=>r});var l=i(9124);function a(e){return Array.isArray(e)?e.reduce((e,t)=>"number"==typeof t.price&&"number"==typeof t.quantity&&!0!==t.voided?e+t.price*t.quantity:e,0):0}let n=(e,t)=>{let i=window.i18next?.language?.substring(0,2)??"",l=new Intl.NumberFormat(i,{style:"currency",currency:t,minimumFractionDigits:2}).format(Math.abs(e));return e<0&&(l=`(${l})`),l},r=(e,t)=>{switch(e){case"male":return(0,l.getCoreTranslation)("male");case"female":return(0,l.getCoreTranslation)("female");case"other":return(0,l.getCoreTranslation)("other");case"unknown":return(0,l.getCoreTranslation)("unknown");default:return e}}},7661(e,t,i){i.d(t,{e:()=>l});let l=(e,t)=>{if(!e.length)return null;let i=e.find(e=>e.name===t);return i?.uuid??null}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([["1899"],{6994(e,t,i){i.d(t,{MH:()=>m,OS:()=>d,WJ:()=>o,bb:()=>c,cW:()=>_,j2:()=>u,ly:()=>s,vv:()=>b});var l=i(6335),a=i.n(l),n=i(9124),r=i(7003);let s=()=>{let e=`${r.B}billableService?v=custom:(uuid,name,shortName,serviceStatus,concept:(uuid,display,name:(name)),serviceType:(display,uuid),servicePrices:(uuid,name,price,paymentMode:(uuid,name)))`,{data:t,isLoading:i,isValidating:l,error:a,mutate:s}=(0,n.useOpenmrsFetchAll)(e);return{billableServices:t??[],isLoading:i,isValidating:l,error:a,mutate:s}};function m(){let{serviceTypes:e}=(0,n.useConfig)(),t=e.billableService,i=`${n.restBaseUrl}/concept/${t}?v=custom:(setMembers:(uuid,display))`,{data:l,error:r,isLoading:s}=a()(i,n.openmrsFetch);return{serviceTypes:l?.data.setMembers?[...l.data.setMembers].sort((e,t)=>e.display.localeCompare(t.display)):[],error:r,isLoadingServiceTypes:s}}let o=()=>{let e=`${r.B}paymentMode`,{data:t,error:i,isLoading:l,mutate:s}=a()(e,n.openmrsFetch);return{paymentModes:t?.data.results?[...t.data.results].sort((e,t)=>e.name.localeCompare(t.name)):[],error:i,isLoadingPaymentModes:l,mutate:s}};function c(e){let t=`${n.restBaseUrl}/conceptsearch?q=${e}`,{data:i,error:l,isLoading:r}=a()(e?t:null,n.openmrsFetch);return{searchResults:i?.data?.results??[],error:l,isSearching:r}}let u=async e=>{let t=`${r.B}api/billable-service`;return await (0,n.openmrsFetch)(t,{method:"POST",body:e,headers:{"Content-Type":"application/json"}})},d=async(e,t)=>{let i=`${r.B}billableService/${e}`;return await (0,n.openmrsFetch)(i,{method:"POST",body:t,headers:{"Content-Type":"application/json"}})},_=e=>{let t=`${n.restBaseUrl}/billing/paymentMode`;return(0,n.openmrsFetch)(t,{method:"POST",body:e,headers:{"Content-Type":"application/json"}})},b=(e,t)=>{let i=`${n.restBaseUrl}/billing/paymentMode/${e}`;return(0,n.openmrsFetch)(i,{method:"POST",body:t,headers:{"Content-Type":"application/json"}})}},662(e,t,i){i.r(t),i.d(t,{default:()=>y});var l=i(5275),a=i.n(l),n=i(8395),r=i(6335),s=i(1752),m=i(9124),o=i(6199),c=i(6994),u=i(7661),d=i(2373),_=i(5084);let b="-esm-billing__billing-form__button___miCYp",p="-esm-billing__billing-form__sectionHeading___f9Y8R",g="-esm-billing__billing-form__controlSection___vBeep",y=({workspaceProps:{patientUuid:e,onMutate:t,billUuid:i},closeWorkspace:y})=>{let h="tablet"===(0,m.useLayoutType)(),{t:v}=(0,n.useTranslation)(),{patient:f}=(0,m.usePatient)(e),{mutate:E}=(0,r.useSWRConfig)(),{defaultCurrency:N,postBilledItems:S}=(0,m.useConfig)(),[I,C]=(0,l.useState)(!1),[P,T]=(0,l.useState)([]),{data:B,error:M,isLoading:w}=(0,o.ly)(),{bill:k,isLoading:q,error:L}=(0,o.DX)(i),{billableServices:F,isLoading:x,error:$}=(0,c.ly)(),U=!!i&&!!k,{activeVisit:A}=(0,m.useVisit)(e),D=(0,l.useMemo)(()=>U?(0,d.Zz)(k.lineItems):0,[U,k?.lineItems]),O=(0,l.useMemo)(()=>{if(!B)return[];if(!U)return B;let e=new Set((k.lineItems??[]).flatMap(e=>[e.billableService,e.item].filter(Boolean)));return B.filter(t=>t.name&&!e.has(t.name))},[B,U,k?.lineItems]),R=async()=>{if(I||0===P.length||U&&(x||$)||!(()=>{if(0===P.length)return!1;for(let e of P){if(e.availablePaymentMethods&&e.availablePaymentMethods.length>1&&!e.selectedPaymentMethod)return(0,m.showSnackbar)({title:v("validationError","Validation error"),subtitle:v("paymentMethodRequired","Payment method is required for all items"),kind:"error"}),!1;if(!e.quantity||e.quantity<1)return!1}return!0})())return;C(!0);let i=P.map(e=>({quantity:e.quantity,price:e.price,lineItemOrder:0,status:_.zk.PENDING,billableService:e.uuid}));try{if(U){let e=k.lineItems.map(e=>{let t=(0,u.e)(F,e.billableService||e.item);if(!t)throw Error(v("serviceResolutionError",'Could not resolve service "{{service}}"',{service:e.billableService||e.item}));return{uuid:e.uuid,quantity:e.quantity,price:e.price,lineItemOrder:e.lineItemOrder,status:e.status,billableService:t,priceName:e.priceName,priceUuid:e.priceUuid}}),t={cashPoint:k.cashPointUuid,cashier:k.cashier.uuid,lineItems:[...e,...i],patient:k.patientUuid,status:k.status,uuid:k.uuid};await (0,o.FR)(t)}else{let t={cashPoint:S.cashPoint,cashier:S.cashier,lineItems:i,payments:[],patient:e,status:_.ih.PENDING,...A?.uuid&&{visit:A.uuid}};await (0,o.Xn)(t)}y({discardUnsavedChanges:!0}),t?.(),E((0,o.Z5)(e)),(0,m.showSnackbar)({title:U?v("itemsAddedToBill","Items added to bill"):v("billProcessed","Bill processed"),subtitle:U?v("itemsAddedToBillSuccessfully","Items have been added to the bill successfully"):v("billProcessedSuccessfully","Bill processed successfully"),kind:"success"})}catch(e){(0,m.showSnackbar)({title:v("billProcessingError","Bill processing error"),kind:"error",subtitle:e instanceof Error?e.message:v("unknownBillError","An unexpected error occurred")})}finally{C(!1)}};return a().createElement(m.Workspace2,{title:U?v("addItemsToBill","Add items to bill"):v("addBillItems","Add bill items"),hasUnsavedChanges:P.length>0},a().createElement(s.Form,{className:"-esm-billing__billing-form__form___ECl9X",onSubmit:e=>{e.preventDefault(),R()}},a().createElement("div",{className:"-esm-billing__billing-form__formContent___lxLnY"},h&&f&&e&&a().createElement(m.ExtensionSlot,{name:"patient-header-slot",state:{patient:f,patientUuid:e,hideActionsOverflow:!0}}),a().createElement("div",{className:"-esm-billing__billing-form__grid___qXtbW"},i&&q?a().createElement(s.InlineLoading,{description:(0,m.getCoreTranslation)("loading")+"..."}):i&&L?a().createElement(s.InlineNotification,{kind:"error",lowContrast:!0,title:v("errorLoadingBill","Error loading bill"),subtitle:L?.message}):U&&$?a().createElement(s.InlineNotification,{kind:"error",lowContrast:!0,title:v("errorLoadingBillableServices","Error loading billable services"),subtitle:$?.message}):a().createElement(a().Fragment,null,U&&a().createElement("div",{className:"-esm-billing__billing-form__existingItemsContainer___cfzXU"},a().createElement("h4",{className:p},v("existingItems","Existing items")),k.lineItems.map(e=>a().createElement("div",{key:e.uuid,className:"-esm-billing__billing-form__existingItemRow___RMcu1"},a().createElement("span",{className:"-esm-billing__billing-form__existingItemName___md4qn"},e.billableService||e.item||e.display),a().createElement("span",{className:"-esm-billing__billing-form__existingItemDetail___uwWSZ"},e.quantity," x ",(0,d.aL)(e.price,N)),a().createElement("span",{className:"-esm-billing__billing-form__existingItemTotal___+vdv7"},(0,d.aL)(e.price*e.quantity,N)))),a().createElement("div",{className:"-esm-billing__billing-form__existingItemsSubtotal___abWhv"},a().createElement("strong",null,v("subtotal","Subtotal"),": ",(0,d.aL)(D,N)))),U&&a().createElement("h4",{className:p},v("newItems","New items")),w?a().createElement(s.InlineLoading,{description:(0,m.getCoreTranslation)("loading")+"..."}):M?a().createElement(s.InlineNotification,{kind:"error",lowContrast:!0,title:v("errorLoadingBillableServices","Error loading billable services"),subtitle:M?.message}):a().createElement(s.ComboBox,{id:"searchItems",onChange:({selectedItem:e})=>(e=>{if(!e)return;let t=P.find(t=>t.uuid===e.uuid);if(t){let i={...t,quantity:t.quantity+1};T([...P].map(t=>t.uuid===e.uuid?i:t));return}let i=e.servicePrices||[],l=0,a=null;if(1===i.length){let e=i[0].price;l="number"==typeof e?e:parseFloat(e),a=i[0]}T([...P,{uuid:e.uuid,display:e.name,quantity:1,price:l,billableService:e.uuid,status:_.zk.PENDING,lineItemOrder:0,selectedPaymentMethod:a,availablePaymentMethods:i}])})(e),itemToString:e=>e?.name||"",items:O,titleText:v("searchItems","Search items and services")})),P&&P.length>0&&a().createElement("div",{className:"-esm-billing__billing-form__selectedItemsContainer___Wfu4P"},a().createElement("h4",{className:p},v("selectedItems","Selected items")),P.map(e=>a().createElement("div",{key:e.uuid,className:"-esm-billing__billing-form__itemCard___JpDpA"},a().createElement("div",{className:"-esm-billing__billing-form__itemHeader___FwNiq"},a().createElement("span",{className:"-esm-billing__billing-form__itemName___jVlbU"},e.display),a().createElement(s.IconButton,{align:"top-end",kind:"ghost",label:v("remove","Remove"),onClick:()=>{var t;return t=e.uuid,void T([...P].filter(e=>e.uuid!==t))}},a().createElement(m.TrashCanIcon,{size:16}))),a().createElement("div",{className:"-esm-billing__billing-form__itemControls___zsB6m"},e.availablePaymentMethods&&e.availablePaymentMethods.length>1?a().createElement("div",{className:g},a().createElement("label",null,v("selectPaymentMethod","Select payment method")),a().createElement(s.ComboBox,{id:`payment-method-${e.uuid}`,items:e.availablePaymentMethods,itemToString:e=>e?`${e.name} - ${(0,d.aL)("number"==typeof e.price?e.price:parseFloat(e.price),N)}`:"",selectedItem:e.selectedPaymentMethod,onChange:({selectedItem:t})=>{var i;t&&(i=e.uuid,T([...P].map(e=>e.uuid===i?{...e,selectedPaymentMethod:t,price:"number"==typeof t.price?t.price:parseFloat(t.price),priceName:t.name,priceUuid:t.uuid}:e)))},placeholder:v("selectPaymentMethod","Select payment method"),titleText:""})):a().createElement("div",{className:g},a().createElement("label",null,v("unitPrice","Unit price")),a().createElement("span",{className:"-esm-billing__billing-form__priceDisplay___2f6BZ"},(0,d.aL)(e.price,N))),a().createElement("div",{className:g},a().createElement("label",null,v("quantity","Quantity")),a().createElement(s.NumberInput,{allowEmpty:!0,disableWheel:!0,hideSteppers:!0,id:`quantity-${e.uuid}`,invalid:!e.quantity||e.quantity<1,invalidText:v("quantityMustBeAtLeastOne","Quantity must be at least 1"),onChange:(t,{value:i})=>{var l,a;let n=parseFloat(String(i));l=e.uuid,a=isNaN(n)?0:n,T([...P].map(e=>e.uuid===l?{...e,quantity:a}:e))},value:e.quantity||""})),a().createElement("div",{className:g},a().createElement("label",null,v("total","Total")),a().createElement("span",{className:"-esm-billing__billing-form__totalDisplay___RJjsD"},(0,d.aL)(e.price*e.quantity,N)))))),a().createElement("div",{className:"-esm-billing__billing-form__grandTotal___eRlcF"},a().createElement("strong",null,v("grandTotal","Grand total"),":"," ",(0,d.aL)(D+(0,d.Zz)(P),N)))))),a().createElement(s.ButtonSet,{className:h?"-esm-billing__billing-form__tablet___MG9Xm":"-esm-billing__billing-form__desktop___CL1X8"},a().createElement(s.Button,{className:b,kind:"secondary",disabled:I,onClick:()=>y({discardUnsavedChanges:!1})},v("discard","Discard")),a().createElement(s.Button,{className:b,kind:"primary",disabled:I||0===P.length||U&&x,type:"submit"},I?a().createElement(s.InlineLoading,{description:v("saving","Saving")+"..."}):v("saveAndClose","Save and close")))))}},2373(e,t,i){i.d(t,{Zz:()=>a,aL:()=>n,o_:()=>r});var l=i(9124);function a(e){return Array.isArray(e)?e.reduce((e,t)=>"number"==typeof t.price&&"number"==typeof t.quantity&&!0!==t.voided?e+t.price*t.quantity:e,0):0}let n=(e,t)=>{let i=window.i18next?.language?.substring(0,2)??"",l=new Intl.NumberFormat(i,{style:"currency",currency:t,minimumFractionDigits:2}).format(Math.abs(e));return e<0&&(l=`(${l})`),l},r=(e,t)=>{switch(e){case"male":return(0,l.getCoreTranslation)("male");case"female":return(0,l.getCoreTranslation)("female");case"other":return(0,l.getCoreTranslation)("other");case"unknown":return(0,l.getCoreTranslation)("unknown");default:return e}}},7661(e,t,i){i.d(t,{e:()=>l});let l=(e,t)=>{if(!e.length)return null;let i=e.find(e=>e.name===t);return i?.uuid??null}}}]);
|
package/dist/1899.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1899.js","sources":["webpack://@openmrs/esm-billing-app/./src/billable-services/billable-service.resource.ts","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss?2862","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.workspace.tsx","webpack://@openmrs/esm-billing-app/./src/helpers/functions.ts","webpack://@openmrs/esm-billing-app/./src/invoice/payments/utils.ts"],"names":["useBillableServices","url","apiBasePath","data","isLoading","isValidating","error","mutate","useOpenmrsFetchAll","useServiceTypes","serviceTypes","useConfig","serviceConceptUuid","restBaseUrl","useSWR","openmrsFetch","a","b","usePaymentModes","useConceptsSearch","conceptToLookup","conditionsSearchUrl","createBillableService","payload","updateBillableService","uuid","createPaymentMode","updatePaymentMode","patientUuid","onMutate","billUuid","closeWorkspace","isTablet","useLayoutType","t","useTranslation","swrMutate","useSWRConfig","defaultCurrency","postBilledItems","isSubmitting","setIsSubmitting","useState","selectedItems","setSelectedItems","bill","isLoadingBill","billError","useBill","billableServices","isLoadingBillableServices","billableServicesError","useBillableServicesList","isEditMode","activeVisit","useVisit","existingItemsTotal","useMemo","calculateTotalAmount","availableBillableItems","existingNames","Set","lineItems","lineItem","Boolean","item","postBillItems","validateSelectedItems","showSnackbar","newLineItems","BillLineItemStatus","existingLineItems","serviceUuid","getBillableServiceUuid","Error","updateBillItems","BillStatus","processBillItems","patientPaymentStatusCacheKey","err","Workspace2","Form","event","InlineLoading","getCoreTranslation","InlineNotification","convertToCurrency","ComboBox","selectBillableItem","existingItem","selectedItem","updatedItem","availablePaymentMethods","defaultPrice","selectedPaymentMethod","price","parseFloat","IconButton","TrashCanIcon","method","itemUuid","paymentMethod","NumberInput","_","value","quantity","number","String","isNaN","ButtonSet","Button","Array","totalAmount","amountToConvert","currencyType","locale","window","formattedAmount","formatter","Intl","Math","getGender","gender","serviceName","service"],"mappings":"2QAcO,IAAMA,EAAsB,KACjC,IAAMC,EAAM,GAAGC,EAAAA,CAAWA,oLAA0B,CAC9C,CAAEC,KAAAA,CAAI,CAAEC,UAAAA,CAAS,CAAEC,aAAAA,CAAY,CAAEC,MAAAA,CAAK,CAAEC,OAAAA,CAAM,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAoCP,GAE7F,MAAO,CACL,iBAAkBE,GAAQ,EAAE,CAC5BC,UAAAA,EACAC,aAAAA,EACAC,MAAAA,EACAC,OAAAA,CACF,CACF,EAEO,SAASE,IACd,GAAM,CAAEC,aAAAA,CAAY,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,SAAAA,AAAAA,IACnBC,EAAqBF,EAAa,eAAe,CACjDT,EAAM,CAAC,EAAEY,EAAAA,WAAWA,CAAC,SAAS,EAAED,EAAmB,qCAAqC,CAAC,CAEzF,CAAET,KAAAA,CAAI,CAAEG,MAAAA,CAAK,CAAEF,UAAAA,CAAS,CAAE,CAAGU,IACjCb,EACAc,EAAAA,YAAYA,EAOd,MAAO,CACL,aALyBZ,GAAM,KAAK,WAClC,IAAIA,EAAK,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAACa,EAAGC,IAAMD,EAAE,OAAO,CAAC,aAAa,CAACC,EAAE,OAAO,GAC1E,EAAE,CAIJX,MAAAA,EACA,sBAAuBF,CACzB,CACF,CAOO,IAAMc,EAAkB,KAC7B,IAAMjB,EAAM,CAAC,EAAEC,EAAAA,CAAWA,CAAC,WAAW,CAAC,CAEjC,CAAEC,KAAAA,CAAI,CAAEG,MAAAA,CAAK,CAAEF,UAAAA,CAAS,CAAEG,OAAAA,CAAM,CAAE,CAAGO,IAA6Cb,EAAKc,EAAAA,YAAYA,EAKzG,MAAO,CAC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AK,SACH,MAAOA,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAmB,SAC5B,KAAK,QACH,MAAOA,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAmB,QAC5B,KAAK,UACH,MAAOA,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAmB,UAC5B,SACE,OAAOsC,CACX,CACF,C,+BC9DO,IAAMjD,EAAyB,CAACxB,EAA0C0E,KAC/E,GAAI,CAAC1E,EAAiB,MAAM,CAC1B,OAAO,KAET,IAAM2E,EAAU3E,EAAiB,IAAI,CAAC,AAAC2E,GAAYA,EAAQ,IAAI,GAAKD,GACpE,OAAOC,GAAS,MAAQ,IAC1B,C"}
|
|
1
|
+
{"version":3,"file":"1899.js","sources":["webpack://@openmrs/esm-billing-app/./src/billable-services/billable-service.resource.ts","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss?2862","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.workspace.tsx","webpack://@openmrs/esm-billing-app/./src/helpers/functions.ts","webpack://@openmrs/esm-billing-app/./src/invoice/payments/utils.ts"],"names":["useBillableServices","url","apiBasePath","data","isLoading","isValidating","error","mutate","useOpenmrsFetchAll","useServiceTypes","serviceTypes","useConfig","serviceConceptUuid","restBaseUrl","useSWR","openmrsFetch","a","b","usePaymentModes","useConceptsSearch","conceptToLookup","conditionsSearchUrl","createBillableService","payload","updateBillableService","uuid","createPaymentMode","updatePaymentMode","patientUuid","onMutate","billUuid","closeWorkspace","isTablet","useLayoutType","t","useTranslation","patient","usePatient","swrMutate","useSWRConfig","defaultCurrency","postBilledItems","isSubmitting","setIsSubmitting","useState","selectedItems","setSelectedItems","bill","isLoadingBill","billError","useBill","billableServices","isLoadingBillableServices","billableServicesError","useBillableServicesList","isEditMode","activeVisit","useVisit","existingItemsTotal","useMemo","calculateTotalAmount","availableBillableItems","existingNames","Set","lineItems","lineItem","Boolean","item","postBillItems","validateSelectedItems","showSnackbar","newLineItems","BillLineItemStatus","existingLineItems","serviceUuid","getBillableServiceUuid","Error","updateBillItems","BillStatus","processBillItems","patientPaymentStatusCacheKey","err","Workspace2","Form","event","ExtensionSlot","InlineLoading","getCoreTranslation","InlineNotification","convertToCurrency","ComboBox","selectBillableItem","existingItem","selectedItem","updatedItem","availablePaymentMethods","defaultPrice","selectedPaymentMethod","price","parseFloat","IconButton","TrashCanIcon","method","itemUuid","paymentMethod","NumberInput","_","value","quantity","number","String","isNaN","ButtonSet","Button","Array","totalAmount","amountToConvert","currencyType","locale","window","formattedAmount","formatter","Intl","Math","getGender","gender","serviceName","service"],"mappings":"2QAcO,IAAMA,EAAsB,KACjC,IAAMC,EAAM,GAAGC,EAAAA,CAAWA,oLAA0B,CAC9C,CAAEC,KAAAA,CAAI,CAAEC,UAAAA,CAAS,CAAEC,aAAAA,CAAY,CAAEC,MAAAA,CAAK,CAAEC,OAAAA,CAAM,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAoCP,GAE7F,MAAO,CACL,iBAAkBE,GAAQ,EAAE,CAC5BC,UAAAA,EACAC,aAAAA,EACAC,MAAAA,EACAC,OAAAA,CACF,CACF,EAEO,SAASE,IACd,GAAM,CAAEC,aAAAA,CAAY,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,SAAAA,AAAAA,IACnBC,EAAqBF,EAAa,eAAe,CACjDT,EAAM,CAAC,EAAEY,EAAAA,WAAWA,CAAC,SAAS,EAAED,EAAmB,qCAAqC,CAAC,CAEzF,CAAET,KAAAA,CAAI,CAAEG,MAAAA,CAAK,CAAEF,UAAAA,CAAS,CAAE,CAAGU,IACjCb,EACAc,EAAAA,YAAYA,EAOd,MAAO,CACL,aALyBZ,GAAM,KAAK,WAClC,IAAIA,EAAK,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAACa,EAAGC,IAAMD,EAAE,OAAO,CAAC,aAAa,CAACC,EAAE,OAAO,GAC1E,EAAE,CAIJX,MAAAA,EACA,sBAAuBF,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AQ,CAE1CgD,EACN,GACH,CACN,CAEO,IAAM1B,EAAoB,CAAC2B,EAAyBC,KACzD,IAAMC,EAASC,OAAO,OAAO,EAAE,UAAU,UAAU,EAAG,IAAM,GAOxDC,EAAkBC,AANJ,IAAIC,KAAK,YAAY,CAACJ,EAAQ,CAC9C,MAAO,WACP,SAAUD,EACV,sBAAuB,CACzB,GAEgC,MAAM,CAACM,KAAK,GAAG,CAACP,IAMhD,OAJIA,EAAkB,GACpBI,CAAAA,EAAkB,CAAC,CAAC,EAAEA,EAAgB,CAAC,CAAC,AAAD,EAGlCA,CACT,EAEaI,EAAY,CAACC,EAAgB3F,KACxC,OAAQ2F,GACN,IAAK,OACH,MAAOtC,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAmB,OAC5B,KAAK,SACH,MAAOA,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAmB,SAC5B,KAAK,QACH,MAAOA,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAmB,QAC5B,KAAK,UACH,MAAOA,AAAAA,GAAAA,EAAAA,kBAAAA,AAAAA,EAAmB,UAC5B,SACE,OAAOsC,CACX,CACF,C,+BC9DO,IAAMlD,EAAyB,CAACxB,EAA0C2E,KAC/E,GAAI,CAAC3E,EAAiB,MAAM,CAC1B,OAAO,KAET,IAAM4E,EAAU5E,EAAiB,IAAI,CAAC,AAAC4E,GAAYA,EAAQ,IAAI,GAAKD,GACpE,OAAOC,GAAS,MAAQ,IAC1B,C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var _openmrs_esm_billing_app;!function(){var e="u">typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw Error("@openmrs/esm-billing-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var t=e._FEDERATION_RUNTIME_CORE_FROM;t&&t.version&&"2.8"!==String(t.version).split(".").slice(0,2).join(".")&&console.warn("@openmrs/esm-billing-app was built against Module Federation 2.8.x but the app shell provides "+t.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{var e,t,r,n,o,i={2185(e,t,r){"use strict";var n,o,i,a,s,l,u,p,c,d,f,h,m=r(7032),g=r.n(m);let b=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),y={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){let e=(e,t,r)=>{e&&e[t]&&(e[t]=r)},t=(e,t,r)=>{let n=r();Array.isArray(n)?(null!=e[t]||(e[t]=[]),e[t].push(...n)):"object"==typeof n&&null!==n&&(null!=e[t]||(e[t]={}),Object.assign(e[t],n))},m=(e,t,r)=>{null!=e[t]||(e[t]=r())},S=null!=(n=null==(l=r.remotesLoadingData)?void 0:l.chunkMapping)?n:{},E=null!=(o=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?o:{},M=null!=(i=null==(p=r.initializeSharingData)?void 0:p.scopeToSharingDataMapping)?i:{},O=null!=(a=null==(c=r.consumesLoadingData)?void 0:c.chunkMapping)?a:{},_=null!=(s=null==(d=r.consumesLoadingData)?void 0:d.moduleIdToConsumeDataMapping)?s:{},v={},R=[],T={},w=null==(f=r.initializeExposesData)?void 0:f.shareScope;for(let e in g())r.federation[e]=g()[e];m(r.federation,"consumesLoadingModuleToHandlerMapping",()=>{let e={};for(let[t,r]of Object.entries(_))e[t]={getter:r.fallback,shareInfo:{shareConfig:{fixedDependencies:!1,requiredVersion:r.requiredVersion,strictVersion:r.strictVersion,singleton:r.singleton,eager:r.eager},scope:[r.shareScope]},shareKey:r.shareKey};return e}),m(r.federation,"initOptions",()=>({})),m(r.federation.initOptions,"name",()=>"@openmrs/esm-billing-app"),m(r.federation.initOptions,"shareStrategy",()=>"version-first"),m(r.federation.initOptions,"shared",()=>{let e={};for(let[t,r]of Object.entries(M))for(let n of r)if("object"==typeof n&&null!==n){let{name:r,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:o,scope:[t],shareConfig:p,get:i};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(y).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>b),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>y),m(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{let e={};for(let[t,r]of Object.entries(E))e[t]=[r.shareScope,r.name,r.externalModuleId,r.remoteName];return e}),m(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>r),t(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{let e={};for(let[t,r]of Object.entries(E)){let n=y[r.remoteName];n&&(e[t]=n)}return e}),e(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),e(r.f,"remotes",(e,t)=>r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:S,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})),e(r.f,"consumes",(e,t)=>r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:O,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:v,webpackRequire:r})),e(r,"I",(e,t)=>r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:R,initTokens:T,webpackRequire:r})),e(r,"initContainer",(e,t,n)=>r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:w,webpackRequire:r})),e(r,"getContainer",(e,t)=>{var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(h=r.consumesLoadingData)?void 0:h.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:v,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},1760(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},9369(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},1222(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(9369);let n=r(1146),o=r(3054),i={...o.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=o.helpers.share,s=o.helpers.utils;t.default={global:i,share:a,utils:s},t.global=i,t.share=a,t.utils=s},7201(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(9369);let n=r(1146),o=r(3054),i=r(9170);function a(e){let t=new((0,o.getGlobalFederationConstructor)()||o.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,o.setGlobalFederationInstance)(t),t}let s=null;(0,o.setGlobalFederationConstructor)(o.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return o.Module}}),t.ModuleFederation=o.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?o.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return o.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return o.getRemoteInfo}}),t.init=function(e){let t=n.getGlobalFederationInstance(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),s||(s=t),t):s=a(r)},t.loadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.loadShare=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return o.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerShared.apply(s,e)}},1146(e,t,r){r(9369);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@openmrs/esm-billing-app:1.4.1-pre.2123";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},1326(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3026(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},9592(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},5769(e,t,r){let n=r(3026),o=r(9671),i=r(9864),a=r(9296),s=r(2742);t.consumes=function(e){o.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:p,moduleToHandlerMapping:c}=e;n.attachShareScopeMap(u),u.o(p,t)&&p[t].forEach(e=>{if(u.o(l,e))return r.push(l[e]);let t=t=>{l[e]=0,u.m[e]=r=>{delete u.c[e];let n=t(),{shareInfo:o}=c[e];if(o?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=o.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let o=u.federation.instance;if(!o)throw Error("Federation instance not found!");let{shareKey:p,getter:d,shareInfo:f,treeShakingGetter:h}=c[e],m=i.getUsedExports(u,p),g={...f};Array.isArray(g.scope)&&Array.isArray(g.scope[0])&&(g.scope=g.scope[0]),m&&(g.treeShaking={usedExports:m,useIn:[o.options.name]});let b=o.loadShare(p,{customShareInfo:g}).then(e=>{if(!1===e){if("function"!=typeof d)throw Error(s.getShortErrorMsg(a.RUNTIME_012,{[a.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:p}));return h?.()||d()}return e});b.then?r.push(l[e]=b.then(t).catch(n)):t(b)}catch(e){n(e)}})}},9296(e,t){t.RUNTIME_012="RUNTIME-012"},2742(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&o.push(`Original Error Message:
|
|
1
|
+
var _openmrs_esm_billing_app;!function(){var e="u">typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw Error("@openmrs/esm-billing-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var t=e._FEDERATION_RUNTIME_CORE_FROM;t&&t.version&&"2.8"!==String(t.version).split(".").slice(0,2).join(".")&&console.warn("@openmrs/esm-billing-app was built against Module Federation 2.8.x but the app shell provides "+t.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{var e,t,r,n,o,i={2185(e,t,r){"use strict";var n,o,i,a,s,l,u,p,c,d,f,h,m=r(7032),g=r.n(m);let b=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),y={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){let e=(e,t,r)=>{e&&e[t]&&(e[t]=r)},t=(e,t,r)=>{let n=r();Array.isArray(n)?(null!=e[t]||(e[t]=[]),e[t].push(...n)):"object"==typeof n&&null!==n&&(null!=e[t]||(e[t]={}),Object.assign(e[t],n))},m=(e,t,r)=>{null!=e[t]||(e[t]=r())},S=null!=(n=null==(l=r.remotesLoadingData)?void 0:l.chunkMapping)?n:{},E=null!=(o=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?o:{},M=null!=(i=null==(p=r.initializeSharingData)?void 0:p.scopeToSharingDataMapping)?i:{},O=null!=(a=null==(c=r.consumesLoadingData)?void 0:c.chunkMapping)?a:{},_=null!=(s=null==(d=r.consumesLoadingData)?void 0:d.moduleIdToConsumeDataMapping)?s:{},v={},R=[],T={},w=null==(f=r.initializeExposesData)?void 0:f.shareScope;for(let e in g())r.federation[e]=g()[e];m(r.federation,"consumesLoadingModuleToHandlerMapping",()=>{let e={};for(let[t,r]of Object.entries(_))e[t]={getter:r.fallback,shareInfo:{shareConfig:{fixedDependencies:!1,requiredVersion:r.requiredVersion,strictVersion:r.strictVersion,singleton:r.singleton,eager:r.eager},scope:[r.shareScope]},shareKey:r.shareKey};return e}),m(r.federation,"initOptions",()=>({})),m(r.federation.initOptions,"name",()=>"@openmrs/esm-billing-app"),m(r.federation.initOptions,"shareStrategy",()=>"version-first"),m(r.federation.initOptions,"shared",()=>{let e={};for(let[t,r]of Object.entries(M))for(let n of r)if("object"==typeof n&&null!==n){let{name:r,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:o,scope:[t],shareConfig:p,get:i};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(y).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>b),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>y),m(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{let e={};for(let[t,r]of Object.entries(E))e[t]=[r.shareScope,r.name,r.externalModuleId,r.remoteName];return e}),m(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>r),t(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{let e={};for(let[t,r]of Object.entries(E)){let n=y[r.remoteName];n&&(e[t]=n)}return e}),e(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),e(r.f,"remotes",(e,t)=>r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:S,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})),e(r.f,"consumes",(e,t)=>r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:O,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:v,webpackRequire:r})),e(r,"I",(e,t)=>r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:R,initTokens:T,webpackRequire:r})),e(r,"initContainer",(e,t,n)=>r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:w,webpackRequire:r})),e(r,"getContainer",(e,t)=>{var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(h=r.consumesLoadingData)?void 0:h.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:v,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},1760(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},9369(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},1222(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(9369);let n=r(1146),o=r(3054),i={...o.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=o.helpers.share,s=o.helpers.utils;t.default={global:i,share:a,utils:s},t.global=i,t.share=a,t.utils=s},7201(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(9369);let n=r(1146),o=r(3054),i=r(9170);function a(e){let t=new((0,o.getGlobalFederationConstructor)()||o.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,o.setGlobalFederationInstance)(t),t}let s=null;(0,o.setGlobalFederationConstructor)(o.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return o.Module}}),t.ModuleFederation=o.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?o.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return o.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return o.getRemoteInfo}}),t.init=function(e){let t=n.getGlobalFederationInstance(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),s||(s=t),t):s=a(r)},t.loadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.loadShare=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return o.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerShared.apply(s,e)}},1146(e,t,r){r(9369);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@openmrs/esm-billing-app:1.4.1-pre.2143";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},1326(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3026(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},9592(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},5769(e,t,r){let n=r(3026),o=r(9671),i=r(9864),a=r(9296),s=r(2742);t.consumes=function(e){o.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:p,moduleToHandlerMapping:c}=e;n.attachShareScopeMap(u),u.o(p,t)&&p[t].forEach(e=>{if(u.o(l,e))return r.push(l[e]);let t=t=>{l[e]=0,u.m[e]=r=>{delete u.c[e];let n=t(),{shareInfo:o}=c[e];if(o?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=o.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let o=u.federation.instance;if(!o)throw Error("Federation instance not found!");let{shareKey:p,getter:d,shareInfo:f,treeShakingGetter:h}=c[e],m=i.getUsedExports(u,p),g={...f};Array.isArray(g.scope)&&Array.isArray(g.scope[0])&&(g.scope=g.scope[0]),m&&(g.treeShaking={usedExports:m,useIn:[o.options.name]});let b=o.loadShare(p,{customShareInfo:g}).then(e=>{if(!1===e){if("function"!=typeof d)throw Error(s.getShortErrorMsg(a.RUNTIME_012,{[a.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:p}));return h?.()||d()}return e});b.then?r.push(l[e]=b.then(t).catch(n)):t(b)}catch(e){n(e)}})}},9296(e,t){t.RUNTIME_012="RUNTIME-012"},2742(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&o.push(`Original Error Message:
|
|
2
2
|
${n}`),o.join("\n")}},2176(e,t){t.getSharedFallbackGetter=({shareKey:e,factory:t,version:r,webpackRequire:n,libraryType:o="global"})=>{let{runtime:i,instance:a,bundlerRuntime:s,sharedFallback:l}=n.federation;if(!l)return t;let u=l[e];if(!u)return t;let p=r?u.find(e=>e[1]===r):u[0];if(!p)throw Error(`No fallback item found for shareKey: ${e} and version: ${r}`);return()=>i.getRemoteEntry({origin:n.federation.instance,remoteInfo:{name:p[2],entry:`${n.p}${p[0]}`,type:o,entryGlobalName:p[2],shareScope:"default"}}).then(t=>{if(!t)throw Error(`Failed to load fallback entry for shareKey: ${e} and version: ${r}`);return t.init(n.federation.instance,s).then(()=>t.get())})}},9864(e,t){t.getUsedExports=function(e,t){let r=e.federation.usedExports;if(r)return r[t]}},7032(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let n=r(1326),o=r(3026),i=r(5313),a=r(5769),s=r(2614),l=r(8066),u=r(8593),p=r(6554),c=r(2176),d=r(7201);d=n.__toESM(d);let f={remotes:i.remotes,consumes:a.consumes,I:s.initializeSharing,S:{},installInitialConsumes:l.installInitialConsumes,initContainerEntry:u.initContainerEntry,init:p.init,getSharedFallbackGetter:c.getSharedFallbackGetter},h={runtime:d,instance:void 0,initOptions:void 0,bundlerRuntime:f,attachShareScopeMap:o.attachShareScopeMap,bundlerRuntimeOptions:{}},m=h.instance,g=h.initOptions,b=h.bundlerRuntimeOptions;t.attachShareScopeMap=o.attachShareScopeMap,t.bundlerRuntime=f,t.bundlerRuntimeOptions=b,t.default=h,t.initOptions=g,t.instance=m,Object.defineProperty(t,"runtime",{enumerable:!0,get:function(){return d}})},6554(e,t,r){let n=r(1326),o=r(7201),i=r(1222);i=n.__toESM(i),t.init=function({webpackRequire:e}){let{initOptions:t,runtime:n,sharedFallback:a,bundlerRuntime:s,libraryType:l}=e.federation;if(!t)throw Error("initOptions is required!");return t.plugins||=[],t.plugins.push({name:"tree-shake-plugin",beforeInit(t){let{userOptions:n,origin:u,options:p}=t,c=n.version||p.version;if(!a)return t;let d=n.shared||{},f=[];Object.keys(d).forEach(t=>{(Array.isArray(d[t])?d[t]:[d[t]]).forEach(r=>{f.push([t,r]),"get"in r&&(r.treeShaking||={},r.treeShaking.get=r.get,r.get=s.getSharedFallbackGetter({shareKey:t,factory:r.get,webpackRequire:e,libraryType:l,version:r.version}))})});let h=i.default.global.getGlobalSnapshotInfoByModuleInfo({name:u.name,version:c});return h&&"shared"in h&&(Object.keys(p.shared||{}).forEach(e=>{p.shared[e].forEach(t=>{f.push([e,t])})}),f.forEach(([e,t])=>{((e,t)=>{let n=h.shared.find(t=>t.sharedName===e);if(!n)return;let{treeShaking:i}=t;if(!i)return;let{secondarySharedTreeShakingName:a,secondarySharedTreeShakingEntry:s,treeShakingStatus:p}=n;i.status!==p&&(i.status=p,s&&l&&a&&(i.get=async()=>{let e=await (0,o.getRemoteEntry)({origin:u,remoteInfo:{name:a,entry:s,type:l,entryGlobalName:a,shareScope:"default"}});return await e.init(u,r.federation.bundlerRuntime),e.get()}))})(e,t)})),t}}),n.init(t)}},8593(e,t){t.initContainerEntry=function(e){let{webpackRequire:t,shareScope:r,initScope:n,shareScopeKey:o,remoteEntryInitOptions:i}=e;if(!t.S||!t.federation||!t.federation.instance||!t.federation.initOptions)return;let a=t.federation.instance;a.initOptions({name:t.federation.initOptions.name,remotes:[],...i});let s=i?.shareScopeKeys,l=i?.shareScopeMap;if(o&&"string"!=typeof o)o.forEach(e=>{if(!s||!l)return void a.initShareScopeMap(e,r,{hostShareScopeMap:i?.shareScopeMap||{}});l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:i?.shareScopeMap||{}})});else{let e=o||"default";Array.isArray(s)?s.forEach(e=>{l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:i?.shareScopeMap||{}})}):a.initShareScopeMap(e,r,{hostShareScopeMap:i?.shareScopeMap||{}})}return(t.federation.attachShareScopeMap&&t.federation.attachShareScopeMap(t),Array.isArray(o))?t.federation.initOptions.shared?t.I(o,n):Promise.all(o.map(e=>t.I(e,n))).then(()=>!0):t.I(o||"default",n)}},2614(e,t,r){let n=r(3026),o=r(9592);t.initializeSharing=function({shareScopeName:e,webpackRequire:t,initPromises:r,initTokens:i,initScope:a}){let s=Array.isArray(e)?e:[e];var l=[],u=function(s){a||(a=[]);let l=t.federation.instance;var u=i[s];if(u||(u=i[s]={from:l.name}),a.indexOf(u)>=0)return;a.push(u);let p=r[s];if(p)return p;var c=r=>{var n=e=>{let t;return t="Initialization of sharing external failed: "+e,"u">typeof console&&console.warn&&console.warn(t)};try{var o=t(r);if(!o)return;var i=r=>r&&r.init&&r.init(t.S[s],a,{shareScopeMap:t.S||{},shareScopeKeys:e});if(o.then)return d.push(o.then(i,n));var l=i(o);if(l&&"boolean"!=typeof l&&l.then)return d.push(l.catch(n))}catch(e){n(e)}};let d=l.initializeSharing(s,{strategy:l.options.shareStrategy,initScope:a,from:"build"});n.attachShareScopeMap(t);let f=t.federation.bundlerRuntimeOptions.remotes;return(f&&Object.keys(f.idToRemoteMap).forEach(e=>{let t=f.idToRemoteMap[e],r=f.idToExternalAndNameMapping[e][2];if(t.length>1)c(r);else if(1===t.length){let e=t[0];o.FEDERATION_SUPPORTED_TYPES.includes(e.externalType)||c(r)}}),d.length)?r[s]=Promise.all(d).then(()=>r[s]=!0):r[s]=!0};return s.forEach(e=>{l.push(u(e))}),Promise.all(l).then(()=>!0)}},8066(e,t,r){let n=r(9671),o=r(9864);t.installInitialConsumes=function(e){n.updateConsumeOptions(e);let{moduleToHandlerMapping:t,webpackRequire:r,installedModules:i,initialConsumes:a,asyncLoad:s}=e,l=[];a.forEach(e=>{l.push([e,()=>(function(e){let{moduleId:t,moduleToHandlerMapping:r,webpackRequire:n,asyncLoad:i}=e,a=n.federation.instance;if(!a)throw Error("Federation instance not found!");let{shareKey:s,shareInfo:l}=r[t];try{let e=o.getUsedExports(n,s),t={...l};if(e&&(t.treeShaking={usedExports:e,useIn:[a.options.name]}),i)return a.loadShare(s,{customShareInfo:t});return a.loadShareSync(s,{customShareInfo:t})}catch(e){throw console.error('loadShareSync failed! The function should not be called unless you set "eager:true". If you do not set it, and encounter this issue, you can check whether an async boundary is implemented.'),console.error("The original error message is as follows: "),e}})({moduleId:e,moduleToHandlerMapping:t,webpackRequire:r,asyncLoad:s})])});let u=(e,n)=>{r.m[e]=o=>{i[e]=0,delete r.c[e];let a=n();if("function"!=typeof a)throw Error(`Shared module is not available for eager consumption: ${e}`);let s=a(),{shareInfo:l}=t[e];if(l?.shareConfig?.layer&&s&&"object"==typeof s)try{s.hasOwnProperty("layer")&&void 0!==s.layer||(s.layer=l.shareConfig.layer)}catch(e){}o.exports=s}};if(s)return Promise.all(l.map(async([e,t])=>{let r=await t();u(e,()=>r)}));l.forEach(([e,t])=>{u(e,t)})}},5313(e,t,r){r(1326);let n=r(3026),o=r(9592),i=r(9671),a=r(1853);t.remotes=function(e){i.updateRemoteOptions(e);let{chunkId:t,promises:r,webpackRequire:s,chunkMapping:l,idToExternalAndNameMapping:u,idToRemoteMap:p}=e;n.attachShareScopeMap(s),s.o(l,t)&&l[t].forEach(e=>{let t=s.R;t||(t=[]);let n=u[e],i=p[e]||[];if(t.indexOf(n)>=0)return;if(t.push(n),n.p)return r.push(n.p);let l=t=>{t||(t=Error("Container missing")),"string"==typeof t.message&&(t.message+=`
|
|
3
3
|
while loading "${n[1]}" from ${n[2]}`),s.m[e]=()=>{throw t},n.p=0},c=(e,t,o,i,a,s)=>{try{let u=e(t,o);if(!u||!u.then)return a(u,i,s);{let e=u.then(e=>a(e,i),l);if(!s)return e;r.push(n.p=e)}}catch(e){l(e)}};var d=(e,r,o)=>c(r.get,n[1],t,0,f,o),f=t=>{n.p=1,s.m[e]=e=>{e.exports=t()}};1===i.length&&o.FEDERATION_SUPPORTED_TYPES.includes(i[0].externalType)&&i[0].name?c(()=>{try{let e=(0,a.decodeName)(i[0].name,a.ENCODE_NAME_PREFIX)+n[1].slice(1),t=s.federation.instance,r=()=>s.federation.instance.loadRemote(e,{loadFactory:!1,from:"build"});if("version-first"===t.options.shareStrategy){let e=Array.isArray(n[0])?n[0]:[n[0]];return Promise.all(e.map(e=>t.sharedHandler.initializeSharing(e))).then(()=>r())}return r()}catch(e){l(e)}},n[2],0,0,f,1):c(s,n[2],0,0,(e,t,r)=>e?c(s.I,n[0],0,e,d,r):l(),1)})}},9671(e,t){t.updateConsumeOptions=function(e){let{webpackRequire:t,moduleToHandlerMapping:r}=e,{consumesLoadingData:n,initializeSharingData:o}=t,{sharedFallback:i,bundlerRuntime:a,libraryType:s}=t.federation;if(n&&!n._updated){let{moduleIdToConsumeDataMapping:o={},initialConsumes:l=[],chunkMapping:u={}}=n;if(Object.entries(o).forEach(([e,n])=>{r[e]||(r[e]={getter:i?a?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:t,libraryType:s}):n.fallback,treeShakingGetter:i?n.fallback:void 0,shareInfo:{shareConfig:{requiredVersion:n.requiredVersion,strictVersion:n.strictVersion,singleton:n.singleton,eager:n.eager,layer:n.layer},scope:Array.isArray(n.shareScope)?n.shareScope:[n.shareScope||"default"],treeShaking:i?{get:n.fallback,mode:n.treeShakingMode}:void 0},shareKey:n.shareKey})}),"initialConsumes"in e){let{initialConsumes:t=[]}=e;l.forEach(e=>{t.includes(e)||t.push(e)})}if("chunkMapping"in e){let{chunkMapping:t={}}=e;Object.entries(u).forEach(([e,r])=>{t[e]||(t[e]=[]),r.forEach(r=>{t[e].includes(r)||t[e].push(r)})})}n._updated=1}if(o&&!o._updated){let{federation:e}=t;if(!e.instance||!o.scopeToSharingDataMapping)return;let r={};for(let[e,t]of Object.entries(o.scopeToSharingDataMapping))for(let n of t)if("object"==typeof n&&null!==n){let{name:t,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={requiredVersion:`^${o}`},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:o,scope:[e],shareConfig:p,get:i};r[t]?r[t].push(d):r[t]=[d]}e.instance.registerShared(r),o._updated=1}},t.updateRemoteOptions=function(e){let{webpackRequire:t,idToExternalAndNameMapping:r={},idToRemoteMap:n={},chunkMapping:o={}}=e,{remotesLoadingData:i}=t,a=t.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!i||i._updated||!a)return;let{chunkMapping:s,moduleIdToRemoteDataMapping:l}=i;if(s&&l){for(let[e,t]of Object.entries(l))if(r[e]||(r[e]=[t.shareScope,t.name,t.externalModuleId]),!n[e]&&a[t.remoteName]){let r=a[t.remoteName];n[e]||=[],r.forEach(t=>{n[e].includes(t)||n[e].push(t)})}o&&Object.entries(s).forEach(([e,t])=>{o[e]||(o[e]=[]),t.forEach(t=>{o[e].includes(t)||o[e].push(t)})}),i._updated=1}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=i,s.c=a,s.x=()=>s(1760),s.federation||(s.federation={chunkMatcher:function(e){return!/^(1288|296|477|6585)$/.test(e)},rootOutputDir:""}),s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>""+e+".js",s.miniCssF=e=>""+e+".css",s.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l={},s.l=function(e,t,r,n){if(l[e])return void l[e].push(t);if(void 0!==r)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var p=a[u];if(p.getAttribute("src")==e||p.getAttribute("data-rspack")=="@openmrs/esm-billing-app:"+r){o=p;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@openmrs/esm-billing-app:"+r),o.src=e),l[e]=[t];var c=function(t,r){o.onerror=o.onload=null,clearTimeout(d);var n=l[e];if(delete l[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.rv=()=>"1.7.9",s.S={},s.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@carbon/react",version:"1.92.1",factory:()=>Promise.all([s.e("6153"),s.e("9730"),s.e("319"),s.e("4480"),s.e("1617"),s.e("2109"),s.e("6536"),s.e("296"),s.e("1288")]).then(()=>()=>s(203)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"@openmrs/esm-framework",version:"11.0.1-pre.5776",factory:()=>Promise.all([s.e("6153"),s.e("4480"),s.e("5215"),s.e("570"),s.e("296"),s.e("1288"),s.e("6585"),s.e("477")]).then(()=>()=>s(8146)),eager:0,singleton:1,requiredVersion:"11.x",strictVersion:0},{name:"react-dom",version:"18.3.1",factory:()=>Promise.all([s.e("5098"),s.e("296")]).then(()=>()=>s(961)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"react-i18next",version:"16.0.0",factory:()=>Promise.all([s.e("3379"),s.e("296")]).then(()=>()=>s(673)),eager:0,singleton:1,requiredVersion:"16.x",strictVersion:0},{name:"react-router-dom",version:"6.21.3",factory:()=>Promise.all([s.e("749"),s.e("296"),s.e("1288")]).then(()=>()=>s(6204)),eager:0,singleton:1,requiredVersion:"6.x",strictVersion:0},{name:"react",version:"18.3.1",factory:()=>s.e("6237").then(()=>()=>s(6540)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"swr/_internal",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("296")]).then(()=>()=>s(4993)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/immutable",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("296"),s.e("5898")]).then(()=>()=>s(4225)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/infinite",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("296"),s.e("1578")]).then(()=>()=>s(3041)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("296"),s.e("8410")]).then(()=>()=>s(2177)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0}]},uniqueName:"@openmrs/esm-billing-app"},s.I=s.I||function(){throw Error("should have __webpack_require__.I")},s.g.importScripts&&(u=s.g.location+"");var l,u,p=s.g.document;if(!u&&p&&(p.currentScript&&"SCRIPT"===p.currentScript.tagName.toUpperCase()&&(u=p.currentScript.src),!u)){var c=p.getElementsByTagName("script");if(c.length)for(var d=c.length-1;d>-1&&(!u||!/^http(s?):/.test(u));)u=c[d--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");if(s.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.consumesLoadingData={chunkMapping:{477:["2142","2016","3954"],1288:["7643"],4263:["9124"],6585:["9335","1752","8395","6335"],296:["5275"]},moduleIdToConsumeDataMapping:{3954:{shareScope:"default",shareKey:"swr/_internal",import:"swr/_internal",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("6362").then(()=>()=>s(4993))},7643:{shareScope:"default",shareKey:"react-dom",import:"react-dom",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("5098").then(()=>()=>s(961))},1752:{shareScope:"default",shareKey:"@carbon/react",import:"@carbon/react",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6153"),s.e("9730"),s.e("319"),s.e("1617"),s.e("2109"),s.e("6536"),s.e("1288")]).then(()=>()=>s(203))},8395:{shareScope:"default",shareKey:"react-i18next",import:"react-i18next",requiredVersion:"16.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("3379").then(()=>()=>s(673))},5275:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("6237").then(()=>()=>s(6540))},9124:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"11.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6153"),s.e("5215"),s.e("1288"),s.e("477")]).then(()=>()=>s(8146))},9335:{shareScope:"default",shareKey:"react-router-dom",import:"react-router-dom",requiredVersion:"6.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("749"),s.e("1288")]).then(()=>()=>s(6204))},6335:{shareScope:"default",shareKey:"swr",import:"swr",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("6029")]).then(()=>()=>s(2177))},2142:{shareScope:"default",shareKey:"swr/infinite",import:"swr/infinite",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("9197")]).then(()=>()=>s(3041))},2016:{shareScope:"default",shareKey:"swr/immutable",import:"swr/immutable",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("3517")]).then(()=>()=>s(4225))}},initialConsumes:[]},s.f.consumes=s.f.consumes||function(){throw Error("should have __webpack_require__.f.consumes")},"u">typeof document){var f=function(e,t,r,n,o){var i=document.createElement("link");return i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.href=t,i.onerror=i.onload=function(r){if(i.onerror=i.onload=null,"load"===r.type)n();else{var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.href||t,l=Error("Loading CSS chunk "+e+" failed.\\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=a,l.request=s,i.parentNode&&i.parentNode.removeChild(i),o(l)}},r?r.parentNode.insertBefore(i,r.nextSibling):document.head.appendChild(i),i},h=function(e,t){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=r[n],i=o.getAttribute("data-href")||o.getAttribute("href");if(i&&(i=i.split("?")[0]),"stylesheet"===o.rel&&(i===e||i===t))return o}for(var a=document.getElementsByTagName("style"),n=0;n<a.length;n++){var o=a[n],i=o.getAttribute("data-href");if(i===e||i===t)return o}},m={8928:0};s.f.miniCss=function(e,t){if(m[e])t.push(m[e]);else 0!==m[e]&&({1026:1,1564:1,1899:1,203:1,2269:1,3461:1,350:1,3784:1,4263:1,5215:1,5390:1,6594:1,6699:1,6908:1,6969:1,7247:1,7968:1,9414:1})[e]&&t.push(m[e]=new Promise(function(t,r){var n=s.miniCssF(e),o=s.p+n;if(h(n,o))return t();f(e,o,null,t,r)}).then(function(){m[e]=0},function(t){throw delete m[e],t}))}}s.initializeExposesData={moduleMap:{"./start":()=>Promise.all([s.e("9730"),s.e("4480"),s.e("570"),s.e("6988"),s.e("296"),s.e("6585"),s.e("4263")]).then(()=>()=>s(7498))},shareScope:"default"},s.getContainer=s.getContainer||function(){throw Error("should have __webpack_require__.getContainer")},s.initContainer=s.initContainer||function(){throw Error("should have __webpack_require__.initContainer")},e={8928:0},s.f.j=function(t,r){var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^(1288|296|477|6585)$/.test(t))e[t]=0;else{var o=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=o);var i=s.p+s.u(t),a=Error();s.l(i,function(r){if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}},"chunk-"+t,t)}},t=(t,r)=>{var n,o,[i,a,l]=r,u=0;if(i.some(t=>0!==e[t])){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);l&&l(s)}for(t&&t(r);u<i.length;u++)o=i[u],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},(r=globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),s.ruid="bundler=rspack@1.7.9",n=s.x,o=!1,s.x=function(){if(o||(o=!0,s(2185)),"function"==typeof n)return n();console.warn("[MF] Invalid prevStartup")},_openmrs_esm_billing_app=s.x()})();
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"billing":">=2.5.0-0","webservices.rest":">=2.24.0"},"pages":[{"component":"billableServicesHome","route":"billable-services"}],"extensions":[{"component":"billingDashboardLink","name":"billing-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"billing","title":"billing","slot":"billing-dashboard-slot"}},{"component":"root","name":"billing-dashboard-root","slot":"billing-dashboard-slot"},{"name":"billing-patient-summary","component":"billingPatientSummary","slot":"patient-chart-billing-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"visit-bills-panel","component":"visitBillsPanel","slot":"visit-summary-panels","meta":{"title":"Bills"}},{"name":"billing-summary-dashboard-link","component":"billingSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-billing-dashboard-slot","path":"billing-history"}},{"name":"billing-checkin-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm"},{"slot":"system-admin-page-card-link-slot","component":"billableServicesCardLink","name":"billable-services-admin-card-link"},{"name":"patient-banner-billing-tags","component":"visitAttributeTags","slot":"patient-banner-tags-slot","order":2},{"name":"patient-banner-payment-status-tag","component":"patientPaymentStatusTag","slot":"patient-banner-tags-slot","order":3},{"name":"billable-services-left-panel-link","component":"billableServicesLeftPanelLink","slot":"billable-services-left-panel-slot","order":0},{"name":"billing-settings-left-panel-menu","component":"billingSettingsLeftPanelMenu","slot":"billable-services-left-panel-slot","order":1},{"name":"discount-requests-left-panel-link","component":"discountRequestsLeftPanelLink","slot":"billable-services-left-panel-slot","order":2},{"name":"refund-requests-left-panel-link","component":"refundRequestsLeftPanelLink","slot":"billable-services-left-panel-slot","order":3}],"modals":[{"name":"add-cash-point-modal","component":"addCashPointModal"},{"name":"payment-mode-form-modal","component":"paymentModeFormModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"edit-bill-item-modal","component":"editBillLineItemModal"},{"name":"edit-bill-line-item-modal","component":"editBillLineItemModal"},{"name":"require-billing-modal","component":"requirePaymentModal"},{"name":"delete-line-item-confirmation-modal","component":"deleteLineItemConfirmationModal"},{"name":"finalize-bill-confirmation-modal","component":"finalizeBillConfirmationModal"},{"name":"delete-bill-confirmation-modal","component":"deleteBillConfirmationModal"},{"name":"request-discount-modal","component":"requestDiscountModal"},{"name":"review-bill-discounts-modal","component":"reviewBillDiscountsModal"},{"name":"request-refund-modal","component":"requestRefundModal"},{"name":"review-bill-refunds-modal","component":"reviewBillRefundsModal"}],"workspaces2":[{"name":"billing-form-workspace","component":"billingFormWorkspace","window":"billing-form-window"},{"name":"patient-chart-billing-form-workspace","component":"billingFormWorkspace","window":"patient-chart-billing-form"},{"name":"billable-service-form","component":"billableServiceFormWorkspace","window":"billable-service-form-window"}],"workspaceWindows2":[{"name":"billing-form-window","group":"billingFormWorkspaceGroup"},{"name":"patient-chart-billing-form","group":"patient-chart"},{"name":"billable-service-form-window","group":"billingFormWorkspaceGroup","width":"wider"}],"workspaceGroups2":[{"name":"billingFormWorkspaceGroup","overlay":false}],"version":"1.4.1-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"billing":">=2.5.0-0","webservices.rest":">=2.24.0"},"pages":[{"component":"billableServicesHome","route":"billable-services"}],"extensions":[{"component":"billingDashboardLink","name":"billing-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"billing","title":"billing","slot":"billing-dashboard-slot"}},{"component":"root","name":"billing-dashboard-root","slot":"billing-dashboard-slot"},{"name":"billing-patient-summary","component":"billingPatientSummary","slot":"patient-chart-billing-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"visit-bills-panel","component":"visitBillsPanel","slot":"visit-summary-panels","meta":{"title":"Bills"}},{"name":"billing-summary-dashboard-link","component":"billingSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-billing-dashboard-slot","path":"billing-history"}},{"name":"billing-checkin-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm"},{"slot":"system-admin-page-card-link-slot","component":"billableServicesCardLink","name":"billable-services-admin-card-link"},{"name":"patient-banner-billing-tags","component":"visitAttributeTags","slot":"patient-banner-tags-slot","order":2},{"name":"patient-banner-payment-status-tag","component":"patientPaymentStatusTag","slot":"patient-banner-tags-slot","order":3},{"name":"billable-services-left-panel-link","component":"billableServicesLeftPanelLink","slot":"billable-services-left-panel-slot","order":0},{"name":"billing-settings-left-panel-menu","component":"billingSettingsLeftPanelMenu","slot":"billable-services-left-panel-slot","order":1},{"name":"discount-requests-left-panel-link","component":"discountRequestsLeftPanelLink","slot":"billable-services-left-panel-slot","order":2},{"name":"refund-requests-left-panel-link","component":"refundRequestsLeftPanelLink","slot":"billable-services-left-panel-slot","order":3}],"modals":[{"name":"add-cash-point-modal","component":"addCashPointModal"},{"name":"payment-mode-form-modal","component":"paymentModeFormModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"edit-bill-item-modal","component":"editBillLineItemModal"},{"name":"edit-bill-line-item-modal","component":"editBillLineItemModal"},{"name":"require-billing-modal","component":"requirePaymentModal"},{"name":"delete-line-item-confirmation-modal","component":"deleteLineItemConfirmationModal"},{"name":"finalize-bill-confirmation-modal","component":"finalizeBillConfirmationModal"},{"name":"delete-bill-confirmation-modal","component":"deleteBillConfirmationModal"},{"name":"request-discount-modal","component":"requestDiscountModal"},{"name":"review-bill-discounts-modal","component":"reviewBillDiscountsModal"},{"name":"request-refund-modal","component":"requestRefundModal"},{"name":"review-bill-refunds-modal","component":"reviewBillRefundsModal"}],"workspaces2":[{"name":"billing-form-workspace","component":"billingFormWorkspace","window":"billing-form-window"},{"name":"patient-chart-billing-form-workspace","component":"billingFormWorkspace","window":"patient-chart-billing-form"},{"name":"billable-service-form","component":"billableServiceFormWorkspace","window":"billable-service-form-window"}],"workspaceWindows2":[{"name":"billing-form-window","group":"billingFormWorkspaceGroup"},{"name":"patient-chart-billing-form","group":"patient-chart"},{"name":"billable-service-form-window","group":"billingFormWorkspaceGroup","width":"wider"}],"workspaceGroups2":[{"name":"billingFormWorkspaceGroup","overlay":false}],"version":"1.4.1-pre.2143"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-billing-app",
|
|
3
|
-
"version": "1.4.1-pre.
|
|
3
|
+
"version": "1.4.1-pre.2143",
|
|
4
4
|
"description": "O3 frontend module for handling billing concerns in healthcare settings",
|
|
5
5
|
"browser": "dist/openmrs-esm-billing-app.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
38
|
-
"url": "git+https://github.com/openmrs/openmrs-esm-billing-app
|
|
38
|
+
"url": "git+https://github.com/openmrs/openmrs-esm-billing-app.git"
|
|
39
39
|
},
|
|
40
40
|
"bugs": {
|
|
41
41
|
"url": "https://github.com/openmrs/openmrs-esm-billing-app/issues"
|
|
@@ -2,7 +2,16 @@ import React from 'react';
|
|
|
2
2
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
3
3
|
import userEvent from '@testing-library/user-event';
|
|
4
4
|
import { render, screen, waitFor } from '@testing-library/react';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
ExtensionSlot,
|
|
7
|
+
getDefaultsFromConfigSchema,
|
|
8
|
+
showSnackbar,
|
|
9
|
+
useConfig,
|
|
10
|
+
useLayoutType,
|
|
11
|
+
usePatient,
|
|
12
|
+
useVisit,
|
|
13
|
+
} from '@openmrs/esm-framework';
|
|
14
|
+
import { mockPatient } from '@mocks/bills.mock';
|
|
6
15
|
import { configSchema, type BillingConfig } from '../config-schema';
|
|
7
16
|
import { processBillItems, updateBillItems, useBill, useBillableServices } from '../billing.resource';
|
|
8
17
|
import { type BillLineItemStatus, type BillStatus } from '../types';
|
|
@@ -12,6 +21,9 @@ import BillingForm from './billing-form.workspace';
|
|
|
12
21
|
|
|
13
22
|
const mockUseConfig = vi.mocked(useConfig<BillingConfig>);
|
|
14
23
|
const mockUseVisit = vi.mocked(useVisit);
|
|
24
|
+
const mockUsePatient = vi.mocked(usePatient);
|
|
25
|
+
const mockUseLayoutType = vi.mocked(useLayoutType);
|
|
26
|
+
const mockExtensionSlot = vi.mocked(ExtensionSlot);
|
|
15
27
|
const mockUseBillableServices = vi.mocked(useBillableServices);
|
|
16
28
|
const mockUseBill = vi.mocked(useBill);
|
|
17
29
|
const mockUseBillableServicesList = vi.mocked(useBillableServicesList);
|
|
@@ -142,6 +154,7 @@ describe('BillingForm', () => {
|
|
|
142
154
|
} as any);
|
|
143
155
|
mockGetBillableServiceUuid.mockReturnValue('bs-uuid-1');
|
|
144
156
|
mockUseVisit.mockReturnValue({ activeVisit: null } as any);
|
|
157
|
+
mockUseLayoutType.mockReturnValue('small-desktop');
|
|
145
158
|
});
|
|
146
159
|
|
|
147
160
|
describe('Create mode (no billUuid)', () => {
|
|
@@ -604,4 +617,48 @@ describe('BillingForm', () => {
|
|
|
604
617
|
});
|
|
605
618
|
});
|
|
606
619
|
});
|
|
620
|
+
|
|
621
|
+
describe('patient header', () => {
|
|
622
|
+
beforeEach(() => {
|
|
623
|
+
mockUseLayoutType.mockReturnValue('tablet');
|
|
624
|
+
mockExtensionSlot.mockImplementation((({ name, state }: any) =>
|
|
625
|
+
name === 'patient-header-slot' && state?.patient ? <div>{state.patient.display}</div> : null) as any);
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
it('renders the patient header showing the patient being billed', () => {
|
|
629
|
+
mockUsePatient.mockReturnValue({ patient: mockPatient, isLoading: false, patientUuid: 'patient-uuid' } as any);
|
|
630
|
+
|
|
631
|
+
render(<BillingForm {...defaultCreateProps} />);
|
|
632
|
+
|
|
633
|
+
expect(screen.getByText(mockPatient.display)).toBeInTheDocument();
|
|
634
|
+
const headerCall = mockExtensionSlot.mock.calls.find(([props]) => props?.name === 'patient-header-slot');
|
|
635
|
+
expect(headerCall[0].state).toEqual(
|
|
636
|
+
expect.objectContaining({
|
|
637
|
+
patientUuid: 'patient-uuid',
|
|
638
|
+
hideActionsOverflow: true,
|
|
639
|
+
}),
|
|
640
|
+
);
|
|
641
|
+
});
|
|
642
|
+
|
|
643
|
+
it('does not render the patient header when the patient has not loaded', () => {
|
|
644
|
+
mockUsePatient.mockReturnValue({ patient: null, isLoading: true, patientUuid: null } as any);
|
|
645
|
+
|
|
646
|
+
render(<BillingForm {...defaultCreateProps} />);
|
|
647
|
+
|
|
648
|
+
expect(screen.queryByText(mockPatient.display)).not.toBeInTheDocument();
|
|
649
|
+
const headerCall = mockExtensionSlot.mock.calls.find(([props]) => props?.name === 'patient-header-slot');
|
|
650
|
+
expect(headerCall).toBeUndefined();
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
it('does not render the patient header on desktop', () => {
|
|
654
|
+
mockUseLayoutType.mockReturnValue('small-desktop');
|
|
655
|
+
mockUsePatient.mockReturnValue({ patient: mockPatient, isLoading: false, patientUuid: 'patient-uuid' } as any);
|
|
656
|
+
|
|
657
|
+
render(<BillingForm {...defaultCreateProps} />);
|
|
658
|
+
|
|
659
|
+
expect(screen.queryByText(mockPatient.display)).not.toBeInTheDocument();
|
|
660
|
+
const headerCall = mockExtensionSlot.mock.calls.find(([props]) => props?.name === 'patient-header-slot');
|
|
661
|
+
expect(headerCall).toBeUndefined();
|
|
662
|
+
});
|
|
663
|
+
});
|
|
607
664
|
});
|
|
@@ -12,8 +12,10 @@ import {
|
|
|
12
12
|
NumberInput,
|
|
13
13
|
} from '@carbon/react';
|
|
14
14
|
import {
|
|
15
|
+
ExtensionSlot,
|
|
15
16
|
useConfig,
|
|
16
17
|
useLayoutType,
|
|
18
|
+
usePatient,
|
|
17
19
|
useVisit,
|
|
18
20
|
showSnackbar,
|
|
19
21
|
getCoreTranslation,
|
|
@@ -60,6 +62,7 @@ const BillingForm: React.FC<Workspace2DefinitionProps<BillingFormProps>> = ({
|
|
|
60
62
|
}) => {
|
|
61
63
|
const isTablet = useLayoutType() === 'tablet';
|
|
62
64
|
const { t } = useTranslation();
|
|
65
|
+
const { patient } = usePatient(patientUuid);
|
|
63
66
|
const { mutate: swrMutate } = useSWRConfig();
|
|
64
67
|
const { defaultCurrency, postBilledItems } = useConfig<BillingConfig>();
|
|
65
68
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
@@ -272,152 +275,157 @@ const BillingForm: React.FC<Workspace2DefinitionProps<BillingFormProps>> = ({
|
|
|
272
275
|
title={isEditMode ? t('addItemsToBill', 'Add items to bill') : t('addBillItems', 'Add bill items')}
|
|
273
276
|
hasUnsavedChanges={selectedItems.length > 0}>
|
|
274
277
|
<Form className={styles.form} onSubmit={handleSubmit}>
|
|
275
|
-
<div className={styles.
|
|
276
|
-
{
|
|
277
|
-
<
|
|
278
|
-
) : billUuid && billError ? (
|
|
279
|
-
<InlineNotification
|
|
280
|
-
kind="error"
|
|
281
|
-
lowContrast
|
|
282
|
-
title={t('errorLoadingBill', 'Error loading bill')}
|
|
283
|
-
subtitle={billError?.message}
|
|
284
|
-
/>
|
|
285
|
-
) : isEditMode && billableServicesError ? (
|
|
286
|
-
<InlineNotification
|
|
287
|
-
kind="error"
|
|
288
|
-
lowContrast
|
|
289
|
-
title={t('errorLoadingBillableServices', 'Error loading billable services')}
|
|
290
|
-
subtitle={billableServicesError?.message}
|
|
291
|
-
/>
|
|
292
|
-
) : (
|
|
293
|
-
<>
|
|
294
|
-
{isEditMode && (
|
|
295
|
-
<div className={styles.existingItemsContainer}>
|
|
296
|
-
<h4 className={styles.sectionHeading}>{t('existingItems', 'Existing items')}</h4>
|
|
297
|
-
{bill.lineItems.map((item) => (
|
|
298
|
-
<div key={item.uuid} className={styles.existingItemRow}>
|
|
299
|
-
<span className={styles.existingItemName}>
|
|
300
|
-
{item.billableService || item.item || item.display}
|
|
301
|
-
</span>
|
|
302
|
-
<span className={styles.existingItemDetail}>
|
|
303
|
-
{item.quantity} x {convertToCurrency(item.price, defaultCurrency)}
|
|
304
|
-
</span>
|
|
305
|
-
<span className={styles.existingItemTotal}>
|
|
306
|
-
{convertToCurrency(item.price * item.quantity, defaultCurrency)}
|
|
307
|
-
</span>
|
|
308
|
-
</div>
|
|
309
|
-
))}
|
|
310
|
-
<div className={styles.existingItemsSubtotal}>
|
|
311
|
-
<strong>
|
|
312
|
-
{t('subtotal', 'Subtotal')}: {convertToCurrency(existingItemsTotal, defaultCurrency)}
|
|
313
|
-
</strong>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
)}
|
|
317
|
-
{isEditMode && <h4 className={styles.sectionHeading}>{t('newItems', 'New items')}</h4>}
|
|
318
|
-
{isLoading ? (
|
|
319
|
-
<InlineLoading description={getCoreTranslation('loading') + '...'} />
|
|
320
|
-
) : error ? (
|
|
321
|
-
<InlineNotification
|
|
322
|
-
kind="error"
|
|
323
|
-
lowContrast
|
|
324
|
-
title={t('errorLoadingBillableServices', 'Error loading billable services')}
|
|
325
|
-
subtitle={error?.message}
|
|
326
|
-
/>
|
|
327
|
-
) : (
|
|
328
|
-
<ComboBox
|
|
329
|
-
id="searchItems"
|
|
330
|
-
onChange={({ selectedItem: item }: { selectedItem: BillableItem }) => selectBillableItem(item)}
|
|
331
|
-
itemToString={(item: BillableItem) => item?.name || ''}
|
|
332
|
-
items={availableBillableItems}
|
|
333
|
-
titleText={t('searchItems', 'Search items and services')}
|
|
334
|
-
/>
|
|
335
|
-
)}
|
|
336
|
-
</>
|
|
278
|
+
<div className={styles.formContent}>
|
|
279
|
+
{isTablet && patient && patientUuid && (
|
|
280
|
+
<ExtensionSlot name="patient-header-slot" state={{ patient, patientUuid, hideActionsOverflow: true }} />
|
|
337
281
|
)}
|
|
338
|
-
{
|
|
339
|
-
|
|
340
|
-
<
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
282
|
+
<div className={styles.grid}>
|
|
283
|
+
{billUuid && isLoadingBill ? (
|
|
284
|
+
<InlineLoading description={getCoreTranslation('loading') + '...'} />
|
|
285
|
+
) : billUuid && billError ? (
|
|
286
|
+
<InlineNotification
|
|
287
|
+
kind="error"
|
|
288
|
+
lowContrast
|
|
289
|
+
title={t('errorLoadingBill', 'Error loading bill')}
|
|
290
|
+
subtitle={billError?.message}
|
|
291
|
+
/>
|
|
292
|
+
) : isEditMode && billableServicesError ? (
|
|
293
|
+
<InlineNotification
|
|
294
|
+
kind="error"
|
|
295
|
+
lowContrast
|
|
296
|
+
title={t('errorLoadingBillableServices', 'Error loading billable services')}
|
|
297
|
+
subtitle={billableServicesError?.message}
|
|
298
|
+
/>
|
|
299
|
+
) : (
|
|
300
|
+
<>
|
|
301
|
+
{isEditMode && (
|
|
302
|
+
<div className={styles.existingItemsContainer}>
|
|
303
|
+
<h4 className={styles.sectionHeading}>{t('existingItems', 'Existing items')}</h4>
|
|
304
|
+
{bill.lineItems.map((item) => (
|
|
305
|
+
<div key={item.uuid} className={styles.existingItemRow}>
|
|
306
|
+
<span className={styles.existingItemName}>
|
|
307
|
+
{item.billableService || item.item || item.display}
|
|
308
|
+
</span>
|
|
309
|
+
<span className={styles.existingItemDetail}>
|
|
310
|
+
{item.quantity} x {convertToCurrency(item.price, defaultCurrency)}
|
|
311
|
+
</span>
|
|
312
|
+
<span className={styles.existingItemTotal}>
|
|
313
|
+
{convertToCurrency(item.price * item.quantity, defaultCurrency)}
|
|
314
|
+
</span>
|
|
315
|
+
</div>
|
|
316
|
+
))}
|
|
317
|
+
<div className={styles.existingItemsSubtotal}>
|
|
318
|
+
<strong>
|
|
319
|
+
{t('subtotal', 'Subtotal')}: {convertToCurrency(existingItemsTotal, defaultCurrency)}
|
|
320
|
+
</strong>
|
|
321
|
+
</div>
|
|
352
322
|
</div>
|
|
323
|
+
)}
|
|
324
|
+
{isEditMode && <h4 className={styles.sectionHeading}>{t('newItems', 'New items')}</h4>}
|
|
325
|
+
{isLoading ? (
|
|
326
|
+
<InlineLoading description={getCoreTranslation('loading') + '...'} />
|
|
327
|
+
) : error ? (
|
|
328
|
+
<InlineNotification
|
|
329
|
+
kind="error"
|
|
330
|
+
lowContrast
|
|
331
|
+
title={t('errorLoadingBillableServices', 'Error loading billable services')}
|
|
332
|
+
subtitle={error?.message}
|
|
333
|
+
/>
|
|
334
|
+
) : (
|
|
335
|
+
<ComboBox
|
|
336
|
+
id="searchItems"
|
|
337
|
+
onChange={({ selectedItem: item }: { selectedItem: BillableItem }) => selectBillableItem(item)}
|
|
338
|
+
itemToString={(item: BillableItem) => item?.name || ''}
|
|
339
|
+
items={availableBillableItems}
|
|
340
|
+
titleText={t('searchItems', 'Search items and services')}
|
|
341
|
+
/>
|
|
342
|
+
)}
|
|
343
|
+
</>
|
|
344
|
+
)}
|
|
345
|
+
{selectedItems && selectedItems.length > 0 && (
|
|
346
|
+
<div className={styles.selectedItemsContainer}>
|
|
347
|
+
<h4 className={styles.sectionHeading}>{t('selectedItems', 'Selected items')}</h4>
|
|
348
|
+
{selectedItems.map((item) => (
|
|
349
|
+
<div key={item.uuid} className={styles.itemCard}>
|
|
350
|
+
<div className={styles.itemHeader}>
|
|
351
|
+
<span className={styles.itemName}>{item.display}</span>
|
|
352
|
+
<IconButton
|
|
353
|
+
align="top-end"
|
|
354
|
+
kind="ghost"
|
|
355
|
+
label={t('remove', 'Remove')}
|
|
356
|
+
onClick={() => removeSelectedBillableItem(item.uuid)}>
|
|
357
|
+
<TrashCanIcon size={16} />
|
|
358
|
+
</IconButton>
|
|
359
|
+
</div>
|
|
353
360
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
selectedItem={item.selectedPaymentMethod}
|
|
370
|
-
onChange={({ selectedItem }) => {
|
|
371
|
-
if (selectedItem) {
|
|
372
|
-
updatePaymentMethod(item.uuid, selectedItem);
|
|
361
|
+
<div className={styles.itemControls}>
|
|
362
|
+
{item.availablePaymentMethods && item.availablePaymentMethods.length > 1 ? (
|
|
363
|
+
<div className={styles.controlSection}>
|
|
364
|
+
<label>{t('selectPaymentMethod', 'Select payment method')}</label>
|
|
365
|
+
<ComboBox
|
|
366
|
+
id={`payment-method-${item.uuid}`}
|
|
367
|
+
items={item.availablePaymentMethods}
|
|
368
|
+
itemToString={(method: ServicePrice) =>
|
|
369
|
+
method
|
|
370
|
+
? `${method.name} - ${convertToCurrency(
|
|
371
|
+
typeof method.price === 'number' ? method.price : parseFloat(method.price),
|
|
372
|
+
defaultCurrency,
|
|
373
|
+
)}`
|
|
374
|
+
: ''
|
|
373
375
|
}
|
|
376
|
+
selectedItem={item.selectedPaymentMethod}
|
|
377
|
+
onChange={({ selectedItem }) => {
|
|
378
|
+
if (selectedItem) {
|
|
379
|
+
updatePaymentMethod(item.uuid, selectedItem);
|
|
380
|
+
}
|
|
381
|
+
}}
|
|
382
|
+
placeholder={t('selectPaymentMethod', 'Select payment method')}
|
|
383
|
+
titleText=""
|
|
384
|
+
/>
|
|
385
|
+
</div>
|
|
386
|
+
) : (
|
|
387
|
+
<div className={styles.controlSection}>
|
|
388
|
+
<label>{t('unitPrice', 'Unit price')}</label>
|
|
389
|
+
<span className={styles.priceDisplay}>{convertToCurrency(item.price, defaultCurrency)}</span>
|
|
390
|
+
</div>
|
|
391
|
+
)}
|
|
392
|
+
|
|
393
|
+
<div className={styles.controlSection}>
|
|
394
|
+
<label>{t('quantity', 'Quantity')}</label>
|
|
395
|
+
<NumberInput
|
|
396
|
+
allowEmpty
|
|
397
|
+
disableWheel
|
|
398
|
+
hideSteppers
|
|
399
|
+
id={`quantity-${item.uuid}`}
|
|
400
|
+
invalid={!item.quantity || item.quantity < 1}
|
|
401
|
+
invalidText={t('quantityMustBeAtLeastOne', 'Quantity must be at least 1')}
|
|
402
|
+
onChange={(_, { value }) => {
|
|
403
|
+
const number = parseFloat(String(value));
|
|
404
|
+
updateQuantity(item.uuid, isNaN(number) ? 0 : number);
|
|
374
405
|
}}
|
|
375
|
-
|
|
376
|
-
titleText=""
|
|
406
|
+
value={item.quantity || ''}
|
|
377
407
|
/>
|
|
378
408
|
</div>
|
|
379
|
-
|
|
409
|
+
|
|
380
410
|
<div className={styles.controlSection}>
|
|
381
|
-
<label>{t('
|
|
382
|
-
<span className={styles.
|
|
411
|
+
<label>{t('total', 'Total')}</label>
|
|
412
|
+
<span className={styles.totalDisplay}>
|
|
413
|
+
{convertToCurrency(item.price * item.quantity, defaultCurrency)}
|
|
414
|
+
</span>
|
|
383
415
|
</div>
|
|
384
|
-
)}
|
|
385
|
-
|
|
386
|
-
<div className={styles.controlSection}>
|
|
387
|
-
<label>{t('quantity', 'Quantity')}</label>
|
|
388
|
-
<NumberInput
|
|
389
|
-
allowEmpty
|
|
390
|
-
disableWheel
|
|
391
|
-
hideSteppers
|
|
392
|
-
id={`quantity-${item.uuid}`}
|
|
393
|
-
invalid={!item.quantity || item.quantity < 1}
|
|
394
|
-
invalidText={t('quantityMustBeAtLeastOne', 'Quantity must be at least 1')}
|
|
395
|
-
onChange={(_, { value }) => {
|
|
396
|
-
const number = parseFloat(String(value));
|
|
397
|
-
updateQuantity(item.uuid, isNaN(number) ? 0 : number);
|
|
398
|
-
}}
|
|
399
|
-
value={item.quantity || ''}
|
|
400
|
-
/>
|
|
401
|
-
</div>
|
|
402
|
-
|
|
403
|
-
<div className={styles.controlSection}>
|
|
404
|
-
<label>{t('total', 'Total')}</label>
|
|
405
|
-
<span className={styles.totalDisplay}>
|
|
406
|
-
{convertToCurrency(item.price * item.quantity, defaultCurrency)}
|
|
407
|
-
</span>
|
|
408
416
|
</div>
|
|
409
417
|
</div>
|
|
410
|
-
|
|
411
|
-
))}
|
|
418
|
+
))}
|
|
412
419
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
420
|
+
<div className={styles.grandTotal}>
|
|
421
|
+
<strong>
|
|
422
|
+
{t('grandTotal', 'Grand total')}:{' '}
|
|
423
|
+
{convertToCurrency(existingItemsTotal + calculateTotalAmount(selectedItems), defaultCurrency)}
|
|
424
|
+
</strong>
|
|
425
|
+
</div>
|
|
418
426
|
</div>
|
|
419
|
-
|
|
420
|
-
|
|
427
|
+
)}
|
|
428
|
+
</div>
|
|
421
429
|
</div>
|
|
422
430
|
|
|
423
431
|
<ButtonSet className={isTablet ? styles.tablet : styles.desktop}>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"6e00959574e962d6","duration":8881}
|
|
Binary file
|