@palladium-ethiopia/esm-billing-app 5.4.2-pre.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +22 -0
- package/README.md +5 -0
- package/__mocks__/bill.mock.ts +107 -0
- package/__mocks__/visit.mock.ts +151 -0
- package/dist/003671ee2a876e7614cd94390e2255b3.js +1 -0
- package/dist/0078b630bed2938ce03f618c2bcd1363.js +1 -0
- package/dist/0144de97a3c256f81447e7e7135780e5.js +1 -0
- package/dist/019e34e85139cfc611bf23efa096c980.js +1 -0
- package/dist/01b769b06e3967d7382e74f2c443ca6e.js +1 -0
- package/dist/02174460fe8ff6a6bc19db86543b9600.js +1 -0
- package/dist/022fc31e47969919bef8f04c7ceb6396.js +1 -0
- package/dist/029ed9161a8d24a9c2ba97124020989d.js +1 -0
- package/dist/029f5ee0420883bc3c38a7f143fd174a.js +1 -0
- package/dist/03980cb12dacd26148c22bb61fce440f.js +1 -0
- package/dist/03a5f5b2b97a8fc289399d92fba810d0.js +1 -0
- package/dist/03aae8272914723a7bf85b984385032c.js +1 -0
- package/dist/03f614920ec2da304abfca8b015a2b40.js +1 -0
- package/dist/0416c21cfe088739209926632a360e3b.js +1 -0
- package/dist/069a0d6b093e73e820f6a60a91fa614b.js +1 -0
- package/dist/06d958315fc6cdbb28576b03e43203aa.js +1 -0
- package/dist/07397bd479cbc34bc04576b4f15bdf18.js +1 -0
- package/dist/078dd0bd08c93b1512e3d1b777591b21.js +1 -0
- package/dist/08eb6e8d603ac500da471cc07b0cf188.js +1 -0
- package/dist/0972f21af3e75388ef55435c0b3b831d.js +1 -0
- package/dist/0973bb38b2e3efd2a879fd8e81d50fce.js +1 -0
- package/dist/0a1d9862d917663419ac2dd2e8193267.js +1 -0
- package/dist/0b06cbc7edf78b6f2810187262e7630b.js +1 -0
- package/dist/0bd45b2d490c48c31619072a4fb0eaea.js +1 -0
- package/dist/0bf319cb891a35363be356125cf61925.js +1 -0
- package/dist/0d5aa4cf4cd6ced22d689adc35468925.js +1 -0
- package/dist/0e579f8a92c87ee13f03bbb00bfd6965.js +1 -0
- package/dist/0e67325b9a04863301e36c0c37947069.js +1 -0
- package/dist/0e9edc546e19e0d70ebaeec446142d3f.js +1 -0
- package/dist/0f147528a6f36ca40c8b3ec796429f58.js +1 -0
- package/dist/0fa30731c46fe8b6a54f9752ad0ed7e0.js +1 -0
- package/dist/10.js +1 -0
- package/dist/10.js.map +1 -0
- package/dist/101.js +1 -0
- package/dist/101.js.map +1 -0
- package/dist/10132993df2cf9c9423b53a8a44379ab.js +1 -0
- package/dist/1034e3807d1bcf55cb564491950237ab.js +1 -0
- package/dist/10c464f3f882bfeeefbc0934c2ee9fbe.js +1 -0
- package/dist/111d9fdb9864abba36298d1a0807fe6d.js +1 -0
- package/dist/112.js +1 -0
- package/dist/112.js.map +1 -0
- package/dist/117.js +1 -0
- package/dist/1195816afa4a5e8183857be16a04ae6f.js +1 -0
- package/dist/119f6c45ea400e3c27e1ce172e4c881d.js +1 -0
- package/dist/11e3a2a8fb5bcb9d19298a80cafd3f5a.js +1 -0
- package/dist/130340e2c62b9e858f186dab5f491e55.js +1 -0
- package/dist/131.js +1 -0
- package/dist/131.js.map +1 -0
- package/dist/135747176621bcc94e9edd0323a81d3c.js +1 -0
- package/dist/1383530217ac0068c844902d24e18e08.js +1 -0
- package/dist/13eda3507db9cbfb400f46b9b3ff6553.js +1 -0
- package/dist/1495a3d68b15b8622c53f6688b64809f.js +1 -0
- package/dist/152.js +1 -0
- package/dist/152.js.map +1 -0
- package/dist/1533058f0ce13acdaa8d5bdc7d147bef.js +1 -0
- package/dist/157d1af856797eaa6a6d4517a5335299.js +1 -0
- package/dist/15f3800d33b854ba476c9daf1b9e0326.js +1 -0
- package/dist/166.js +15 -0
- package/dist/166.js.map +1 -0
- package/dist/16c2e1b50af4ba05edaa03c8c9e9d18c.js +1 -0
- package/dist/170487867de05784a96608617bdd544d.js +1 -0
- package/dist/1736cea368ae85240f34289307fdf67f.js +1 -0
- package/dist/17632e1e19e438f431784dfd77e01773.js +1 -0
- package/dist/17dc98279d24649d3ca77cbce8c44e83.js +1 -0
- package/dist/187.js +1 -0
- package/dist/187.js.map +1 -0
- package/dist/1875ecdf54e78b5f07ff1bd944cf794b.js +1 -0
- package/dist/191feb6103c36b202bc01ba262916cdf.js +1 -0
- package/dist/1983055014f3f7a31b72b9c24eebfe2e.js +1 -0
- package/dist/1a435bdf5bbc57b954136c38dea5dd56.js +1 -0
- package/dist/1b012b7a13787e2ab186f7bc6978af5d.js +1 -0
- package/dist/1b15b9f88acaf59b96e59c6b5f32da12.js +1 -0
- package/dist/1b399d419893e83d7aea276705c2cd46.js +1 -0
- package/dist/1c24a68cb472146022d0806ea2505cfb.js +1 -0
- package/dist/1c57b3481f295105588972ffa1305521.js +1 -0
- package/dist/1cc6fc3772824e2f87f10a9c3fad2dae.js +1 -0
- package/dist/1ce14f2cad9f3c122cb5ccfcd485ffb4.js +1 -0
- package/dist/1d3796180f854b5d8ab435ab0a1c2c11.js +1 -0
- package/dist/1f5e5fcf6311b2bee3ea3d90352d584a.js +1 -0
- package/dist/1ff1389501159e4846a5133e3b8992d8.js +1 -0
- package/dist/20545e6680e996248f667158904a6a9b.js +1 -0
- package/dist/209.js +1 -0
- package/dist/209.js.map +1 -0
- package/dist/210aec2722e6416a0349a987260e14a3.js +1 -0
- package/dist/211511e7b374f57ad31acaf49dbdccb1.js +1 -0
- package/dist/219.js +1 -0
- package/dist/219.js.map +1 -0
- package/dist/21ce36baab7df3edd2c728ac1a6776b7.js +1 -0
- package/dist/21d07d2aa7d7e54330fb3c627689a691.js +1 -0
- package/dist/225.js +1 -0
- package/dist/225.js.map +1 -0
- package/dist/2272c6632c52c3e402ab27b8045ab8f1.js +1 -0
- package/dist/2287e0a9970175f8e26f811b688d2d36.js +1 -0
- package/dist/228ca80abf1ae030cbfe7faaec61913f.js +1 -0
- package/dist/2302902e10c4afab56e1b864c96070cb.js +1 -0
- package/dist/2348c5ed0da81c27fa889f56e43f91a1.js +1 -0
- package/dist/23602ad4c88f0f19e7a0a12454ebf556.js +1 -0
- package/dist/23bb1a9f279e7a732bfd405350aab114.js +1 -0
- package/dist/245.js +1 -0
- package/dist/245.js.map +1 -0
- package/dist/24547132c0093d2bae739db169cda5a6.js +1 -0
- package/dist/24a3ff38afde257888d755ece9bfd704.js +1 -0
- package/dist/24f97ddd76026815674affbc50ad6169.js +1 -0
- package/dist/254.js +27 -0
- package/dist/254.js.map +1 -0
- package/dist/25718a469574ade47e23567d8c543169.js +1 -0
- package/dist/25be9f866b93e4ffa34f07a4fde632d4.js +1 -0
- package/dist/25eda4bb98e40a82cfd5b4bf9fbc06ec.js +1 -0
- package/dist/269732f4c5f6e82ea3246548a9631b47.js +1 -0
- package/dist/27730a0bdc6f430cc85049a46a73a029.js +1 -0
- package/dist/283970c76db99e2d0d90f0e7c45494f9.js +1 -0
- package/dist/28785bea435918d49b290d27bf660baa.js +1 -0
- package/dist/29558eac6b1d269fb491df21eb506d11.js +1 -0
- package/dist/29c12604c7db4a1ad67ed4d7cdb4f4ed.js +1 -0
- package/dist/2a8394955e047270a2a965ec67843989.js +1 -0
- package/dist/2aa392a501973ebfcea38239a45ed8e7.js +1 -0
- package/dist/2ad349208b3a727abb3c9f943865a27c.js +1 -0
- package/dist/2b1b8f8b9e8f1e423a69afd121fd7da9.js +1 -0
- package/dist/2b385abd24ebcff8a1c7de52aa2970ab.js +1 -0
- package/dist/2b5729e073775b8fb827fc8e4725e48a.js +1 -0
- package/dist/2b89e20071dd734f42b8694d7a84c264.js +1 -0
- package/dist/2d2a75e3d01a74b93d07db04df8abe5e.js +1 -0
- package/dist/2dd82c65030101b60dffccedd8741c6e.js +1 -0
- package/dist/2e841e8b77c2a2c00fd71940632bc1e1.js +1 -0
- package/dist/2f055ac4066041b9008dd6aebf9df34b.js +1 -0
- package/dist/2fc0239242a898632ca8aa451cb930c2.js +1 -0
- package/dist/318dcae1cdcd4733986a93e7a5fab7b8.js +1 -0
- package/dist/31c610efb1d25afc90853b52ba4cb089.js +1 -0
- package/dist/3219bb3283a319e7a33f7366deb7ed1b.js +1 -0
- package/dist/328cbf598e9711b0a87c19437b02f80d.js +1 -0
- package/dist/32cf6d8a099c0a653928cbc9a05af5da.js +1 -0
- package/dist/33b4e371d4983ab56f4db08627119f0b.js +1 -0
- package/dist/349237ad9565dc823ce7bcb7527ba7ee.js +1 -0
- package/dist/34f99cce131bd7aa65e7a924e2456006.js +1 -0
- package/dist/3567d1ea443427e944a6f189a0898819.js +1 -0
- package/dist/363d3bac8dcd9a83332c3758185ce080.js +1 -0
- package/dist/367def81f25c0a08527f9a4e86e70c56.js +1 -0
- package/dist/37172facd8a534a38f378ca2a9c7c11b.js +1 -0
- package/dist/378.js +1 -0
- package/dist/37ee3b5201ae2e2dc5dc8b1b20ad900e.js +1 -0
- package/dist/38105097fc2497d628f398be7db5f6e8.js +1 -0
- package/dist/38b1d18836e38ee7b4deaeba0c35f7b8.js +1 -0
- package/dist/39fea85ed7dd99d7c6c9e59b7040523f.js +1 -0
- package/dist/3a395ae85f6a58001cb48cc5a4e6360b.js +1 -0
- package/dist/3a6ca6958d003ae67bb7fefc8713ee93.js +1 -0
- package/dist/3ac8c7749734990e2d9f81eeca219886.js +1 -0
- package/dist/3b02cca9e95276a74f3ed2bbc7a64ce6.js +1 -0
- package/dist/3b190e5159c72fb7e27271956772bcba.js +1 -0
- package/dist/3b26795ad1700506b62e1171ff6fcd9b.js +1 -0
- package/dist/3b544bb2c5a4e7b225a4b50235a0fd6d.js +1 -0
- package/dist/3b6e7dc98c47eeafd851ca5072db4be6.js +1 -0
- package/dist/3bee0656a21a6106946d9f424fc22337.js +1 -0
- package/dist/3bf96f8eb1859e2724a4b769af3b5f1e.js +1 -0
- package/dist/3c5b59a666c5d39d9ba9cc054d36a410.js +1 -0
- package/dist/3e93259f04cf0b4b52cc237cfc21cb05.js +1 -0
- package/dist/3ea020c57c2bbf457a8497df313b2e5c.js +1 -0
- package/dist/3eefbe1c009cfd730b2ca6f834367c45.js +1 -0
- package/dist/3efaf75fa91357a71f55203c10d0562b.js +1 -0
- package/dist/3f896944a97f002f2146e028ff2eac63.js +1 -0
- package/dist/41.js +1 -0
- package/dist/41.js.map +1 -0
- package/dist/41a77c181e7d3172f53496cb25166d13.js +1 -0
- package/dist/41ae585cdbb9c2e8eefff5d30193029f.js +1 -0
- package/dist/41e8a86a20df71cb48a373b096c06cd1.js +1 -0
- package/dist/42e0ea6351d45d342caab13cb12f9ea4.js +1 -0
- package/dist/43139bfbcbce9de597b4985dc1e6a03b.js +1 -0
- package/dist/432a5982ba3ddf958381d780e1e9a8e2.js +1 -0
- package/dist/432aff60ba31a74d2120031fdc894775.js +1 -0
- package/dist/433.js +1 -0
- package/dist/433.js.map +1 -0
- package/dist/442.js +1 -0
- package/dist/442.js.map +1 -0
- package/dist/4430c55f023b72fb5e389cee9351b38c.js +1 -0
- package/dist/44599d9b6202ebebfcdd073edf3562e3.js +1 -0
- package/dist/44e9d75bc694599ba5a672eeec11d3b7.js +1 -0
- package/dist/44efcea2f84e80cc4092a89796afe886.js +1 -0
- package/dist/45227a487a5d1829deaf3589411c7333.js +1 -0
- package/dist/453d207e70a9d6fe976b60b6a20b39fb.js +1 -0
- package/dist/458.js +1 -0
- package/dist/458.js.map +1 -0
- package/dist/466.js +1 -0
- package/dist/466.js.map +1 -0
- package/dist/46ed21c8fbddeefacaf10d78887aa22a.js +1 -0
- package/dist/472ba8f81bf8cac86027cb1be4e3b9cd.js +1 -0
- package/dist/479.js +1 -0
- package/dist/479.js.map +1 -0
- package/dist/47e5776dff3b80ed69ab5947dba33c76.js +1 -0
- package/dist/48827a80c9c8a8b394a208065231dabb.js +1 -0
- package/dist/48e9351c5623d4da657ce7d5d0267ea6.js +1 -0
- package/dist/49582665262ff6179b9f3a98adf7ed5c.js +1 -0
- package/dist/4b692785a8a6340a89e6067274a7583c.js +1 -0
- package/dist/4bee3a46b8378a7b4ef84492f08abd22.js +1 -0
- package/dist/4bf3bc1fbdd26ac698fef1bdf26e3ff4.js +1 -0
- package/dist/4c1bdecbedd36a5765de184ac056822a.js +1 -0
- package/dist/4d0ebf4c528cee9b0cdd3e076e06570b.js +1 -0
- package/dist/4d156ee0485ab4b40b090a3cd7b995a9.js +1 -0
- package/dist/4d6d9020e7e5c8d8dee7a5e374355f05.js +1 -0
- package/dist/4d8cb7033879cb7fcc7a43798e2bde22.js +1 -0
- package/dist/4db8b05f109448d519f60cbb920dc38e.js +1 -0
- package/dist/4db989de49617370db449991af03f578.js +1 -0
- package/dist/4e389cce6fb8f78845fab249bce43c0b.js +1 -0
- package/dist/4ef80ee74467e0297eec3cc03092da01.js +1 -0
- package/dist/4f03709d8b1d52a622f0676f7a299510.js +1 -0
- package/dist/4f2451dd2095d05141a5c24fab1594e1.js +1 -0
- package/dist/4f683c6881e9f8740f5516a85b9eb9da.js +1 -0
- package/dist/509.js +1 -0
- package/dist/509.js.map +1 -0
- package/dist/50d61b10bebf34dab99e3025495beaa2.js +1 -0
- package/dist/5106411f7468a5ee5b1ee77aed12c0c7.js +1 -0
- package/dist/512.js +1 -0
- package/dist/512.js.map +1 -0
- package/dist/517200f13a5516e40a9ad6d9c5bcd90e.js +1 -0
- package/dist/51f903c5ce5284a63196247cffb5ca40.js +1 -0
- package/dist/52fd09d1713345d9ee64dc7daea9fd6f.js +1 -0
- package/dist/5348f3cfbe5a63954e7d984f197bbddb.js +1 -0
- package/dist/5352ecd8e5f1a2637b48e18cc406edb1.js +1 -0
- package/dist/5398e3b596fa15df4d84b2aa0464e5c4.js +1 -0
- package/dist/53e3600928916423671f3388e2d67844.js +1 -0
- package/dist/54560f13b36626237959e93b7771a484.js +1 -0
- package/dist/54a10f3bddad1e6da452fee7124fe846.js +1 -0
- package/dist/57e14488b13e50ebdb5fdfc7880da683.js +1 -0
- package/dist/57f4109bd1f06be4dc2bcb8ff7eaf1e5.js +1 -0
- package/dist/582e24f5ba929e358fadfc7be4c18025.js +1 -0
- package/dist/58598705e7012f4ca1eb1dd21d3c59a5.js +1 -0
- package/dist/5861dfe4f2c7823623e82d0619c5bf06.js +1 -0
- package/dist/58aab872dbdb5e1607076e1935130e03.js +1 -0
- package/dist/58c35e5c73bbc1664bbd67c570342aa0.js +1 -0
- package/dist/59cc05504a1c823b6d4796bf6b430822.js +1 -0
- package/dist/5a496ae20cc576bef1d35972548207cf.js +1 -0
- package/dist/5a741aab715866cb4d9a55e89dfc8420.js +1 -0
- package/dist/5a8ead0357e5029a2518959423dc29f3.js +1 -0
- package/dist/5b6a626249d0bc43e412fffa6a9ee177.js +1 -0
- package/dist/5c9be61a5fe851f5f37cc4de2586b096.js +1 -0
- package/dist/5cab33610b8d9c1aee4db4672811cb5f.js +1 -0
- package/dist/5cd4e1282f4409600b942819b7aa4f21.js +1 -0
- package/dist/5ce650c06c385f9d15621e54c60457c0.js +1 -0
- package/dist/5cebfc2c3495b6294dcb2a99e5174872.js +1 -0
- package/dist/5d312b184c1f4565f51247d3c6dbba90.js +1 -0
- package/dist/5d3314103b00c8ea165c6f9f6757f794.js +1 -0
- package/dist/5df362c9904925cdf574d9506e4be76d.js +1 -0
- package/dist/5e55b301888460bd06c8e26d1011e01a.js +1 -0
- package/dist/5e8a4f4320a07ae4bb1d8a5cd621d955.js +1 -0
- package/dist/5f3ce6efab3c679ec1ad25ab0b3f6b2f.js +1 -0
- package/dist/5f5a93ab1249b7cbdb13d9466febd3a0.js +1 -0
- package/dist/5fedbf948ed123687f77167fac1faf8b.js +1 -0
- package/dist/5ffbb9579edc192b3e268a1f47fa61ae.js +1 -0
- package/dist/60190285b6c2243e14184b9e57d48dbb.js +1 -0
- package/dist/60d2bacc2e51eabc2bb0afa982fffb56.js +1 -0
- package/dist/60ede8d7ffdf4c05f2ce51b6d8d2be68.js +1 -0
- package/dist/60f8f158539619aaf544fa35ce8daccd.js +1 -0
- package/dist/61.js +1 -0
- package/dist/61.js.map +1 -0
- package/dist/617ddc517c704963dc032140e80151d5.js +1 -0
- package/dist/622e27eec5f26148f51ccc30315a3deb.js +1 -0
- package/dist/6250c7594cd66ca91184b5beca293e06.js +1 -0
- package/dist/629e56c05a8ab32ebfd5d058ba8d242d.js +1 -0
- package/dist/62a96977e725e8bc809dc80afe0fedf1.js +1 -0
- package/dist/63596b4896732fb322ab0496b4be1e74.js +1 -0
- package/dist/639.js +1 -0
- package/dist/639.js.map +1 -0
- package/dist/6490772da5aecc6cb9e4c625abc74a96.js +1 -0
- package/dist/64a5f4d62507d032038dcd76d15188e1.js +1 -0
- package/dist/64d6924350bd7706850cdc0dcc76ccf6.js +1 -0
- package/dist/656927386f77b2620f35af391f59d5ab.js +1 -0
- package/dist/65abcd8e99a385bcd8f1776f160040a9.js +1 -0
- package/dist/65e7cf62ca9df32c18b630f31025a401.js +1 -0
- package/dist/663ffb67b9683a2126410325d1a5a152.js +1 -0
- package/dist/678f5201c1917429f334b88078ca4174.js +1 -0
- package/dist/689.js +1 -0
- package/dist/689.js.map +1 -0
- package/dist/69731d1754f66b8b2640df4f561a6526.js +1 -0
- package/dist/6a1c347ab79a93f3ac01b08c8ccfc827.js +1 -0
- package/dist/6a3775ac1fe6361f31918720b62c8f3d.js +1 -0
- package/dist/6a851f05f1f4a974e02fe23eac2bad4e.js +1 -0
- package/dist/6b4b87a54f673cfbb82be45329441bef.js +1 -0
- package/dist/6bed1b724e74e6bc80688f42bc824d70.js +1 -0
- package/dist/6c0a75dc5671c3f237a79f6e45b9891c.js +1 -0
- package/dist/6c3d5ea389d0e47cbe327673b7495701.js +1 -0
- package/dist/6c67587c2093ac3a19da9f2196e040b7.js +1 -0
- package/dist/6d38cef4a006e6cfe54a6117aba7b600.js +1 -0
- package/dist/6e40b726d91e9138d9eaef6fd012c740.js +1 -0
- package/dist/6eac646091211287dd5e5b376c755110.js +1 -0
- package/dist/6faa9e5f2a0122d2333fa450337a09b0.js +1 -0
- package/dist/70074e0c785c9a808dea76c7c7d17af3.js +1 -0
- package/dist/70286c33cab463fd576766adecd2d5d9.js +1 -0
- package/dist/7080d2a1db1608264a6d9d9fbaf2cce8.js +1 -0
- package/dist/711.js +1 -0
- package/dist/711.js.map +1 -0
- package/dist/712.js +1 -0
- package/dist/712.js.map +1 -0
- package/dist/714763ddd9bd466c95df7b042900bb87.js +1 -0
- package/dist/7222998c10fabd9c824cf8cf540b3b74.js +1 -0
- package/dist/724a16861717b5b4f786d24b56b62614.js +1 -0
- package/dist/7259bceba25ac1476fc775122a63d249.js +1 -0
- package/dist/725da29f1643c2263a437c08a1454aea.js +1 -0
- package/dist/732e6b65765e6a792f04be1fa30993a5.js +1 -0
- package/dist/74988a42599f1bd6a3a890e5f582da2b.js +1 -0
- package/dist/75182a479f7eba2798d943fa230a91ef.js +1 -0
- package/dist/755114145e5b97e5571a160a39e716db.js +1 -0
- package/dist/764b59bdd3a89e14f88c9d63020551a1.js +1 -0
- package/dist/771.js +1 -0
- package/dist/771.js.map +1 -0
- package/dist/77aaca51c1c32acaf32656d45f4dc017.js +1 -0
- package/dist/789.js +1 -0
- package/dist/789.js.map +1 -0
- package/dist/78c709e6b518df25c267f2a5116de970.js +1 -0
- package/dist/79241f85b016a7332f85bb66667459c2.js +1 -0
- package/dist/79455ab9a6cd507f5314141cc965093a.js +1 -0
- package/dist/7a4e3546b63a5296028f4268f96b82b3.js +1 -0
- package/dist/7b839a5c1f6d89538928c8a29003bbda.js +1 -0
- package/dist/7c488184a1ff274206e8af2c3aeeb2f6.js +1 -0
- package/dist/7e0c1151de4aade1c41d42a40530fc7c.js +1 -0
- package/dist/7e4099fc2d04c7c1cf96892b962ba4ec.js +1 -0
- package/dist/7e7131507a20f96834597eb2de3e880a.js +1 -0
- package/dist/7f007f3f67d9c856e727cec1369f8cba.js +1 -0
- package/dist/7f79d4bde67c8013b187889b63e25bce.js +1 -0
- package/dist/7f9a9efc9ab681fcbf6400e2adb368a9.js +1 -0
- package/dist/8024bca4a1198cc51cbffaa7a907ee99.js +1 -0
- package/dist/805cb6232d7a9fa46025d48a43622ecf.js +1 -0
- package/dist/806.js +1 -0
- package/dist/80ddbf4f0fdde4ddba57130e61043017.js +1 -0
- package/dist/81318a3530fb35d5178eb7a4a13a606f.js +1 -0
- package/dist/814b9f8056e54d372eefebdae282728e.js +1 -0
- package/dist/814fee9e631f1e4ceb9f1983c0349fa9.js +1 -0
- package/dist/816.js +1 -0
- package/dist/816.js.map +1 -0
- package/dist/817edb0c6f9d66f9c0027762edb1d797.js +1 -0
- package/dist/82ff13fbc1af95d2d76ca788fd72e607.js +1 -0
- package/dist/83387cb17a7680f59240e7b399e3ac2b.js +1 -0
- package/dist/834d28f1d0979e2614f1e8643f0b7211.js +1 -0
- package/dist/839e3594798c1942d3c92f9acfaa5f0b.js +1 -0
- package/dist/83bd353f98aa901411c82b8af58d1296.js +1 -0
- package/dist/83e8c44ee2a064e0eac31dbd3c876493.js +1 -0
- package/dist/84270e22d4439d15b0d8f392d1338d8e.js +1 -0
- package/dist/843c762c24f7fac628d8c62519a7b308.js +1 -0
- package/dist/84abf03cc94d264bb38020b4ac5f76e1.js +1 -0
- package/dist/852.js +1 -0
- package/dist/852.js.map +1 -0
- package/dist/875ae58e8015a6d08dbc9d0c04e24638.js +1 -0
- package/dist/879d6bc1ca1dde95a9a98dc7a2ab0d06.js +1 -0
- package/dist/87bce6f50196688852142c679227b1b9.js +1 -0
- package/dist/880ae94877022f7fb0458ced0825eb4c.js +1 -0
- package/dist/88730abfeb4a23e692ac7933882f12eb.js +1 -0
- package/dist/88ca2076c5882a4abcf74c2b173a9c58.js +1 -0
- package/dist/88e2feda80ac8cfb28f1dc0ec833b40d.js +1 -0
- package/dist/894052ca1f8f35cc1cf7cfb29ef75027.js +1 -0
- package/dist/894edcaf39c3c95818e3949d737ed459.js +1 -0
- package/dist/897.js +1 -0
- package/dist/897.js.map +1 -0
- package/dist/8a31266178067a316bb2503147cdb5cb.js +1 -0
- package/dist/8a5127228870aafabfff6111d29313d6.js +1 -0
- package/dist/8afd141ad70961656700a70beeb2eb05.js +1 -0
- package/dist/8c7616f0adba6a5ac0d2f06ba4ebd696.js +1 -0
- package/dist/8d9bb1799d9b98db107e84f10132e17f.js +1 -0
- package/dist/8ed58ed9c7e1cb1ae1f2830d29011ffb.js +1 -0
- package/dist/8ed5aba33ead1f94e97d5c35a5e93434.js +1 -0
- package/dist/8eede17ae9e4d25c3c17b8a8a7fc3c3d.js +1 -0
- package/dist/8f9ce72eeabbf31f2d51f4bcfc66d3b0.js +1 -0
- package/dist/90812d89181b698975cbb081adcbbcb0.js +1 -0
- package/dist/90d2a5c1cd19738e0968b86280050556.js +1 -0
- package/dist/90f3dc3c18d447104b63c156cb7fddb5.js +1 -0
- package/dist/91beb08737a1bbf071f351fb0acdbf3c.js +1 -0
- package/dist/926.js +17 -0
- package/dist/926.js.map +1 -0
- package/dist/92f4aab5c66f6269c7054c8fbcb3de13.js +1 -0
- package/dist/947d538f92dd1e146e4a3c41e4eacb92.js +1 -0
- package/dist/950a205e91da7e78226dd785fd6d34db.js +1 -0
- package/dist/961.js +1 -0
- package/dist/961.js.map +1 -0
- package/dist/962969a46fefcace3305abd4d6e14a2e.js +1 -0
- package/dist/9696a4229fb787eeb25b26f1274b75ee.js +1 -0
- package/dist/96b8d8b5efd11741639659c63a485c27.js +1 -0
- package/dist/9807cf1e443a7440371904b6525f37eb.js +1 -0
- package/dist/981bd23edacd811f9e4a583d89b544ee.js +1 -0
- package/dist/9827973b533de05b338533a0211d97d9.js +1 -0
- package/dist/983fccb9f00748c487e889f6c83aa367.js +1 -0
- package/dist/98e7bdab44ecb58b3b76ed8025f330c4.js +1 -0
- package/dist/9920e03a65566d728a73c7bf18bc5741.js +1 -0
- package/dist/9938f30907f64b5d1bc4b641411ff8b8.js +1 -0
- package/dist/9b1fd9cf4206cc32e84150c49707d811.js +1 -0
- package/dist/9b4de1346c73ba258736f1a3f00fdc14.js +1 -0
- package/dist/9b5a6ec07bb0a2daade10189696fc399.js +1 -0
- package/dist/9b80d1a12acd18c90e41ca92073122a7.js +1 -0
- package/dist/9b9578869f378f8e2afbf85a76c0ac72.js +1 -0
- package/dist/9d5bba46df7fb1577fec6cb90f1bb2a7.js +1 -0
- package/dist/9ebb9ac2c9c875649c72722bc585d445.js +1 -0
- package/dist/9ed8c3550b5c3c1e878d0692f0338cb7.js +1 -0
- package/dist/9fd3f255cfd09016ec7f4896bc51864c.js +1 -0
- package/dist/a0e32ba94aa4384823d768802b9486e1.js +1 -0
- package/dist/a1bb5b3f6078f04941c00f87171dc0ae.js +1 -0
- package/dist/a1c12fd9c6c9e1b151ad99a847f09006.js +1 -0
- package/dist/a1c8660c5bcc6b6a43a7fb3c351174d9.js +1 -0
- package/dist/a223748cd69094dd12b486353b22f479.js +1 -0
- package/dist/a2242e107926b9274a7f57b52fba4a29.js +1 -0
- package/dist/a2746fc96d535b19c120d4b87dc86ef1.js +1 -0
- package/dist/a3a941911290b143d26ceb5e776e1d18.js +1 -0
- package/dist/a3dfa410d90c00078f4b015410048f34.js +1 -0
- package/dist/a41ce517e26d17d855b7224af9ee433b.js +1 -0
- package/dist/a496f663a8cf2dc047e12d8a80d76510.js +1 -0
- package/dist/a4bedde07e392f8ebf64341b61f75df2.js +1 -0
- package/dist/a4d0588d199cb1afffb42e57ea40fa86.js +1 -0
- package/dist/a4d638b976f02f35740be031f996e088.js +1 -0
- package/dist/a4e021a4b5d5d65cc87fee17c1886c3f.js +1 -0
- package/dist/a52f9ac0e3d582ed7e488aa1dfc33eda.js +1 -0
- package/dist/a533e643002830be2da76c9527265860.js +1 -0
- package/dist/a569591af2f834ec4b58f43ab7742186.js +1 -0
- package/dist/a66a34e3af97cd404f0cf6a5ded342c5.js +1 -0
- package/dist/a6eb87af5cd7ae7e4fcba8ec606ec4ba.js +1 -0
- package/dist/a709bba98acec5da3ea6258e245514cb.js +1 -0
- package/dist/a83211eadd86ef80416334e72774ab11.js +1 -0
- package/dist/a8c8aa148991e4ca35ed78cd5ccfcc03.js +1 -0
- package/dist/a9cb92db2399f7ac97ad55fe79fe5c20.js +1 -0
- package/dist/aa0eee504d52a12d3a30bbd523afcc34.js +1 -0
- package/dist/aa5623ec68d23fedb9c9c115c7d99063.js +1 -0
- package/dist/ab0128ab12bcb8729032421b40f5f8dd.js +1 -0
- package/dist/ab237eed5fd16ab99c06f0d28d465edb.js +1 -0
- package/dist/af1635b600efd13f6059eb6ac9deae12.js +1 -0
- package/dist/af6fdb556ee3f9065578bb01f81f6216.js +1 -0
- package/dist/afba1f28f2baa29eae717d6cb03f5464.js +1 -0
- package/dist/b02d982ccb1011197a5a24800b178a0a.js +1 -0
- package/dist/b10accbff47791a59b8494225af07025.js +1 -0
- package/dist/b1170472ae4b50e3b0070eb991e502fe.js +1 -0
- package/dist/b13d991d1e4a016abea3fe5837261690.js +1 -0
- package/dist/b1e349371cb9c226905c846706ad8b93.js +1 -0
- package/dist/b1f3f77a9279cdb38846ebe13c3438bc.js +1 -0
- package/dist/b20cd9acf45420fcacfd923754185663.js +1 -0
- package/dist/b243eabb7cb281a20eae3523742d562f.js +1 -0
- package/dist/b306285dfd802d091e788de0f96b8cb2.js +1 -0
- package/dist/b3147425240a31fc04d7aaf7f0fbd3d3.js +1 -0
- package/dist/b33ef9b4202539d3690251cb8213a034.js +1 -0
- package/dist/b3f1431b9e6d9e6632a93c2cd89f945b.js +1 -0
- package/dist/b808fb222140a85b23ebbe0fffa906d9.js +1 -0
- package/dist/b881dca9d9a80f61d87374b4bd5a2dd5.js +1 -0
- package/dist/b8b6bd460e7da0ba8f3b2218327966ee.js +1 -0
- package/dist/b934b22e8f8a8b1ba81dbc2cf058b0cd.js +1 -0
- package/dist/b953ce2f19e7291598cd9c05128133c1.js +1 -0
- package/dist/b992b348ffb6453e4a02a60e71c5304e.js +1 -0
- package/dist/b9ca55e245b8bbed49058e9dada2dd14.js +1 -0
- package/dist/ba6b8b3e06cd9d0aee9c69278ee84647.js +1 -0
- package/dist/bb5476e5e0c5368b031ba774c0f23999.js +1 -0
- package/dist/bb5bab7a675544fe31ddb7f4a77dffb9.js +1 -0
- package/dist/bb75a64c7f1e8f7d792e8115710299cb.js +1 -0
- package/dist/bc27b2d7127da36a976f00f889810836.js +1 -0
- package/dist/bcfde0a9c69146bbfb702f12811a4aa4.js +1 -0
- package/dist/bd309bb3f23f2bfbcf914f2e71474ab5.js +1 -0
- package/dist/bd459306ebcabc90fabccdfbbcd199ea.js +1 -0
- package/dist/be75b76e74c78535966ec8aaa7d46bec.js +1 -0
- package/dist/bf37de323316c6ae5745fc11fd576b1c.js +1 -0
- package/dist/c1a1f4ba29aa2d9a0b1a1abe5cfee0c6.js +1 -0
- package/dist/c3832579be376308fa819b04e7b0c66f.js +1 -0
- package/dist/c3f345c994392d97785925e790513a9f.js +1 -0
- package/dist/c4c991b8f5eb242f1e220e5f568fdfbc.js +1 -0
- package/dist/c4e58637b4d14c303e29d3ce4b4a210f.js +1 -0
- package/dist/c51840077c684be0e7e13339f85cd4a9.js +1 -0
- package/dist/c530988d2b1966fd10a4d99fa3877e1b.js +1 -0
- package/dist/c64d6e1e72024bb5d3d3e9bfc19d183d.js +1 -0
- package/dist/c80e89199aef31e48addb2b35ea96365.js +1 -0
- package/dist/c81814fb2ec8bab7bb415b5a40ed93b5.js +1 -0
- package/dist/c8230f96396f0378d032dce2be3dce66.js +1 -0
- package/dist/c8803facc1e76ecd4b6ba756118f1a6d.js +1 -0
- package/dist/c8deee9d1d08e50285fe2b1c2897bca5.js +1 -0
- package/dist/c9e94edb706994da8aee83c3593cb2d0.js +1 -0
- package/dist/cb0d121a88477f943960f5ad60602c22.js +1 -0
- package/dist/cb4380c2fd4e67769f509b2be529d7b2.js +1 -0
- package/dist/cb4bb785934eeca9b408e892ae6b73b7.js +1 -0
- package/dist/cb5746e29527a2fdb9f857a121e086ed.js +1 -0
- package/dist/cb652f200fc3dd740b2e7f678a9272ea.js +1 -0
- package/dist/cb9910e014b468ada91393696fcad206.js +1 -0
- package/dist/cbdbd623038183a8c068dd24ecd90682.js +1 -0
- package/dist/cbdc4ca43a8c940a6c3f59a8b6f17df5.js +1 -0
- package/dist/cc65d108f0e7cfb200de1d0bcf115005.js +1 -0
- package/dist/cc715c90d57b30965fc297a12746d6b5.js +1 -0
- package/dist/cd9a17f94a922c7c88000b1b3cdd67df.js +1 -0
- package/dist/cf1706c8b4a4eecbc161e915a4be16ca.js +1 -0
- package/dist/cf188b3f83735389d47bb12fc9f7069a.js +1 -0
- package/dist/cf26dd07f19bcb5b7efbf057a6cfeb8f.js +1 -0
- package/dist/cf3f6b1c74c72cb5d02870022dbc9f94.js +1 -0
- package/dist/cf909ad6e321c2f98750f5c3581556f8.js +1 -0
- package/dist/cf9c7cbfc2b609b9ae59daeab82719c4.js +1 -0
- package/dist/d1db2c4677dd2ee7a0c690c58798a013.js +1 -0
- package/dist/d43ad5f9bad9a042b49b2592c7639c28.js +1 -0
- package/dist/d4f1a314cb3668f8e17f24bccf0229b6.js +1 -0
- package/dist/d4f5981ee5a73d8a6e19112f2ffcb72c.js +1 -0
- package/dist/d542dda7308361c34af2afb9b70d755a.js +1 -0
- package/dist/d5999827bd3af6b813a871de344b109a.js +1 -0
- package/dist/d5a6140d581e5c4eb200259ce372f40b.js +1 -0
- package/dist/d5f79987405c2169278f8de37bcc9d05.js +1 -0
- package/dist/d76046afaf4d32b0f0afb63b4fabc680.js +1 -0
- package/dist/d78d3b050ea95b068380d975fd413fd7.js +1 -0
- package/dist/d7d616d4aa8fd3f51d681242853dcde9.js +1 -0
- package/dist/d83cda12aee0c87c8b381a1234bf7798.js +1 -0
- package/dist/d85853bab3b213652aee023adecfb690.js +1 -0
- package/dist/da4a891d81f066ebf82f298c53bd4ed8.js +1 -0
- package/dist/da740c1b29a85b999a6874b59a1baeef.js +1 -0
- package/dist/db8ca5cfb6fe4aaef215f116f6991784.js +1 -0
- package/dist/dc7ab72407b0b44ef5dae159373de53b.js +1 -0
- package/dist/dc8240db39815020378555a4d80571c3.js +1 -0
- package/dist/dc83a73f0eb89665520bbb6672dfa3cb.js +1 -0
- package/dist/dc932cde2fbfca8e2901fb693968b131.js +1 -0
- package/dist/ddbc961769cd2ff4d4a7a136168ebf4c.js +1 -0
- package/dist/de0fd4fd7c2d7a4887cbc99eed91f797.js +1 -0
- package/dist/de73b4d2a9ed4bcb851f9141e303636d.js +1 -0
- package/dist/e00b330413304d60c26e164da7f9fe0c.js +1 -0
- package/dist/e0adad8a8579bf99f3e22f7c214a5c64.js +1 -0
- package/dist/e0c565aadda4787ba4ef4456c0a7ee29.js +1 -0
- package/dist/e0fa6a4fe8bff90d50ce812e666957ca.js +1 -0
- package/dist/e2b38a8393be2cf23f3894ace3efb1c3.js +1 -0
- package/dist/e2fe8f0d4fd950b20b30fabaea96b3f8.js +1 -0
- package/dist/e37ac12436bcd0536ec98ae8470a1228.js +1 -0
- package/dist/e4917fa7632b01d28e99304d32d989f7.js +1 -0
- package/dist/e61779df91186b23e7adf2d1968b2708.js +1 -0
- package/dist/e63fce237243190962fcc3b12b387e1b.js +1 -0
- package/dist/e6ad50b520736b595970c9e07029c3f1.js +1 -0
- package/dist/e7e1a807af3160b342e0a3550cf8f7c5.js +1 -0
- package/dist/e7f37e0f2b6113039c45a326264c4d36.js +1 -0
- package/dist/e874d975c9128dc6eb9a513d088bed9f.js +1 -0
- package/dist/e9382a0e67b22188c75e9418de1c9295.js +1 -0
- package/dist/e9c8f7e13e00284ce126890bf7ac46fd.js +1 -0
- package/dist/eaa55a522fb2cb2f0287711f42344984.js +1 -0
- package/dist/eb0b62e1895dcf7491419aa728f00c38.js +1 -0
- package/dist/ec7b3f184238605a5239da7559e6cff9.js +1 -0
- package/dist/ec901efce9bc8572f27155236a447e62.js +1 -0
- package/dist/ecdb4966f685f3e44b1f28fae46827a3.js +1 -0
- package/dist/ecff3d4bbf59ef41230960af46098e74.js +1 -0
- package/dist/ee41eb1fd1d1c87c45e818b5a8a65cf8.js +1 -0
- package/dist/ee5d36473f84db2af26d82efd69a38ec.js +1 -0
- package/dist/ef27f3b478f5d1558c2382b4bc0866bb.js +1 -0
- package/dist/ef87482c92662e8b69a21f47588474ea.js +1 -0
- package/dist/efc14cdf19554635e477781704353ec2.js +1 -0
- package/dist/eff4371180dfac54de25ed3a0105d82f.js +1 -0
- package/dist/ethiopia-esm-billing-app.js +6 -0
- package/dist/ethiopia-esm-billing-app.js.buildmanifest.json +1449 -0
- package/dist/ethiopia-esm-billing-app.js.map +1 -0
- package/dist/f15cbf0d23cba4a313f3f2acfef5370c.js +1 -0
- package/dist/f326f2f263b1498fedbe1d07d7254d10.js +1 -0
- package/dist/f694018779de5916e404c0fa902f34c1.js +1 -0
- package/dist/f69b43eccd9faed6d9182fac0b2a176d.js +1 -0
- package/dist/f6b33aded7ae7504bfcc4550925cccb0.js +1 -0
- package/dist/f6d7091e70dee6c74956acfef2464d08.js +1 -0
- package/dist/f6dc1ef066da7f1c3e5c5fc1462f7be0.js +1 -0
- package/dist/fa0c561bb37040fc8145e5c70ea64912.js +1 -0
- package/dist/fac0ce75e0690947a9e9e6f5b35c1ea8.js +1 -0
- package/dist/fb393a7455b47f3d4fc30cf219d5145c.js +1 -0
- package/dist/fd00121832e53db8249f7985d80ccd44.js +1 -0
- package/dist/fd3859a700b456e06c65c0cf6b0af05c.js +1 -0
- package/dist/fd5bc50b18c9f46380cbe5ec1ac2127b.js +1 -0
- package/dist/fd9645aaf1f70c8abc562be41bee25fc.js +1 -0
- package/dist/fe9499c0a5444f7f42843fa00fb355cb.js +1 -0
- package/dist/ffd3b83e8b5878f4785591ff54b1dfff.js +1 -0
- package/dist/main.js +32 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.json +1 -0
- package/jest.config.js +8 -0
- package/package.json +52 -0
- package/rspack.config.js +1 -0
- package/src/autosuggest/autosuggest.component.tsx +203 -0
- package/src/autosuggest/autosuggest.scss +68 -0
- package/src/autosuggest/patient-search-info.component.tsx +29 -0
- package/src/autosuggest/patient-search-info.scss +37 -0
- package/src/autosuggest/search-empty-state.component.tsx +27 -0
- package/src/autosuggest/search-empty-state.scss +18 -0
- package/src/benefits-package/benefits/benefits-header.component.tsx +28 -0
- package/src/benefits-package/benefits/benefits.component.tsx +74 -0
- package/src/benefits-package/benefits/benefits.scss +61 -0
- package/src/benefits-package/benefits-package.component.tsx +37 -0
- package/src/benefits-package/benefits-package.mock.ts +145 -0
- package/src/benefits-package/benefits-package.resources.tsx +58 -0
- package/src/benefits-package/benefits-package.scss +23 -0
- package/src/benefits-package/empty-state/empty-state.component.tsx +23 -0
- package/src/benefits-package/empty-state/empty-state.scss +32 -0
- package/src/benefits-package/forms/benefit-pre-auth-form.workspace.tsx +292 -0
- package/src/benefits-package/forms/benefits-pre-auth-form.scss +66 -0
- package/src/benefits-package/forms/interventions-form.component.tsx +94 -0
- package/src/benefits-package/forms/packages-and-interventions-form.component.tsx +117 -0
- package/src/benefits-package/forms/preauth.resources.ts +17 -0
- package/src/benefits-package/table/benebfits-table.scss +53 -0
- package/src/benefits-package/table/benefits-table.component.tsx +90 -0
- package/src/benefits-package/table/generic-data-table.scss +57 -0
- package/src/benefits-package/table/generic_data_table.component.tsx +96 -0
- package/src/benefits-package/table/temporary-pre-auth-responses.json +392 -0
- package/src/bill-administration/bill-deposit/components/dashboard/bill-deposit-dashboard.component.tsx +35 -0
- package/src/bill-administration/bill-deposit/components/forms/add-deposit.workspace.scss +26 -0
- package/src/bill-administration/bill-deposit/components/forms/add-deposit.workspace.tsx +212 -0
- package/src/bill-administration/bill-deposit/components/forms/deposit-transactions/deposit-transaction.workspace.scss +33 -0
- package/src/bill-administration/bill-deposit/components/forms/deposit-transactions/deposit-transaction.workspace.tsx +257 -0
- package/src/bill-administration/bill-deposit/components/modal/delete-deposit.modal.tsx +58 -0
- package/src/bill-administration/bill-deposit/components/modal/reverse-transaction.modal.tsx +59 -0
- package/src/bill-administration/bill-deposit/components/search/bill-deposit-search.component.tsx +106 -0
- package/src/bill-administration/bill-deposit/components/search/bill-deposit-search.scss +107 -0
- package/src/bill-administration/bill-deposit/components/search/components/deposit-table.tsx +150 -0
- package/src/bill-administration/bill-deposit/components/search/components/patient-info.tsx +38 -0
- package/src/bill-administration/bill-deposit/components/search/components/patient-search.tsx +24 -0
- package/src/bill-administration/bill-deposit/components/search/components/transaction-list/transaction-list.component.tsx +66 -0
- package/src/bill-administration/bill-deposit/components/search/components/transaction-list/transaction-list.scss +5 -0
- package/src/bill-administration/bill-deposit/constants/bill-deposit.constants.ts +25 -0
- package/src/bill-administration/bill-deposit/hooks/useBillDeposit.ts +43 -0
- package/src/bill-administration/bill-deposit/styles/bill-deposit-dashboard.scss +11 -0
- package/src/bill-administration/bill-deposit/types/bill-deposit.types.ts +61 -0
- package/src/bill-administration/bill-deposit/utils/bill-deposit.utils.ts +92 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/action-buttons/action-buttons.component.tsx +18 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/action-buttons/action-buttons.scss +12 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/billable-exemptions-viewer.component.tsx +172 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/billable-exemptions.scss +75 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/modals/save-schema-modal.scss +39 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/modals/save-schema.modal.tsx +88 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/schema-editor/schema-editor.component.tsx +179 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/schema-editor/schema-editor.scss +36 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/schema-editor/schema-viewer-component.tsx +93 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/schema-editor/schema-viewer.scss +28 -0
- package/src/bill-administration/billable-exemption/billable-exemptions/schema-editor/schema-viewer.test.tsx +50 -0
- package/src/bill-administration/billable-exemption/billable-exemptions.component.tsx +16 -0
- package/src/bill-administration/dashboard/dashboard-container.component.tsx +26 -0
- package/src/bill-administration/dashboard/dashboard-container.scss +2 -0
- package/src/bill-administration/dashboard.meta.ts +48 -0
- package/src/bill-administration/home.component.tsx +26 -0
- package/src/bill-administration/home.scss +10 -0
- package/src/bill-administration/index.tsx +71 -0
- package/src/bill-administration/patient-billing/bill-actions/cancel-line-item.component.tsx +29 -0
- package/src/bill-administration/patient-billing/bill-actions/delete-bill-action-button.component.tsx +37 -0
- package/src/bill-administration/patient-billing/bill-actions/edit-line-item.component.tsx +31 -0
- package/src/bill-administration/patient-billing/bill-actions/refund-line-item.component.tsx +34 -0
- package/src/bill-administration/patient-billing/bill-actions/waive-bill-action-button.component.tsx +37 -0
- package/src/bill-administration/patient-billing/bill-line-items.component.tsx +85 -0
- package/src/bill-administration/patient-billing/modals/cancel-bill.scss +29 -0
- package/src/bill-administration/patient-billing/modals/delete-bill.modal.tsx +122 -0
- package/src/bill-administration/patient-billing/modals/delete-billable-service.modal.tsx +79 -0
- package/src/bill-administration/patient-billing/modals/delete-billable-service.test.tsx +101 -0
- package/src/bill-administration/patient-billing/modals/delete-services.scss +28 -0
- package/src/bill-administration/patient-billing/modals/refund-bill.modal.tsx +105 -0
- package/src/bill-administration/patient-billing/patient-billing.component.tsx +64 -0
- package/src/bill-administration/patient-billing/patient-billing.scss +31 -0
- package/src/bill-administration/patient-billing/patient-bills.component.tsx +147 -0
- package/src/bill-administration/patient-billing/workspaces/cancel-bill/cance-bill.resource.tsx +47 -0
- package/src/bill-administration/patient-billing/workspaces/cancel-bill/cancel-bill.scss +40 -0
- package/src/bill-administration/patient-billing/workspaces/cancel-bill/cancel-bill.workspace.tsx +128 -0
- package/src/bill-administration/patient-billing/workspaces/create-bill/create-bill.style.scss +40 -0
- package/src/bill-administration/patient-billing/workspaces/create-bill/create-bill.workspace.test.tsx +271 -0
- package/src/bill-administration/patient-billing/workspaces/create-bill/create-bill.workspace.tsx +295 -0
- package/src/bill-administration/patient-billing/workspaces/edit-bill/edit-bill-form.test.tsx +90 -0
- package/src/bill-administration/patient-billing/workspaces/edit-bill/edit-bill-form.workspace.tsx +190 -0
- package/src/bill-administration/patient-billing/workspaces/edit-bill/edit-bill-util.ts +60 -0
- package/src/bill-administration/patient-billing/workspaces/edit-bill/edit-bill.scss +40 -0
- package/src/bill-administration/patient-billing/workspaces/edit-bill/useEditBillFormSchema.tsx +92 -0
- package/src/bill-administration/patient-billing/workspaces/waive-bill/waive-bill-form.scss +57 -0
- package/src/bill-administration/patient-billing/workspaces/waive-bill/waive-bill-form.test.tsx +173 -0
- package/src/bill-administration/patient-billing/workspaces/waive-bill/waive-bill-form.workspace.tsx +232 -0
- package/src/bill-administration/payment-history/filters/bill-filter.test.ts +124 -0
- package/src/bill-administration/payment-history/filters/bill-filter.ts +42 -0
- package/src/bill-administration/payment-history/filters/cashier-filter.component.tsx +61 -0
- package/src/bill-administration/payment-history/filters/date-ranger-filter.component.tsx +38 -0
- package/src/bill-administration/payment-history/filters/filter-dashboard.scss +15 -0
- package/src/bill-administration/payment-history/filters/filter-dashboard.tsx +17 -0
- package/src/bill-administration/payment-history/filters/filter.component.tsx +15 -0
- package/src/bill-administration/payment-history/filters/filter.scss +5 -0
- package/src/bill-administration/payment-history/filters/payment-type-filter.component.tsx +61 -0
- package/src/bill-administration/payment-history/filters/service-type-filter.component.tsx +65 -0
- package/src/bill-administration/payment-history/filters/timesheets-filter.component.tsx +68 -0
- package/src/bill-administration/payment-history/payment-dashboard.component.tsx +39 -0
- package/src/bill-administration/payment-history/payment-dashboard.scss +8 -0
- package/src/bill-administration/payment-history/payment-history-table.component.tsx +174 -0
- package/src/bill-administration/payment-history/payment-history-viewer.component.tsx +40 -0
- package/src/bill-administration/payment-history/payment-history.component.tsx +15 -0
- package/src/bill-administration/payment-history/payment-history.scss +86 -0
- package/src/bill-administration/payment-history/payment-method-distribution.component.tsx +100 -0
- package/src/bill-administration/payment-history/useBillServiceTypes.tsx +15 -0
- package/src/bill-administration/payment-history/usePaymentFilterContext.tsx +110 -0
- package/src/bill-administration/payment-history/usePaymentModeGroupTotals.tsx +42 -0
- package/src/bill-administration/payment-history/usePaymentTransactionHistory.tsx +34 -0
- package/src/bill-administration/payment-modes/delete-payment-mode.modal.scss +33 -0
- package/src/bill-administration/payment-modes/delete-payment-mode.modal.tsx +62 -0
- package/src/bill-administration/payment-modes/delete-payment-mode.test.tsx +56 -0
- package/src/bill-administration/payment-modes/payment-attributes/payment-mode-attributes.component.tsx +156 -0
- package/src/bill-administration/payment-modes/payment-attributes/payment-mode-attributes.scss +10 -0
- package/src/bill-administration/payment-modes/payment-mode-dashboard.component.tsx +222 -0
- package/src/bill-administration/payment-modes/payment-mode-dashboard.scss +32 -0
- package/src/bill-administration/payment-modes/payment-mode-home.component.tsx +18 -0
- package/src/bill-administration/payment-modes/payment-mode.resource.tsx +49 -0
- package/src/bill-administration/payment-modes/payment-mode.workspace.scss +33 -0
- package/src/bill-administration/payment-modes/payment-mode.workspace.test.tsx +207 -0
- package/src/bill-administration/payment-modes/payment-mode.workspace.tsx +223 -0
- package/src/bill-administration/payment-modes/usePaymentModeFormSchema.tsx +52 -0
- package/src/bill-administration/payment-points/clock-in-boundary.component.tsx +35 -0
- package/src/bill-administration/payment-points/create-payment-point.component.tsx +104 -0
- package/src/bill-administration/payment-points/payment-point/clock-in.modal.tsx +162 -0
- package/src/bill-administration/payment-points/payment-point/clock-in.scss +11 -0
- package/src/bill-administration/payment-points/payment-point/clock-out.modal.tsx +65 -0
- package/src/bill-administration/payment-points/payment-point/payment-point.component.tsx +30 -0
- package/src/bill-administration/payment-points/payment-points-styles.scss +16 -0
- package/src/bill-administration/payment-points/payment-points-table.component.tsx +101 -0
- package/src/bill-administration/payment-points/payment-points.component.tsx +33 -0
- package/src/bill-administration/payment-points/payment-points.resource.ts +131 -0
- package/src/bill-administration/payment-points/use-clock-in-status.ts +14 -0
- package/src/bill-administration/service-catalog/billable-service.resource.tsx +78 -0
- package/src/bill-administration/service-catalog/bulk-import-billable-service.modal.tsx +194 -0
- package/src/bill-administration/service-catalog/charge-summary-table.component.test.tsx +199 -0
- package/src/bill-administration/service-catalog/charge-summary-table.component.tsx +236 -0
- package/src/bill-administration/service-catalog/charge-summary-table.scss +19 -0
- package/src/bill-administration/service-catalog/charge-summary.resource.tsx +42 -0
- package/src/bill-administration/service-catalog/clinical-charges.component.tsx +36 -0
- package/src/bill-administration/service-catalog/clinical-charges.scss +259 -0
- package/src/bill-administration/service-catalog/commodity/commodity-form.scss +61 -0
- package/src/bill-administration/service-catalog/commodity/commodity-form.workspace.test.tsx +307 -0
- package/src/bill-administration/service-catalog/commodity/commodity-form.workspace.tsx +215 -0
- package/src/bill-administration/service-catalog/commodity/stock-search.component.tsx +107 -0
- package/src/bill-administration/service-catalog/commodity/useCommodityItem.tsx +59 -0
- package/src/bill-administration/service-catalog/form-helper.ts +225 -0
- package/src/bill-administration/service-catalog/form-schemas.tsx +33 -0
- package/src/bill-administration/service-catalog/services/concept-search.component.tsx +67 -0
- package/src/bill-administration/service-catalog/services/price.component.tsx +82 -0
- package/src/bill-administration/service-catalog/services/service-form.scss +59 -0
- package/src/bill-administration/service-catalog/services/service-form.workspace.test.tsx +228 -0
- package/src/bill-administration/service-catalog/services/service-form.workspace.tsx +301 -0
- package/src/bill-history/bill-history.component.tsx +193 -0
- package/src/bill-history/bill-history.scss +168 -0
- package/src/bill-history/bill-history.test.tsx +118 -0
- package/src/billable-services/billable-orders/drug-order/drug-order.component.tsx +65 -0
- package/src/billable-services/billable-orders/drug-order/drug-order.scss +31 -0
- package/src/billable-services/billable-orders/order-actions/components/base-order-button.component.tsx +42 -0
- package/src/billable-services/billable-orders/order-actions/components/generic-button.component.tsx +64 -0
- package/src/billable-services/billable-orders/order-actions/components/medication-order-button.component.tsx +115 -0
- package/src/billable-services/billable-orders/order-actions/components/medication-order-button.scss +11 -0
- package/src/billable-services/billable-orders/order-actions/components/order-action-button.component.tsx +59 -0
- package/src/billable-services/billable-orders/order-actions/hooks/useBillStatus.ts +12 -0
- package/src/billable-services/billable-orders/order-actions/hooks/useLabOrderAction.ts +55 -0
- package/src/billable-services/billable-orders/order-actions/hooks/useMedicationOrderAction.ts +128 -0
- package/src/billable-services/billable-orders/order-actions/hooks/useModalHandler.ts +103 -0
- package/src/billable-services/billable-orders/order-actions/styles/order-action.scss +0 -0
- package/src/billable-services/billable-orders/test-order/dispense.resource.tsx +89 -0
- package/src/billable-services/billable-orders/test-order/imaging-order.component.tsx +34 -0
- package/src/billable-services/billable-orders/test-order/lab-order.component.tsx +34 -0
- package/src/billable-services/billable-orders/test-order/price-info-order.componet.tsx +60 -0
- package/src/billable-services/billable-orders/test-order/price-info-order.scss +20 -0
- package/src/billable-services/billable-orders/test-order/procedure-order.component.tsx +34 -0
- package/src/billable-services/billable-orders/test-order/test-order-action.resource.tsx +86 -0
- package/src/billable-services/billable-orders/test-order/test-order-action.scss +12 -0
- package/src/billable-services/billable-orders/useBillableItem.tsx +69 -0
- package/src/billable-services/utils.ts +60 -0
- package/src/billing-dashboard/billing-dashboard.component.tsx +34 -0
- package/src/billing-dashboard/billing-dashboard.scss +72 -0
- package/src/billing-dashboard/clock-in-button.component.tsx +40 -0
- package/src/billing-dashboard/clock-out-strip.component.tsx +63 -0
- package/src/billing-form/billing-checkin-form.component.tsx +153 -0
- package/src/billing-form/billing-checkin-form.scss +14 -0
- package/src/billing-form/billing-checkin-form.test.tsx +146 -0
- package/src/billing-form/billing-form.component.tsx +237 -0
- package/src/billing-form/billing-form.scss +67 -0
- package/src/billing-form/check-in-form.utils.tsx +13 -0
- package/src/billing-form/helper.ts +2 -0
- package/src/billing-form/hie.resource.tsx +71 -0
- package/src/billing-form/social-health-authority/patient-banner-sha-status.extension.tsx +93 -0
- package/src/billing-form/social-health-authority/patient-banner-sha-status.scss +62 -0
- package/src/billing-form/social-health-authority/sha-number-validity.component.tsx +125 -0
- package/src/billing-form/social-health-authority/sha-number-validity.scss +88 -0
- package/src/billing-form/visit-attributes/visit-attributes-form.component.tsx +198 -0
- package/src/billing-form/visit-attributes/visit-attributes-form.scss +18 -0
- package/src/billing-header/billing-header.component.tsx +33 -0
- package/src/billing-header/billing-header.scss +83 -0
- package/src/billing-header/billing-illustration.component.tsx +30 -0
- package/src/billing-tabs/billing-tabs.scss +8 -0
- package/src/billing-tabs/billling-tabs.component.tsx +54 -0
- package/src/billing.resource.ts +298 -0
- package/src/bills-table/bills-table.component.tsx +292 -0
- package/src/bills-table/bills-table.scss +189 -0
- package/src/bills-table/bills-table.test.tsx +135 -0
- package/src/claims/claims-management/generic-table/generic-table.component.tsx +165 -0
- package/src/claims/claims-management/generic-table/generic-table.scss +40 -0
- package/src/claims/claims-management/header/claims-header.component.tsx +35 -0
- package/src/claims/claims-management/header/claims-header.scss +70 -0
- package/src/claims/claims-management/header/claims-illustration.component.tsx +13 -0
- package/src/claims/claims-management/header/filter-header.component.tsx +75 -0
- package/src/claims/claims-management/header/filter-header.scss +13 -0
- package/src/claims/claims-management/main/claims-overview-main.component.tsx +17 -0
- package/src/claims/claims-management/main/claims-pre-auth-main.component.tsx +36 -0
- package/src/claims/claims-management/main/claims-preauth.scss +13 -0
- package/src/claims/claims-management/table/claim-summary-modal/claim-summary.modal.tsx +284 -0
- package/src/claims/claims-management/table/claim-summary-modal/claim-summary.scss +252 -0
- package/src/claims/claims-management/table/claim-table.component.tsx +288 -0
- package/src/claims/claims-management/table/claims-list-table.component.tsx +16 -0
- package/src/claims/claims-management/table/claims-list-table.scss +45 -0
- package/src/claims/claims-management/table/hook/table.resource.tsx +9 -0
- package/src/claims/claims-management/table/manage-claim-request.modal.tsx +184 -0
- package/src/claims/claims-management/table/pre-auth-table.component.tsx +81 -0
- package/src/claims/claims-management/table/preauth-table.tmp.component.tsx +31 -0
- package/src/claims/claims-management/table/table-mock-up-data.ts +112 -0
- package/src/claims/claims-management/table/use-facility-claims.ts +43 -0
- package/src/claims/claims-wrap/claims-main-component.tsx +35 -0
- package/src/claims/claims-wrap/claims-main.scss +28 -0
- package/src/claims/dashboard/claims-breakdown/claims-breakdown.component.tsx +19 -0
- package/src/claims/dashboard/claims-breakdown/claims-breakdown.scss +35 -0
- package/src/claims/dashboard/claims-dashboard.component.tsx +41 -0
- package/src/claims/dashboard/form/claims-explanation-and-justification-form-input.component.tsx +192 -0
- package/src/claims/dashboard/form/claims-form.component.tsx +719 -0
- package/src/claims/dashboard/form/claims-form.mocks.ts +44 -0
- package/src/claims/dashboard/form/claims-form.resource.ts +161 -0
- package/src/claims/dashboard/form/claims-form.scss +161 -0
- package/src/claims/dashboard/form/claims-supporting-documents-inputs.form.tsx +180 -0
- package/src/claims/dashboard/header/claims-header.component.tsx +23 -0
- package/src/claims/dashboard/header/claims-header.scss +23 -0
- package/src/claims/dashboard/table/claims-table.component.tsx +206 -0
- package/src/claims/dashboard/table/claims-table.scss +106 -0
- package/src/claims/make-claims.component.tsx +28 -0
- package/src/claims/make-claims.scss +7 -0
- package/src/claims/metrics/metrics-card.component.tsx +36 -0
- package/src/claims/metrics/metrics-card.scss +75 -0
- package/src/claims/metrics/metrics-header.component.tsx +16 -0
- package/src/claims/metrics/metrics-header.scss +16 -0
- package/src/claims/metrics/metrics.component.tsx +49 -0
- package/src/claims/metrics/metrics.scss +13 -0
- package/src/claims/utils.ts +50 -0
- package/src/config-schema.ts +248 -0
- package/src/constants.ts +24 -0
- package/src/dashboard.meta.ts +25 -0
- package/src/declarations.d.ts +2 -0
- package/src/helpers/README.md +174 -0
- package/src/helpers/currency.test.ts +114 -0
- package/src/helpers/currency.ts +137 -0
- package/src/helpers/excelExport.ts +31 -0
- package/src/helpers/functions.ts +83 -0
- package/src/helpers/index.ts +1 -0
- package/src/hooks/benefits.mock.ts +391 -0
- package/src/hooks/getMflCode.tsx +19 -0
- package/src/hooks/use-payments-reconciler.tsx +75 -0
- package/src/hooks/use-pre-auth-requests.ts +256 -0
- package/src/hooks/use-rendered-rows.ts +90 -0
- package/src/hooks/useBillableServices.ts +18 -0
- package/src/hooks/useExemptionSchema.tsx +49 -0
- package/src/hooks/useFacilityLevel.ts +27 -0
- package/src/hooks/useInterventions.ts +50 -0
- package/src/hooks/useOTP.ts +677 -0
- package/src/hooks/usePackages.ts +43 -0
- package/src/hooks/usePatient.ts +12 -0
- package/src/hooks/usePatientAttributes.tsx +26 -0
- package/src/hooks/usePatientDiagnosis.ts +26 -0
- package/src/hooks/usePatientIdentifierType.ts +26 -0
- package/src/hooks/usePaymentSchema.tsx +42 -0
- package/src/hooks/usePhoneNumber.ts +35 -0
- package/src/hooks/usePrintPreview.tsx +17 -0
- package/src/hooks/useProvider.ts +19 -0
- package/src/hooks/useProviderList.ts +19 -0
- package/src/hooks/useRequestStatus.tsx +211 -0
- package/src/index.ts +159 -0
- package/src/invoice/invoice-actions.component.tsx +240 -0
- package/src/invoice/invoice-table.component.tsx +202 -0
- package/src/invoice/invoice-table.scss +91 -0
- package/src/invoice/invoice.component.tsx +132 -0
- package/src/invoice/invoice.resource.ts +151 -0
- package/src/invoice/invoice.scss +186 -0
- package/src/invoice/invoice.test.tsx +220 -0
- package/src/invoice/payments/initiate-payment/initiate-payment.component.tsx +207 -0
- package/src/invoice/payments/initiate-payment/initiate-payment.scss +48 -0
- package/src/invoice/payments/invoice-breakdown/invoice-breakdown.component.tsx +17 -0
- package/src/invoice/payments/invoice-breakdown/invoice-breakdown.scss +29 -0
- package/src/invoice/payments/payment-form/payment-form.component.tsx +137 -0
- package/src/invoice/payments/payment-form/payment-form.scss +54 -0
- package/src/invoice/payments/payment-form/payment.scss +33 -0
- package/src/invoice/payments/payment-form/payment.workspace.tsx +195 -0
- package/src/invoice/payments/payment-form/use-payment-form.ts +77 -0
- package/src/invoice/payments/payment-history/payment-history.component.tsx +68 -0
- package/src/invoice/payments/payment-status-ckecker.modal.tsx +136 -0
- package/src/invoice/payments/payments.component.tsx +273 -0
- package/src/invoice/payments/payments.resource.ts +65 -0
- package/src/invoice/payments/payments.scss +71 -0
- package/src/invoice/payments/payments.test.tsx +321 -0
- package/src/invoice/payments/utils.ts +205 -0
- package/src/invoice/payments/visit-tags/visit-attribute.component.tsx +21 -0
- package/src/left--panel-link.test.tsx +42 -0
- package/src/left-panel-link.component.tsx +79 -0
- package/src/m-pesa/mpesa-resource.tsx +146 -0
- package/src/metrics-cards/card.component.tsx +11 -0
- package/src/metrics-cards/card.scss +20 -0
- package/src/metrics-cards/metrics-cards.component.tsx +58 -0
- package/src/metrics-cards/metrics-cards.scss +84 -0
- package/src/metrics-cards/metrics-cards.test.tsx +42 -0
- package/src/metrics-cards/metrics.resource.ts +54 -0
- package/src/modal/bill-action.modal.scss +7 -0
- package/src/modal/bill-action.modal.tsx +124 -0
- package/src/past-patient-bills/patient-bills-dashboard/empty-patient-bill.component.tsx +42 -0
- package/src/past-patient-bills/patient-bills-dashboard/empty-svg.component.tsx +566 -0
- package/src/past-patient-bills/patient-bills-dashboard/patient-bills-dashboard.scss +53 -0
- package/src/past-patient-bills/patient-bills-dashboard/patient-bills-dashboard.tsx +44 -0
- package/src/past-patient-bills/patient-bills-dashboard/patient-search-extension.component.tsx +25 -0
- package/src/past-patient-bills/patient-bills.component.tsx +157 -0
- package/src/past-patient-bills/patient-bills.scss +42 -0
- package/src/past-patient-bills/patient-bills.test.tsx +300 -0
- package/src/print-preview/print-preview.modal.tsx +45 -0
- package/src/print-preview/print-preview.scss +21 -0
- package/src/prompt-payment/prompt-payment-modal.component.tsx +118 -0
- package/src/prompt-payment/prompt-payment.modal.test.tsx +204 -0
- package/src/prompt-payment/prompt-payment.resource.tsx +231 -0
- package/src/prompt-payment/prompt-payment.scss +18 -0
- package/src/root.component.tsx +40 -0
- package/src/routes.json +426 -0
- package/src/types/index.ts +697 -0
- package/src/utils.ts +172 -0
- package/translations/am.json +365 -0
- package/translations/en.json +365 -0
- package/translations/sw.json +365 -0
- package/tsconfig.json +5 -0
package/src/bill-administration/patient-billing/workspaces/edit-bill/useEditBillFormSchema.tsx
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LineItem, MappedBill } from '../../../../types';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { useBillableServices } from '../../../../bill-administration/service-catalog/billable-service.resource';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Schema configuration for edit bill form validation
|
|
9
|
+
* @constant
|
|
10
|
+
*/
|
|
11
|
+
const BILL_FORM_VALIDATION_RULES = {
|
|
12
|
+
MINIMUM_PRICE: 0,
|
|
13
|
+
MINIMUM_QUANTITY: 0,
|
|
14
|
+
MINIMUM_REASON_LENGTH: 1,
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Custom hook that returns the Zod schema for edit bill form validation
|
|
19
|
+
* @returns {z.ZodObject} Zod schema for edit bill form
|
|
20
|
+
*/
|
|
21
|
+
export const useEditBillFormSchema = () => {
|
|
22
|
+
const { t } = useTranslation();
|
|
23
|
+
const billFormValidationSchema = z.object({
|
|
24
|
+
price: z
|
|
25
|
+
.string({ required_error: 'Price amount is required' })
|
|
26
|
+
.refine((priceStr) => parseInt(priceStr) > BILL_FORM_VALIDATION_RULES.MINIMUM_PRICE, {
|
|
27
|
+
message: t('priceShouldBeGreaterThanZero', 'Price should be greater than zero'),
|
|
28
|
+
}),
|
|
29
|
+
quantity: z
|
|
30
|
+
.string({ required_error: 'Quantity amount is required' })
|
|
31
|
+
.refine((quantityStr) => parseInt(quantityStr) > BILL_FORM_VALIDATION_RULES.MINIMUM_QUANTITY, {
|
|
32
|
+
message: t('quantityShouldBeGreaterThanZero', 'Quantity should be greater than zero'),
|
|
33
|
+
}),
|
|
34
|
+
adjustmentReason: z
|
|
35
|
+
.string()
|
|
36
|
+
.min(BILL_FORM_VALIDATION_RULES.MINIMUM_REASON_LENGTH, {
|
|
37
|
+
message: t('adjustmentReasonIsRequired', 'Adjustment reason is required'),
|
|
38
|
+
})
|
|
39
|
+
.trim(),
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return billFormValidationSchema;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** Type definition for edit bill form data based on the schema */
|
|
46
|
+
export type EditBillFormData = z.infer<ReturnType<typeof useEditBillFormSchema>>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Custom hook that returns default values for edit bill form
|
|
50
|
+
* @param {LineItem} billLineItem - The line item containing price and quantity
|
|
51
|
+
* @param {MappedBill} existingBill - The bill containing adjustment reason
|
|
52
|
+
* @returns {EditBillFormData} Default form values
|
|
53
|
+
*/
|
|
54
|
+
export const useDefaultEditBillFormValues = (billLineItem: LineItem, existingBill: MappedBill): EditBillFormData => {
|
|
55
|
+
return {
|
|
56
|
+
price: billLineItem?.price.toString(),
|
|
57
|
+
quantity: billLineItem?.quantity.toString(),
|
|
58
|
+
adjustmentReason: existingBill?.adjustmentReason,
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Custom hook that provides initial values for the form based on line item and billable services
|
|
64
|
+
* @param {LineItem} billLineItem - The line item to initialize the form with
|
|
65
|
+
* @returns {Object} Object containing selected service price, loading state, and selected billable service
|
|
66
|
+
*/
|
|
67
|
+
export const useFormInitialValues = (billLineItem: LineItem) => {
|
|
68
|
+
const { billableServices, isLoading: isLoadingServices } = useBillableServices();
|
|
69
|
+
|
|
70
|
+
const selectedBillableService = useMemo(() => {
|
|
71
|
+
const billableServiceId = billLineItem?.billableService?.split(':')[0];
|
|
72
|
+
return billableServiceId ? billableServices.find((service) => service.uuid === billableServiceId) ?? null : null;
|
|
73
|
+
}, [billableServices, billLineItem.billableService]);
|
|
74
|
+
|
|
75
|
+
const selectedServicePrice = useMemo(() => {
|
|
76
|
+
if (!selectedBillableService?.servicePrices) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
selectedBillableService.servicePrices.find(
|
|
82
|
+
(servicePrice) => servicePrice.price.toString() === billLineItem.price.toString(),
|
|
83
|
+
) ?? null
|
|
84
|
+
);
|
|
85
|
+
}, [selectedBillableService, billLineItem.price]);
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
selectedServicePrice,
|
|
89
|
+
isLoadingServices,
|
|
90
|
+
selectedBillableService,
|
|
91
|
+
};
|
|
92
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@carbon/colors';
|
|
4
|
+
|
|
5
|
+
.buttonContainer {
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: flex-end;
|
|
8
|
+
margin-top: -1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.formControlLayer {
|
|
12
|
+
margin: layout.$spacing-05 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.billWaiverDescription {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: 1fr 1fr;
|
|
18
|
+
column-gap: 1rem;
|
|
19
|
+
align-items: center;
|
|
20
|
+
margin-top: 0.125rem;
|
|
21
|
+
margin-bottom: 0.5rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.label {
|
|
25
|
+
@include type.type-style('heading-compact-01');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.value {
|
|
29
|
+
@include type.type-style('body-01');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.editFormInput {
|
|
33
|
+
margin-bottom: layout.$spacing-05;
|
|
34
|
+
}
|
|
35
|
+
.waiverPaymentModeNotFound {
|
|
36
|
+
margin: layout.$spacing-03;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.form {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
height: 100%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.formContainer {
|
|
47
|
+
margin: layout.$spacing-05;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.tablet {
|
|
51
|
+
padding: layout.$spacing-06 layout.$spacing-05;
|
|
52
|
+
background-color: colors.$white;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.desktop {
|
|
56
|
+
padding: 0;
|
|
57
|
+
}
|
package/src/bill-administration/patient-billing/workspaces/waive-bill/waive-bill-form.test.tsx
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { processBillPayment, usePaymentModes } from '../../../../billing.resource';
|
|
4
|
+
import { WaiveBillForm } from './waive-bill-form.workspace';
|
|
5
|
+
import userEvent from '@testing-library/user-event';
|
|
6
|
+
import { LineItem, MappedBill, PaymentMethod } from '../../../../types';
|
|
7
|
+
import { showSnackbar } from '@openmrs/esm-framework';
|
|
8
|
+
|
|
9
|
+
const mockedUsePaymentModes = usePaymentModes as jest.MockedFunction<typeof usePaymentModes>;
|
|
10
|
+
const mockProcessBillPayment = processBillPayment as jest.MockedFunction<typeof processBillPayment>;
|
|
11
|
+
const mockShowSnackbar = showSnackbar as jest.MockedFunction<typeof showSnackbar>;
|
|
12
|
+
|
|
13
|
+
jest.mock('../../../../billing.resource', () => ({
|
|
14
|
+
processBillPayment: jest.fn(),
|
|
15
|
+
usePaymentModes: jest.fn(),
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
const mockedBill: MappedBill = {
|
|
19
|
+
id: 1909,
|
|
20
|
+
uuid: '45143fae-b83d-4768-ada5-621e8dc1229d',
|
|
21
|
+
patientName: ' Test Patient',
|
|
22
|
+
identifier: 'MGVDGL ',
|
|
23
|
+
patientUuid: '03de0a73-67f1-483f-a9e3-b432295c014a',
|
|
24
|
+
status: 'PENDING',
|
|
25
|
+
receiptNumber: '1937-2',
|
|
26
|
+
cashier: {
|
|
27
|
+
uuid: '48b55692-e061-4ffa-b1f2-fd4aaf506224',
|
|
28
|
+
display: 'admin - Super User',
|
|
29
|
+
links: [],
|
|
30
|
+
},
|
|
31
|
+
cashPointUuid: '54065383-b4d4-42d2-af4d-d250a1fd2590',
|
|
32
|
+
cashPointName: 'OPD Cash Point',
|
|
33
|
+
cashPointLocation: 'Moi Teaching Refferal Hospital',
|
|
34
|
+
dateCreated: 'Today, 00:33',
|
|
35
|
+
lineItems: [
|
|
36
|
+
{
|
|
37
|
+
uuid: 'e53c5589-e588-4bb9-bb72-6d4d16189679',
|
|
38
|
+
display: 'BillLineItem',
|
|
39
|
+
voided: false,
|
|
40
|
+
voidReason: null,
|
|
41
|
+
item: '',
|
|
42
|
+
billableService: '3f5d0684-a280-477e-a67b-2a956a1f6dca:Registration Revist',
|
|
43
|
+
quantity: 1,
|
|
44
|
+
price: 50,
|
|
45
|
+
priceName: 'Default',
|
|
46
|
+
priceUuid: '',
|
|
47
|
+
lineItemOrder: 0,
|
|
48
|
+
paymentStatus: 'PENDING',
|
|
49
|
+
resourceVersion: '1.8',
|
|
50
|
+
itemOrServiceConceptUuid: '',
|
|
51
|
+
} as unknown as LineItem,
|
|
52
|
+
],
|
|
53
|
+
billingService: '3f5d0684-a280-477e-a67b-2a956a1f6dca:Registration Revist',
|
|
54
|
+
payments: [],
|
|
55
|
+
display: '1937-2',
|
|
56
|
+
totalAmount: 50,
|
|
57
|
+
dateCreatedUnformatted: '',
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const mockedPaymentMode = [
|
|
61
|
+
{
|
|
62
|
+
uuid: 'eb6173cb-9678-4614-bbe1-0ccf7ed9d1d4',
|
|
63
|
+
name: 'Waiver',
|
|
64
|
+
description: 'Waiver payment',
|
|
65
|
+
retired: false,
|
|
66
|
+
retireReason: null,
|
|
67
|
+
auditInfo: null,
|
|
68
|
+
sortOrder: 0,
|
|
69
|
+
resourceVersion: '1.8',
|
|
70
|
+
attributeTypes: [
|
|
71
|
+
{
|
|
72
|
+
uuid: 'eb6173cb-9678-4614-bbe1-0ccf7ed9d1d4',
|
|
73
|
+
name: 'Waiver',
|
|
74
|
+
description: 'Waiver payment',
|
|
75
|
+
retired: false,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
} as unknown as PaymentMethod,
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
describe('BillWaiverForm', () => {
|
|
82
|
+
test('Should post waiver correctly', async () => {
|
|
83
|
+
const user = userEvent.setup();
|
|
84
|
+
mockedUsePaymentModes.mockReturnValue({
|
|
85
|
+
paymentModes: mockedPaymentMode,
|
|
86
|
+
isLoading: false,
|
|
87
|
+
error: null,
|
|
88
|
+
mutate: jest.fn(),
|
|
89
|
+
});
|
|
90
|
+
render(
|
|
91
|
+
<WaiveBillForm
|
|
92
|
+
bill={mockedBill}
|
|
93
|
+
closeWorkspace={jest.fn()}
|
|
94
|
+
patientUuid="some-patient-uuid"
|
|
95
|
+
promptBeforeClosing={jest.fn()}
|
|
96
|
+
setTitle={jest.fn()}
|
|
97
|
+
closeWorkspaceWithSavedChanges={jest.fn()}
|
|
98
|
+
/>,
|
|
99
|
+
);
|
|
100
|
+
expect(screen.getByText('Bill Items')).toBeInTheDocument();
|
|
101
|
+
|
|
102
|
+
// get waiver amount input
|
|
103
|
+
const waiverAmountInput = screen.getByRole('spinbutton', { name: 'Enter amount to waive' });
|
|
104
|
+
const waiverReasonInput = screen.getByRole('textbox', { name: 'Waiver reason' });
|
|
105
|
+
|
|
106
|
+
// Input waiver amount and reason
|
|
107
|
+
await user.type(waiverAmountInput, '50');
|
|
108
|
+
await user.type(waiverReasonInput, 'Test reason');
|
|
109
|
+
|
|
110
|
+
// should display error if amount keyed in is greater than total amount
|
|
111
|
+
expect(screen.queryByText('Amount to waive cannot be greater than total amount')).toBeNull();
|
|
112
|
+
await user.type(waiverAmountInput, '100');
|
|
113
|
+
expect(screen.getByText('Amount to waive cannot be greater than total amount')).toBeInTheDocument();
|
|
114
|
+
|
|
115
|
+
// should post waiver correctly
|
|
116
|
+
mockProcessBillPayment.mockResolvedValue({
|
|
117
|
+
headers: new Headers(),
|
|
118
|
+
ok: true,
|
|
119
|
+
redirected: false,
|
|
120
|
+
status: 200,
|
|
121
|
+
statusText: 'OK',
|
|
122
|
+
type: 'basic',
|
|
123
|
+
url: 'http://example.com',
|
|
124
|
+
body: null,
|
|
125
|
+
} as any);
|
|
126
|
+
await user.clear(waiverAmountInput);
|
|
127
|
+
await user.type(waiverAmountInput, '50');
|
|
128
|
+
await user.click(screen.getByRole('button', { name: 'Post waiver' }));
|
|
129
|
+
|
|
130
|
+
expect(mockProcessBillPayment).toHaveBeenCalledTimes(1);
|
|
131
|
+
|
|
132
|
+
const expectedBill = {
|
|
133
|
+
cashPoint: mockedBill.cashPointUuid,
|
|
134
|
+
cashier: mockedBill.cashier.uuid,
|
|
135
|
+
lineItems: [
|
|
136
|
+
{
|
|
137
|
+
uuid: 'e53c5589-e588-4bb9-bb72-6d4d16189679',
|
|
138
|
+
display: 'BillLineItem',
|
|
139
|
+
voided: false,
|
|
140
|
+
voidReason: null,
|
|
141
|
+
item: '3f5d0684-a280-477e-a67b-2a956a1f6dca',
|
|
142
|
+
billableService: '3f5d0684-a280-477e-a67b-2a956a1f6dca',
|
|
143
|
+
quantity: 1,
|
|
144
|
+
price: 50,
|
|
145
|
+
priceName: 'Default',
|
|
146
|
+
priceUuid: '',
|
|
147
|
+
lineItemOrder: 0,
|
|
148
|
+
paymentStatus: 'PAID',
|
|
149
|
+
resourceVersion: '1.8',
|
|
150
|
+
itemOrServiceConceptUuid: '',
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
payments: [
|
|
154
|
+
{
|
|
155
|
+
amount: 50,
|
|
156
|
+
amountTendered: 50,
|
|
157
|
+
attributes: [{ attributeType: mockedPaymentMode[0].uuid, value: 'Test reason' }],
|
|
158
|
+
instanceType: mockedPaymentMode[0].uuid,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
patient: mockedBill.patientUuid,
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
expect(mockProcessBillPayment).toHaveBeenCalledWith(expectedBill, '45143fae-b83d-4768-ada5-621e8dc1229d');
|
|
165
|
+
expect(mockShowSnackbar).toHaveBeenCalledWith({
|
|
166
|
+
title: 'Bill waiver',
|
|
167
|
+
subtitle: 'Bill waiver successful',
|
|
168
|
+
kind: 'success',
|
|
169
|
+
timeoutInMs: 3500,
|
|
170
|
+
isLowContrast: true,
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
});
|
package/src/bill-administration/patient-billing/workspaces/waive-bill/waive-bill-form.workspace.tsx
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
FormGroup,
|
|
4
|
+
Layer,
|
|
5
|
+
Button,
|
|
6
|
+
NumberInput,
|
|
7
|
+
TextArea,
|
|
8
|
+
InlineNotification,
|
|
9
|
+
InlineLoading,
|
|
10
|
+
ButtonSet,
|
|
11
|
+
} from '@carbon/react';
|
|
12
|
+
import { TaskAdd } from '@carbon/react/icons';
|
|
13
|
+
import { useTranslation } from 'react-i18next';
|
|
14
|
+
import styles from './waive-bill-form.scss';
|
|
15
|
+
import { MappedBill } from '../../../../types';
|
|
16
|
+
import { createBillWaiverPayload, extractErrorMessagesFromResponse } from '../../../../utils';
|
|
17
|
+
import { processBillPayment, usePaymentModes } from '../../../../billing.resource';
|
|
18
|
+
import { restBaseUrl, showSnackbar, useLayoutType } from '@openmrs/esm-framework';
|
|
19
|
+
import { mutate } from 'swr';
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
22
|
+
import { Controller, SubmitHandler, useForm } from 'react-hook-form';
|
|
23
|
+
import first from 'lodash-es/first';
|
|
24
|
+
import classNames from 'classnames';
|
|
25
|
+
import { useCurrencyFormatting } from '../../../../helpers/currency';
|
|
26
|
+
import { extractString } from '../../../../helpers';
|
|
27
|
+
|
|
28
|
+
type BillWaiverFormProps = {
|
|
29
|
+
bill: MappedBill;
|
|
30
|
+
closeWorkspace: () => void;
|
|
31
|
+
closeWorkspaceWithSavedChanges?: () => void;
|
|
32
|
+
promptBeforeClosing?: (testFcn: () => boolean) => void;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const WaiveBillForm: React.FC<BillWaiverFormProps> = ({
|
|
36
|
+
bill,
|
|
37
|
+
closeWorkspace,
|
|
38
|
+
promptBeforeClosing,
|
|
39
|
+
closeWorkspaceWithSavedChanges,
|
|
40
|
+
}) => {
|
|
41
|
+
const { lineItems = [], payments = [] } = bill ?? {};
|
|
42
|
+
const isTablet = useLayoutType() === 'tablet';
|
|
43
|
+
|
|
44
|
+
const { t } = useTranslation();
|
|
45
|
+
const { format: formatCurrency } = useCurrencyFormatting();
|
|
46
|
+
|
|
47
|
+
const totalAmount = lineItems.reduce((acc, curr) => acc + curr.price * curr.quantity, 0);
|
|
48
|
+
const { isLoading, paymentModes = [] } = usePaymentModes(false);
|
|
49
|
+
const waiverPaymentMode =
|
|
50
|
+
first(paymentModes.filter((mode) => mode.name.toLowerCase().includes('waiver')))?.attributeTypes ?? [];
|
|
51
|
+
// calculate amount already waived or paid this is to ensure that the amount to waive is not greater than the total amount
|
|
52
|
+
const amountAlreadyWaivedOrPaid = payments.reduce((acc, curr) => acc + curr.amountTendered, 0);
|
|
53
|
+
|
|
54
|
+
const schema = z.object({
|
|
55
|
+
waiveAmount: z
|
|
56
|
+
.string({ required_error: t('waiveAmountRequired', 'Waive amount is required') })
|
|
57
|
+
.refine((n) => parseInt(n) > 0, {
|
|
58
|
+
message: t('waiveAmountGreaterThanZero', 'Amount to waive should be greater than zero'),
|
|
59
|
+
})
|
|
60
|
+
.refine(
|
|
61
|
+
(n) =>
|
|
62
|
+
amountAlreadyWaivedOrPaid > 0
|
|
63
|
+
? parseInt(n) < totalAmount - amountAlreadyWaivedOrPaid + 1
|
|
64
|
+
: parseInt(n) < totalAmount + 1,
|
|
65
|
+
{
|
|
66
|
+
message:
|
|
67
|
+
amountAlreadyWaivedOrPaid > 0
|
|
68
|
+
? t(
|
|
69
|
+
'waiveAmountCannotBeGreaterThanRemainingAmount',
|
|
70
|
+
'Amount to waive cannot be greater than the remaining amount {{remainingAmount}}',
|
|
71
|
+
{
|
|
72
|
+
remainingAmount: totalAmount - amountAlreadyWaivedOrPaid,
|
|
73
|
+
},
|
|
74
|
+
)
|
|
75
|
+
: t('waiveAmountCannotBeGreaterThanTotal', 'Amount to waive cannot be greater than total amount'),
|
|
76
|
+
},
|
|
77
|
+
),
|
|
78
|
+
waiverReason: z
|
|
79
|
+
.string({ required_error: t('waiverReasonRequired', 'Waiver reason is required') })
|
|
80
|
+
.min(1, { message: t('waiverReasonRequired', 'Waiver reason is required') }),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
type FormData = z.infer<typeof schema>;
|
|
84
|
+
|
|
85
|
+
const {
|
|
86
|
+
control,
|
|
87
|
+
handleSubmit,
|
|
88
|
+
formState: { errors, isDirty, isSubmitting, isValid },
|
|
89
|
+
} = useForm<FormData>({
|
|
90
|
+
mode: 'all',
|
|
91
|
+
resolver: zodResolver(schema),
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
promptBeforeClosing(() => isDirty);
|
|
96
|
+
}, [isDirty, promptBeforeClosing]);
|
|
97
|
+
|
|
98
|
+
if (lineItems?.length === 0) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const onSubmit: SubmitHandler<FormData> = ({ waiveAmount, waiverReason }) => {
|
|
103
|
+
const waiverEndPointPayload = createBillWaiverPayload(
|
|
104
|
+
bill,
|
|
105
|
+
parseInt(waiveAmount),
|
|
106
|
+
totalAmount,
|
|
107
|
+
lineItems,
|
|
108
|
+
paymentModes,
|
|
109
|
+
waiverReason,
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
processBillPayment(waiverEndPointPayload, bill.uuid).then(
|
|
113
|
+
(resp) => {
|
|
114
|
+
showSnackbar({
|
|
115
|
+
title: t('billWaiver', 'Bill waiver'),
|
|
116
|
+
subtitle: t('billWaiverSuccess', 'Bill waiver successful'),
|
|
117
|
+
kind: 'success',
|
|
118
|
+
timeoutInMs: 3500,
|
|
119
|
+
isLowContrast: true,
|
|
120
|
+
});
|
|
121
|
+
mutate((key) => typeof key === 'string' && key.startsWith(`${restBaseUrl}/cashier/bill?status`), undefined, {
|
|
122
|
+
revalidate: true,
|
|
123
|
+
});
|
|
124
|
+
closeWorkspaceWithSavedChanges();
|
|
125
|
+
},
|
|
126
|
+
(error) => {
|
|
127
|
+
showSnackbar({
|
|
128
|
+
title: t('billWaiver', 'Bill waiver'),
|
|
129
|
+
subtitle: t('billWaiverError', 'Bill waiver failed {{error}}', {
|
|
130
|
+
error: extractErrorMessagesFromResponse(error?.responseBody),
|
|
131
|
+
}),
|
|
132
|
+
kind: 'error',
|
|
133
|
+
timeoutInMs: 3500,
|
|
134
|
+
isLowContrast: true,
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
if (isLoading) {
|
|
141
|
+
return <InlineLoading description={t('loading', 'Loading')} />;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (waiverPaymentMode.length === 0) {
|
|
145
|
+
return (
|
|
146
|
+
<div className={styles.waiverPaymentModeNotFound}>
|
|
147
|
+
<InlineNotification
|
|
148
|
+
title={t('waiverPaymentModeNotFound', 'Waiver payment mode not found')}
|
|
149
|
+
subtitle={t(
|
|
150
|
+
'waiverPaymentModeNotFoundSubtitle',
|
|
151
|
+
'Contact your administrator to create a waiver payment attribute type to waive a bill',
|
|
152
|
+
)}
|
|
153
|
+
kind="error"
|
|
154
|
+
lowContrast
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<form className={styles.form} aria-label={t('waiverForm', 'Waiver form')} onSubmit={handleSubmit(onSubmit)}>
|
|
162
|
+
<div className={styles.formContainer}>
|
|
163
|
+
<FormGroup legendText={t('billItemsSummary', 'Bill Items Summary')}>
|
|
164
|
+
<section className={styles.billWaiverDescription}>
|
|
165
|
+
<label className={styles.label}>{t('waiverBillItems', 'Bill Items')}</label>
|
|
166
|
+
<p className={styles.value}>
|
|
167
|
+
{t('billName', ' {{billName}} ', {
|
|
168
|
+
billName: lineItems.map((item) => extractString(item.item || item.billableService)).join(', ') ?? '--',
|
|
169
|
+
})}
|
|
170
|
+
</p>
|
|
171
|
+
</section>
|
|
172
|
+
<section className={styles.billWaiverDescription}>
|
|
173
|
+
<label className={styles.label}>{t('billTotal', 'Bill total')}</label>
|
|
174
|
+
<p className={styles.value}>{formatCurrency(totalAmount)}</p>
|
|
175
|
+
</section>
|
|
176
|
+
{amountAlreadyWaivedOrPaid > 0 && (
|
|
177
|
+
<section className={styles.billWaiverDescription}>
|
|
178
|
+
<label className={styles.label}>{t('amountAlreadyWaivedOrPaid', 'Total paid / waived')}</label>
|
|
179
|
+
<p className={styles.value}>{formatCurrency(amountAlreadyWaivedOrPaid)}</p>
|
|
180
|
+
</section>
|
|
181
|
+
)}
|
|
182
|
+
<Controller
|
|
183
|
+
control={control}
|
|
184
|
+
name="waiveAmount"
|
|
185
|
+
render={({ field }) => (
|
|
186
|
+
<Layer className={styles.formControlLayer}>
|
|
187
|
+
<NumberInput
|
|
188
|
+
id="waiverAmount"
|
|
189
|
+
label={t('amountToWaiveLabel', 'Amount to Waive')}
|
|
190
|
+
helperText={t('amountToWaiveHelper', 'Specify the amount to be deducted from the bill')}
|
|
191
|
+
aria-label={t('amountToWaiveAriaLabel', 'Enter amount to waive')}
|
|
192
|
+
hideSteppers
|
|
193
|
+
disableWheel
|
|
194
|
+
min={0}
|
|
195
|
+
max={totalAmount}
|
|
196
|
+
{...field}
|
|
197
|
+
invalidText={errors.waiveAmount?.message || 'Invalid'}
|
|
198
|
+
invalid={!!errors.waiveAmount}
|
|
199
|
+
/>
|
|
200
|
+
</Layer>
|
|
201
|
+
)}
|
|
202
|
+
/>
|
|
203
|
+
<Controller
|
|
204
|
+
control={control}
|
|
205
|
+
name="waiverReason"
|
|
206
|
+
render={({ field }) => (
|
|
207
|
+
<TextArea labelText={t('waiverReasonLabel', 'Waiver reason')} rows={4} id="waiverReason" {...field} />
|
|
208
|
+
)}
|
|
209
|
+
/>
|
|
210
|
+
</FormGroup>
|
|
211
|
+
</div>
|
|
212
|
+
<ButtonSet className={classNames({ [styles.tablet]: isTablet, [styles.desktop]: !isTablet })}>
|
|
213
|
+
<Button style={{ maxWidth: '50%' }} kind="secondary" onClick={() => closeWorkspace()}>
|
|
214
|
+
{t('cancel', 'Cancel')}
|
|
215
|
+
</Button>
|
|
216
|
+
<Button
|
|
217
|
+
disabled={isSubmitting || !isDirty || !isValid}
|
|
218
|
+
style={{ maxWidth: '50%' }}
|
|
219
|
+
kind="primary"
|
|
220
|
+
type="submit">
|
|
221
|
+
{isSubmitting ? (
|
|
222
|
+
<span style={{ display: 'flex', justifyItems: 'center' }}>
|
|
223
|
+
{t('submitting', 'Submitting...')} <InlineLoading status="active" iconDescription="Loading" />
|
|
224
|
+
</span>
|
|
225
|
+
) : (
|
|
226
|
+
t('postWaiver', 'Post waiver')
|
|
227
|
+
)}
|
|
228
|
+
</Button>
|
|
229
|
+
</ButtonSet>
|
|
230
|
+
</form>
|
|
231
|
+
);
|
|
232
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { filterBills } from './bill-filter';
|
|
2
|
+
import { Filter, MappedBill } from '../../../types';
|
|
3
|
+
|
|
4
|
+
describe('Bill Filter', () => {
|
|
5
|
+
const mockBills: Array<MappedBill> = [
|
|
6
|
+
{
|
|
7
|
+
uuid: '1',
|
|
8
|
+
payments: [
|
|
9
|
+
{ instanceType: { name: 'Cash' }, amount: 100 },
|
|
10
|
+
{ instanceType: { name: 'MPESA' }, amount: 200 },
|
|
11
|
+
],
|
|
12
|
+
lineItems: [{ serviceTypeUuid: 'service-1' }, { serviceTypeUuid: 'service-2' }],
|
|
13
|
+
status: 'PAID',
|
|
14
|
+
cashier: { uuid: 'cashier-1' },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
uuid: '2',
|
|
18
|
+
payments: [{ instanceType: { name: 'Cash' }, amount: 300 }],
|
|
19
|
+
lineItems: [{ serviceTypeUuid: 'service-3' }],
|
|
20
|
+
status: 'PENDING',
|
|
21
|
+
cashier: { uuid: 'cashier-2' },
|
|
22
|
+
},
|
|
23
|
+
] as Array<MappedBill>;
|
|
24
|
+
|
|
25
|
+
it('should return all bills when no filters are applied', () => {
|
|
26
|
+
const filters: Filter = {};
|
|
27
|
+
const result = filterBills(mockBills, filters);
|
|
28
|
+
expect(result).toHaveLength(2);
|
|
29
|
+
expect(result).toEqual(mockBills);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('should filter bills by payment method', () => {
|
|
33
|
+
const filters: Filter = {
|
|
34
|
+
paymentMethods: ['MPESA'],
|
|
35
|
+
};
|
|
36
|
+
const result = filterBills(mockBills, filters);
|
|
37
|
+
expect(result).toHaveLength(1);
|
|
38
|
+
expect(result[0].payments).toHaveLength(1);
|
|
39
|
+
expect(result[0].payments[0].instanceType.name).toBe('MPESA');
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should filter bills by multiple payment methods', () => {
|
|
43
|
+
const filters: Filter = {
|
|
44
|
+
paymentMethods: ['Cash', 'MPESA'],
|
|
45
|
+
};
|
|
46
|
+
const result = filterBills(mockBills, filters);
|
|
47
|
+
expect(result).toHaveLength(2);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('should filter bills by service type', () => {
|
|
51
|
+
const filters: Filter = {
|
|
52
|
+
serviceTypes: ['service-1'],
|
|
53
|
+
};
|
|
54
|
+
const result = filterBills(mockBills, filters);
|
|
55
|
+
expect(result).toHaveLength(1);
|
|
56
|
+
expect(result[0].uuid).toBe('1');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('should filter bills by cashier', () => {
|
|
60
|
+
const filters: Filter = {
|
|
61
|
+
cashiers: ['cashier-1'],
|
|
62
|
+
};
|
|
63
|
+
const result = filterBills(mockBills, filters);
|
|
64
|
+
expect(result).toHaveLength(1);
|
|
65
|
+
expect(result[0].cashier.uuid).toBe('cashier-1');
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('should filter bills by status', () => {
|
|
69
|
+
const filters: Filter = {
|
|
70
|
+
status: 'PENDING',
|
|
71
|
+
};
|
|
72
|
+
const result = filterBills(mockBills, filters);
|
|
73
|
+
expect(result).toHaveLength(1);
|
|
74
|
+
expect(result[0].status).toBe('PENDING');
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should combine multiple filters', () => {
|
|
78
|
+
const filters: Filter = {
|
|
79
|
+
paymentMethods: ['Cash'],
|
|
80
|
+
serviceTypes: ['service-1'],
|
|
81
|
+
cashiers: ['cashier-1'],
|
|
82
|
+
status: 'PAID',
|
|
83
|
+
};
|
|
84
|
+
const result = filterBills(mockBills, filters);
|
|
85
|
+
expect(result).toHaveLength(1);
|
|
86
|
+
expect(result[0].uuid).toBe('1');
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('should return empty array when no bills match filters', () => {
|
|
90
|
+
const filters: Filter = {
|
|
91
|
+
paymentMethods: ['NonExistentMethod'],
|
|
92
|
+
};
|
|
93
|
+
const result = filterBills(mockBills, filters);
|
|
94
|
+
expect(result).toHaveLength(0);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('should handle case-insensitive payment method matching', () => {
|
|
98
|
+
const filters: Filter = {
|
|
99
|
+
paymentMethods: ['cash', 'mpesa'], // lowercase
|
|
100
|
+
};
|
|
101
|
+
const result = filterBills(mockBills, filters);
|
|
102
|
+
expect(result).toHaveLength(2);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('should filter out bills with no payments when payment methods are specified', () => {
|
|
106
|
+
const billsWithEmptyPayments = [
|
|
107
|
+
...mockBills,
|
|
108
|
+
{
|
|
109
|
+
uuid: '3',
|
|
110
|
+
payments: [],
|
|
111
|
+
lineItems: [],
|
|
112
|
+
status: 'PENDING',
|
|
113
|
+
cashier: { uuid: 'cashier-3' },
|
|
114
|
+
} as MappedBill,
|
|
115
|
+
];
|
|
116
|
+
|
|
117
|
+
const filters: Filter = {
|
|
118
|
+
paymentMethods: ['Cash'],
|
|
119
|
+
};
|
|
120
|
+
const result = filterBills(billsWithEmptyPayments, filters);
|
|
121
|
+
expect(result).toHaveLength(2);
|
|
122
|
+
expect(result.find((bill) => bill.uuid === '3')).toBeUndefined();
|
|
123
|
+
});
|
|
124
|
+
});
|