@argusoft/medplat-core 1.0.30 → 1.0.32
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/{AccessRights-xrday-L1.js → AccessRights-DBjTQA1-.js} +395 -390
- package/dist/AccessRights-DBjTQA1-.js.map +1 -0
- package/dist/{AddFeatures-D1sU8RjY.js → AddFeatures-COj4ZTIM.js} +2 -2
- package/dist/{AddFeatures-D1sU8RjY.js.map → AddFeatures-COj4ZTIM.js.map} +1 -1
- package/dist/AddMenuConfiguration-Creeib5X.js +11223 -0
- package/dist/AddMenuConfiguration-Creeib5X.js.map +1 -0
- package/dist/AddMenuConfiguration.css +1 -1
- package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js → BrandsPage-CdcAvaml-ZtVTX6vX.js} +43 -43
- package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js.map → BrandsPage-CdcAvaml-ZtVTX6vX.js.map} +1 -1
- package/dist/{CategoriesPage-BsS5IQh3-B03lWRY5.js → CategoriesPage-BprQEYJw-CclreTv1.js} +109 -102
- package/dist/CategoriesPage-BprQEYJw-CclreTv1.js.map +1 -0
- package/dist/{ChangePasswordModalCore-BPsJquTS.js → ChangePasswordModalCore-DZGOkbRY.js} +3 -3
- package/dist/{ChangePasswordModalCore-BPsJquTS.js.map → ChangePasswordModalCore-DZGOkbRY.js.map} +1 -1
- package/dist/ConditionConfig-Bpm6OoV5.js +408 -0
- package/dist/ConditionConfig-Bpm6OoV5.js.map +1 -0
- package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js → DashboardPage-CTiGSx71-CsYohJ5e.js} +32 -32
- package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js.map → DashboardPage-CTiGSx71-CsYohJ5e.js.map} +1 -1
- package/dist/EntityManagement-BGwJGl9k.js +62 -0
- package/dist/EntityManagement-BGwJGl9k.js.map +1 -0
- package/dist/EventConfig-BY2cgGyx.js +27 -0
- package/dist/{EventConfig-BmLemzX3.js.map → EventConfig-BY2cgGyx.js.map} +1 -1
- package/dist/EventConfigurations-B-z7xHh_.js +544 -0
- package/dist/EventConfigurations-B-z7xHh_.js.map +1 -0
- package/dist/EventConfigurations.css +1 -1
- package/dist/EventsExceptionModal-DafomIv6.js +188 -0
- package/dist/EventsExceptionModal-DafomIv6.js.map +1 -0
- package/dist/EventsUi-Dl_yckSA.js +263 -0
- package/dist/EventsUi-Dl_yckSA.js.map +1 -0
- package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js +112 -0
- package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js.map +1 -0
- package/dist/{FeatureMenu-DYJmDt7q.js → FeatureMenu-Kc73yPHH.js} +9 -5
- package/dist/FeatureMenu-Kc73yPHH.js.map +1 -0
- package/dist/{FhirServerList-DuTwnngN.js → FhirServerList-CrIHMAxz.js} +16 -16
- package/dist/{FhirServerList-DuTwnngN.js.map → FhirServerList-CrIHMAxz.js.map} +1 -1
- package/dist/{FhirServerProfile-CUOwC6Wb.js → FhirServerProfile-D3aYcpwY.js} +8 -8
- package/dist/{FhirServerProfile-CUOwC6Wb.js.map → FhirServerProfile-D3aYcpwY.js.map} +1 -1
- package/dist/{FhirServerWizard-DZI8Olku.js → FhirServerWizard-Db6Hm4bQ.js} +15 -15
- package/dist/{FhirServerWizard-DZI8Olku.js.map → FhirServerWizard-Db6Hm4bQ.js.map} +1 -1
- package/dist/{GrantPermissionModal-BDN66Atn.js → GrantPermissionModal-D7iNZd0M.js} +54 -51
- package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-lKsJZMak.js +8060 -0
- package/dist/ImmunizationConfigurationBase-lKsJZMak.js.map +1 -0
- package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js +1017 -0
- package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js.map +1 -0
- package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js +1344 -0
- package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js.map +1 -0
- package/dist/{ManageDynamicFeature-BU0I45dd.js → ManageDynamicFeature-CuyYfx_P.js} +104 -97
- package/dist/ManageDynamicFeature-CuyYfx_P.js.map +1 -0
- package/dist/ManageEventConfiguration-DqPbn3Oi.js +1216 -0
- package/dist/ManageEventConfiguration-DqPbn3Oi.js.map +1 -0
- package/dist/ManageEventConfiguration.css +1 -1
- package/dist/ManageRole-CyfpySt9.js +981 -0
- package/dist/ManageRole-CyfpySt9.js.map +1 -0
- package/dist/{ManageUser-DCFkUMV9.js → ManageUser-Dm0l833u.js} +286 -286
- package/dist/{ManageUser-DCFkUMV9.js.map → ManageUser-Dm0l833u.js.map} +1 -1
- package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js → MemberProfileCard-01d_jz3w-DYHtbgMX.js} +46 -46
- package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js.map → MemberProfileCard-01d_jz3w-DYHtbgMX.js.map} +1 -1
- package/dist/MobileAnalytics-C9oc2yAo.js +18399 -0
- package/dist/MobileAnalytics-C9oc2yAo.js.map +1 -0
- package/dist/MobileMenuManagement-BmzTPXy7.js +231 -0
- package/dist/MobileMenuManagement-BmzTPXy7.js.map +1 -0
- package/dist/MobileTypeEventConfigModal-DodU3beR.js +752 -0
- package/dist/MobileTypeEventConfigModal-DodU3beR.js.map +1 -0
- package/dist/{NewServerManagement-Cxe0dV0O.js → NewServerManagement-BdayO78D.js} +368 -352
- package/dist/NewServerManagement-BdayO78D.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-D_9S50aI.js +1414 -0
- package/dist/OtherTypeEventConfigModal-D_9S50aI.js.map +1 -0
- package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js} +58 -58
- package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js.map} +1 -1
- package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js → PaymentsPage-CHieGNrn-BnYCtqHd.js} +37 -37
- package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js.map → PaymentsPage-CHieGNrn-BnYCtqHd.js.map} +1 -1
- package/dist/{PermissionsModal-CCYkcKlC.js → PermissionsModal-Dxbkkrqe.js} +18 -18
- package/dist/PermissionsModal-Dxbkkrqe.js.map +1 -0
- package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js} +2 -2
- package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js.map} +1 -1
- package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js +801 -0
- package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js.map +1 -0
- package/dist/{PickupsPage-Ctpghavs-CUp4uIZq.js → PickupsPage-BWblMlic-CWkgeBw0.js} +132 -132
- package/dist/PickupsPage-BWblMlic-CWkgeBw0.js.map +1 -0
- package/dist/PmGuard-BvUUbU80-BpYNaDzl.js +641 -0
- package/dist/PmGuard-BvUUbU80-BpYNaDzl.js.map +1 -0
- package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js +1523 -0
- package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js.map +1 -0
- package/dist/{ProductsPage-CupVmOD4-D45a_hf-.js → ProductsPage-BI22nPb4-CQBjnc-n.js} +44 -43
- package/dist/ProductsPage-BI22nPb4-CQBjnc-n.js.map +1 -0
- package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js +724 -0
- package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js.map +1 -0
- package/dist/{PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js → PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js} +428 -418
- package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js.map +1 -0
- package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js} +65 -65
- package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js.map} +1 -1
- package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js → PurchasesPage-Djl1AqD_-DXeYFMrX.js} +55 -55
- package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js.map → PurchasesPage-Djl1AqD_-DXeYFMrX.js.map} +1 -1
- package/dist/{RoleManagement-s8iNx2Mu.js → RoleManagement-DVYufwy-.js} +3 -3
- package/dist/{RoleManagement-s8iNx2Mu.js.map → RoleManagement-DVYufwy-.js.map} +1 -1
- package/dist/Roles-BoNGJhtR.js +19 -0
- package/dist/Roles-BoNGJhtR.js.map +1 -0
- package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js → SaleCreatePage-DHBLmlBr-BlgjVsq6.js} +39 -39
- package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map → SaleCreatePage-DHBLmlBr-BlgjVsq6.js.map} +1 -1
- package/dist/{SalesPage-D18DCseD-BxktGDRQ.js → SalesPage-eF9Yr42z-BQ9FlXC3.js} +61 -61
- package/dist/{SalesPage-D18DCseD-BxktGDRQ.js.map → SalesPage-eF9Yr42z-BQ9FlXC3.js.map} +1 -1
- package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js +741 -0
- package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js.map +1 -0
- package/dist/{ShowFlywayQuery-D1y_4A1u.js → ShowFlywayQuery-DIOUdYfG.js} +26 -19
- package/dist/{ShowFlywayQuery-D1y_4A1u.js.map → ShowFlywayQuery-DIOUdYfG.js.map} +1 -1
- package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js} +253 -223
- package/dist/StorageUnitsPage-CTEVuemZ-B4osG74N.js.map +1 -0
- package/dist/{SubMenu-eEDhZUvh.js → SubMenu-OO2zhKiu.js} +5 -3
- package/dist/SubMenu-OO2zhKiu.js.map +1 -0
- package/dist/{TableDetails-BtafRxXb.js → TableDetails-Cc40dEUs.js} +272 -267
- package/dist/TableDetails-Cc40dEUs.js.map +1 -0
- package/dist/{TableList-Dpo6dO7S.js → TableList-B5tX4wII.js} +316 -312
- package/dist/TableList-B5tX4wII.js.map +1 -0
- package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js → TransactionsPage-Zuu7sjID-B-ACzvd1.js} +195 -180
- package/dist/TransactionsPage-Zuu7sjID-B-ACzvd1.js.map +1 -0
- package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js +635 -0
- package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js.map +1 -0
- package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js +600 -0
- package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js.map +1 -0
- package/dist/TypeConfiguration-EaFiOzRE.js +114 -0
- package/dist/TypeConfiguration-EaFiOzRE.js.map +1 -0
- package/dist/UserList-Cf5B-o_1.js +1904 -0
- package/dist/UserList-Cf5B-o_1.js.map +1 -0
- package/dist/Users-MC7txo1V.js +43 -0
- package/dist/{Users-Bpc4Sazd.js.map → Users-MC7txo1V.js.map} +1 -1
- package/dist/VaccineEducation-T_UE57Ef.js +231 -0
- package/dist/VaccineEducation-T_UE57Ef.js.map +1 -0
- package/dist/VaccineEducation.css +1 -0
- package/dist/VaccineEducationConfigurator-CWc20_rv.js +50948 -0
- package/dist/VaccineEducationConfigurator-CWc20_rv.js.map +1 -0
- package/dist/VaccineEducationConfigurator.css +4 -0
- package/dist/VaccineEducationList-Ok7_5EFb.js +334 -0
- package/dist/VaccineEducationList-Ok7_5EFb.js.map +1 -0
- package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js +457 -0
- package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js.map +1 -0
- package/dist/{constants-ClZJY2x1-MkSWn6TZ.js → constants-BTpJFQe_-CYPZIqQF.js} +166 -56
- package/dist/constants-BTpJFQe_-CYPZIqQF.js.map +1 -0
- package/dist/dashboardLayoutUtils--xUnoKPa.js +615 -0
- package/dist/dashboardLayoutUtils--xUnoKPa.js.map +1 -0
- package/dist/index-mfoqII2U.js +524 -0
- package/dist/index-mfoqII2U.js.map +1 -0
- package/dist/{index-D9YNFPn9.js → index-o8Pyt1Bt.js} +445 -439
- package/dist/index-o8Pyt1Bt.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.lib-BySa9-Z-.js +936 -0
- package/dist/index.lib-BySa9-Z-.js.map +1 -0
- package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js +43 -0
- package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js.map +1 -0
- package/package.json +5 -1
- package/dist/AccessRights-xrday-L1.js.map +0 -1
- package/dist/AddMenuConfiguration-e5BVXhmw.js +0 -8547
- package/dist/AddMenuConfiguration-e5BVXhmw.js.map +0 -1
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +0 -1
- package/dist/ConditionConfig-Ddz9halE.js +0 -395
- package/dist/ConditionConfig-Ddz9halE.js.map +0 -1
- package/dist/ConditionConfig.css +0 -1
- package/dist/EntityManagement-CPQL6qBj.js +0 -50
- package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
- package/dist/EventConfig-BmLemzX3.js +0 -26
- package/dist/EventConfigurations-Bzh1qWXU.js +0 -450
- package/dist/EventConfigurations-Bzh1qWXU.js.map +0 -1
- package/dist/EventsExceptionModal-B2SRrnB1.js +0 -200
- package/dist/EventsExceptionModal-B2SRrnB1.js.map +0 -1
- package/dist/EventsSkeleton-BIcPks4T.js +0 -61
- package/dist/EventsSkeleton-BIcPks4T.js.map +0 -1
- package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js +0 -79
- package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js.map +0 -1
- package/dist/FeatureMenu-DYJmDt7q.js.map +0 -1
- package/dist/GrantPermissionModal-BDN66Atn.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js +0 -7639
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +0 -1
- package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js +0 -665
- package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js.map +0 -1
- package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
- package/dist/ManageEventConfiguration-CoYcpjR9.js +0 -1085
- package/dist/ManageEventConfiguration-CoYcpjR9.js.map +0 -1
- package/dist/ManageRole-CNZBRKGU.js +0 -776
- package/dist/ManageRole-CNZBRKGU.js.map +0 -1
- package/dist/MobileAnalytics-pQoE8cG1.js +0 -16888
- package/dist/MobileAnalytics-pQoE8cG1.js.map +0 -1
- package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
- package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
- package/dist/MobileTypeEventConfigModal-BeveaX0C.js +0 -783
- package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +0 -1
- package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js +0 -2046
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +0 -1
- package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
- package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js +0 -783
- package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map +0 -1
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +0 -1
- package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js +0 -599
- package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js.map +0 -1
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js +0 -1302
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +0 -1
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +0 -1
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js +0 -648
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +0 -1
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +0 -1
- package/dist/Roles-BIyiic67.js +0 -14
- package/dist/Roles-BIyiic67.js.map +0 -1
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +0 -747
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +0 -1
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +0 -1
- package/dist/SubMenu-eEDhZUvh.js.map +0 -1
- package/dist/TableDetails-BtafRxXb.js.map +0 -1
- package/dist/TableList-Dpo6dO7S.js.map +0 -1
- package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js.map +0 -1
- package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js +0 -315
- package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map +0 -1
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js +0 -476
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +0 -1
- package/dist/TypeConfiguration-3O6ABrK-.js +0 -117
- package/dist/TypeConfiguration-3O6ABrK-.js.map +0 -1
- package/dist/UserList-DgPxsnj2.js +0 -1129
- package/dist/UserList-DgPxsnj2.js.map +0 -1
- package/dist/Users-Bpc4Sazd.js +0 -41
- package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js +0 -321
- package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js.map +0 -1
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +0 -1
- package/dist/dashboardLayoutUtils-D1xCAxp3.js +0 -405
- package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
- package/dist/index-D9YNFPn9.js.map +0 -1
- package/dist/index.lib-Dn8PMkeD.js +0 -862
- package/dist/index.lib-Dn8PMkeD.js.map +0 -1
package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js}
RENAMED
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { v as
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { B as je, z as He, V as Qe, G as fe, _ as Ze, C as _e, a as U, v as Je, y as Ke, e as Xe } from "./ImmunizationConfigurationBase-lKsJZMak.js";
|
|
2
|
+
import { H as ye } from "./constants-BTpJFQe_-CYPZIqQF.js";
|
|
3
|
+
import { t as Ge } from "./format-UOyOu75i-D0GyylyQ.js";
|
|
4
|
+
import { v as ei, i as ii, r as L, C as ti, g as ni, _ as ri } from "./validation-BzlHnL-r-CCJm2utQ.js";
|
|
5
|
+
import { n as Te } from "./useFieldErrors-hDG8ox_x-DbSAzrGo.js";
|
|
6
|
+
import { Q as ai, Z as li, $ as oi, e as si, Y as ui } from "./PmGuard-BvUUbU80-BpYNaDzl.js";
|
|
7
|
+
import { y as di } from "./listValueStore-5d4vNGQM-WclZ5nBG.js";
|
|
8
|
+
import { f as ci } from "./FacilityPicker-BXa2VF7i-Dab_Jwa5.js";
|
|
8
9
|
import { useState as p } from "react";
|
|
9
|
-
import { jsxs as n, jsx as i, Fragment as
|
|
10
|
-
import { Box as
|
|
11
|
-
import { v4 as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
10
|
+
import { jsxs as n, jsx as i, Fragment as j } from "react/jsx-runtime";
|
|
11
|
+
import { Box as H, Alert as $, TableHead as we, TableRow as W, TableCell as a, TableBody as ve, Skeleton as pi, Button as g, Typography as T, Chip as be, Stack as v, FormControlLabel as xe, Dialog as Me, DialogTitle as ke, DialogContent as Ie, Divider as mi, TextField as w, Checkbox as hi, Link as gi, DialogActions as Ne, Table as Ci } from "@mui/material";
|
|
12
|
+
import { v4 as Be } from "uuid";
|
|
13
|
+
import Ae from "@mui/icons-material/AddRounded";
|
|
14
|
+
import fi from "@mui/icons-material/RefreshRounded";
|
|
15
|
+
import yi from "@/views/custom-components/CustomSwitch";
|
|
16
|
+
import { useNavigate as Ti } from "react-router-dom";
|
|
17
|
+
import wi from "@mui/icons-material/WarehouseRounded";
|
|
18
|
+
import vi from "@mui/icons-material/CheckCircleRounded";
|
|
19
|
+
import bi from "@mui/icons-material/DeviceThermostatRounded";
|
|
20
|
+
import $e from "@mui/icons-material/WarningAmberRounded";
|
|
21
|
+
var xi = [{
|
|
20
22
|
value: "FACILITY",
|
|
21
23
|
label: "Facility"
|
|
22
24
|
}];
|
|
23
|
-
function
|
|
24
|
-
var
|
|
25
|
-
let
|
|
25
|
+
function Yi() {
|
|
26
|
+
var me, he, ge, Ce;
|
|
27
|
+
let q = ai().has("update.manage.productManagement.storageUnit"), { storageUnitTypes: F } = di(), We = Ti(), qe = (e) => {
|
|
28
|
+
var s;
|
|
29
|
+
return e ? ((s = F.find((r) => r.value === e)) == null ? void 0 : s.label) ?? ye(e) : "";
|
|
30
|
+
}, [b, Fe] = p([]), [ze, E] = p({}), [Q, Z] = p(!1), [_, x] = p(""), [Se, k] = p(!1), [I, J] = p(null), [t, m] = p(X()), [K, Re] = p(!1), l = Te(), D = Te();
|
|
26
31
|
function X() {
|
|
27
32
|
return {
|
|
28
33
|
id: "",
|
|
@@ -30,175 +35,180 @@ function qi() {
|
|
|
30
35
|
ownerId: "",
|
|
31
36
|
unitName: "",
|
|
32
37
|
unitCode: "",
|
|
33
|
-
unitType: "
|
|
38
|
+
unitType: "",
|
|
34
39
|
make: "",
|
|
35
40
|
model: "",
|
|
36
41
|
comments: "",
|
|
37
42
|
operatingTempMinCelsius: "",
|
|
38
43
|
operatingTempMaxCelsius: "",
|
|
39
|
-
isActive: !0
|
|
44
|
+
isActive: !0,
|
|
45
|
+
occupyingBatchCount: 0
|
|
40
46
|
};
|
|
41
47
|
}
|
|
42
|
-
async function
|
|
43
|
-
var e,
|
|
44
|
-
|
|
48
|
+
async function z() {
|
|
49
|
+
var e, s;
|
|
50
|
+
Z(!0), x("");
|
|
45
51
|
try {
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
if (
|
|
52
|
+
let r = await Ze({ activeOnly: !1 });
|
|
53
|
+
Fe(r);
|
|
54
|
+
let u = Array.from(new Set(r.map((y) => y.ownerId).filter(Boolean)));
|
|
55
|
+
if (u.length === 0) E({});
|
|
50
56
|
else try {
|
|
51
|
-
let
|
|
52
|
-
|
|
57
|
+
let y = await _e(u), h = {};
|
|
58
|
+
y.forEach((c) => {
|
|
53
59
|
h[c.id] = c.name;
|
|
54
60
|
}), E(h);
|
|
55
61
|
} catch {
|
|
56
62
|
E({});
|
|
57
63
|
}
|
|
58
|
-
} catch (
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
message:
|
|
64
|
+
} catch (r) {
|
|
65
|
+
let u = ((s = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : s.message) ?? (r == null ? void 0 : r.message) ?? "Failed to load storage units";
|
|
66
|
+
x(u), U({
|
|
67
|
+
message: u,
|
|
62
68
|
type: "error"
|
|
63
69
|
});
|
|
64
70
|
} finally {
|
|
65
|
-
|
|
71
|
+
Z(!1);
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
li("view.manage.productManagement.storageUnit", () => {
|
|
75
|
+
z();
|
|
70
76
|
}, []);
|
|
71
|
-
function
|
|
72
|
-
return
|
|
77
|
+
function Ue(e) {
|
|
78
|
+
return ze[e] ?? e;
|
|
73
79
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
80
|
+
function G() {
|
|
81
|
+
J(null), m({
|
|
76
82
|
...X(),
|
|
77
|
-
id:
|
|
78
|
-
}), l.reset(),
|
|
83
|
+
id: Be()
|
|
84
|
+
}), l.reset(), x(""), k(!0);
|
|
79
85
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
86
|
+
function Le(e) {
|
|
87
|
+
J(e), l.reset(), x(""), m({
|
|
82
88
|
id: e.id,
|
|
83
89
|
ownerType: e.ownerType ?? "FACILITY",
|
|
84
90
|
ownerId: e.ownerId ?? "",
|
|
85
91
|
unitName: e.unitName ?? "",
|
|
86
92
|
unitCode: e.unitCode ?? "",
|
|
87
|
-
unitType: e.unitType ?? "
|
|
93
|
+
unitType: e.unitType ?? "",
|
|
88
94
|
make: e.make ?? "",
|
|
89
95
|
model: e.model ?? "",
|
|
90
96
|
comments: e.comments ?? "",
|
|
91
97
|
operatingTempMinCelsius: e.operatingTempMinCelsius ?? "",
|
|
92
98
|
operatingTempMaxCelsius: e.operatingTempMaxCelsius ?? "",
|
|
93
|
-
isActive: e.isActive !== !1
|
|
99
|
+
isActive: e.isActive !== !1,
|
|
100
|
+
occupyingBatchCount: e.occupyingBatchCount ?? 0
|
|
94
101
|
}), k(!0);
|
|
95
102
|
}
|
|
96
|
-
let
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
let ee = !!I && t.isActive && (t.occupyingBatchCount ?? 0) > 0, ie = ei(t.operatingTempMinCelsius, t.operatingTempMaxCelsius), te = ii(t.unitCode, { required: !0 }), ne = (t.unitCode || "").trim().toUpperCase(), Ee = !te && ne && t.ownerId && b.some((e) => e.id !== t.id && e.ownerId === t.ownerId && (e.unitCode || "").toUpperCase() === ne), De = t.unitType && !F.some((e) => e.value === t.unitType) ? [...F, {
|
|
104
|
+
value: t.unitType,
|
|
105
|
+
label: ye(t.unitType)
|
|
106
|
+
}] : F, o = {
|
|
107
|
+
ownerType: L(t.ownerType, "Owner type"),
|
|
108
|
+
ownerId: L(t.ownerId, "Facility"),
|
|
109
|
+
unitName: L(t.unitName, "Name"),
|
|
110
|
+
unitCode: te || (Ee ? "Code is already in use for this facility." : ""),
|
|
111
|
+
unitType: L(t.unitType, "Type"),
|
|
112
|
+
operatingTempMinCelsius: ie.min,
|
|
113
|
+
operatingTempMaxCelsius: ie.max
|
|
114
|
+
}, re = ti(o);
|
|
115
|
+
async function Oe() {
|
|
116
|
+
var e, s, r, u, y;
|
|
117
|
+
if (!re) {
|
|
118
|
+
l.markAllTouched(), x("Please fix the highlighted fields.");
|
|
109
119
|
return;
|
|
110
120
|
}
|
|
111
121
|
try {
|
|
112
|
-
await
|
|
122
|
+
await Je({
|
|
113
123
|
id: t.id,
|
|
114
124
|
ownerId: t.ownerId,
|
|
115
125
|
unitName: t.unitName.trim(),
|
|
116
126
|
unitCode: t.unitCode.trim().toUpperCase(),
|
|
117
127
|
unitType: t.unitType,
|
|
118
128
|
make: ((e = t.make) == null ? void 0 : e.trim()) || null,
|
|
119
|
-
model: ((
|
|
120
|
-
comments: ((
|
|
129
|
+
model: ((s = t.model) == null ? void 0 : s.trim()) || null,
|
|
130
|
+
comments: ((r = t.comments) == null ? void 0 : r.trim()) || null,
|
|
121
131
|
operatingTempMinCelsius: t.operatingTempMinCelsius === "" ? null : Number(t.operatingTempMinCelsius),
|
|
122
132
|
operatingTempMaxCelsius: t.operatingTempMaxCelsius === "" ? null : Number(t.operatingTempMaxCelsius),
|
|
123
133
|
isActive: t.isActive
|
|
124
|
-
}),
|
|
134
|
+
}), U({
|
|
125
135
|
message: "Storage unit saved.",
|
|
126
136
|
type: "success"
|
|
127
|
-
}), k(!1), await
|
|
137
|
+
}), k(!1), await z();
|
|
128
138
|
} catch (h) {
|
|
129
|
-
let c = ((
|
|
130
|
-
|
|
139
|
+
let c = ((y = (u = h == null ? void 0 : h.response) == null ? void 0 : u.data) == null ? void 0 : y.message) ?? (h == null ? void 0 : h.message) ?? "Failed to save storage unit";
|
|
140
|
+
x(c), U({
|
|
131
141
|
message: c,
|
|
132
142
|
type: "error"
|
|
133
143
|
});
|
|
134
144
|
}
|
|
135
145
|
}
|
|
136
|
-
let [
|
|
146
|
+
let [d, O] = p({
|
|
137
147
|
open: !1,
|
|
138
148
|
unit: null
|
|
139
|
-
}), [M,
|
|
149
|
+
}), [M, V] = p({
|
|
140
150
|
temperatureCelsius: "",
|
|
141
151
|
notes: ""
|
|
142
|
-
}), [
|
|
143
|
-
function
|
|
152
|
+
}), [ae, P] = p("input"), [C, le] = p(null), [f, S] = p(!1), [oe, N] = p("");
|
|
153
|
+
function Ve(e) {
|
|
144
154
|
O({
|
|
145
155
|
open: !0,
|
|
146
156
|
unit: e
|
|
147
|
-
}),
|
|
157
|
+
}), V({
|
|
148
158
|
temperatureCelsius: "",
|
|
149
159
|
notes: ""
|
|
150
|
-
}), P("input"),
|
|
160
|
+
}), P("input"), le(null), N(""), D.reset();
|
|
151
161
|
}
|
|
152
|
-
function
|
|
162
|
+
function se() {
|
|
153
163
|
f || O({
|
|
154
164
|
open: !1,
|
|
155
165
|
unit: null
|
|
156
166
|
});
|
|
157
167
|
}
|
|
158
|
-
let
|
|
159
|
-
async function
|
|
160
|
-
var e,
|
|
161
|
-
if (!(!
|
|
162
|
-
S(!0),
|
|
168
|
+
let B = M.temperatureCelsius, Y = ni(B, { required: !0 }), ue = ri(B, (me = d.unit) == null ? void 0 : me.operatingTempMinCelsius, (he = d.unit) == null ? void 0 : he.operatingTempMaxCelsius), de = !Y, ce = !!Y && (B !== "" || D.show("temperatureCelsius")), Pe = ((ge = d.unit) == null ? void 0 : ge.operatingTempMinCelsius) != null && ((Ce = d.unit) == null ? void 0 : Ce.operatingTempMaxCelsius) != null ? ` This unit operates between ${d.unit.operatingTempMinCelsius}°C and ${d.unit.operatingTempMaxCelsius}°C.` : "";
|
|
169
|
+
async function Ye() {
|
|
170
|
+
var e, s;
|
|
171
|
+
if (!(!d.unit || !de)) {
|
|
172
|
+
S(!0), N("");
|
|
163
173
|
try {
|
|
164
|
-
|
|
165
|
-
} catch (
|
|
166
|
-
|
|
174
|
+
le(await Ke(d.unit.id, Number(B))), P("result");
|
|
175
|
+
} catch (r) {
|
|
176
|
+
N(((s = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : s.message) ?? (r == null ? void 0 : r.message) ?? "Failed to evaluate temperature");
|
|
167
177
|
} finally {
|
|
168
178
|
S(!1);
|
|
169
179
|
}
|
|
170
180
|
}
|
|
171
181
|
}
|
|
172
|
-
async function
|
|
173
|
-
var
|
|
174
|
-
if (
|
|
175
|
-
S(!0),
|
|
182
|
+
async function pe(e) {
|
|
183
|
+
var s, r, u, y, h;
|
|
184
|
+
if (d.unit) {
|
|
185
|
+
S(!0), N("");
|
|
176
186
|
try {
|
|
177
|
-
let c = ((
|
|
178
|
-
id:
|
|
179
|
-
temperatureCelsius: Number(
|
|
187
|
+
let c = ((u = (r = await Xe(d.unit.id, {
|
|
188
|
+
id: Be(),
|
|
189
|
+
temperatureCelsius: Number(B),
|
|
180
190
|
wasteOutOfRange: e,
|
|
181
|
-
notes: ((
|
|
182
|
-
})) == null ? void 0 :
|
|
183
|
-
|
|
191
|
+
notes: ((s = M.notes) == null ? void 0 : s.trim()) || null
|
|
192
|
+
})) == null ? void 0 : r.affectedBatches) == null ? void 0 : u.length) ?? 0;
|
|
193
|
+
U({
|
|
184
194
|
message: e && c > 0 ? `Reading logged. ${c} ${c === 1 ? "batch" : "batches"} marked as wastage.` : "Temperature reading logged.",
|
|
185
195
|
type: "success"
|
|
186
196
|
}), O({
|
|
187
197
|
open: !1,
|
|
188
198
|
unit: null
|
|
189
|
-
}), await
|
|
199
|
+
}), await z();
|
|
190
200
|
} catch (c) {
|
|
191
|
-
|
|
201
|
+
N(((h = (y = c == null ? void 0 : c.response) == null ? void 0 : y.data) == null ? void 0 : h.message) ?? (c == null ? void 0 : c.message) ?? "Failed to log temperature");
|
|
192
202
|
} finally {
|
|
193
203
|
S(!1);
|
|
194
204
|
}
|
|
195
205
|
}
|
|
196
206
|
}
|
|
197
|
-
let A = (C == null ? void 0 : C.affectedBatches) ?? [],
|
|
198
|
-
return /* @__PURE__ */ n(
|
|
207
|
+
let A = (C == null ? void 0 : C.affectedBatches) ?? [], R = K ? b : b.filter((e) => e.isActive !== !1);
|
|
208
|
+
return /* @__PURE__ */ n(H, { children: [/* @__PURE__ */ i(oi, {}), /* @__PURE__ */ n(si, {
|
|
199
209
|
perm: "view.manage.productManagement.storageUnit",
|
|
200
210
|
children: [
|
|
201
|
-
/* @__PURE__ */ n(
|
|
211
|
+
/* @__PURE__ */ n(ui, {
|
|
202
212
|
title: "Storage Units",
|
|
203
213
|
subtitle: "Cold-chain equipment for storing vaccine and product batches. Currently managed per facility.",
|
|
204
214
|
chips: ["Catalog", "Facility-owned"],
|
|
@@ -207,30 +217,30 @@ function qi() {
|
|
|
207
217
|
spacing: 1,
|
|
208
218
|
children: [/* @__PURE__ */ i(g, {
|
|
209
219
|
variant: "outlined",
|
|
210
|
-
startIcon: /* @__PURE__ */ i(
|
|
211
|
-
onClick: () => void
|
|
220
|
+
startIcon: /* @__PURE__ */ i(fi, {}),
|
|
221
|
+
onClick: () => void z(),
|
|
212
222
|
children: "Refresh"
|
|
213
|
-
}),
|
|
223
|
+
}), q ? /* @__PURE__ */ i(g, {
|
|
214
224
|
variant: "contained",
|
|
215
|
-
startIcon: /* @__PURE__ */ i(
|
|
216
|
-
onClick:
|
|
225
|
+
startIcon: /* @__PURE__ */ i(Ae, {}),
|
|
226
|
+
onClick: G,
|
|
217
227
|
children: "New Storage Unit"
|
|
218
228
|
}) : null]
|
|
219
229
|
}),
|
|
220
|
-
children: [
|
|
230
|
+
children: [_ ? /* @__PURE__ */ i($, {
|
|
221
231
|
severity: "error",
|
|
222
232
|
sx: { mb: 2 },
|
|
223
|
-
children:
|
|
224
|
-
}) : null, /* @__PURE__ */ i(
|
|
233
|
+
children: _
|
|
234
|
+
}) : null, /* @__PURE__ */ i(je, {
|
|
225
235
|
eyebrow: "Cold-chain network",
|
|
226
236
|
title: "Storage units",
|
|
227
|
-
subtitle:
|
|
228
|
-
actions: /* @__PURE__ */ i(
|
|
229
|
-
control: /* @__PURE__ */ i(
|
|
230
|
-
checked:
|
|
231
|
-
onChange: (e) =>
|
|
237
|
+
subtitle: Q ? "Loading…" : `${R.length} ${R.length === 1 ? "unit" : "units"}`,
|
|
238
|
+
actions: /* @__PURE__ */ i(xe, {
|
|
239
|
+
control: /* @__PURE__ */ i(yi, {
|
|
240
|
+
checked: K,
|
|
241
|
+
onChange: (e) => Re(e.target.checked)
|
|
232
242
|
}),
|
|
233
|
-
label: /* @__PURE__ */ i(
|
|
243
|
+
label: /* @__PURE__ */ i(T, {
|
|
234
244
|
variant: "body2",
|
|
235
245
|
sx: { fontWeight: 600 },
|
|
236
246
|
children: "Show inactive"
|
|
@@ -241,33 +251,33 @@ function qi() {
|
|
|
241
251
|
ml: 0
|
|
242
252
|
}
|
|
243
253
|
}),
|
|
244
|
-
children: /* @__PURE__ */ n(
|
|
245
|
-
/* @__PURE__ */ i(
|
|
246
|
-
/* @__PURE__ */ i(
|
|
247
|
-
/* @__PURE__ */ i(
|
|
248
|
-
/* @__PURE__ */ i(
|
|
249
|
-
/* @__PURE__ */ i(
|
|
250
|
-
/* @__PURE__ */ i(
|
|
251
|
-
/* @__PURE__ */ i(
|
|
254
|
+
children: /* @__PURE__ */ n(He, { children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ n(W, { children: [
|
|
255
|
+
/* @__PURE__ */ i(a, { children: "Code" }),
|
|
256
|
+
/* @__PURE__ */ i(a, { children: "Name" }),
|
|
257
|
+
/* @__PURE__ */ i(a, { children: "Facility" }),
|
|
258
|
+
/* @__PURE__ */ i(a, { children: "Type" }),
|
|
259
|
+
/* @__PURE__ */ i(a, { children: "Operating range" }),
|
|
260
|
+
/* @__PURE__ */ i(a, { children: "Status" }),
|
|
261
|
+
/* @__PURE__ */ i(a, {
|
|
252
262
|
align: "right",
|
|
253
263
|
children: "Action"
|
|
254
264
|
})
|
|
255
|
-
] }) }), /* @__PURE__ */ i(
|
|
265
|
+
] }) }), /* @__PURE__ */ i(ve, { children: Q ? Array.from({ length: 4 }).map((e, s) => /* @__PURE__ */ i(W, { children: Array.from({ length: 7 }).map((r, u) => /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(pi, { height: 22 }) }, u)) }, s)) : R.length === 0 ? /* @__PURE__ */ i(Qe, {
|
|
256
266
|
colSpan: 7,
|
|
257
|
-
icon:
|
|
258
|
-
title:
|
|
259
|
-
hint:
|
|
260
|
-
action:
|
|
267
|
+
icon: wi,
|
|
268
|
+
title: b.length === 0 ? "No storage units yet" : "No active storage units",
|
|
269
|
+
hint: b.length === 0 ? "You need storage equipment to keep vaccine batches safe." : "Turn on “Show inactive” to see deactivated storage units.",
|
|
270
|
+
action: b.length === 0 && q ? /* @__PURE__ */ i(g, {
|
|
261
271
|
variant: "contained",
|
|
262
272
|
size: "small",
|
|
263
|
-
startIcon: /* @__PURE__ */ i(
|
|
264
|
-
onClick:
|
|
273
|
+
startIcon: /* @__PURE__ */ i(Ae, {}),
|
|
274
|
+
onClick: G,
|
|
265
275
|
children: "Create first unit"
|
|
266
276
|
}) : null
|
|
267
|
-
}) :
|
|
277
|
+
}) : R.map((e) => /* @__PURE__ */ n(W, {
|
|
268
278
|
hover: !0,
|
|
269
279
|
children: [
|
|
270
|
-
/* @__PURE__ */ i(
|
|
280
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(H, {
|
|
271
281
|
component: "span",
|
|
272
282
|
sx: {
|
|
273
283
|
display: "inline-flex",
|
|
@@ -281,19 +291,19 @@ function qi() {
|
|
|
281
291
|
},
|
|
282
292
|
children: e.unitCode
|
|
283
293
|
}) }),
|
|
284
|
-
/* @__PURE__ */ i(
|
|
294
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(T, {
|
|
285
295
|
variant: "body2",
|
|
286
296
|
sx: { fontWeight: 700 },
|
|
287
297
|
children: e.unitName
|
|
288
298
|
}) }),
|
|
289
|
-
/* @__PURE__ */ i(
|
|
299
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(T, {
|
|
290
300
|
variant: "caption",
|
|
291
301
|
color: "text.secondary",
|
|
292
|
-
children:
|
|
302
|
+
children: Ue(e.ownerId)
|
|
293
303
|
}) }),
|
|
294
|
-
/* @__PURE__ */ i(
|
|
304
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(be, {
|
|
295
305
|
size: "small",
|
|
296
|
-
label:
|
|
306
|
+
label: qe(e.unitType),
|
|
297
307
|
variant: "outlined",
|
|
298
308
|
sx: {
|
|
299
309
|
fontWeight: 700,
|
|
@@ -301,7 +311,7 @@ function qi() {
|
|
|
301
311
|
height: 22
|
|
302
312
|
}
|
|
303
313
|
}) }),
|
|
304
|
-
/* @__PURE__ */ i(
|
|
314
|
+
/* @__PURE__ */ i(a, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(T, {
|
|
305
315
|
variant: "caption",
|
|
306
316
|
sx: {
|
|
307
317
|
fontWeight: 700,
|
|
@@ -313,12 +323,12 @@ function qi() {
|
|
|
313
323
|
e.operatingTempMaxCelsius,
|
|
314
324
|
"°C"
|
|
315
325
|
]
|
|
316
|
-
}) : /* @__PURE__ */ i(
|
|
326
|
+
}) : /* @__PURE__ */ i(T, {
|
|
317
327
|
variant: "caption",
|
|
318
328
|
color: "text.disabled",
|
|
319
329
|
children: "—"
|
|
320
330
|
}) }),
|
|
321
|
-
/* @__PURE__ */ i(
|
|
331
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(be, {
|
|
322
332
|
size: "small",
|
|
323
333
|
label: e.isActive ? "Active" : "Inactive",
|
|
324
334
|
color: e.isActive ? "success" : "default",
|
|
@@ -329,23 +339,23 @@ function qi() {
|
|
|
329
339
|
height: 22
|
|
330
340
|
}
|
|
331
341
|
}) }),
|
|
332
|
-
/* @__PURE__ */ i(
|
|
342
|
+
/* @__PURE__ */ i(a, {
|
|
333
343
|
align: "right",
|
|
334
344
|
children: /* @__PURE__ */ n(v, {
|
|
335
345
|
direction: "row",
|
|
336
346
|
spacing: 1,
|
|
337
347
|
justifyContent: "flex-end",
|
|
338
|
-
children: [
|
|
348
|
+
children: [q ? /* @__PURE__ */ i(g, {
|
|
339
349
|
size: "small",
|
|
340
350
|
variant: "outlined",
|
|
341
351
|
color: "info",
|
|
342
|
-
startIcon: /* @__PURE__ */ i(
|
|
343
|
-
onClick: () =>
|
|
352
|
+
startIcon: /* @__PURE__ */ i(bi, {}),
|
|
353
|
+
onClick: () => Ve(e),
|
|
344
354
|
children: "Log temp"
|
|
345
|
-
}) : null,
|
|
355
|
+
}) : null, q ? /* @__PURE__ */ i(g, {
|
|
346
356
|
size: "small",
|
|
347
357
|
variant: "outlined",
|
|
348
|
-
onClick: () =>
|
|
358
|
+
onClick: () => Le(e),
|
|
349
359
|
children: "Edit"
|
|
350
360
|
}) : null]
|
|
351
361
|
})
|
|
@@ -354,23 +364,23 @@ function qi() {
|
|
|
354
364
|
}, e.id)) })] })
|
|
355
365
|
})]
|
|
356
366
|
}),
|
|
357
|
-
/* @__PURE__ */ n(
|
|
358
|
-
open:
|
|
367
|
+
/* @__PURE__ */ n(Me, {
|
|
368
|
+
open: Se,
|
|
359
369
|
onClose: () => k(!1),
|
|
360
370
|
fullWidth: !0,
|
|
361
371
|
maxWidth: "sm",
|
|
362
372
|
children: [
|
|
363
|
-
/* @__PURE__ */ i(
|
|
364
|
-
/* @__PURE__ */ i(
|
|
373
|
+
/* @__PURE__ */ i(ke, { children: I ? "Edit Storage Unit" : "New Storage Unit" }),
|
|
374
|
+
/* @__PURE__ */ i(Ie, {
|
|
365
375
|
dividers: !0,
|
|
366
376
|
children: /* @__PURE__ */ n(v, {
|
|
367
377
|
spacing: 2,
|
|
368
378
|
sx: { pt: 1 },
|
|
369
379
|
children: [
|
|
370
|
-
/* @__PURE__ */ i(
|
|
380
|
+
/* @__PURE__ */ i(fe, {
|
|
371
381
|
label: "Owner Type",
|
|
372
382
|
required: !0,
|
|
373
|
-
disabled: !!
|
|
383
|
+
disabled: !!I,
|
|
374
384
|
value: t.ownerType,
|
|
375
385
|
onChange: (e) => m({
|
|
376
386
|
...t,
|
|
@@ -380,11 +390,11 @@ function qi() {
|
|
|
380
390
|
onBlur: l.onBlur("ownerType"),
|
|
381
391
|
error: l.show("ownerType") && !!o.ownerType,
|
|
382
392
|
helperText: l.show("ownerType") && o.ownerType ? o.ownerType : "Only Facility is available currently.",
|
|
383
|
-
options:
|
|
393
|
+
options: xi
|
|
384
394
|
}),
|
|
385
|
-
/* @__PURE__ */ i(
|
|
395
|
+
/* @__PURE__ */ i(ci, {
|
|
386
396
|
required: !0,
|
|
387
|
-
disabled: !!
|
|
397
|
+
disabled: !!I || t.ownerType !== "FACILITY",
|
|
388
398
|
value: t.ownerId,
|
|
389
399
|
onChange: (e) => m({
|
|
390
400
|
...t,
|
|
@@ -394,26 +404,26 @@ function qi() {
|
|
|
394
404
|
error: l.show("ownerId") && !!o.ownerId,
|
|
395
405
|
helperText: l.show("ownerId") && o.ownerId ? o.ownerId : "Search by name. The owner cannot be changed once created."
|
|
396
406
|
}),
|
|
397
|
-
/* @__PURE__ */ i(
|
|
398
|
-
/* @__PURE__ */ i(
|
|
407
|
+
/* @__PURE__ */ i(mi, {}),
|
|
408
|
+
/* @__PURE__ */ i(w, {
|
|
399
409
|
required: !0,
|
|
400
410
|
label: "Unit name",
|
|
401
411
|
size: "small",
|
|
402
412
|
fullWidth: !0,
|
|
403
413
|
value: t.unitName,
|
|
404
414
|
onChange: (e) => {
|
|
405
|
-
let
|
|
406
|
-
m((
|
|
407
|
-
...
|
|
408
|
-
unitName:
|
|
409
|
-
unitCode:
|
|
415
|
+
let s = e.target.value, r = s.split(/\s+/).filter(Boolean).map((u) => u[0]).join("").toUpperCase().replace(/[^A-Z0-9_]/g, "");
|
|
416
|
+
m((u) => ({
|
|
417
|
+
...u,
|
|
418
|
+
unitName: s,
|
|
419
|
+
unitCode: I ? u.unitCode : r
|
|
410
420
|
}));
|
|
411
421
|
},
|
|
412
422
|
onBlur: l.onBlur("unitName"),
|
|
413
423
|
error: l.show("unitName") && !!o.unitName,
|
|
414
424
|
helperText: l.show("unitName") ? o.unitName : ""
|
|
415
425
|
}),
|
|
416
|
-
/* @__PURE__ */ i(
|
|
426
|
+
/* @__PURE__ */ i(w, {
|
|
417
427
|
required: !0,
|
|
418
428
|
label: "Unit code (unique within facility)",
|
|
419
429
|
size: "small",
|
|
@@ -427,7 +437,7 @@ function qi() {
|
|
|
427
437
|
error: l.show("unitCode") && !!o.unitCode,
|
|
428
438
|
helperText: l.show("unitCode") && o.unitCode ? o.unitCode : "Auto-generated from the name. Edit if needed to make it unique within this facility."
|
|
429
439
|
}),
|
|
430
|
-
/* @__PURE__ */ i(
|
|
440
|
+
/* @__PURE__ */ i(fe, {
|
|
431
441
|
label: "Type",
|
|
432
442
|
required: !0,
|
|
433
443
|
value: t.unitType,
|
|
@@ -437,12 +447,12 @@ function qi() {
|
|
|
437
447
|
}),
|
|
438
448
|
onBlur: l.onBlur("unitType"),
|
|
439
449
|
error: l.show("unitType") && !!o.unitType,
|
|
440
|
-
options:
|
|
450
|
+
options: De
|
|
441
451
|
}),
|
|
442
452
|
/* @__PURE__ */ n(v, {
|
|
443
453
|
direction: "row",
|
|
444
454
|
spacing: 2,
|
|
445
|
-
children: [/* @__PURE__ */ i(
|
|
455
|
+
children: [/* @__PURE__ */ i(w, {
|
|
446
456
|
label: "Make",
|
|
447
457
|
size: "small",
|
|
448
458
|
fullWidth: !0,
|
|
@@ -452,7 +462,7 @@ function qi() {
|
|
|
452
462
|
make: e.target.value
|
|
453
463
|
}),
|
|
454
464
|
helperText: "Example: Godrej, Vestfrost"
|
|
455
|
-
}), /* @__PURE__ */ i(
|
|
465
|
+
}), /* @__PURE__ */ i(w, {
|
|
456
466
|
label: "Model",
|
|
457
467
|
size: "small",
|
|
458
468
|
fullWidth: !0,
|
|
@@ -467,7 +477,7 @@ function qi() {
|
|
|
467
477
|
/* @__PURE__ */ n(v, {
|
|
468
478
|
direction: "row",
|
|
469
479
|
spacing: 2,
|
|
470
|
-
children: [/* @__PURE__ */ i(
|
|
480
|
+
children: [/* @__PURE__ */ i(w, {
|
|
471
481
|
label: "Min °C",
|
|
472
482
|
size: "small",
|
|
473
483
|
type: "number",
|
|
@@ -485,7 +495,7 @@ function qi() {
|
|
|
485
495
|
onBlur: l.onBlur("operatingTempMinCelsius"),
|
|
486
496
|
error: l.show("operatingTempMinCelsius") && !!o.operatingTempMinCelsius,
|
|
487
497
|
helperText: l.show("operatingTempMinCelsius") && o.operatingTempMinCelsius ? o.operatingTempMinCelsius : "Allowed range: −90°C to +30°C"
|
|
488
|
-
}), /* @__PURE__ */ i(
|
|
498
|
+
}), /* @__PURE__ */ i(w, {
|
|
489
499
|
label: "Max °C",
|
|
490
500
|
size: "small",
|
|
491
501
|
type: "number",
|
|
@@ -505,7 +515,7 @@ function qi() {
|
|
|
505
515
|
helperText: l.show("operatingTempMaxCelsius") && o.operatingTempMaxCelsius ? o.operatingTempMaxCelsius : "Allowed range: −90°C to +30°C"
|
|
506
516
|
})]
|
|
507
517
|
}),
|
|
508
|
-
/* @__PURE__ */ i(
|
|
518
|
+
/* @__PURE__ */ i(w, {
|
|
509
519
|
label: "Comments",
|
|
510
520
|
size: "small",
|
|
511
521
|
multiline: !0,
|
|
@@ -518,61 +528,81 @@ function qi() {
|
|
|
518
528
|
}),
|
|
519
529
|
helperText: "Notes about placement, maintenance schedule, or other details."
|
|
520
530
|
}),
|
|
521
|
-
/* @__PURE__ */ i(
|
|
522
|
-
control: /* @__PURE__ */ i(
|
|
531
|
+
/* @__PURE__ */ n(H, { children: [/* @__PURE__ */ i(xe, {
|
|
532
|
+
control: /* @__PURE__ */ i(hi, {
|
|
523
533
|
checked: t.isActive,
|
|
534
|
+
disabled: ee,
|
|
524
535
|
onChange: (e) => m({
|
|
525
536
|
...t,
|
|
526
537
|
isActive: e.target.checked
|
|
527
538
|
})
|
|
528
539
|
}),
|
|
529
540
|
label: "Active"
|
|
530
|
-
})
|
|
541
|
+
}), ee ? /* @__PURE__ */ n(T, {
|
|
542
|
+
variant: "caption",
|
|
543
|
+
sx: {
|
|
544
|
+
display: "block",
|
|
545
|
+
color: "text.secondary",
|
|
546
|
+
ml: 4,
|
|
547
|
+
mt: -0.5
|
|
548
|
+
},
|
|
549
|
+
children: [
|
|
550
|
+
`This unit holds ${t.occupyingBatchCount} ${t.occupyingBatchCount === 1 ? "batch" : "batches"}. `,
|
|
551
|
+
/* @__PURE__ */ i(gi, {
|
|
552
|
+
component: "button",
|
|
553
|
+
type: "button",
|
|
554
|
+
underline: "always",
|
|
555
|
+
onClick: () => We(`/ui/medplat/manage/pm/inventory?storageUnitId=${t.id}`),
|
|
556
|
+
children: "Move that stock"
|
|
557
|
+
}),
|
|
558
|
+
" or write it off before marking it inactive."
|
|
559
|
+
]
|
|
560
|
+
}) : null] })
|
|
531
561
|
]
|
|
532
562
|
})
|
|
533
563
|
}),
|
|
534
|
-
/* @__PURE__ */ n(
|
|
564
|
+
/* @__PURE__ */ n(Ne, { children: [/* @__PURE__ */ i(g, {
|
|
535
565
|
onClick: () => k(!1),
|
|
536
566
|
children: "Cancel"
|
|
537
567
|
}), /* @__PURE__ */ i(g, {
|
|
538
568
|
variant: "contained",
|
|
539
|
-
disabled: !
|
|
540
|
-
onClick: () => void
|
|
569
|
+
disabled: !re,
|
|
570
|
+
onClick: () => void Oe(),
|
|
541
571
|
children: "Save"
|
|
542
572
|
})] })
|
|
543
573
|
]
|
|
544
574
|
}),
|
|
545
|
-
/* @__PURE__ */ n(
|
|
546
|
-
open:
|
|
547
|
-
onClose:
|
|
575
|
+
/* @__PURE__ */ n(Me, {
|
|
576
|
+
open: d.open,
|
|
577
|
+
onClose: se,
|
|
548
578
|
fullWidth: !0,
|
|
549
579
|
maxWidth: "sm",
|
|
550
580
|
children: [
|
|
551
|
-
/* @__PURE__ */ n(
|
|
581
|
+
/* @__PURE__ */ n(ke, { children: ["Log Temperature", d.unit ? /* @__PURE__ */ n(T, {
|
|
552
582
|
variant: "caption",
|
|
553
583
|
color: "text.secondary",
|
|
554
584
|
sx: {
|
|
555
585
|
display: "block",
|
|
556
586
|
fontWeight: 600
|
|
557
587
|
},
|
|
558
|
-
children: [
|
|
588
|
+
children: [d.unit.unitName, d.unit.operatingTempMinCelsius != null && d.unit.operatingTempMaxCelsius != null ? ` · operates ${d.unit.operatingTempMinCelsius}°C → ${d.unit.operatingTempMaxCelsius}°C` : ""]
|
|
559
589
|
}) : null] }),
|
|
560
|
-
/* @__PURE__ */ n(
|
|
590
|
+
/* @__PURE__ */ n(Ie, {
|
|
561
591
|
dividers: !0,
|
|
562
|
-
children: [
|
|
592
|
+
children: [oe ? /* @__PURE__ */ i($, {
|
|
563
593
|
severity: "error",
|
|
564
594
|
sx: { mb: 2 },
|
|
565
|
-
children:
|
|
566
|
-
}) : null,
|
|
595
|
+
children: oe
|
|
596
|
+
}) : null, ae === "input" ? /* @__PURE__ */ n(v, {
|
|
567
597
|
spacing: 2,
|
|
568
598
|
sx: { pt: 1 },
|
|
569
599
|
children: [
|
|
570
|
-
/* @__PURE__ */ i(
|
|
600
|
+
/* @__PURE__ */ i(T, {
|
|
571
601
|
variant: "body2",
|
|
572
602
|
color: "text.secondary",
|
|
573
603
|
children: "Record the current temperature reading for this storage unit. We will check whether any stored product batch falls outside its required range."
|
|
574
604
|
}),
|
|
575
|
-
/* @__PURE__ */ i(
|
|
605
|
+
/* @__PURE__ */ i(w, {
|
|
576
606
|
required: !0,
|
|
577
607
|
autoFocus: !0,
|
|
578
608
|
label: "Temperature (°C)",
|
|
@@ -585,27 +615,27 @@ function qi() {
|
|
|
585
615
|
max: 30
|
|
586
616
|
},
|
|
587
617
|
value: M.temperatureCelsius,
|
|
588
|
-
onChange: (e) =>
|
|
618
|
+
onChange: (e) => V({
|
|
589
619
|
...M,
|
|
590
620
|
temperatureCelsius: e.target.value
|
|
591
621
|
}),
|
|
592
|
-
onBlur:
|
|
593
|
-
error:
|
|
594
|
-
helperText:
|
|
622
|
+
onBlur: D.onBlur("temperatureCelsius"),
|
|
623
|
+
error: ce,
|
|
624
|
+
helperText: ce ? Y : `Enter the reading in degrees Celsius.${Pe}`
|
|
595
625
|
}),
|
|
596
|
-
|
|
626
|
+
ue ? /* @__PURE__ */ i($, {
|
|
597
627
|
severity: "warning",
|
|
598
|
-
icon: /* @__PURE__ */ i(
|
|
599
|
-
children:
|
|
628
|
+
icon: /* @__PURE__ */ i($e, {}),
|
|
629
|
+
children: ue
|
|
600
630
|
}) : null,
|
|
601
|
-
/* @__PURE__ */ i(
|
|
631
|
+
/* @__PURE__ */ i(w, {
|
|
602
632
|
label: "Notes (optional)",
|
|
603
633
|
size: "small",
|
|
604
634
|
multiline: !0,
|
|
605
635
|
minRows: 2,
|
|
606
636
|
fullWidth: !0,
|
|
607
637
|
value: M.notes,
|
|
608
|
-
onChange: (e) =>
|
|
638
|
+
onChange: (e) => V({
|
|
609
639
|
...M,
|
|
610
640
|
notes: e.target.value
|
|
611
641
|
}),
|
|
@@ -615,7 +645,7 @@ function qi() {
|
|
|
615
645
|
}) : /* @__PURE__ */ n(v, {
|
|
616
646
|
spacing: 2,
|
|
617
647
|
sx: { pt: 1 },
|
|
618
|
-
children: [/* @__PURE__ */ n(
|
|
648
|
+
children: [/* @__PURE__ */ n(T, {
|
|
619
649
|
variant: "body2",
|
|
620
650
|
sx: { fontWeight: 700 },
|
|
621
651
|
children: [
|
|
@@ -623,13 +653,13 @@ function qi() {
|
|
|
623
653
|
C == null ? void 0 : C.temperatureCelsius,
|
|
624
654
|
"°C"
|
|
625
655
|
]
|
|
626
|
-
}), A.length === 0 ? /* @__PURE__ */ i(
|
|
656
|
+
}), A.length === 0 ? /* @__PURE__ */ i($, {
|
|
627
657
|
severity: "success",
|
|
628
|
-
icon: /* @__PURE__ */ i(
|
|
658
|
+
icon: /* @__PURE__ */ i(vi, {}),
|
|
629
659
|
children: "Every stored product tolerates this temperature. Nothing will be wasted — you can still log the reading for the record."
|
|
630
|
-
}) : /* @__PURE__ */ n(
|
|
660
|
+
}) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n($, {
|
|
631
661
|
severity: "warning",
|
|
632
|
-
icon: /* @__PURE__ */ i(
|
|
662
|
+
icon: /* @__PURE__ */ i($e, {}),
|
|
633
663
|
children: [
|
|
634
664
|
"At ",
|
|
635
665
|
C == null ? void 0 : C.temperatureCelsius,
|
|
@@ -639,45 +669,45 @@ function qi() {
|
|
|
639
669
|
A.length === 1 ? "it" : "them",
|
|
640
670
|
" — and any open vials — as wastage. This cannot be undone."
|
|
641
671
|
]
|
|
642
|
-
}), /* @__PURE__ */ n(
|
|
672
|
+
}), /* @__PURE__ */ n(Ci, {
|
|
643
673
|
size: "small",
|
|
644
|
-
children: [/* @__PURE__ */ i(
|
|
645
|
-
/* @__PURE__ */ i(
|
|
646
|
-
/* @__PURE__ */ i(
|
|
647
|
-
/* @__PURE__ */ i(
|
|
648
|
-
/* @__PURE__ */ i(
|
|
674
|
+
children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ n(W, { children: [
|
|
675
|
+
/* @__PURE__ */ i(a, { children: "Product" }),
|
|
676
|
+
/* @__PURE__ */ i(a, { children: "Lot" }),
|
|
677
|
+
/* @__PURE__ */ i(a, { children: "Expiry" }),
|
|
678
|
+
/* @__PURE__ */ i(a, {
|
|
649
679
|
align: "right",
|
|
650
680
|
children: "Qty"
|
|
651
681
|
}),
|
|
652
|
-
/* @__PURE__ */ i(
|
|
682
|
+
/* @__PURE__ */ i(a, {
|
|
653
683
|
align: "right",
|
|
654
684
|
children: "Open vials"
|
|
655
685
|
}),
|
|
656
|
-
/* @__PURE__ */ i(
|
|
657
|
-
] }) }), /* @__PURE__ */ i(
|
|
658
|
-
/* @__PURE__ */ i(
|
|
686
|
+
/* @__PURE__ */ i(a, { children: "Required" })
|
|
687
|
+
] }) }), /* @__PURE__ */ i(ve, { children: A.map((e) => /* @__PURE__ */ n(W, { children: [
|
|
688
|
+
/* @__PURE__ */ i(a, {
|
|
659
689
|
sx: { fontWeight: 700 },
|
|
660
690
|
children: e.productName
|
|
661
691
|
}),
|
|
662
|
-
/* @__PURE__ */ i(
|
|
692
|
+
/* @__PURE__ */ i(a, {
|
|
663
693
|
sx: {
|
|
664
694
|
fontFamily: "monospace",
|
|
665
695
|
fontSize: "0.78rem"
|
|
666
696
|
},
|
|
667
697
|
children: e.lotNumber || "—"
|
|
668
698
|
}),
|
|
669
|
-
/* @__PURE__ */ i(
|
|
670
|
-
/* @__PURE__ */ i(
|
|
699
|
+
/* @__PURE__ */ i(a, { children: e.expiryDate ? Ge(e.expiryDate) : "—" }),
|
|
700
|
+
/* @__PURE__ */ i(a, {
|
|
671
701
|
align: "right",
|
|
672
702
|
sx: { fontVariantNumeric: "tabular-nums" },
|
|
673
703
|
children: e.qtyRemaining ?? 0
|
|
674
704
|
}),
|
|
675
|
-
/* @__PURE__ */ i(
|
|
705
|
+
/* @__PURE__ */ i(a, {
|
|
676
706
|
align: "right",
|
|
677
707
|
sx: { fontVariantNumeric: "tabular-nums" },
|
|
678
708
|
children: e.openVialCount ?? 0
|
|
679
709
|
}),
|
|
680
|
-
/* @__PURE__ */ i(
|
|
710
|
+
/* @__PURE__ */ i(a, {
|
|
681
711
|
sx: { whiteSpace: "nowrap" },
|
|
682
712
|
children: e.requiredMinCelsius != null && e.requiredMaxCelsius != null ? `${e.requiredMinCelsius}°C → ${e.requiredMaxCelsius}°C` : "—"
|
|
683
713
|
})
|
|
@@ -685,29 +715,29 @@ function qi() {
|
|
|
685
715
|
})] })]
|
|
686
716
|
})]
|
|
687
717
|
}),
|
|
688
|
-
/* @__PURE__ */ i(
|
|
689
|
-
onClick:
|
|
718
|
+
/* @__PURE__ */ i(Ne, { children: ae === "input" ? /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
|
|
719
|
+
onClick: se,
|
|
690
720
|
disabled: f,
|
|
691
721
|
children: "Cancel"
|
|
692
722
|
}), /* @__PURE__ */ i(g, {
|
|
693
723
|
variant: "contained",
|
|
694
|
-
disabled: !
|
|
695
|
-
onClick: () => void
|
|
724
|
+
disabled: !de || f,
|
|
725
|
+
onClick: () => void Ye(),
|
|
696
726
|
children: f ? "Checking…" : "Check"
|
|
697
|
-
})] }) : /* @__PURE__ */ n(
|
|
727
|
+
})] }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
|
|
698
728
|
onClick: () => P("input"),
|
|
699
729
|
disabled: f,
|
|
700
730
|
children: "Back"
|
|
701
731
|
}), A.length === 0 ? /* @__PURE__ */ i(g, {
|
|
702
732
|
variant: "contained",
|
|
703
733
|
disabled: f,
|
|
704
|
-
onClick: () => void
|
|
734
|
+
onClick: () => void pe(!1),
|
|
705
735
|
children: f ? "Logging…" : "Log reading"
|
|
706
736
|
}) : /* @__PURE__ */ i(g, {
|
|
707
737
|
variant: "contained",
|
|
708
738
|
color: "error",
|
|
709
739
|
disabled: f,
|
|
710
|
-
onClick: () => void
|
|
740
|
+
onClick: () => void pe(!0),
|
|
711
741
|
children: f ? "Processing…" : "Confirm & mark wastage"
|
|
712
742
|
})] }) })
|
|
713
743
|
]
|
|
@@ -716,6 +746,6 @@ function qi() {
|
|
|
716
746
|
})] });
|
|
717
747
|
}
|
|
718
748
|
export {
|
|
719
|
-
|
|
749
|
+
Yi as default
|
|
720
750
|
};
|
|
721
|
-
//# sourceMappingURL=StorageUnitsPage-
|
|
751
|
+
//# sourceMappingURL=StorageUnitsPage-CTEVuemZ-B4osG74N.js.map
|