@openmrs/esm-billing-app 1.0.2-pre.953 → 1.0.2-pre.958
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/dist/4739.js +1 -1
- package/dist/4739.js.map +1 -1
- package/dist/8572.js +1 -1
- package/dist/8572.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-billing-app.js +1 -1
- package/dist/openmrs-esm-billing-app.js.buildmanifest.json +10 -10
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/bill-item-actions/edit-bill-item.modal.tsx +1 -0
- package/src/bill-item-actions/edit-bill-item.test.tsx +19 -0
- package/src/billable-services/bill-waiver/bill-waiver-form.component.tsx +7 -6
- package/src/billing-form/billing-form.component.tsx +19 -12
- package/src/invoice/invoice.component.tsx +1 -2
- package/src/invoice/printable-invoice/print-receipt.component.tsx +0 -1
package/dist/4739.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[4739],{12149:(n,e,i)=>{i.d(e,{A:()=>a});var l=i(72996),t=i.n(l),r=i(70159),o=i.n(r)()(t());o.push([n.id,":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___depIv{padding:1.5rem 1rem;background-color:#fff}.-esm-billing__billing-form__desktop___XrIGU{padding:0rem}.-esm-billing__billing-form__button___\\+KaHL{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading{min-height:1rem !important}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading__text{font-size:unset !important}.-esm-billing__billing-form__mt2___XSCej{margin-top:2rem}.-esm-billing__billing-form__searchContent___rwtx-{position:absolute;background-color:#fff;min-width:230px;overflow:auto;border:1px solid #ddd;z-index:1;width:92%}.-esm-billing__billing-form__searchItem___gJRX7{border-bottom:.1rem solid;border-bottom-color:silver;cursor:pointer}.-esm-billing__billing-form__invalidInput___-CFhJ{border:2px solid red}.-esm-billing__billing-form__removeButton___JOb\\+t{color:#ee0909;right:20px;cursor:pointer}.-esm-billing__billing-form__form___dOD1L{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}.omrs-breakpoint-lt-desktop .-esm-billing__billing-form__form___dOD1L{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-billing__billing-form__form___dOD1L{background-color:#fff}.-esm-billing__billing-form__grid___bVIsN{margin:1rem;display:flex;flex-direction:column;gap:1rem}.-esm-billing__billing-form__row___kfkPE{margin:.5rem 0rem 0rem;display:flex;flex-flow:row wrap;gap:1rem}.-esm-billing__billing-form__spacer___5WyoB{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw h4{margin-bottom:1rem;color:#525252;font-size:1rem;font-weight:600}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{border:1px solid #e0e0e0;border-radius:.25rem;padding:1rem;margin-bottom:1rem;background-color:#f4f4f4}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh .-esm-billing__billing-form__itemName___0pvcY{font-weight:600;font-size:1rem;color:#525252}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.5rem;align-items:flex-end}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb{display:flex;flex-direction:column;min-width:0}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child{flex:1 1 auto;min-width:250px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:0 0 140px;width:140px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:0 0 180px;width:180px;margin-left:auto;text-align:right}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb label{font-size:.875rem;font-weight:500;margin-bottom:.5rem;color:#525252;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--number,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--combo-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__wrapper,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__field{width:100% !important;max-width:100% !important;min-width:0 !important}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__priceDisplay___MN5Zc,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__totalDisplay___mNY6D{font-size:.875rem;font-size:.875rem;font-weight:600;color:#525252;padding:.5rem 0;word-break:break-word}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__grandTotal___a5c-8{text-align:right;padding:1rem;border-top:2px solid #0f62fe;margin-top:1rem;background-color:#f4f4f4;font-size:1.125rem;font-weight:600;color:#525252}@media(max-width: 1056px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:1 1 100%;width:100%}}@media(max-width: 768px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{padding:.75rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{flex-direction:column;gap:.5rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2),.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:1 1 100%;width:100%;max-width:100%}}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/billing-form/billing-form.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DF,4CACE,mBAAA,CACA,qBDFM,CCKR,6CACE,YAAA,CAGF,6CACE,WC2CW,CD1CX,YAAA,CACA,wBAAA,CACA,oBAAA,CACA,aAAA,CAEA,kEACE,0BAAA,CAGF,wEACE,0BAAA,CAIJ,yCACE,eCYW,CDTb,mDACE,iBAAA,CACA,qBAAA,CACA,eAAA,CACA,aAAA,CACA,qBAAA,CACA,SAAA,CACA,SAAA,CAGF,gDACE,yBAAA,CACA,0BAAA,CACA,cAAA,CAGF,kDACE,oBAAA,CAGF,mDACE,aAAA,CACA,UAAA,CACA,cAAA,CAGF,0CACE,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,yBAAA,CAGF,sEACE,wBAAA,CAGF,qEACE,qBDnEM,CCsER,0CACE,WC3CW,CD4CX,YAAA,CACA,qBAAA,CACA,QC9CW,CDiDb,yCACE,sBAAA,CACA,YAAA,CACA,kBAAA,CACA,QCrDW,CDwDb,4CACE,eCzDW,CD4Db,4DACE,eC7DW,CD+DX,+DACE,kBChES,CDiET,aDzFM,CC0FN,cAAA,CACA,eAAA,CAGF,0GACE,wBAAA,CACA,oBCvFS,CDwFT,YCzES,CD0ET,kBC1ES,CD2ET,wBDxGI,CC0GJ,0JACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,kBCjFO,CDmFP,wMACE,eAAA,CACA,cAAA,CACA,aD9GE,CCkHJ,4JACA,YAAA,CACA,cAAA,CACA,QC7FO,CD8FP,gBCxGO,CDyGP,oBAAA,CAAA,gNACE,YAAA,CACA,qBAAA,CACA,WAAA,CAEA,4NACE,aAAA,CACA,eAAA,CAGF,6NACE,cAAA,CACA,WAAA,CAGF,2NACE,cAAA,CACA,WAAA,CACA,gBAAA,CACA,gBAAA,CAGF,sNACE,iBAAA,CACA,eAAA,CACA,mBClIG,CDmIH,aDjJA,CCkJA,kBAAA,CACA,eAAA,CACA,sBAAA,CAGF,0mCAKE,qBAAA,CACA,yBAAA,CACA,sBAAA,CAGF,ogBAEE,iBAAA,CACA,iBAAA,CACA,eAAA,CACA,aDtKA,CCuKA,eAAA,CACA,qBAAA,CAMR,4GACE,gBAAA,CACA,YCxJS,CDyJT,4BAAA,CACA,eC1JS,CD2JT,wBDxLI,CCyLJ,kBAAA,CACA,eAAA,CACA,aDtLM,CC0LV,0BAKU,6NACE,aAAA,CACA,UAAA,CAAA,CAQZ,yBAEI,0GACE,cCzLO,CD2LP,4JACE,qBAAA,CACA,SClMK,CDqMH,opBAGE,aAAA,CACA,UAAA,CACA,cAAA,CAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.tablet {\n padding: layout.$spacing-06 layout.$spacing-05;\n background-color: $ui-02;\n}\n\n.desktop {\n padding: 0rem;\n}\n\n.button {\n height: layout.$spacing-10;\n display: flex;\n align-content: flex-start;\n align-items: baseline;\n min-width: 50%;\n\n :global(.cds--inline-loading) {\n min-height: layout.$spacing-05 !important;\n }\n\n :global(.cds--inline-loading__text) {\n font-size: unset !important;\n }\n}\n\n.mt2 {\n margin-top: layout.$spacing-07;\n}\n\n.searchContent {\n position: absolute;\n background-color: #fff;\n min-width: 230px;\n overflow: auto;\n border: 1px solid #ddd;\n z-index: 1;\n width: 92%;\n}\n\n.searchItem {\n border-bottom: 0.1rem solid;\n border-bottom-color: silver;\n cursor: pointer;\n}\n\n.invalidInput {\n border: 2px solid red;\n}\n\n.removeButton {\n color: #ee0909;\n right: 20px;\n cursor: pointer;\n}\n\n.form {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: calc(100vh - 6rem);\n}\n\n:global(.omrs-breakpoint-lt-desktop) .form {\n background-color: #ededed;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .form {\n background-color: $ui-02;\n}\n\n.grid {\n margin: layout.$spacing-05;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-05;\n}\n\n.row {\n margin: layout.$spacing-03 0rem 0rem;\n display: flex;\n flex-flow: row wrap;\n gap: layout.$spacing-05;\n}\n\n.spacer {\n margin-top: layout.$spacing-05;\n}\n\n.selectedItemsContainer {\n margin-top: layout.$spacing-05;\n \n h4 {\n margin-bottom: layout.$spacing-05;\n color: $text-02;\n font-size: 1rem;\n font-weight: 600;\n }\n \n .itemCard {\n border: 1px solid $ui-03;\n border-radius: layout.$spacing-02;\n padding: layout.$spacing-05;\n margin-bottom: layout.$spacing-05;\n background-color: $ui-01;\n \n .itemHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: layout.$spacing-05;\n \n .itemName {\n font-weight: 600;\n font-size: 1rem;\n color: $text-02;\n }\n }\n \n .itemControls {\n display: flex;\n flex-wrap: wrap;\n gap: layout.$spacing-05;\n margin-top: layout.$spacing-03;\n align-items: flex-end; .controlSection {\n display: flex;\n flex-direction: column;\n min-width: 0;\n \n &:first-child {\n flex: 1 1 auto;\n min-width: 250px;\n }\n \n &:nth-child(2) {\n flex: 0 0 140px;\n width: 140px;\n }\n \n &:last-child {\n flex: 0 0 180px;\n width: 180px;\n margin-left: auto;\n text-align: right;\n }\n \n label {\n font-size: 0.875rem;\n font-weight: 500;\n margin-bottom: layout.$spacing-03;\n color: $text-02;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n :global(.cds--list-box),\n :global(.cds--number),\n :global(.cds--combo-box),\n :global(.cds--list-box__wrapper),\n :global(.cds--list-box__field) {\n width: 100% !important;\n max-width: 100% !important;\n min-width: 0 !important;\n }\n \n .priceDisplay,\n .totalDisplay {\n font-size: 0.875rem;\n font-size: 0.875rem;\n font-weight: 600;\n color: $text-02;\n padding: layout.$spacing-03 0;\n word-break: break-word;\n }\n }\n }\n }\n \n .grandTotal {\n text-align: right;\n padding: layout.$spacing-05;\n border-top: 2px solid $interactive-01;\n margin-top: layout.$spacing-05;\n background-color: $ui-01;\n font-size: 1.125rem;\n font-weight: 600;\n color: $text-02;\n }\n}\n\n@media (max-width: 1056px) {\n .selectedItemsContainer {\n .itemCard {\n .itemControls {\n .controlSection {\n &:nth-child(2) {\n flex: 1 1 100%;\n width: 100%;\n }\n }\n }\n }\n }\n}\n\n@media (max-width: 768px) {\n .selectedItemsContainer {\n .itemCard {\n padding: layout.$spacing-04;\n \n .itemControls {\n flex-direction: column;\n gap: layout.$spacing-03;\n \n .controlSection {\n &:first-child,\n &:nth-child(2),\n &:last-child {\n flex: 1 1 100%;\n width: 100%;\n max-width: 100%;\n }\n }\n }\n }\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),o.locals={tablet:"-esm-billing__billing-form__tablet___depIv",desktop:"-esm-billing__billing-form__desktop___XrIGU",button:"-esm-billing__billing-form__button___+KaHL",mt2:"-esm-billing__billing-form__mt2___XSCej",searchContent:"-esm-billing__billing-form__searchContent___rwtx-",searchItem:"-esm-billing__billing-form__searchItem___gJRX7",invalidInput:"-esm-billing__billing-form__invalidInput___-CFhJ",removeButton:"-esm-billing__billing-form__removeButton___JOb+t",form:"-esm-billing__billing-form__form___dOD1L",grid:"-esm-billing__billing-form__grid___bVIsN",row:"-esm-billing__billing-form__row___kfkPE",spacer:"-esm-billing__billing-form__spacer___5WyoB",selectedItemsContainer:"-esm-billing__billing-form__selectedItemsContainer___EgCXw",itemCard:"-esm-billing__billing-form__itemCard___-qABa",itemHeader:"-esm-billing__billing-form__itemHeader___IPVIh",itemName:"-esm-billing__billing-form__itemName___0pvcY",itemControls:"-esm-billing__billing-form__itemControls___T4bKO",controlSection:"-esm-billing__billing-form__controlSection___OAlFb",priceDisplay:"-esm-billing__billing-form__priceDisplay___MN5Zc",totalDisplay:"-esm-billing__billing-form__totalDisplay___mNY6D",grandTotal:"-esm-billing__billing-form__grandTotal___a5c-8"};const a=o},64739:(n,e,i)=>{i.r(e),i.d(e,{default:()=>q});var l=i(16072),t=i.n(l),r=i(2076),o=i(27804),a=i(84280),_=i(55576),s=i(15847),m=i(54392),c=i(14720),b=i(50930),g=i(85072),d=i.n(g),A=i(97825),p=i.n(A),u=i(77659),f=i.n(u),C=i(55056),y=i.n(C),h=i(10540),w=i.n(h),v=i(41113),x=i.n(v),E=i(12149),$={};$.styleTagTransform=x(),$.setAttributes=y(),$.insert=f().bind(null,"head"),$.domAPI=p(),$.insertStyleElement=w(),d()(E.A,$);const k=E.A&&E.A.locals?E.A.locals:void 0;function B(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,l=new Array(e);i<e;i++)l[i]=n[i];return l}function I(n,e,i,l,t,r,o){try{var a=n[r](o),_=a.value}catch(n){return void i(n)}a.done?e(_):Promise.resolve(_).then(l,t)}function O(n,e,i){return e in n?Object.defineProperty(n,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[e]=i,n}function S(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{},l=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(i).filter((function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})))),l.forEach((function(e){O(n,e,i[e])}))}return n}function D(n,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):function(n){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e.push.apply(e,i)}return e}(Object(e)).forEach((function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})),n}function N(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var i=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=i){var l,t,r=[],o=!0,a=!1;try{for(i=i.call(n);!(o=(l=i.next()).done)&&(r.push(l.value),!e||r.length!==e);o=!0);}catch(n){a=!0,t=n}finally{try{o||null==i.return||i.return()}finally{if(a)throw t}}return r}}(n,e)||F(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(n){return function(n){if(Array.isArray(n))return B(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||F(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(n,e){if(n){if("string"==typeof n)return B(n,e);var i=Object.prototype.toString.call(n).slice(8,-1);return"Object"===i&&n.constructor&&(i=n.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?B(n,e):void 0}}const q=function(n){var e=n.patientUuid,i=n.closeWorkspace,g="tablet"===(0,s.useLayoutType)(),d=(0,r.useTranslation)().t,A=(0,s.useConfig)(),p=A.defaultCurrency,u=A.postBilledItems,f=N((0,l.useState)(!1),2),C=f[0],y=f[1],h=N((0,l.useState)([]),2),w=h[0],v=h[1],x=(0,m.ly)(),E=x.data,$=x.error,B=x.isLoading;return t().createElement(a.lVW,{className:k.form},t().createElement("div",{className:k.grid},B?t().createElement(a.OuH,{description:(0,s.getCoreTranslation)("loading")+"..."}):$?t().createElement(a.jeF,{kind:"error",lowContrast:!0,title:d("errorLoadingBillableServices","Error loading billable services"),subtitle:null==$?void 0:$.message}):t().createElement(a.a32,{id:"searchItems",onChange:function(n){return function(n){if(n){var e=w.find((function(e){return e.uuid===n.uuid}));if(e){var i=D(S({},e),{quantity:e.quantity+1});v(T(w).map((function(e){return e.uuid===n.uuid?i:e})))}else{var l=n.servicePrices||[],t=0,r=null;if(1===l.length){var o=l[0].price;t="number"==typeof o?o:parseFloat(o),r=l[0]}var a={uuid:n.uuid,display:n.name,quantity:1,price:t,billableService:n.uuid,paymentStatus:"PENDING",lineItemOrder:0,selectedPaymentMethod:r,availablePaymentMethods:l};v(T(w).concat([a]))}}}(n.selectedItem)},itemToString:function(n){return(null==n?void 0:n.name)||""},items:null!=E?E:[],titleText:d("searchItems","Search items and services")}),w&&w.length>0&&t().createElement("div",{className:k.selectedItemsContainer},t().createElement("h4",null,d("selectedItems","Selected items")),w.map((function(n){return t().createElement("div",{key:n.uuid,className:k.itemCard},t().createElement("div",{className:k.itemHeader},t().createElement("span",{className:k.itemName},n.display),t().createElement(a.$nd,{kind:"ghost",size:"sm",renderIcon:_.zH,iconDescription:d("remove","Remove"),onClick:function(){return e=n.uuid,i=T(w).filter((function(n){return n.uuid!==e})),void v(i);var e,i}})),t().createElement("div",{className:k.itemControls},n.availablePaymentMethods&&n.availablePaymentMethods.length>1?t().createElement("div",{className:k.controlSection},t().createElement("label",null,d("selectPaymentMethod","Select payment method")),t().createElement(a.a32,{id:"payment-method-".concat(n.uuid),items:n.availablePaymentMethods,size:"md",itemToString:function(n){return n?"".concat(n.name," - ").concat((0,c.aL)("number"==typeof n.price?n.price:parseFloat(n.price),p)):""},selectedItem:n.selectedPaymentMethod,onChange:function(e){var i,l,t,r=e.selectedItem;r&&(i=n.uuid,l=r,t=T(w).map((function(n){return n.uuid===i?D(S({},n),{selectedPaymentMethod:l,price:"number"==typeof l.price?l.price:parseFloat(l.price),priceName:l.name,priceUuid:l.uuid}):n})),v(t))},placeholder:d("selectPaymentMethod","Select payment method"),titleText:""})):t().createElement("div",{className:k.controlSection},t().createElement("label",null,d("unitPrice","Unit price")),t().createElement("span",{className:k.priceDisplay},(0,c.aL)(n.price,p))),t().createElement("div",{className:k.controlSection},t().createElement("label",null,d("quantity","Quantity")),t().createElement(a.Q7x,{disableWheel:!0,hideSteppers:!0,id:"quantity-".concat(n.uuid),min:1,value:n.quantity,size:"md",onChange:function(e,i){var l,t,r,o=i.value,a=parseFloat(String(o));l=n.uuid,t=isNaN(a)?1:a,r=T(w).map((function(n){return n.uuid===l?D(S({},n),{quantity:t}):n})),v(r)}})),t().createElement("div",{className:k.controlSection},t().createElement("label",null,d("total","Total")),t().createElement("span",{className:k.totalDisplay},(0,c.aL)(n.price*n.quantity,p)))))})),t().createElement("div",{className:k.grandTotal},t().createElement("strong",null,d("grandTotal","Grand total"),":"," ",(0,c.aL)((0,c.Zz)(w),p))))),t().createElement(a.Te$,{className:g?k.tablet:k.desktop},t().createElement(a.$nd,{className:k.button,kind:"secondary",disabled:C,onClick:i},d("discard","Discard")),t().createElement(a.$nd,{className:k.button,kind:"primary",onClick:function(){return(n=function(){var n,l,t;return function(n,e){var i,l,t,r={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(_){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(i=1,l&&(t=2&a[0]?l.return:a[0]?l.throw||((t=l.return)&&t.call(l),0):l.next)&&!(t=t.call(l,a[1])).done)return t;switch(l=0,t&&(a=[2&a[0],t.value]),a[0]){case 0:case 1:t=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,l=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((t=(t=r.trys).length>0&&t[t.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!t||a[1]>t[0]&&a[1]<t[3])){r.label=a[1];break}if(6===a[0]&&r.label<t[1]){r.label=t[1],t=a;break}if(t&&r.label<t[2]){r.label=t[2],r.ops.push(a);break}t[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(n,r)}catch(n){a=[6,n],l=0}finally{i=t=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,_])}}}(this,(function(r){switch(r.label){case 0:if(!function(){var n=!0,e=!1,i=void 0;try{for(var l,t=w[Symbol.iterator]();!(n=(l=t.next()).done);n=!0){var r=l.value;if(r.availablePaymentMethods&&r.availablePaymentMethods.length>1&&!r.selectedPaymentMethod)return(0,s.showSnackbar)({title:d("validationError","Validation error"),subtitle:d("paymentMethodRequired","Payment method is required for all items"),kind:"error"}),!1}}catch(n){e=!0,i=n}finally{try{n||null==t.return||t.return()}finally{if(e)throw i}}return!0}())return[2];y(!0),n={cashPoint:u.cashPoint,cashier:u.cashier,lineItems:[],payments:[],patient:e,status:"PENDING"},w.forEach((function(e){var i={quantity:e.quantity,price:e.price,lineItemOrder:0,paymentStatus:"PENDING",billableService:e.uuid};n.lineItems.push(i)})),l="".concat(b.B,"bill"),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,(0,m.Xn)(n)];case 2:return r.sent(),i(),(0,o.j)((function(n){return"string"==typeof n&&n.startsWith(l)}),void 0,{revalidate:!0}),(0,s.showSnackbar)({title:d("saveBill","Save bill"),subtitle:d("billProcessedSuccessfully","Bill processed successfully"),kind:"success"}),[3,5];case 3:return t=r.sent(),(0,s.showSnackbar)({title:d("billProcessingError","Bill processing error"),kind:"error",subtitle:null==t?void 0:t.message}),[3,5];case 4:return y(!1),[7];case 5:return[2]}}))},function(){var e=this,i=arguments;return new Promise((function(l,t){var r=n.apply(e,i);function o(n){I(r,l,t,o,a,"next",n)}function a(n){I(r,l,t,o,a,"throw",n)}o(void 0)}))})();var n},disabled:C||0===w.length,type:"submit"},C?t().createElement(a.OuH,{description:d("saving","Saving")+"..."}):d("saveAndClose","Save and close"))))}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[4739],{12149:(n,e,i)=>{i.d(e,{A:()=>a});var l=i(72996),t=i.n(l),r=i(70159),o=i.n(r)()(t());o.push([n.id,":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___depIv{padding:1.5rem 1rem;background-color:#fff}.-esm-billing__billing-form__desktop___XrIGU{padding:0rem}.-esm-billing__billing-form__button___\\+KaHL{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading{min-height:1rem !important}.-esm-billing__billing-form__button___\\+KaHL .cds--inline-loading__text{font-size:unset !important}.-esm-billing__billing-form__mt2___XSCej{margin-top:2rem}.-esm-billing__billing-form__searchContent___rwtx-{position:absolute;background-color:#fff;min-width:230px;overflow:auto;border:1px solid #ddd;z-index:1;width:92%}.-esm-billing__billing-form__searchItem___gJRX7{border-bottom:.1rem solid;border-bottom-color:silver;cursor:pointer}.-esm-billing__billing-form__invalidInput___-CFhJ{border:2px solid red}.-esm-billing__billing-form__removeButton___JOb\\+t{color:#ee0909;right:20px;cursor:pointer}.-esm-billing__billing-form__form___dOD1L{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}.omrs-breakpoint-lt-desktop .-esm-billing__billing-form__form___dOD1L{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-billing__billing-form__form___dOD1L{background-color:#fff}.-esm-billing__billing-form__grid___bVIsN{margin:1rem;display:flex;flex-direction:column;gap:1rem}.-esm-billing__billing-form__row___kfkPE{margin:.5rem 0rem 0rem;display:flex;flex-flow:row wrap;gap:1rem}.-esm-billing__billing-form__spacer___5WyoB{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw{margin-top:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw h4{margin-bottom:1rem;color:#525252;font-size:1rem;font-weight:600}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{border:1px solid #e0e0e0;border-radius:.25rem;padding:1rem;margin-bottom:1rem;background-color:#f4f4f4}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemHeader___IPVIh .-esm-billing__billing-form__itemName___0pvcY{font-weight:600;font-size:1rem;color:#525252}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.5rem;align-items:flex-end}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb{display:flex;flex-direction:column;min-width:0}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child{flex:1 1 auto;min-width:250px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:0 0 140px;width:140px}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:0 0 180px;width:180px;margin-left:auto;text-align:right}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb label{font-size:.875rem;font-weight:500;margin-bottom:.5rem;color:#525252;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--number,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--combo-box,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__wrapper,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .cds--list-box__field{width:100% !important;max-width:100% !important;min-width:0 !important}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__priceDisplay___MN5Zc,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb .-esm-billing__billing-form__totalDisplay___mNY6D{font-size:.875rem;font-size:.875rem;font-weight:600;color:#525252;padding:.5rem 0;word-break:break-word}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__grandTotal___a5c-8{text-align:right;padding:1rem;border-top:2px solid #0f62fe;margin-top:1rem;background-color:#f4f4f4;font-size:1.125rem;font-weight:600;color:#525252}@media(max-width: 1056px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2){flex:1 1 100%;width:100%}}@media(max-width: 768px){.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa{padding:.75rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO{flex-direction:column;gap:.5rem}.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:first-child,.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:nth-child(2),.-esm-billing__billing-form__selectedItemsContainer___EgCXw .-esm-billing__billing-form__itemCard___-qABa .-esm-billing__billing-form__itemControls___T4bKO .-esm-billing__billing-form__controlSection___OAlFb:last-child{flex:1 1 100%;width:100%;max-width:100%}}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/billing-form/billing-form.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DF,4CACE,mBAAA,CACA,qBDFM,CCKR,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,eAAA,CACA,qBAAA,CAMR,4GACE,gBAAA,CACA,YCxJS,CDyJT,4BAAA,CACA,eC1JS,CD2JT,wBDxLI,CCyLJ,kBAAA,CACA,eAAA,CACA,aDtLM,CC0LV,0BAKU,6NACE,aAAA,CACA,UAAA,CAAA,CAQZ,yBAEI,0GACE,cCzLO,CD2LP,4JACE,qBAAA,CACA,SClMK,CDqMH,opBAGE,aAAA,CACA,UAAA,CACA,cAAA,CAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.tablet {\n padding: layout.$spacing-06 layout.$spacing-05;\n background-color: $ui-02;\n}\n\n.desktop {\n padding: 0rem;\n}\n\n.button {\n height: layout.$spacing-10;\n display: flex;\n align-content: flex-start;\n align-items: baseline;\n min-width: 50%;\n\n :global(.cds--inline-loading) {\n min-height: layout.$spacing-05 !important;\n }\n\n :global(.cds--inline-loading__text) {\n font-size: unset !important;\n }\n}\n\n.mt2 {\n margin-top: layout.$spacing-07;\n}\n\n.searchContent {\n position: absolute;\n background-color: #fff;\n min-width: 230px;\n overflow: auto;\n border: 1px solid #ddd;\n z-index: 1;\n width: 92%;\n}\n\n.searchItem {\n border-bottom: 0.1rem solid;\n border-bottom-color: silver;\n cursor: pointer;\n}\n\n.invalidInput {\n border: 2px solid red;\n}\n\n.removeButton {\n color: #ee0909;\n right: 20px;\n cursor: pointer;\n}\n\n.form {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: calc(100vh - 6rem);\n}\n\n:global(.omrs-breakpoint-lt-desktop) .form {\n background-color: #ededed;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .form {\n background-color: $ui-02;\n}\n\n.grid {\n margin: layout.$spacing-05;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-05;\n}\n\n.row {\n margin: layout.$spacing-03 0rem 0rem;\n display: flex;\n flex-flow: row wrap;\n gap: layout.$spacing-05;\n}\n\n.spacer {\n margin-top: layout.$spacing-05;\n}\n\n.selectedItemsContainer {\n margin-top: layout.$spacing-05;\n \n h4 {\n margin-bottom: layout.$spacing-05;\n color: $text-02;\n font-size: 1rem;\n font-weight: 600;\n }\n \n .itemCard {\n border: 1px solid $ui-03;\n border-radius: layout.$spacing-02;\n padding: layout.$spacing-05;\n margin-bottom: layout.$spacing-05;\n background-color: $ui-01;\n \n .itemHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: layout.$spacing-05;\n \n .itemName {\n font-weight: 600;\n font-size: 1rem;\n color: $text-02;\n }\n }\n \n .itemControls {\n display: flex;\n flex-wrap: wrap;\n gap: layout.$spacing-05;\n margin-top: layout.$spacing-03;\n align-items: flex-end; .controlSection {\n display: flex;\n flex-direction: column;\n min-width: 0;\n \n &:first-child {\n flex: 1 1 auto;\n min-width: 250px;\n }\n \n &:nth-child(2) {\n flex: 0 0 140px;\n width: 140px;\n }\n \n &:last-child {\n flex: 0 0 180px;\n width: 180px;\n margin-left: auto;\n text-align: right;\n }\n \n label {\n font-size: 0.875rem;\n font-weight: 500;\n margin-bottom: layout.$spacing-03;\n color: $text-02;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n :global(.cds--list-box),\n :global(.cds--number),\n :global(.cds--combo-box),\n :global(.cds--list-box__wrapper),\n :global(.cds--list-box__field) {\n width: 100% !important;\n max-width: 100% !important;\n min-width: 0 !important;\n }\n \n .priceDisplay,\n .totalDisplay {\n font-size: 0.875rem;\n font-size: 0.875rem;\n font-weight: 600;\n color: $text-02;\n padding: layout.$spacing-03 0;\n word-break: break-word;\n }\n }\n }\n }\n \n .grandTotal {\n text-align: right;\n padding: layout.$spacing-05;\n border-top: 2px solid $interactive-01;\n margin-top: layout.$spacing-05;\n background-color: $ui-01;\n font-size: 1.125rem;\n font-weight: 600;\n color: $text-02;\n }\n}\n\n@media (max-width: 1056px) {\n .selectedItemsContainer {\n .itemCard {\n .itemControls {\n .controlSection {\n &:nth-child(2) {\n flex: 1 1 100%;\n width: 100%;\n }\n }\n }\n }\n }\n}\n\n@media (max-width: 768px) {\n .selectedItemsContainer {\n .itemCard {\n padding: layout.$spacing-04;\n \n .itemControls {\n flex-direction: column;\n gap: layout.$spacing-03;\n \n .controlSection {\n &:first-child,\n &:nth-child(2),\n &:last-child {\n flex: 1 1 100%;\n width: 100%;\n max-width: 100%;\n }\n }\n }\n }\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),o.locals={tablet:"-esm-billing__billing-form__tablet___depIv",desktop:"-esm-billing__billing-form__desktop___XrIGU",button:"-esm-billing__billing-form__button___+KaHL",mt2:"-esm-billing__billing-form__mt2___XSCej",searchContent:"-esm-billing__billing-form__searchContent___rwtx-",searchItem:"-esm-billing__billing-form__searchItem___gJRX7",invalidInput:"-esm-billing__billing-form__invalidInput___-CFhJ",removeButton:"-esm-billing__billing-form__removeButton___JOb+t",form:"-esm-billing__billing-form__form___dOD1L",grid:"-esm-billing__billing-form__grid___bVIsN",row:"-esm-billing__billing-form__row___kfkPE",spacer:"-esm-billing__billing-form__spacer___5WyoB",selectedItemsContainer:"-esm-billing__billing-form__selectedItemsContainer___EgCXw",itemCard:"-esm-billing__billing-form__itemCard___-qABa",itemHeader:"-esm-billing__billing-form__itemHeader___IPVIh",itemName:"-esm-billing__billing-form__itemName___0pvcY",itemControls:"-esm-billing__billing-form__itemControls___T4bKO",controlSection:"-esm-billing__billing-form__controlSection___OAlFb",priceDisplay:"-esm-billing__billing-form__priceDisplay___MN5Zc",totalDisplay:"-esm-billing__billing-form__totalDisplay___mNY6D",grandTotal:"-esm-billing__billing-form__grandTotal___a5c-8"};const a=o},64739:(n,e,i)=>{i.r(e),i.d(e,{default:()=>F});var l=i(16072),t=i.n(l),r=i(2076),o=i(27804),a=i(84280),_=i(15847),s=i(54392),m=i(14720),c=i(50930),b=i(85072),g=i.n(b),d=i(97825),A=i.n(d),p=i(77659),u=i.n(p),f=i(55056),C=i.n(f),y=i(10540),h=i.n(y),w=i(41113),v=i.n(w),x=i(12149),E={};E.styleTagTransform=v(),E.setAttributes=C(),E.insert=u().bind(null,"head"),E.domAPI=A(),E.insertStyleElement=h(),g()(x.A,E);const $=x.A&&x.A.locals?x.A.locals:void 0;function k(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,l=new Array(e);i<e;i++)l[i]=n[i];return l}function B(n,e,i,l,t,r,o){try{var a=n[r](o),_=a.value}catch(n){return void i(n)}a.done?e(_):Promise.resolve(_).then(l,t)}function I(n,e,i){return e in n?Object.defineProperty(n,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[e]=i,n}function O(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{},l=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(i).filter((function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})))),l.forEach((function(e){I(n,e,i[e])}))}return n}function S(n,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):function(n){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e.push.apply(e,i)}return e}(Object(e)).forEach((function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})),n}function D(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var i=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=i){var l,t,r=[],o=!0,a=!1;try{for(i=i.call(n);!(o=(l=i.next()).done)&&(r.push(l.value),!e||r.length!==e);o=!0);}catch(n){a=!0,t=n}finally{try{o||null==i.return||i.return()}finally{if(a)throw t}}return r}}(n,e)||T(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(n){return function(n){if(Array.isArray(n))return k(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||T(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(n,e){if(n){if("string"==typeof n)return k(n,e);var i=Object.prototype.toString.call(n).slice(8,-1);return"Object"===i&&n.constructor&&(i=n.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?k(n,e):void 0}}const F=function(n){var e=n.patientUuid,i=n.closeWorkspace,b="tablet"===(0,_.useLayoutType)(),g=(0,r.useTranslation)().t,d=(0,_.useConfig)(),A=d.defaultCurrency,p=d.postBilledItems,u=D((0,l.useState)(!1),2),f=u[0],C=u[1],y=D((0,l.useState)([]),2),h=y[0],w=y[1],v=(0,s.ly)(),x=v.data,E=v.error,k=v.isLoading;return t().createElement(a.lVW,{className:$.form},t().createElement("div",{className:$.grid},k?t().createElement(a.OuH,{description:(0,_.getCoreTranslation)("loading")+"..."}):E?t().createElement(a.jeF,{kind:"error",lowContrast:!0,title:g("errorLoadingBillableServices","Error loading billable services"),subtitle:null==E?void 0:E.message}):t().createElement(a.a32,{id:"searchItems",onChange:function(n){return function(n){if(n){var e=h.find((function(e){return e.uuid===n.uuid}));if(e){var i=S(O({},e),{quantity:e.quantity+1});w(N(h).map((function(e){return e.uuid===n.uuid?i:e})))}else{var l=n.servicePrices||[],t=0,r=null;if(1===l.length){var o=l[0].price;t="number"==typeof o?o:parseFloat(o),r=l[0]}var a={uuid:n.uuid,display:n.name,quantity:1,price:t,billableService:n.uuid,paymentStatus:"PENDING",lineItemOrder:0,selectedPaymentMethod:r,availablePaymentMethods:l};w(N(h).concat([a]))}}}(n.selectedItem)},itemToString:function(n){return(null==n?void 0:n.name)||""},items:null!=x?x:[],titleText:g("searchItems","Search items and services")}),h&&h.length>0&&t().createElement("div",{className:$.selectedItemsContainer},t().createElement("h4",null,g("selectedItems","Selected items")),h.map((function(n){return t().createElement("div",{key:n.uuid,className:$.itemCard},t().createElement("div",{className:$.itemHeader},t().createElement("span",{className:$.itemName},n.display),t().createElement(a.K0,{align:"top-end",kind:"ghost",label:g("remove","Remove"),onClick:function(){return e=n.uuid,i=N(h).filter((function(n){return n.uuid!==e})),void w(i);var e,i}},t().createElement(_.TrashCanIcon,{size:16}))),t().createElement("div",{className:$.itemControls},n.availablePaymentMethods&&n.availablePaymentMethods.length>1?t().createElement("div",{className:$.controlSection},t().createElement("label",null,g("selectPaymentMethod","Select payment method")),t().createElement(a.a32,{id:"payment-method-".concat(n.uuid),items:n.availablePaymentMethods,itemToString:function(n){return n?"".concat(n.name," - ").concat((0,m.aL)("number"==typeof n.price?n.price:parseFloat(n.price),A)):""},selectedItem:n.selectedPaymentMethod,onChange:function(e){var i,l,t,r=e.selectedItem;r&&(i=n.uuid,l=r,t=N(h).map((function(n){return n.uuid===i?S(O({},n),{selectedPaymentMethod:l,price:"number"==typeof l.price?l.price:parseFloat(l.price),priceName:l.name,priceUuid:l.uuid}):n})),w(t))},placeholder:g("selectPaymentMethod","Select payment method"),titleText:""})):t().createElement("div",{className:$.controlSection},t().createElement("label",null,g("unitPrice","Unit price")),t().createElement("span",{className:$.priceDisplay},(0,m.aL)(n.price,A))),t().createElement("div",{className:$.controlSection},t().createElement("label",null,g("quantity","Quantity")),t().createElement(a.Q7x,{allowEmpty:!0,disableWheel:!0,hideSteppers:!0,id:"quantity-".concat(n.uuid),min:1,onChange:function(e,i){var l,t,r,o=i.value,a=parseFloat(String(o));l=n.uuid,t=isNaN(a)?1:a,r=N(h).map((function(n){return n.uuid===l?S(O({},n),{quantity:t}):n})),w(r)},value:n.quantity})),t().createElement("div",{className:$.controlSection},t().createElement("label",null,g("total","Total")),t().createElement("span",{className:$.totalDisplay},(0,m.aL)(n.price*n.quantity,A)))))})),t().createElement("div",{className:$.grandTotal},t().createElement("strong",null,g("grandTotal","Grand total"),":"," ",(0,m.aL)((0,m.Zz)(h),A))))),t().createElement(a.Te$,{className:b?$.tablet:$.desktop},t().createElement(a.$nd,{className:$.button,kind:"secondary",disabled:f,onClick:i},g("discard","Discard")),t().createElement(a.$nd,{className:$.button,kind:"primary",onClick:function(){return(n=function(){var n,l,t;return function(n,e){var i,l,t,r={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(_){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(i=1,l&&(t=2&a[0]?l.return:a[0]?l.throw||((t=l.return)&&t.call(l),0):l.next)&&!(t=t.call(l,a[1])).done)return t;switch(l=0,t&&(a=[2&a[0],t.value]),a[0]){case 0:case 1:t=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,l=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((t=(t=r.trys).length>0&&t[t.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!t||a[1]>t[0]&&a[1]<t[3])){r.label=a[1];break}if(6===a[0]&&r.label<t[1]){r.label=t[1],t=a;break}if(t&&r.label<t[2]){r.label=t[2],r.ops.push(a);break}t[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(n,r)}catch(n){a=[6,n],l=0}finally{i=t=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,_])}}}(this,(function(r){switch(r.label){case 0:if(!function(){var n=!0,e=!1,i=void 0;try{for(var l,t=h[Symbol.iterator]();!(n=(l=t.next()).done);n=!0){var r=l.value;if(r.availablePaymentMethods&&r.availablePaymentMethods.length>1&&!r.selectedPaymentMethod)return(0,_.showSnackbar)({title:g("validationError","Validation error"),subtitle:g("paymentMethodRequired","Payment method is required for all items"),kind:"error"}),!1}}catch(n){e=!0,i=n}finally{try{n||null==t.return||t.return()}finally{if(e)throw i}}return!0}())return[2];C(!0),n={cashPoint:p.cashPoint,cashier:p.cashier,lineItems:[],payments:[],patient:e,status:"PENDING"},h.forEach((function(e){var i={quantity:e.quantity,price:e.price,lineItemOrder:0,paymentStatus:"PENDING",billableService:e.uuid};n.lineItems.push(i)})),l="".concat(c.B,"bill"),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,(0,s.Xn)(n)];case 2:return r.sent(),i(),(0,o.j)((function(n){return"string"==typeof n&&n.startsWith(l)}),void 0,{revalidate:!0}),(0,_.showSnackbar)({title:g("saveBill","Save bill"),subtitle:g("billProcessedSuccessfully","Bill processed successfully"),kind:"success"}),[3,5];case 3:return t=r.sent(),(0,_.showSnackbar)({title:g("billProcessingError","Bill processing error"),kind:"error",subtitle:null==t?void 0:t.message}),[3,5];case 4:return C(!1),[7];case 5:return[2]}}))},function(){var e=this,i=arguments;return new Promise((function(l,t){var r=n.apply(e,i);function o(n){B(r,l,t,o,a,"next",n)}function a(n){B(r,l,t,o,a,"throw",n)}o(void 0)}))})();var n},disabled:f||0===h.length,type:"submit"},f?t().createElement(a.OuH,{description:g("saving","Saving")+"..."}):g("saveAndClose","Save and close"))))}}}]);
|
package/dist/4739.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4739.js","mappings":"qMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,wlPAAylP,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,iDAAiD,wEAAwE,MAAQ,GAAG,SAAW,y7CAAy7C,eAAiB,CAAC,g/DAAg/D,mmJAAmmJ,25DAA25D,WAAa,MAEpzjBH,EAAwBI,OAAS,CAChC,OAAU,6CACV,QAAW,8CACX,OAAU,6CACV,IAAO,0CACP,cAAiB,oDACjB,WAAc,iDACd,aAAgB,mDAChB,aAAgB,mDAChB,KAAQ,2CACR,KAAQ,2CACR,IAAO,0CACP,OAAU,6CACV,uBAA0B,6DAC1B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cAAe,EACfD,cAAe,UACfD,gBAAiBlB,EAAKI,MAGxBkE,EAAKM,UAAU1H,KAAK+H,EACtB,IAEMV,EAAM,GAAe,OAAZW,EAAAA,EAAY,Q,iBAEzB,O,uBAAA,C,GAAMC,EAAAA,EAAAA,IAAiBb,I,cAAvB,SACAxG,KACAsH,EAAAA,EAAAA,IAAO,SAACzD,G,MAAuB,iBAARA,GAAoBA,EAAI0D,WAAWd,E,QAAM3G,EAAW,CAAE0H,YAAY,KACzFd,EAAAA,EAAAA,cAAa,CACX7E,MAAOzB,EAAE,WAAY,aACrB0B,SAAU1B,EAAE,4BAA6B,+BACzCuB,KAAM,Y,oBAEDZ,EAAAA,EAAAA,QACP2F,EAAAA,EAAAA,cAAa,CACX7E,MAAOzB,EAAE,sBAAuB,yBAChCuB,KAAM,QACNG,SAAUf,aAAAA,EAAAA,EAAOgB,U,oBAGnBrB,GAAgB,G,wBAEpB,E,wLAmHQ6F,SAAU9F,GAAyC,IAAzBE,EAAcmC,OACxC2E,KAAK,UACJhH,EACC,kBAACc,EAAAA,IAAaA,CAACC,YAAapB,EAAE,SAAU,UAAY,QAEpDA,EAAE,eAAgB,oBAM9B,C","sources":["webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.scss?df6c","webpack://@openmrs/esm-billing-app/./src/billing-form/billing-form.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","patientUuid","closeWorkspace","isTablet","useLayoutType","useTranslation","t","useConfig","defaultCurrency","postBilledItems","useState","isSubmitting","setIsSubmitting","selectedItems","setSelectedItems","useBillableServices","data","error","isLoading","Form","className","styles","form","div","grid","InlineLoading","description","getCoreTranslation","InlineNotification","kind","lowContrast","title","subtitle","message","ComboBox","onChange","item","existingItem","find","selectedItem","uuid","updatedItem","quantity","map","availablePaymentMethods","servicePrices","defaultPrice","selectedPaymentMethod","length","price","parseFloat","mappedItem","display","name","billableService","paymentStatus","lineItemOrder","selectBillableItem","itemToString","items","titleText","selectedItemsContainer","h4","key","itemCard","itemHeader","span","itemName","IconButton","align","label","onClick","updatedItems","filter","TrashCanIcon","size","itemControls","controlSection","method","convertToCurrency","itemUuid","paymentMethod","priceName","priceUuid","placeholder","priceDisplay","NumberInput","allowEmpty","disableWheel","hideSteppers","min","_","value","number","String","isNaN","totalDisplay","grandTotal","strong","calculateTotalAmount","ButtonSet","tablet","desktop","Button","button","disabled","bill","url","showSnackbar","validateSelectedItems","cashPoint","cashier","lineItems","payments","patient","status","forEach","lineItem","apiBasePath","processBillItems","mutate","startsWith","revalidate","type"],"sourceRoot":""}
|