@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
|
@@ -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(8708),t.e(1146),t.e(2524),t.e(6072),t.e(5747),t.e(8572)]).then((()=>()=>t(98572)))},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.3444",(()=>Promise.all([S.e(2177),S.e(3717),S.e(8708),S.e(1856),S.e(6072),S.e(1997),S.e(5747)]).then((()=>()=>S(41856))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.
|
|
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(8708),t.e(1146),t.e(2524),t.e(6072),t.e(5747),t.e(8572)]).then((()=>()=>t(98572)))},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.3444",(()=>Promise.all([S.e(2177),S.e(3717),S.e(8708),S.e(1856),S.e(6072),S.e(1997),S.e(5747)]).then((()=>()=>S(41856))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9133",(()=>Promise.all([S.e(2177),S.e(3717),S.e(8708),S.e(4724),S.e(1146),S.e(6072),S.e(1997),S.e(5747)]).then((()=>()=>S(94724))))),l("react-dom","18.3.1",(()=>Promise.all([S.e(961),S.e(6072)]).then((()=>()=>S(40961))))),l("react-i18next","16.0.0",(()=>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))))),2076:()=>v("default","react-i18next",!1,[1,16],(()=>S.e(7255).then((()=>()=>S(77255))))),15847:()=>v("default","@openmrs/esm-framework",!1,[1,8],(()=>Promise.all([S.e(3717),S.e(1856),S.e(1997)]).then((()=>()=>S(41856))))),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],5747:[2076,15847,92646],6072:[16072],8572:[35332]},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|5747|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})();
|
|
@@ -665,9 +665,9 @@
|
|
|
665
665
|
"initial": false,
|
|
666
666
|
"entry": false,
|
|
667
667
|
"recorded": false,
|
|
668
|
-
"size":
|
|
668
|
+
"size": 43617,
|
|
669
669
|
"sizes": {
|
|
670
|
-
"javascript":
|
|
670
|
+
"javascript": 43617
|
|
671
671
|
},
|
|
672
672
|
"names": [],
|
|
673
673
|
"idHints": [],
|
|
@@ -681,7 +681,7 @@
|
|
|
681
681
|
"auxiliaryFiles": [
|
|
682
682
|
"4739.js.map"
|
|
683
683
|
],
|
|
684
|
-
"hash": "
|
|
684
|
+
"hash": "23dcc92713f643e8",
|
|
685
685
|
"childrenByOrder": {}
|
|
686
686
|
},
|
|
687
687
|
{
|
|
@@ -998,7 +998,7 @@
|
|
|
998
998
|
"auxiliaryFiles": [
|
|
999
999
|
"openmrs-esm-billing-app.js.map"
|
|
1000
1000
|
],
|
|
1001
|
-
"hash": "
|
|
1001
|
+
"hash": "84c3140026007285",
|
|
1002
1002
|
"childrenByOrder": {}
|
|
1003
1003
|
},
|
|
1004
1004
|
{
|
|
@@ -1187,9 +1187,9 @@
|
|
|
1187
1187
|
"initial": false,
|
|
1188
1188
|
"entry": false,
|
|
1189
1189
|
"recorded": false,
|
|
1190
|
-
"size":
|
|
1190
|
+
"size": 1109271,
|
|
1191
1191
|
"sizes": {
|
|
1192
|
-
"javascript":
|
|
1192
|
+
"javascript": 1109229,
|
|
1193
1193
|
"consume-shared": 42
|
|
1194
1194
|
},
|
|
1195
1195
|
"names": [],
|
|
@@ -1203,7 +1203,7 @@
|
|
|
1203
1203
|
"auxiliaryFiles": [
|
|
1204
1204
|
"8572.js.map"
|
|
1205
1205
|
],
|
|
1206
|
-
"hash": "
|
|
1206
|
+
"hash": "889be701a774d105",
|
|
1207
1207
|
"childrenByOrder": {}
|
|
1208
1208
|
},
|
|
1209
1209
|
{
|
|
@@ -1260,10 +1260,10 @@
|
|
|
1260
1260
|
"initial": true,
|
|
1261
1261
|
"entry": true,
|
|
1262
1262
|
"recorded": false,
|
|
1263
|
-
"size":
|
|
1263
|
+
"size": 5390893,
|
|
1264
1264
|
"sizes": {
|
|
1265
1265
|
"consume-shared": 210,
|
|
1266
|
-
"javascript":
|
|
1266
|
+
"javascript": 5368241,
|
|
1267
1267
|
"share-init": 336,
|
|
1268
1268
|
"runtime": 22106
|
|
1269
1269
|
},
|
|
@@ -1280,7 +1280,7 @@
|
|
|
1280
1280
|
"auxiliaryFiles": [
|
|
1281
1281
|
"main.js.map"
|
|
1282
1282
|
],
|
|
1283
|
-
"hash": "
|
|
1283
|
+
"hash": "42203052844b409c",
|
|
1284
1284
|
"childrenByOrder": {}
|
|
1285
1285
|
},
|
|
1286
1286
|
{
|
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"}},{"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"}},{"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"},{"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":"billable-services-left-panel-link","component":"billableServicesLeftPanelLink","slot":"billable-services-left-panel-slot","order":0},{"name":"bill-waiver-left-panel-link","component":"billWaiverLeftPanelLink","slot":"billable-services-left-panel-slot","order":1},{"name":"billing-settings-left-panel-menu","component":"billingSettingsLeftPanelMenu","slot":"billable-services-left-panel-slot","order":2}],"modals":[{"name":"add-cash-point-modal","component":"addCashPointModal"},{"name":"payment-mode-form-modal","component":"paymentModeFormModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"edit-bill-item-modal","component":"editBillLineItemModal"},{"name":"edit-bill-line-item-modal","component":"editBillLineItemModal"},{"name":"require-billing-modal","component":"requirePaymentModal"}],"workspaces":[{"name":"billing-form-workspace","title":"billingForm","component":"billingFormWorkspace","type":"form"},{"name":"billable-service-form","title":"billableServiceForm","component":"billableServiceFormWorkspace","type":"form","width":"wider"}],"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"}},{"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"}},{"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"},{"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":"billable-services-left-panel-link","component":"billableServicesLeftPanelLink","slot":"billable-services-left-panel-slot","order":0},{"name":"bill-waiver-left-panel-link","component":"billWaiverLeftPanelLink","slot":"billable-services-left-panel-slot","order":1},{"name":"billing-settings-left-panel-menu","component":"billingSettingsLeftPanelMenu","slot":"billable-services-left-panel-slot","order":2}],"modals":[{"name":"add-cash-point-modal","component":"addCashPointModal"},{"name":"payment-mode-form-modal","component":"paymentModeFormModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"edit-bill-item-modal","component":"editBillLineItemModal"},{"name":"edit-bill-line-item-modal","component":"editBillLineItemModal"},{"name":"require-billing-modal","component":"requirePaymentModal"}],"workspaces":[{"name":"billing-form-workspace","title":"billingForm","component":"billingFormWorkspace","type":"form"},{"name":"billable-service-form","title":"billableServiceForm","component":"billableServiceFormWorkspace","type":"form","width":"wider"}],"version":"1.0.2-pre.958"}
|
package/package.json
CHANGED
|
@@ -168,6 +168,7 @@ const EditBillLineItemModal: React.FC<EditBillLineItemModalProps> = ({ bill, clo
|
|
|
168
168
|
control={control}
|
|
169
169
|
render={({ field: { onChange, value } }) => (
|
|
170
170
|
<NumberInput
|
|
171
|
+
allowEmpty
|
|
171
172
|
disableWheel
|
|
172
173
|
className={styles.controlField}
|
|
173
174
|
hideSteppers
|
|
@@ -308,4 +308,23 @@ describe('EditBillItem', () => {
|
|
|
308
308
|
expect(screen.queryByText(/Quantity must be at least 1/)).not.toBeInTheDocument();
|
|
309
309
|
});
|
|
310
310
|
});
|
|
311
|
+
|
|
312
|
+
test('shows validation error when quantity field is left empty', async () => {
|
|
313
|
+
const user = userEvent.setup();
|
|
314
|
+
render(<EditBillLineItemModal bill={mockBill} item={mockItem} closeModal={mockCloseModal} />);
|
|
315
|
+
|
|
316
|
+
const quantityInput = screen.getByRole('spinbutton', { name: /Quantity/ });
|
|
317
|
+
await user.clear(quantityInput);
|
|
318
|
+
|
|
319
|
+
// Try to submit with empty field
|
|
320
|
+
await user.click(screen.getByText(/save/i));
|
|
321
|
+
|
|
322
|
+
// Should show validation error (empty string coerces to 0, triggering min validation)
|
|
323
|
+
await waitFor(() => {
|
|
324
|
+
expect(screen.getByText(/Quantity must be at least 1/)).toBeInTheDocument();
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
// Should NOT call the update function
|
|
328
|
+
expect(mockUpdateBillItems).not.toHaveBeenCalled();
|
|
329
|
+
});
|
|
311
330
|
});
|
|
@@ -80,16 +80,17 @@ const BillWaiverForm: React.FC<BillWaiverFormProps> = ({ bill, lineItems, setPat
|
|
|
80
80
|
|
|
81
81
|
<Layer className={styles.formControlLayer}>
|
|
82
82
|
<NumberInput
|
|
83
|
-
|
|
84
|
-
helperText={t('amountToWaiveHelper', 'Specify the amount to be deducted from the bill')}
|
|
83
|
+
allowEmpty
|
|
85
84
|
aria-label={t('amountToWaiveAriaLabel', 'Enter amount to waive')}
|
|
86
|
-
hideSteppers
|
|
87
85
|
disableWheel
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
helperText={t('amountToWaiveHelper', 'Specify the amount to be deducted from the bill')}
|
|
87
|
+
hideSteppers
|
|
90
88
|
invalidText={t('invalidWaiverAmount', 'Invalid waiver amount')}
|
|
91
|
-
|
|
89
|
+
label={t('amountToWaiveLabel', 'Amount to waive')}
|
|
90
|
+
max={totalAmount}
|
|
91
|
+
min={0}
|
|
92
92
|
onChange={(event) => setWaiverAmount(event.target.value)}
|
|
93
|
+
value={waiverAmount}
|
|
93
94
|
/>
|
|
94
95
|
</Layer>
|
|
95
96
|
</FormGroup>
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { mutate } from 'swr';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
ButtonSet,
|
|
7
|
+
ComboBox,
|
|
8
|
+
IconButton,
|
|
9
|
+
InlineLoading,
|
|
10
|
+
InlineNotification,
|
|
11
|
+
Form,
|
|
12
|
+
NumberInput,
|
|
13
|
+
} from '@carbon/react';
|
|
14
|
+
import { useConfig, useLayoutType, showSnackbar, getCoreTranslation, TrashCanIcon } from '@openmrs/esm-framework';
|
|
7
15
|
import { processBillItems, useBillableServices } from '../billing.resource';
|
|
8
16
|
import { calculateTotalAmount, convertToCurrency } from '../helpers/functions';
|
|
9
17
|
import type { BillingConfig } from '../config-schema';
|
|
@@ -181,13 +189,13 @@ const BillingForm: React.FC<BillingFormProps> = ({ patientUuid, closeWorkspace }
|
|
|
181
189
|
<div key={item.uuid} className={styles.itemCard}>
|
|
182
190
|
<div className={styles.itemHeader}>
|
|
183
191
|
<span className={styles.itemName}>{item.display}</span>
|
|
184
|
-
<
|
|
192
|
+
<IconButton
|
|
193
|
+
align="top-end"
|
|
185
194
|
kind="ghost"
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
/>
|
|
195
|
+
label={t('remove', 'Remove')}
|
|
196
|
+
onClick={() => removeSelectedBillableItem(item.uuid)}>
|
|
197
|
+
<TrashCanIcon size={16} />
|
|
198
|
+
</IconButton>
|
|
191
199
|
</div>
|
|
192
200
|
|
|
193
201
|
<div className={styles.itemControls}>
|
|
@@ -197,7 +205,6 @@ const BillingForm: React.FC<BillingFormProps> = ({ patientUuid, closeWorkspace }
|
|
|
197
205
|
<ComboBox
|
|
198
206
|
id={`payment-method-${item.uuid}`}
|
|
199
207
|
items={item.availablePaymentMethods}
|
|
200
|
-
size="md"
|
|
201
208
|
itemToString={(method: ServicePrice) =>
|
|
202
209
|
method
|
|
203
210
|
? `${method.name} - ${convertToCurrency(
|
|
@@ -226,16 +233,16 @@ const BillingForm: React.FC<BillingFormProps> = ({ patientUuid, closeWorkspace }
|
|
|
226
233
|
<div className={styles.controlSection}>
|
|
227
234
|
<label>{t('quantity', 'Quantity')}</label>
|
|
228
235
|
<NumberInput
|
|
236
|
+
allowEmpty
|
|
229
237
|
disableWheel
|
|
230
238
|
hideSteppers
|
|
231
239
|
id={`quantity-${item.uuid}`}
|
|
232
240
|
min={1}
|
|
233
|
-
value={item.quantity}
|
|
234
|
-
size="md"
|
|
235
241
|
onChange={(_, { value }) => {
|
|
236
242
|
const number = parseFloat(String(value));
|
|
237
243
|
updateQuantity(item.uuid, isNaN(number) ? 1 : number);
|
|
238
244
|
}}
|
|
245
|
+
value={item.quantity}
|
|
239
246
|
/>
|
|
240
247
|
</div>
|
|
241
248
|
|
|
@@ -114,8 +114,7 @@ const Invoice: React.FC = () => {
|
|
|
114
114
|
disabled={isPrinting || isLoadingPatient || isLoadingBill}
|
|
115
115
|
onClick={handlePrint}
|
|
116
116
|
renderIcon={(props) => <Printer size={24} {...props} />}
|
|
117
|
-
iconDescription={t('printBill', 'Print bill')}
|
|
118
|
-
size="md">
|
|
117
|
+
iconDescription={t('printBill', 'Print bill')}>
|
|
119
118
|
{t('printBill', 'Print bill')}
|
|
120
119
|
</Button>
|
|
121
120
|
{(bill?.status === 'PAID' || bill?.tenderedAmount > 0) && <PrintReceipt billId={bill?.id} />}
|
|
@@ -33,7 +33,6 @@ const PrintReceipt: React.FC<PrintReceiptProps> = ({ billId }) => {
|
|
|
33
33
|
<Button
|
|
34
34
|
kind="secondary"
|
|
35
35
|
className={styles.button}
|
|
36
|
-
size="md"
|
|
37
36
|
renderIcon={(props) => <Printer size={24} {...props} />}
|
|
38
37
|
onClick={handlePrintReceiptClick}
|
|
39
38
|
disabled={isRedirecting}>
|