@openmrs/esm-billing-app 1.0.2-pre.820 → 1.0.2-pre.826

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.
Files changed (36) hide show
  1. package/dist/1856.js +1 -1
  2. package/dist/3717.js +2 -0
  3. package/dist/3717.js.map +1 -0
  4. package/dist/4300.js +1 -1
  5. package/dist/4344.js +1 -1
  6. package/dist/4344.js.map +1 -1
  7. package/dist/4724.js +1 -1
  8. package/dist/4724.js.map +1 -1
  9. package/dist/4739.js +1 -1
  10. package/dist/4739.js.map +1 -1
  11. package/dist/6295.js +2 -0
  12. package/dist/6295.js.map +1 -0
  13. package/dist/main.js +1 -1
  14. package/dist/main.js.map +1 -1
  15. package/dist/openmrs-esm-billing-app.js +1 -1
  16. package/dist/openmrs-esm-billing-app.js.buildmanifest.json +70 -70
  17. package/dist/routes.json +1 -1
  18. package/package.json +1 -1
  19. package/src/bill-item-actions/bill-item-actions.scss +21 -1
  20. package/src/bill-item-actions/edit-bill-item.modal.tsx +19 -37
  21. package/src/bill-item-actions/edit-bill-item.test.tsx +105 -16
  22. package/src/billable-services/bill-waiver/bill-selection.component.tsx +2 -2
  23. package/src/billable-services/bill-waiver/bill-waiver-form.component.tsx +26 -29
  24. package/src/billing-form/billing-checkin-form.component.tsx +18 -13
  25. package/src/billing-form/billing-form.component.tsx +20 -37
  26. package/src/billing.resource.ts +23 -12
  27. package/src/invoice/invoice-table.component.tsx +1 -1
  28. package/src/invoice/invoice-table.test.tsx +1 -1
  29. package/src/routes.json +4 -6
  30. package/translations/en.json +5 -3
  31. package/dist/7452.js +0 -2
  32. package/dist/7452.js.map +0 -1
  33. package/dist/8930.js +0 -2
  34. package/dist/8930.js.map +0 -1
  35. /package/dist/{7452.js.LICENSE.txt → 3717.js.LICENSE.txt} +0 -0
  36. /package/dist/{8930.js.LICENSE.txt → 6295.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- var _openmrs_esm_billing_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,f,p,d,c,h,m,v,g,b,y,w,_={45120:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2177),t.e(8930),t.e(1146),t.e(2524),t.e(6072),t.e(3006),t.e(4344)]).then((()=>()=>t(34344)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},P={};function S(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,loaded:!1,exports:{}};return _[e].call(t.exports,t,t.exports,S),t.loaded=!0,t.exports}S.m=_,S.c=P,S.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return S.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,S.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);S.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,S.d(o,a),o},S.d=(e,r)=>{for(var t in r)S.o(r,t)&&!S.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},S.f={},S.e=e=>Promise.all(Object.keys(S.f).reduce(((r,t)=>(S.f[t](e,r),r)),[])),S.u=e=>e+".js",S.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),S.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@openmrs/esm-billing-app:",S.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var f=s[u];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==n+o){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,S.nc&&i.setAttribute("nonce",S.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var p=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),l&&document.head.appendChild(i)}},S.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},S.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{S.S={};var e={},r={};S.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];S.o(S.S,t)||(S.S[t]={});var a=S.S[t],i="@openmrs/esm-billing-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","8.0.1-pre.3423",(()=>Promise.all([S.e(2177),S.e(7452),S.e(8930),S.e(1856),S.e(6072),S.e(1997),S.e(3006)]).then((()=>()=>S(41856))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9028",(()=>Promise.all([S.e(2177),S.e(7452),S.e(8930),S.e(4724),S.e(1146),S.e(6072),S.e(1997),S.e(3006)]).then((()=>()=>S(94724))))),l("react-dom","18.3.1",(()=>Promise.all([S.e(961),S.e(6072)]).then((()=>()=>S(40961))))),l("react-i18next","14.0.1",(()=>Promise.all([S.e(7255),S.e(6072)]).then((()=>()=>S(77255))))),l("react","18.3.1",(()=>S.e(6540).then((()=>()=>S(96540))))),l("rxjs","6.6.7",(()=>S.e(3184).then((()=>()=>S(63184))))),l("swr/immutable","2.3.3",(()=>Promise.all([S.e(2177),S.e(6072),S.e(4225)]).then((()=>()=>S(54225))))),l("swr/infinite","2.3.3",(()=>Promise.all([S.e(2177),S.e(6072),S.e(3041)]).then((()=>()=>S(23041)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;S.g.importScripts&&(e=S.g.location+"");var r=S.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),S.p=e})(),o=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},a=(e,r)=>{e=o(e),r=o(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],a=(typeof n)[0];if(t>=r.length)return"u"==a;var i=r[t],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&n!=i)return n<i;t++}},i=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(l=e[o]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var a=[];for(o=1;o<e.length;o++){var l=e[o];a.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?a.pop()+" "+a.pop():i(l))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},l=(e,r)=>{if(0 in e){r=o(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var a=0,i=1,s=!0;;i++,a++){var u,f,p=i<e.length?(typeof e[i])[0]:"";if(a>=r.length||"o"==(f=(typeof(u=r[a]))[0]))return!s||("u"==p?i>t&&!n:""==p!=n);if("u"==f){if(!s||"u"!=p)return!1}else if(s)if(p==f)if(i<=t){if(u!=e[i])return!1}else{if(n?u>e[i]:u<e[i])return!1;u!=e[i]&&(s=!1)}else if("s"!=p&&"n"!=p){if(n||i<=t)return!1;s=!1,i--}else{if(i<=t||f<p!=n)return!1;s=!1}else"s"!=p&&"n"!=p&&(s=!1,i--)}}var d=[],c=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?c()|c():2==h?c()&c():h?l(h,r):!c())}return!!c()},s=(e,r)=>e&&S.o(e,r),u=e=>(e.loaded=1,e.get()),f=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),p=(e,r,t)=>{var n=t?f(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&a(e,r)?r:e),0)},d=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",c=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>c("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,o,a){var i=S.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,S.S[r],t,!1,o,a)):e(r,S.S[r],t,n,o,a)})(((e,r,t,n,o,a)=>{if(!s(r,t))return m(e,t,a);var i=p(r,t,n);return l(o,i)||h(d(r,t,i,o)),u(r[t][i])})),g={},b={16072:()=>v("default","react",!1,[1,18],(()=>S.e(6540).then((()=>()=>S(96540))))),44209:()=>v("default","swr/immutable",!1,[1,2],(()=>S.e(6606).then((()=>()=>S(54225))))),53083:()=>v("default","rxjs",!1,[1,6],(()=>S.e(3184).then((()=>()=>S(63184))))),56339:()=>v("default","swr/infinite",!1,[1,2],(()=>S.e(5422).then((()=>()=>S(23041))))),15847:()=>v("default","@openmrs/esm-framework",!1,[1,8],(()=>Promise.all([S.e(7452),S.e(1856),S.e(1997)]).then((()=>()=>S(41856))))),53941:()=>v("default","react-i18next",!1,[1,11],(()=>S.e(7255).then((()=>()=>S(77255))))),92646:()=>v("default","react-dom",!1,[1,18],(()=>S.e(961).then((()=>()=>S(40961))))),35332:()=>v("default","@openmrs/esm-patient-common-lib",!1,[1,11],(()=>Promise.all([S.e(7452),S.e(4724),S.e(1997)]).then((()=>()=>S(94724)))))},y={1997:[44209,53083,56339],3006:[15847,53941,92646],4344:[35332],6072:[16072]},w={},S.f.consumes=(e,r)=>{S.o(y,e)&&y[e].forEach((e=>{if(S.o(g,e))return r.push(g[e]);if(!w[e]){var t=r=>{g[e]=0,S.m[e]=t=>{delete S.c[e],t.exports=r()}};w[e]=!0;var n=r=>{delete g[e],S.m[e]=t=>{throw delete S.c[e],r}};try{var o=b[e]();o.then?r.push(g[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))},(()=>{var e={6803:0};S.f.j=(r,t)=>{var n=S.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(1997|3006|6072)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=S.p+S.u(r),i=new Error;S.l(a,(t=>{if(S.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)S.o(i,n)&&(S.m[n]=i[n]);l&&l(S)}for(r&&r(t);s<a.length;s++)o=a[s],S.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),S.nc=void 0;var j=S(45120);_openmrs_esm_billing_app=j})();
1
+ var _openmrs_esm_billing_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,f,p,d,c,h,m,v,g,b,y,w,_={45120:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2177),t.e(6295),t.e(1146),t.e(2524),t.e(6072),t.e(3006),t.e(4344)]).then((()=>()=>t(34344)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},P={};function S(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,loaded:!1,exports:{}};return _[e].call(t.exports,t,t.exports,S),t.loaded=!0,t.exports}S.m=_,S.c=P,S.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return S.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,S.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);S.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,S.d(o,a),o},S.d=(e,r)=>{for(var t in r)S.o(r,t)&&!S.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},S.f={},S.e=e=>Promise.all(Object.keys(S.f).reduce(((r,t)=>(S.f[t](e,r),r)),[])),S.u=e=>e+".js",S.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),S.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@openmrs/esm-billing-app:",S.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var f=s[u];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==n+o){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,S.nc&&i.setAttribute("nonce",S.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var p=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),l&&document.head.appendChild(i)}},S.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},S.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{S.S={};var e={},r={};S.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];S.o(S.S,t)||(S.S[t]={});var a=S.S[t],i="@openmrs/esm-billing-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","8.0.1-pre.3423",(()=>Promise.all([S.e(2177),S.e(3717),S.e(6295),S.e(1856),S.e(6072),S.e(1997),S.e(3006)]).then((()=>()=>S(41856))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9035",(()=>Promise.all([S.e(2177),S.e(3717),S.e(6295),S.e(4724),S.e(1146),S.e(6072),S.e(1997),S.e(3006)]).then((()=>()=>S(94724))))),l("react-dom","18.3.1",(()=>Promise.all([S.e(961),S.e(6072)]).then((()=>()=>S(40961))))),l("react-i18next","14.0.1",(()=>Promise.all([S.e(7255),S.e(6072)]).then((()=>()=>S(77255))))),l("react","18.3.1",(()=>S.e(6540).then((()=>()=>S(96540))))),l("rxjs","6.6.7",(()=>S.e(3184).then((()=>()=>S(63184))))),l("swr/immutable","2.3.3",(()=>Promise.all([S.e(2177),S.e(6072),S.e(4225)]).then((()=>()=>S(54225))))),l("swr/infinite","2.3.3",(()=>Promise.all([S.e(2177),S.e(6072),S.e(3041)]).then((()=>()=>S(23041)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;S.g.importScripts&&(e=S.g.location+"");var r=S.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),S.p=e})(),o=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},a=(e,r)=>{e=o(e),r=o(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],a=(typeof n)[0];if(t>=r.length)return"u"==a;var i=r[t],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&n!=i)return n<i;t++}},i=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(l=e[o]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var a=[];for(o=1;o<e.length;o++){var l=e[o];a.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?a.pop()+" "+a.pop():i(l))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},l=(e,r)=>{if(0 in e){r=o(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var a=0,i=1,s=!0;;i++,a++){var u,f,p=i<e.length?(typeof e[i])[0]:"";if(a>=r.length||"o"==(f=(typeof(u=r[a]))[0]))return!s||("u"==p?i>t&&!n:""==p!=n);if("u"==f){if(!s||"u"!=p)return!1}else if(s)if(p==f)if(i<=t){if(u!=e[i])return!1}else{if(n?u>e[i]:u<e[i])return!1;u!=e[i]&&(s=!1)}else if("s"!=p&&"n"!=p){if(n||i<=t)return!1;s=!1,i--}else{if(i<=t||f<p!=n)return!1;s=!1}else"s"!=p&&"n"!=p&&(s=!1,i--)}}var d=[],c=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?c()|c():2==h?c()&c():h?l(h,r):!c())}return!!c()},s=(e,r)=>e&&S.o(e,r),u=e=>(e.loaded=1,e.get()),f=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),p=(e,r,t)=>{var n=t?f(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&a(e,r)?r:e),0)},d=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",c=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>c("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,o,a){var i=S.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,S.S[r],t,!1,o,a)):e(r,S.S[r],t,n,o,a)})(((e,r,t,n,o,a)=>{if(!s(r,t))return m(e,t,a);var i=p(r,t,n);return l(o,i)||h(d(r,t,i,o)),u(r[t][i])})),g={},b={16072:()=>v("default","react",!1,[1,18],(()=>S.e(6540).then((()=>()=>S(96540))))),44209:()=>v("default","swr/immutable",!1,[1,2],(()=>S.e(6606).then((()=>()=>S(54225))))),53083:()=>v("default","rxjs",!1,[1,6],(()=>S.e(3184).then((()=>()=>S(63184))))),56339:()=>v("default","swr/infinite",!1,[1,2],(()=>S.e(5422).then((()=>()=>S(23041))))),15847:()=>v("default","@openmrs/esm-framework",!1,[1,8],(()=>Promise.all([S.e(3717),S.e(1856),S.e(1997)]).then((()=>()=>S(41856))))),53941:()=>v("default","react-i18next",!1,[1,11],(()=>S.e(7255).then((()=>()=>S(77255))))),92646:()=>v("default","react-dom",!1,[1,18],(()=>S.e(961).then((()=>()=>S(40961))))),35332:()=>v("default","@openmrs/esm-patient-common-lib",!1,[1,11],(()=>Promise.all([S.e(3717),S.e(4724),S.e(1997)]).then((()=>()=>S(94724)))))},y={1997:[44209,53083,56339],3006:[15847,53941,92646],4344:[35332],6072:[16072]},w={},S.f.consumes=(e,r)=>{S.o(y,e)&&y[e].forEach((e=>{if(S.o(g,e))return r.push(g[e]);if(!w[e]){var t=r=>{g[e]=0,S.m[e]=t=>{delete S.c[e],t.exports=r()}};w[e]=!0;var n=r=>{delete g[e],S.m[e]=t=>{throw delete S.c[e],r}};try{var o=b[e]();o.then?r.push(g[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))},(()=>{var e={6803:0};S.f.j=(r,t)=>{var n=S.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(1997|3006|6072)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=S.p+S.u(r),i=new Error;S.l(a,(t=>{if(S.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)S.o(i,n)&&(S.m[n]=i[n]);l&&l(S)}for(r&&r(t);s<a.length;s++)o=a[s],S.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_billing_app=globalThis.webpackChunk_openmrs_esm_billing_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),S.nc=void 0;var j=S(45120);_openmrs_esm_billing_app=j})();
@@ -210,7 +210,7 @@
210
210
  "auxiliaryFiles": [
211
211
  "1856.js.map"
212
212
  ],
213
- "hash": "a229e4319f026aa0",
213
+ "hash": "378c5082189c8658",
214
214
  "childrenByOrder": {}
215
215
  },
216
216
  {
@@ -349,7 +349,7 @@
349
349
  ],
350
350
  "files": [],
351
351
  "auxiliaryFiles": [],
352
- "hash": "d93481d586182eef",
352
+ "hash": "f592db885475a05c",
353
353
  "childrenByOrder": {}
354
354
  },
355
355
  {
@@ -447,6 +447,33 @@
447
447
  "hash": "5296c25725dc9a51",
448
448
  "childrenByOrder": {}
449
449
  },
450
+ {
451
+ "rendered": true,
452
+ "initial": false,
453
+ "entry": false,
454
+ "recorded": false,
455
+ "reason": "split chunk (cache group: defaultVendors)",
456
+ "size": 4077441,
457
+ "sizes": {
458
+ "javascript": 4077441
459
+ },
460
+ "names": [],
461
+ "idHints": [
462
+ "vendors"
463
+ ],
464
+ "runtime": [
465
+ "@openmrs/esm-billing-app",
466
+ "main"
467
+ ],
468
+ "files": [
469
+ "3717.js"
470
+ ],
471
+ "auxiliaryFiles": [
472
+ "3717.js.map"
473
+ ],
474
+ "hash": "35183d57856f43f4",
475
+ "childrenByOrder": {}
476
+ },
450
477
  {
451
478
  "rendered": true,
452
479
  "initial": false,
@@ -520,9 +547,9 @@
520
547
  "initial": false,
521
548
  "entry": false,
522
549
  "recorded": false,
523
- "size": 8777,
550
+ "size": 8890,
524
551
  "sizes": {
525
- "javascript": 8777
552
+ "javascript": 8890
526
553
  },
527
554
  "names": [],
528
555
  "idHints": [],
@@ -534,7 +561,7 @@
534
561
  "4300.js"
535
562
  ],
536
563
  "auxiliaryFiles": [],
537
- "hash": "5e3aefcd437e10e9",
564
+ "hash": "78058774c4fea3fd",
538
565
  "childrenByOrder": {}
539
566
  },
540
567
  {
@@ -564,9 +591,9 @@
564
591
  "initial": false,
565
592
  "entry": false,
566
593
  "recorded": false,
567
- "size": 1166398,
594
+ "size": 1177218,
568
595
  "sizes": {
569
- "javascript": 1166356,
596
+ "javascript": 1177176,
570
597
  "consume-shared": 42
571
598
  },
572
599
  "names": [],
@@ -580,7 +607,7 @@
580
607
  "auxiliaryFiles": [
581
608
  "4344.js.map"
582
609
  ],
583
- "hash": "f506d0d12e301fca",
610
+ "hash": "511640558b070f2c",
584
611
  "childrenByOrder": {}
585
612
  },
586
613
  {
@@ -651,7 +678,7 @@
651
678
  "auxiliaryFiles": [
652
679
  "4724.js.map"
653
680
  ],
654
- "hash": "e2aa66c60df99690",
681
+ "hash": "daaffd878b3ea0b7",
655
682
  "childrenByOrder": {}
656
683
  },
657
684
  {
@@ -659,9 +686,9 @@
659
686
  "initial": false,
660
687
  "entry": false,
661
688
  "recorded": false,
662
- "size": 38056,
689
+ "size": 43598,
663
690
  "sizes": {
664
- "javascript": 38056
691
+ "javascript": 43598
665
692
  },
666
693
  "names": [],
667
694
  "idHints": [],
@@ -675,7 +702,7 @@
675
702
  "auxiliaryFiles": [
676
703
  "4739.js.map"
677
704
  ],
678
- "hash": "76e266d7cea98afc",
705
+ "hash": "d1c777178a6f760b",
679
706
  "childrenByOrder": {}
680
707
  },
681
708
  {
@@ -855,6 +882,33 @@
855
882
  "hash": "a8e8b59b9e85f503",
856
883
  "childrenByOrder": {}
857
884
  },
885
+ {
886
+ "rendered": true,
887
+ "initial": false,
888
+ "entry": false,
889
+ "recorded": false,
890
+ "reason": "split chunk (cache group: defaultVendors)",
891
+ "size": 3490510,
892
+ "sizes": {
893
+ "javascript": 3490510
894
+ },
895
+ "names": [],
896
+ "idHints": [
897
+ "vendors"
898
+ ],
899
+ "runtime": [
900
+ "@openmrs/esm-billing-app",
901
+ "main"
902
+ ],
903
+ "files": [
904
+ "6295.js"
905
+ ],
906
+ "auxiliaryFiles": [
907
+ "6295.js.map"
908
+ ],
909
+ "hash": "55d0b1a47387fd51",
910
+ "childrenByOrder": {}
911
+ },
858
912
  {
859
913
  "rendered": true,
860
914
  "initial": false,
@@ -971,7 +1025,7 @@
971
1025
  "auxiliaryFiles": [
972
1026
  "openmrs-esm-billing-app.js.map"
973
1027
  ],
974
- "hash": "aa142b9e6961f799",
1028
+ "hash": "dfcb59e04be2c114",
975
1029
  "childrenByOrder": {}
976
1030
  },
977
1031
  {
@@ -1089,33 +1143,6 @@
1089
1143
  "hash": "f4ced39e0419f4eb",
1090
1144
  "childrenByOrder": {}
1091
1145
  },
1092
- {
1093
- "rendered": true,
1094
- "initial": false,
1095
- "entry": false,
1096
- "recorded": false,
1097
- "reason": "split chunk (cache group: defaultVendors)",
1098
- "size": 4075443,
1099
- "sizes": {
1100
- "javascript": 4075443
1101
- },
1102
- "names": [],
1103
- "idHints": [
1104
- "vendors"
1105
- ],
1106
- "runtime": [
1107
- "@openmrs/esm-billing-app",
1108
- "main"
1109
- ],
1110
- "files": [
1111
- "7452.js"
1112
- ],
1113
- "auxiliaryFiles": [
1114
- "7452.js.map"
1115
- ],
1116
- "hash": "41beee450fa10580",
1117
- "childrenByOrder": {}
1118
- },
1119
1146
  {
1120
1147
  "rendered": true,
1121
1148
  "initial": false,
@@ -1209,10 +1236,10 @@
1209
1236
  "initial": true,
1210
1237
  "entry": true,
1211
1238
  "recorded": false,
1212
- "size": 5464229,
1239
+ "size": 5460672,
1213
1240
  "sizes": {
1214
1241
  "consume-shared": 210,
1215
- "javascript": 5441573,
1242
+ "javascript": 5438016,
1216
1243
  "share-init": 336,
1217
1244
  "runtime": 22110
1218
1245
  },
@@ -1229,34 +1256,7 @@
1229
1256
  "auxiliaryFiles": [
1230
1257
  "main.js.map"
1231
1258
  ],
1232
- "hash": "df3eed0f46f00380",
1233
- "childrenByOrder": {}
1234
- },
1235
- {
1236
- "rendered": true,
1237
- "initial": false,
1238
- "entry": false,
1239
- "recorded": false,
1240
- "reason": "split chunk (cache group: defaultVendors)",
1241
- "size": 3504887,
1242
- "sizes": {
1243
- "javascript": 3504887
1244
- },
1245
- "names": [],
1246
- "idHints": [
1247
- "vendors"
1248
- ],
1249
- "runtime": [
1250
- "@openmrs/esm-billing-app",
1251
- "main"
1252
- ],
1253
- "files": [
1254
- "8930.js"
1255
- ],
1256
- "auxiliaryFiles": [
1257
- "8930.js.map"
1258
- ],
1259
- "hash": "0de6e75cceba2702",
1259
+ "hash": "63be645170d3f144",
1260
1260
  "childrenByOrder": {}
1261
1261
  },
1262
1262
  {
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":"editBillLineItemModal","online":true,"offline":true}],"modals":[{"name":"add-cash-point-modal","component":"addCashPointModal"},{"name":"add-payment-mode-modal","component":"addPaymentModeModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"edit-bill-item-modal","component":"editBillLineItemModal"},{"name":"edit-billable-service-modal","component":"editBillableServiceModal"},{"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.820"}
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"}],"modals":[{"name":"add-cash-point-modal","component":"addCashPointModal"},{"name":"add-payment-mode-modal","component":"addPaymentModeModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"edit-bill-item-modal","component":"editBillLineItemModal"},{"name":"edit-bill-line-item-modal","component":"editBillLineItemModal"},{"name":"edit-billable-service-modal","component":"editBillableServiceModal"},{"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.826"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-billing-app",
3
- "version": "1.0.2-pre.820",
3
+ "version": "1.0.2-pre.826",
4
4
  "description": "O3 frontend module for handling billing concerns in healthcare settings",
5
5
  "browser": "dist/openmrs-esm-billing-app.js",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
+ @use '@carbon/colors';
1
2
  @use '@carbon/layout';
2
3
  @use '@carbon/type';
3
- @use '@carbon/colors';
4
4
 
5
5
  .sectionTitle {
6
6
  @include type.type-style('heading-compact-02');
@@ -12,6 +12,16 @@
12
12
  padding-bottom: layout.$spacing-05;
13
13
  }
14
14
 
15
+ .billInfo {
16
+ @include type.type-style('body-compact-01');
17
+ color: colors.$gray-70;
18
+
19
+ .separator {
20
+ margin: 0 layout.$spacing-02;
21
+ color: colors.$gray-50;
22
+ }
23
+ }
24
+
15
25
  .label {
16
26
  @include type.type-style('heading-compact-01');
17
27
  margin-bottom: layout.$spacing-05;
@@ -20,3 +30,13 @@
20
30
  .controlField {
21
31
  margin-bottom: layout.$spacing-05;
22
32
  }
33
+
34
+ .loader {
35
+ &:global(.cds--inline-loading) {
36
+ min-height: layout.$spacing-05;
37
+ }
38
+
39
+ :global(.cds--inline-loading__text) {
40
+ font-size: unset;
41
+ }
42
+ }
@@ -1,10 +1,8 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
2
  import {
3
3
  Button,
4
- Column,
5
4
  Form,
6
5
  InlineLoading,
7
- InlineNotification,
8
6
  ModalBody,
9
7
  ModalFooter,
10
8
  ModalHeader,
@@ -13,16 +11,18 @@ import {
13
11
  TextInput,
14
12
  } from '@carbon/react';
15
13
  import { useTranslation } from 'react-i18next';
16
- import { Controller, type FieldErrors, useForm } from 'react-hook-form';
14
+ import { Controller, useForm } from 'react-hook-form';
17
15
  import { mutate } from 'swr';
18
16
  import { z } from 'zod';
19
17
  import { zodResolver } from '@hookform/resolvers/zod';
20
- import { getCoreTranslation, showSnackbar } from '@openmrs/esm-framework';
18
+ import { getCoreTranslation, showSnackbar, useConfig } from '@openmrs/esm-framework';
21
19
  import { apiBasePath } from '../constants';
22
20
  import { getBillableServiceUuid } from '../invoice/payments/utils';
23
21
  import { type LineItem, type MappedBill } from '../types';
24
22
  import { updateBillItems } from '../billing.resource';
25
23
  import { useBillableServices } from '../billable-services/billable-service.resource';
24
+ import { type BillingConfig } from '../config-schema';
25
+ import { convertToCurrency } from '../helpers';
26
26
  import styles from './bill-item-actions.scss';
27
27
 
28
28
  interface EditBillLineItemModalProps {
@@ -33,8 +33,8 @@ interface EditBillLineItemModalProps {
33
33
 
34
34
  const EditBillLineItemModal: React.FC<EditBillLineItemModalProps> = ({ bill, closeModal, item }) => {
35
35
  const { t } = useTranslation();
36
+ const { defaultCurrency } = useConfig<BillingConfig>();
36
37
  const { billableServices } = useBillableServices();
37
- const [showErrorNotification, setShowErrorNotification] = useState(false);
38
38
  const [total, setTotal] = useState(0);
39
39
 
40
40
  const schema = useMemo(
@@ -63,12 +63,6 @@ const EditBillLineItemModal: React.FC<EditBillLineItemModalProps> = ({ bill, clo
63
63
 
64
64
  type BillLineItemForm = z.infer<typeof schema>;
65
65
 
66
- const onError = (errors: FieldErrors<LineItem>) => {
67
- if (errors) {
68
- setShowErrorNotification(true);
69
- }
70
- };
71
-
72
66
  const {
73
67
  control,
74
68
  handleSubmit,
@@ -147,23 +141,27 @@ const EditBillLineItemModal: React.FC<EditBillLineItemModalProps> = ({ bill, clo
147
141
  return (
148
142
  <>
149
143
  <ModalHeader closeModal={closeModal} title={t('editBillLineItem', 'Edit bill line item')} />
150
- <Form onSubmit={handleSubmit(onSubmit, onError)}>
144
+ <Form onSubmit={handleSubmit(onSubmit)}>
151
145
  <ModalBody>
152
146
  <Stack gap={5}>
153
147
  <div className={styles.modalBody}>
154
- <h5>
155
- {bill?.patientName} &nbsp; · &nbsp;{bill?.cashPointName} &nbsp; · &nbsp;{bill?.receiptNumber}&nbsp;
156
- </h5>
148
+ <div className={styles.billInfo}>
149
+ {bill?.patientName}
150
+ <span className={styles.separator}>·</span>
151
+ {bill?.cashPointName}
152
+ <span className={styles.separator}>·</span>
153
+ {bill?.receiptNumber}
154
+ </div>
157
155
  </div>
158
156
  <section>
159
157
  <p className={styles.label}>
160
158
  {t('item', 'Item')}: {item?.billableService ? item?.billableService : item?.item}
161
159
  </p>
162
160
  <p className={styles.label}>
163
- {t('currentPrice', 'Current price')}: {item?.price}
161
+ {t('currentPrice', 'Current price')}: {convertToCurrency(item?.price, defaultCurrency)}
164
162
  </p>
165
163
  <p className={styles.label}>
166
- {t('status', 'status')}: {item?.paymentStatus}
164
+ {t('serviceStatus', 'Service status')}: {item?.paymentStatus}
167
165
  </p>
168
166
  <Controller
169
167
  name="quantity"
@@ -191,7 +189,7 @@ const EditBillLineItemModal: React.FC<EditBillLineItemModalProps> = ({ bill, clo
191
189
  render={({ field: { value } }) => (
192
190
  <TextInput
193
191
  className={styles.controlField}
194
- helperText={t('unitPriceHelperText', 'This is the unit price for this item.')}
192
+ helperText={t('unitPriceHelperText', 'This is the unit price for this item')}
195
193
  id="priceInput"
196
194
  labelText={t('price', 'Unit Price')}
197
195
  readOnly
@@ -199,21 +197,9 @@ const EditBillLineItemModal: React.FC<EditBillLineItemModalProps> = ({ bill, clo
199
197
  />
200
198
  )}
201
199
  />
202
-
203
- <p className={styles.label}>
204
- {t('total', 'Total')}: {total}{' '}
200
+ <p className={styles.label} aria-live="polite">
201
+ {t('total', 'Total')}: {convertToCurrency(total, defaultCurrency)}
205
202
  </p>
206
-
207
- {showErrorNotification && (
208
- <Column className={styles.errorContainer}>
209
- <InlineNotification
210
- lowContrast
211
- title={t('error', 'Error')}
212
- subtitle={t('pleaseRequiredFields', 'Please fill all required fields') + '.'}
213
- onClose={() => setShowErrorNotification(false)}
214
- />
215
- </Column>
216
- )}
217
203
  </section>
218
204
  </Stack>
219
205
  </ModalBody>
@@ -224,11 +210,7 @@ const EditBillLineItemModal: React.FC<EditBillLineItemModalProps> = ({ bill, clo
224
210
  <Button type="submit" disabled={isSubmitting}>
225
211
  {isSubmitting ? (
226
212
  <div className={styles.inline}>
227
- <InlineLoading
228
- status="active"
229
- iconDescription={t('submitting', 'Submitting')}
230
- description={t('submitting', 'Submitting') + '...'}
231
- />
213
+ <InlineLoading className={styles.loader} description={`${t('submitting', 'Submitting')}...`} />
232
214
  </div>
233
215
  ) : (
234
216
  getCoreTranslation('save')