@openmrs/esm-billing-app 1.0.2-pre.675 → 1.0.2-pre.676
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[4739],{12149:(n,e,r)=>{r.d(e,{A:()=>o});var t=r(72996),i=r.n(t),a=r(70159),l=r.n(a)()(i());l.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}","",{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",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","// 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:""}]),l.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"};const o=l},64739:(n,e,r)=>{r.r(e),r.d(e,{default:()=>P});var t=r(16072),i=r.n(t),a=r(53941),l=r(27804),o=r(92881),s=r(13989),c=r(15847),u=r(54392),p=r(14720),m=r(50930),d=r(85072),b=r.n(d),g=r(97825),A=r.n(g),_=r(77659),f=r.n(_),y=r(55056),C=r.n(y),h=r(10540),v=r.n(h),$=r(41113),k=r.n($),E=r(12149),w={};w.styleTagTransform=k(),w.setAttributes=C(),w.insert=f().bind(null,"head"),w.domAPI=A(),w.insertStyleElement=v(),b()(E.A,w);const x=E.A&&E.A.locals?E.A.locals:void 0;function B(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function I(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function N(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})))),t.forEach((function(e){I(n,e,r[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 r=Object.getOwnPropertySymbols(n);e.push.apply(e,r)}return e}(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})),n}function O(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,i,a=[],l=!0,o=!1;try{for(r=r.call(n);!(l=(t=r.next()).done)&&(a.push(t.value),!e||a.length!==e);l=!0);}catch(n){o=!0,i=n}finally{try{l||null==r.return||r.return()}finally{if(o)throw i}}return a}}(n,e)||j(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 D(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)||j(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 j(n,e){if(n){if("string"==typeof n)return B(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(n,e):void 0}}const P=function(n){var e=n.patientUuid,r=n.closeWorkspace,d="tablet"===(0,c.useLayoutType)(),b=(0,a.useTranslation)().t,g=(0,c.useConfig)(),A=g.defaultCurrency,_=g.postBilledItems,f=O((0,t.useState)(!1),2),y=f[0],C=f[1],h=O((0,t.useState)([]),2),v=h[0],$=h[1],k=(0,u.ly)(),E=k.data,w=k.error,B=k.isLoading;return i().createElement(o.lVW,{className:x.form},i().createElement("div",{className:x.grid},B?i().createElement(o.OuH,{description:b("loading","Loading")+"..."}):w?i().createElement(o.jeF,{kind:"error",lowContrast:!0,title:b("billErrorService","Bill service error"),subtitle:b("errorLoadingBillServices","Error loading bill services")}):i().createElement(o.a32,{id:"searchItems",onChange:function(n){return function(n){var e,r,t;if(n){var i=v.find((function(e){return e.uuid===n.uuid}));if(i){var a=S(N({},i),{quantity:i.quantity+1});$(D(v).map((function(e){return e.uuid===n.uuid?a:e})))}else{var l={uuid:n.uuid,display:n.name,quantity:1,price:(null===(e=n.servicePrices)||void 0===e?void 0:e.length)>0?parseFloat(null===(t=n.servicePrices)||void 0===t||null===(r=t[0])||void 0===r?void 0:r.price):0,billableService:n.uuid,paymentStatus:"PENDING",lineItemOrder:0};$(D(v).concat([l]))}}}(n.selectedItem)},itemToString:function(n){return(null==n?void 0:n.name)||""},items:null!=E?E:[],titleText:b("searchItems","Search items and services")}),v&&v.length>0&&i().createElement(o.XIK,{"aria-label":"sample table",className:x.mt2},i().createElement(o.ndF,null,i().createElement(o.Hjg,null,i().createElement(o.A0N,null,b("item","Item")),i().createElement(o.A0N,null,b("quantity","Quantity")),i().createElement(o.A0N,null,b("price","Price")),i().createElement(o.A0N,null,b("total","Total")),i().createElement(o.A0N,null,b("action","Action")))),i().createElement(o.BFY,null,v.map((function(n){return i().createElement(o.Hjg,null,i().createElement(o.nA6,null,n.display),i().createElement(o.nA6,null,i().createElement(o.Q7x,{id:n.uuid,min:1,value:n.quantity,onChange:function(e,r){var t,i,a,l=r.value,o=parseFloat(String(l));t=n.uuid,i=isNaN(o)?1:o,a=D(v).map((function(n){return n.uuid===t?S(N({},n),{quantity:i}):n})),$(a)}})),i().createElement(o.nA6,{id:n.uuid+"Price"},n.price),i().createElement(o.nA6,{id:n.uuid+"Total",className:"totalValue"},n.price*n.quantity),i().createElement(o.nA6,null,i().createElement(s.zH,{className:x.removeButton,onClick:function(){return e=n.uuid,r=D(v).filter((function(n){return n.uuid!==e})),void $(r);var e,r}})))})),i().createElement(o.Hjg,null,i().createElement(o.nA6,{colSpan:3}),i().createElement(o.nA6,{style:{fontWeight:"bold"}},b("grandTotal","Grand total"),":"),i().createElement(o.nA6,{id:"GrandTotalSum"},(0,p.aL)((0,p.Zz)(v),A)))))),i().createElement(o.Te$,{className:d?x.tablet:x.desktop},i().createElement(o.$nd,{className:x.button,kind:"secondary",disabled:y||0===v.length,onClick:r},b("discard","Discard")),i().createElement(o.$nd,{className:x.button,kind:"primary",onClick:function(){C(!0);var n={cashPoint:_.cashPoint,cashier:_.cashier,lineItems:[],payments:[],patient:e,status:"PENDING"};v.forEach((function(e){var r={quantity:e.quantity,price:e.price,lineItemOrder:0,paymentStatus:"PENDING",billableService:e.uuid};n.lineItems.push(r)}));var t="".concat(m.B,"bill");(0,u.Xn)(n).then((function(){C(!1),r(),(0,l.j)((function(n){return"string"==typeof n&&n.startsWith(t)}),void 0,{revalidate:!0}),(0,c.showSnackbar)({title:b("saveBill","Save Bill"),subtitle:b("billProcessingSuccess","Bill processing has been successful"),kind:"success",timeoutInMs:3e3})}),(function(n){C(!1),(0,c.showSnackbar)({title:b("billProcessingError","Bill processing error"),kind:"error",subtitle:null==n?void 0:n.message})}))},disabled:y,type:"submit"},y?i().createElement(o.OuH,{description:b("saving","Saving")+"..."}):b("saveAndClose","Save and close"))))}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[]).push([[4739],{12149:(n,e,r)=>{r.d(e,{A:()=>o});var t=r(72996),i=r.n(t),a=r(70159),l=r.n(a)()(i());l.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}","",{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",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","// 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:""}]),l.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"};const o=l},64739:(n,e,r)=>{r.r(e),r.d(e,{default:()=>P});var t=r(16072),i=r.n(t),a=r(53941),l=r(27804),o=r(92881),s=r(13989),c=r(15847),u=r(54392),p=r(14720),m=r(50930),d=r(85072),b=r.n(d),g=r(97825),A=r.n(g),_=r(77659),f=r.n(_),y=r(55056),C=r.n(y),h=r(10540),v=r.n(h),$=r(41113),k=r.n($),E=r(12149),w={};w.styleTagTransform=k(),w.setAttributes=C(),w.insert=f().bind(null,"head"),w.domAPI=A(),w.insertStyleElement=v(),b()(E.A,w);const x=E.A&&E.A.locals?E.A.locals:void 0;function B(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function I(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function N(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})))),t.forEach((function(e){I(n,e,r[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 r=Object.getOwnPropertySymbols(n);e.push.apply(e,r)}return e}(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})),n}function O(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,i,a=[],l=!0,o=!1;try{for(r=r.call(n);!(l=(t=r.next()).done)&&(a.push(t.value),!e||a.length!==e);l=!0);}catch(n){o=!0,i=n}finally{try{l||null==r.return||r.return()}finally{if(o)throw i}}return a}}(n,e)||j(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 D(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)||j(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 j(n,e){if(n){if("string"==typeof n)return B(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(n,e):void 0}}const P=function(n){var e=n.patientUuid,r=n.closeWorkspace,d="tablet"===(0,c.useLayoutType)(),b=(0,a.useTranslation)().t,g=(0,c.useConfig)(),A=g.defaultCurrency,_=g.postBilledItems,f=O((0,t.useState)(!1),2),y=f[0],C=f[1],h=O((0,t.useState)([]),2),v=h[0],$=h[1],k=(0,u.ly)(),E=k.data,w=k.error,B=k.isLoading;return i().createElement(o.lVW,{className:x.form},i().createElement("div",{className:x.grid},B?i().createElement(o.OuH,{description:b("loading","Loading")+"..."}):w?i().createElement(o.jeF,{kind:"error",lowContrast:!0,title:b("billErrorService","Bill service error"),subtitle:b("errorLoadingBillServices","Error loading bill services")}):i().createElement(o.a32,{id:"searchItems",onChange:function(n){return function(n){var e,r,t;if(n){var i=v.find((function(e){return e.uuid===n.uuid}));if(i){var a=S(N({},i),{quantity:i.quantity+1});$(D(v).map((function(e){return e.uuid===n.uuid?a:e})))}else{var l={uuid:n.uuid,display:n.name,quantity:1,price:(null===(e=n.servicePrices)||void 0===e?void 0:e.length)>0?parseFloat(null===(t=n.servicePrices)||void 0===t||null===(r=t[0])||void 0===r?void 0:r.price):0,billableService:n.uuid,paymentStatus:"PENDING",lineItemOrder:0};$(D(v).concat([l]))}}}(n.selectedItem)},itemToString:function(n){return(null==n?void 0:n.name)||""},items:null!=E?E:[],titleText:b("searchItems","Search items and services")}),v&&v.length>0&&i().createElement(o.XIK,{"aria-label":"sample table",className:x.mt2},i().createElement(o.ndF,null,i().createElement(o.Hjg,null,i().createElement(o.A0N,null,b("item","Item")),i().createElement(o.A0N,null,b("quantity","Quantity")),i().createElement(o.A0N,null,b("price","Price")),i().createElement(o.A0N,null,b("total","Total")),i().createElement(o.A0N,null,b("action","Action")))),i().createElement(o.BFY,null,v.map((function(n){return i().createElement(o.Hjg,null,i().createElement(o.nA6,null,n.display),i().createElement(o.nA6,null,i().createElement(o.Q7x,{id:n.uuid,min:1,value:n.quantity,onChange:function(e,r){var t,i,a,l=r.value,o=parseFloat(String(l));t=n.uuid,i=isNaN(o)?1:o,a=D(v).map((function(n){return n.uuid===t?S(N({},n),{quantity:i}):n})),$(a)}})),i().createElement(o.nA6,{id:n.uuid+"Price"},n.price),i().createElement(o.nA6,{id:n.uuid+"Total",className:"totalValue"},n.price*n.quantity),i().createElement(o.nA6,null,i().createElement(s.zH,{className:x.removeButton,onClick:function(){return e=n.uuid,r=D(v).filter((function(n){return n.uuid!==e})),void $(r);var e,r}})))})),i().createElement(o.Hjg,null,i().createElement(o.nA6,{colSpan:3}),i().createElement(o.nA6,{style:{fontWeight:"bold"}},b("grandTotal","Grand total"),":"),i().createElement(o.nA6,{id:"GrandTotalSum"},(0,p.aL)((0,p.Zz)(v),A)))))),i().createElement(o.Te$,{className:d?x.tablet:x.desktop},i().createElement(o.$nd,{className:x.button,kind:"secondary",disabled:y,onClick:r},b("discard","Discard")),i().createElement(o.$nd,{className:x.button,kind:"primary",onClick:function(){C(!0);var n={cashPoint:_.cashPoint,cashier:_.cashier,lineItems:[],payments:[],patient:e,status:"PENDING"};v.forEach((function(e){var r={quantity:e.quantity,price:e.price,lineItemOrder:0,paymentStatus:"PENDING",billableService:e.uuid};n.lineItems.push(r)}));var t="".concat(m.B,"bill");(0,u.Xn)(n).then((function(){C(!1),r(),(0,l.j)((function(n){return"string"==typeof n&&n.startsWith(t)}),void 0,{revalidate:!0}),(0,c.showSnackbar)({title:b("saveBill","Save Bill"),subtitle:b("billProcessingSuccess","Bill processing has been successful"),kind:"success",timeoutInMs:3e3})}),(function(n){C(!1),(0,c.showSnackbar)({title:b("billProcessingError","Bill processing error"),kind:"error",subtitle:null==n?void 0:n.message})}))},disabled:y||0===v.length,type:"submit"},y?i().createElement(o.OuH,{description:b("saving","Saving")+"..."}):b("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,81DAA+1D,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,iDAAiD,wEAAwE,MAAQ,GAAG,SAAW,qmBAAqmB,eAAiB,CAAC,g/DAAg/D,sgDAAsgD,25DAA25D,WAAa,MAEzoQH,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,8CAEX,S,mSCVIC,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQD,OAAS,IAAQA,YAASO,E,
|
|
1
|
+
{"version":3,"file":"4739.js","mappings":"qMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,81DAA+1D,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,iDAAiD,wEAAwE,MAAQ,GAAG,SAAW,qmBAAqmB,eAAiB,CAAC,g/DAAg/D,sgDAAsgD,25D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AACC,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","InlineNotification","kind","lowContrast","title","subtitle","ComboBox","onChange","item","existingItem","find","selectedItem","uuid","updatedItem","quantity","map","mappedItem","display","name","price","servicePrices","length","parseFloat","billableService","paymentStatus","lineItemOrder","selectBillableItem","itemToString","items","titleText","Table","aria-label","mt2","TableHead","TableRow","TableHeader","TableBody","row","TableCell","NumberInput","min","value","_","updatedItems","number","String","isNaN","TrashCan","removeButton","onClick","filter","colSpan","style","fontWeight","convertToCurrency","calculateTotalAmount","ButtonSet","tablet","desktop","Button","button","disabled","bill","cashPoint","cashier","lineItems","payments","patient","status","forEach","lineItem","url","apiBasePath","processBillItems","then","mutate","key","startsWith","revalidate","showSnackbar","timeoutInMs","message","type"],"sourceRoot":""}
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.24.0","fhir2":">=1.2"},"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"},"featureFlag":"billing"},{"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":"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"},"featureFlag":"billing"},{"name":"billable-services-app-menu-item","component":"billableServicesAppMenuItem","slot":"app-menu-item-slot","meta":{"name":"Billable Services"}},{"name":"billing-checkin-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm","featureFlag":"billing"},{"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":"billing-home-tiles-ext","slot":"billing-home-tiles-slot","component":"serviceMetrics"},{"name":"edit-bill-line-item-dialog","component":"editBillLineItemDialog","online":true,"offline":true}],"modals":[{"name":"require-billing-modal","component":"requirePaymentModal"}],"workspaces":[{"name":"billing-form-workspace","title":"billingForm","component":"billingFormWorkspace","type":"form"}],"featureFlags":[{"flagName":"billing","label":"Billing module","description":"This feature introduces navigation links on the patient chart and home page to allow accessing the billing module features"}],"version":"1.0.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.24.0","fhir2":">=1.2"},"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"},"featureFlag":"billing"},{"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":"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"},"featureFlag":"billing"},{"name":"billable-services-app-menu-item","component":"billableServicesAppMenuItem","slot":"app-menu-item-slot","meta":{"name":"Billable Services"}},{"name":"billing-checkin-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm","featureFlag":"billing"},{"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":"billing-home-tiles-ext","slot":"billing-home-tiles-slot","component":"serviceMetrics"},{"name":"edit-bill-line-item-dialog","component":"editBillLineItemDialog","online":true,"offline":true}],"modals":[{"name":"require-billing-modal","component":"requirePaymentModal"}],"workspaces":[{"name":"billing-form-workspace","title":"billingForm","component":"billingFormWorkspace","type":"form"}],"featureFlags":[{"flagName":"billing","label":"Billing module","description":"This feature introduces navigation links on the patient chart and home page to allow accessing the billing module features"}],"version":"1.0.2-pre.676"}
|
package/package.json
CHANGED
|
@@ -189,10 +189,15 @@ const BillingForm: React.FC<BillingFormProps> = ({ patientUuid, closeWorkspace }
|
|
|
189
189
|
</div>
|
|
190
190
|
|
|
191
191
|
<ButtonSet className={isTablet ? styles.tablet : styles.desktop}>
|
|
192
|
-
<Button className={styles.button} kind="secondary" disabled={isSubmitting
|
|
192
|
+
<Button className={styles.button} kind="secondary" disabled={isSubmitting} onClick={closeWorkspace}>
|
|
193
193
|
{t('discard', 'Discard')}
|
|
194
194
|
</Button>
|
|
195
|
-
<Button
|
|
195
|
+
<Button
|
|
196
|
+
className={styles.button}
|
|
197
|
+
kind="primary"
|
|
198
|
+
onClick={postBillItems}
|
|
199
|
+
disabled={isSubmitting || selectedItems.length === 0}
|
|
200
|
+
type="submit">
|
|
196
201
|
{isSubmitting ? (
|
|
197
202
|
<InlineLoading description={t('saving', 'Saving') + '...'} />
|
|
198
203
|
) : (
|