@argusoft/medplat-core 1.0.31 → 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-DUgY6ewy.js → AccessRights-DBjTQA1-.js} +421 -424
- 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-DMw2vT0u-BVhvhc6J.js → BrandsPage-CdcAvaml-ZtVTX6vX.js} +45 -45
- package/dist/{BrandsPage-DMw2vT0u-BVhvhc6J.js.map → BrandsPage-CdcAvaml-ZtVTX6vX.js.map} +1 -1
- package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js → CategoriesPage-BprQEYJw-CclreTv1.js} +43 -43
- package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js.map → CategoriesPage-BprQEYJw-CclreTv1.js.map} +1 -1
- package/dist/{ChangePasswordModalCore-lQ9GamH1.js → ChangePasswordModalCore-DZGOkbRY.js} +3 -3
- package/dist/{ChangePasswordModalCore-lQ9GamH1.js.map → ChangePasswordModalCore-DZGOkbRY.js.map} +1 -1
- package/dist/{ConditionConfig-BQBmBHaM.js → ConditionConfig-Bpm6OoV5.js} +3 -3
- package/dist/{ConditionConfig-BQBmBHaM.js.map → ConditionConfig-Bpm6OoV5.js.map} +1 -1
- package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js → DashboardPage-CTiGSx71-CsYohJ5e.js} +29 -29
- package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.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/{EventConfigurations-CUPEN5BV.js → EventConfigurations-B-z7xHh_.js} +3 -3
- package/dist/{EventConfigurations-CUPEN5BV.js.map → EventConfigurations-B-z7xHh_.js.map} +1 -1
- package/dist/{EventsExceptionModal-BX-ArkBE.js → EventsExceptionModal-DafomIv6.js} +2 -2
- package/dist/{EventsExceptionModal-BX-ArkBE.js.map → EventsExceptionModal-DafomIv6.js.map} +1 -1
- package/dist/{EventsUi-D6O9S7BK.js → EventsUi-Dl_yckSA.js} +37 -32
- 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-CHsBbw3W.js → FeatureMenu-Kc73yPHH.js} +2 -2
- package/dist/{FeatureMenu-CHsBbw3W.js.map → FeatureMenu-Kc73yPHH.js.map} +1 -1
- package/dist/{FhirServerList-iXBPkRVF.js → FhirServerList-CrIHMAxz.js} +19 -19
- package/dist/{FhirServerList-iXBPkRVF.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/{ImmunizationConfigurationBase-aUtx0JEe.js → ImmunizationConfigurationBase-lKsJZMak.js} +1342 -1301
- 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-DqW3krT6.js → ManageEventConfiguration-DqPbn3Oi.js} +5 -5
- package/dist/{ManageEventConfiguration-DqW3krT6.js.map → ManageEventConfiguration-DqPbn3Oi.js.map} +1 -1
- package/dist/ManageRole-CyfpySt9.js +981 -0
- package/dist/ManageRole-CyfpySt9.js.map +1 -0
- package/dist/{ManageUser-DZltBina.js → ManageUser-Dm0l833u.js} +172 -172
- package/dist/{ManageUser-DZltBina.js.map → ManageUser-Dm0l833u.js.map} +1 -1
- package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js → MemberProfileCard-01d_jz3w-DYHtbgMX.js} +37 -37
- package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.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-CMcj7Ozp.js → MobileTypeEventConfigModal-DodU3beR.js} +3 -3
- package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js.map → MobileTypeEventConfigModal-DodU3beR.js.map} +1 -1
- 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-DfvSZ-kB-CckogYoe.js → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js} +56 -56
- package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js.map} +1 -1
- package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js → PaymentsPage-CHieGNrn-BnYCtqHd.js} +38 -38
- package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.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-CE2RuyJT-BPceiJr8.js → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js} +2 -2
- package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.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-D7zyioJB-bHKnARYw.js → PickupsPage-BWblMlic-CWkgeBw0.js} +122 -122
- 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-DvNHIeZt-BoOOJJtk.js → ProductsPage-BI22nPb4-CQBjnc-n.js} +29 -29
- package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js.map → ProductsPage-BI22nPb4-CQBjnc-n.js.map} +1 -1
- package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js +724 -0
- package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js.map +1 -0
- package/dist/{PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js → PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js} +446 -436
- package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js.map +1 -0
- package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js} +55 -55
- package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js.map} +1 -1
- package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js → PurchasesPage-Djl1AqD_-DXeYFMrX.js} +61 -61
- package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.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-CZnIOydv-DKBw-qp7.js → SaleCreatePage-DHBLmlBr-BlgjVsq6.js} +33 -33
- package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js.map → SaleCreatePage-DHBLmlBr-BlgjVsq6.js.map} +1 -1
- package/dist/{SalesPage-DPIRrC_O-M8rqnK7z.js → SalesPage-eF9Yr42z-BQ9FlXC3.js} +34 -34
- package/dist/SalesPage-eF9Yr42z-BQ9FlXC3.js.map +1 -0
- package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js +741 -0
- package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js.map +1 -0
- package/dist/{StorageUnitsPage-BDRkdCjW-UF64rf7q.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js} +213 -190
- package/dist/StorageUnitsPage-CTEVuemZ-B4osG74N.js.map +1 -0
- package/dist/{SubMenu-BdMTYtC1.js → SubMenu-OO2zhKiu.js} +2 -2
- package/dist/{SubMenu-BdMTYtC1.js.map → SubMenu-OO2zhKiu.js.map} +1 -1
- 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-CqWTMNU8-Df6eGFDW.js → TransactionsPage-Zuu7sjID-B-ACzvd1.js} +185 -170
- 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-JbRCN6GR.js → TypeConfiguration-EaFiOzRE.js} +3 -3
- package/dist/{TypeConfiguration-JbRCN6GR.js.map → TypeConfiguration-EaFiOzRE.js.map} +1 -1
- 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-CsJ08Kjm.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-DpXnLsAB-D6lN5cjK.js → constants-BTpJFQe_-CYPZIqQF.js} +160 -61
- 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-ETRQOzvE.js → index.lib-BySa9-Z-.js} +302 -260
- 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-DUgY6ewy.js.map +0 -1
- package/dist/AddMenuConfiguration-c6ZKiN0i.js +0 -8898
- package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +0 -1
- package/dist/EntityManagement-CPQL6qBj.js +0 -50
- package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
- package/dist/EventsUi-D6O9S7BK.js.map +0 -1
- package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js +0 -79
- package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +0 -1
- package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js +0 -665
- package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js.map +0 -1
- package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
- package/dist/ManageRole-CNZBRKGU.js +0 -776
- package/dist/ManageRole-CNZBRKGU.js.map +0 -1
- package/dist/MobileAnalytics-BLOionG_.js +0 -17301
- package/dist/MobileAnalytics-BLOionG_.js.map +0 -1
- package/dist/MobileMenuManagement-68Wijb0X.js +0 -220
- package/dist/MobileMenuManagement-68Wijb0X.js.map +0 -1
- package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js +0 -1812
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +0 -1
- package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
- package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js +0 -783
- package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map +0 -1
- package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +0 -1
- package/dist/PmGuard-BZE-y4In-D_pUm5MP.js +0 -599
- package/dist/PmGuard-BZE-y4In-D_pUm5MP.js.map +0 -1
- package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js +0 -1305
- package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +0 -1
- package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js +0 -675
- package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +0 -1
- package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +0 -1
- package/dist/Roles-BIyiic67.js +0 -14
- package/dist/Roles-BIyiic67.js.map +0 -1
- package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +0 -1
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +0 -676
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +0 -1
- package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +0 -1
- package/dist/TableDetails-BtafRxXb.js.map +0 -1
- package/dist/TableList-Dpo6dO7S.js.map +0 -1
- package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js.map +0 -1
- package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js +0 -315
- package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map +0 -1
- package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js +0 -476
- package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +0 -1
- package/dist/UserList-L41Xw0Q6.js +0 -1129
- package/dist/UserList-L41Xw0Q6.js.map +0 -1
- package/dist/Users-CsJ08Kjm.js +0 -40
- package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js +0 -321
- package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js.map +0 -1
- package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +0 -1
- package/dist/dashboardLayoutUtils-CJivzaU1.js +0 -408
- package/dist/dashboardLayoutUtils-CJivzaU1.js.map +0 -1
- package/dist/index-D9YNFPn9.js.map +0 -1
- package/dist/index.lib-ETRQOzvE.js.map +0 -1
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +0 -36
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +0 -1
package/dist/{StorageUnitsPage-BDRkdCjW-UF64rf7q.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js}
RENAMED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { v as
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
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";
|
|
9
9
|
import { useState as p } from "react";
|
|
10
10
|
import { jsxs as n, jsx as i, Fragment as j } from "react/jsx-runtime";
|
|
11
|
-
import { Box as
|
|
12
|
-
import { v4 as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
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 = [{
|
|
21
22
|
value: "FACILITY",
|
|
22
23
|
label: "Facility"
|
|
23
24
|
}];
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
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) => {
|
|
27
28
|
var s;
|
|
28
|
-
return e ? ((s =
|
|
29
|
-
}, [
|
|
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();
|
|
30
31
|
function X() {
|
|
31
32
|
return {
|
|
32
33
|
id: "",
|
|
@@ -40,49 +41,50 @@ function Di() {
|
|
|
40
41
|
comments: "",
|
|
41
42
|
operatingTempMinCelsius: "",
|
|
42
43
|
operatingTempMaxCelsius: "",
|
|
43
|
-
isActive: !0
|
|
44
|
+
isActive: !0,
|
|
45
|
+
occupyingBatchCount: 0
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
|
-
async function
|
|
48
|
+
async function z() {
|
|
47
49
|
var e, s;
|
|
48
|
-
|
|
50
|
+
Z(!0), x("");
|
|
49
51
|
try {
|
|
50
|
-
let r = await
|
|
51
|
-
|
|
52
|
-
let u = Array.from(new Set(r.map((
|
|
53
|
-
if (u.length === 0)
|
|
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({});
|
|
54
56
|
else try {
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
+
let y = await _e(u), h = {};
|
|
58
|
+
y.forEach((c) => {
|
|
57
59
|
h[c.id] = c.name;
|
|
58
|
-
}),
|
|
60
|
+
}), E(h);
|
|
59
61
|
} catch {
|
|
60
|
-
|
|
62
|
+
E({});
|
|
61
63
|
}
|
|
62
64
|
} catch (r) {
|
|
63
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";
|
|
64
|
-
|
|
66
|
+
x(u), U({
|
|
65
67
|
message: u,
|
|
66
68
|
type: "error"
|
|
67
69
|
});
|
|
68
70
|
} finally {
|
|
69
|
-
|
|
71
|
+
Z(!1);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
li("view.manage.productManagement.storageUnit", () => {
|
|
75
|
+
z();
|
|
74
76
|
}, []);
|
|
75
|
-
function
|
|
76
|
-
return
|
|
77
|
+
function Ue(e) {
|
|
78
|
+
return ze[e] ?? e;
|
|
77
79
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
+
function G() {
|
|
81
|
+
J(null), m({
|
|
80
82
|
...X(),
|
|
81
|
-
id:
|
|
82
|
-
}), l.reset(),
|
|
83
|
+
id: Be()
|
|
84
|
+
}), l.reset(), x(""), k(!0);
|
|
83
85
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
+
function Le(e) {
|
|
87
|
+
J(e), l.reset(), x(""), m({
|
|
86
88
|
id: e.id,
|
|
87
89
|
ownerType: e.ownerType ?? "FACILITY",
|
|
88
90
|
ownerId: e.ownerId ?? "",
|
|
@@ -94,29 +96,30 @@ function Di() {
|
|
|
94
96
|
comments: e.comments ?? "",
|
|
95
97
|
operatingTempMinCelsius: e.operatingTempMinCelsius ?? "",
|
|
96
98
|
operatingTempMaxCelsius: e.operatingTempMaxCelsius ?? "",
|
|
97
|
-
isActive: e.isActive !== !1
|
|
99
|
+
isActive: e.isActive !== !1,
|
|
100
|
+
occupyingBatchCount: e.occupyingBatchCount ?? 0
|
|
98
101
|
}), k(!0);
|
|
99
102
|
}
|
|
100
|
-
let
|
|
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, {
|
|
101
104
|
value: t.unitType,
|
|
102
|
-
label:
|
|
103
|
-
}] :
|
|
105
|
+
label: ye(t.unitType)
|
|
106
|
+
}] : F, o = {
|
|
104
107
|
ownerType: L(t.ownerType, "Owner type"),
|
|
105
108
|
ownerId: L(t.ownerId, "Facility"),
|
|
106
109
|
unitName: L(t.unitName, "Name"),
|
|
107
|
-
unitCode:
|
|
110
|
+
unitCode: te || (Ee ? "Code is already in use for this facility." : ""),
|
|
108
111
|
unitType: L(t.unitType, "Type"),
|
|
109
|
-
operatingTempMinCelsius:
|
|
110
|
-
operatingTempMaxCelsius:
|
|
111
|
-
},
|
|
112
|
-
async function
|
|
113
|
-
var e, s, r, u,
|
|
114
|
-
if (!
|
|
115
|
-
l.markAllTouched(),
|
|
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.");
|
|
116
119
|
return;
|
|
117
120
|
}
|
|
118
121
|
try {
|
|
119
|
-
await
|
|
122
|
+
await Je({
|
|
120
123
|
id: t.id,
|
|
121
124
|
ownerId: t.ownerId,
|
|
122
125
|
unitName: t.unitName.trim(),
|
|
@@ -128,13 +131,13 @@ function Di() {
|
|
|
128
131
|
operatingTempMinCelsius: t.operatingTempMinCelsius === "" ? null : Number(t.operatingTempMinCelsius),
|
|
129
132
|
operatingTempMaxCelsius: t.operatingTempMaxCelsius === "" ? null : Number(t.operatingTempMaxCelsius),
|
|
130
133
|
isActive: t.isActive
|
|
131
|
-
}),
|
|
134
|
+
}), U({
|
|
132
135
|
message: "Storage unit saved.",
|
|
133
136
|
type: "success"
|
|
134
|
-
}), k(!1), await
|
|
137
|
+
}), k(!1), await z();
|
|
135
138
|
} catch (h) {
|
|
136
|
-
let c = ((
|
|
137
|
-
|
|
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({
|
|
138
141
|
message: c,
|
|
139
142
|
type: "error"
|
|
140
143
|
});
|
|
@@ -143,69 +146,69 @@ function Di() {
|
|
|
143
146
|
let [d, O] = p({
|
|
144
147
|
open: !1,
|
|
145
148
|
unit: null
|
|
146
|
-
}), [M,
|
|
149
|
+
}), [M, V] = p({
|
|
147
150
|
temperatureCelsius: "",
|
|
148
151
|
notes: ""
|
|
149
|
-
}), [
|
|
150
|
-
function
|
|
152
|
+
}), [ae, P] = p("input"), [C, le] = p(null), [f, S] = p(!1), [oe, N] = p("");
|
|
153
|
+
function Ve(e) {
|
|
151
154
|
O({
|
|
152
155
|
open: !0,
|
|
153
156
|
unit: e
|
|
154
|
-
}),
|
|
157
|
+
}), V({
|
|
155
158
|
temperatureCelsius: "",
|
|
156
159
|
notes: ""
|
|
157
|
-
}),
|
|
160
|
+
}), P("input"), le(null), N(""), D.reset();
|
|
158
161
|
}
|
|
159
|
-
function
|
|
162
|
+
function se() {
|
|
160
163
|
f || O({
|
|
161
164
|
open: !1,
|
|
162
165
|
unit: null
|
|
163
166
|
});
|
|
164
167
|
}
|
|
165
|
-
let
|
|
166
|
-
async function
|
|
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() {
|
|
167
170
|
var e, s;
|
|
168
|
-
if (!(!d.unit || !
|
|
169
|
-
|
|
171
|
+
if (!(!d.unit || !de)) {
|
|
172
|
+
S(!0), N("");
|
|
170
173
|
try {
|
|
171
|
-
|
|
174
|
+
le(await Ke(d.unit.id, Number(B))), P("result");
|
|
172
175
|
} catch (r) {
|
|
173
|
-
|
|
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");
|
|
174
177
|
} finally {
|
|
175
|
-
|
|
178
|
+
S(!1);
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
181
|
}
|
|
179
|
-
async function
|
|
180
|
-
var s, r, u,
|
|
182
|
+
async function pe(e) {
|
|
183
|
+
var s, r, u, y, h;
|
|
181
184
|
if (d.unit) {
|
|
182
|
-
|
|
185
|
+
S(!0), N("");
|
|
183
186
|
try {
|
|
184
|
-
let c = ((u = (r = await
|
|
185
|
-
id:
|
|
186
|
-
temperatureCelsius: Number(
|
|
187
|
+
let c = ((u = (r = await Xe(d.unit.id, {
|
|
188
|
+
id: Be(),
|
|
189
|
+
temperatureCelsius: Number(B),
|
|
187
190
|
wasteOutOfRange: e,
|
|
188
191
|
notes: ((s = M.notes) == null ? void 0 : s.trim()) || null
|
|
189
192
|
})) == null ? void 0 : r.affectedBatches) == null ? void 0 : u.length) ?? 0;
|
|
190
|
-
|
|
193
|
+
U({
|
|
191
194
|
message: e && c > 0 ? `Reading logged. ${c} ${c === 1 ? "batch" : "batches"} marked as wastage.` : "Temperature reading logged.",
|
|
192
195
|
type: "success"
|
|
193
196
|
}), O({
|
|
194
197
|
open: !1,
|
|
195
198
|
unit: null
|
|
196
|
-
}), await
|
|
199
|
+
}), await z();
|
|
197
200
|
} catch (c) {
|
|
198
|
-
|
|
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");
|
|
199
202
|
} finally {
|
|
200
|
-
|
|
203
|
+
S(!1);
|
|
201
204
|
}
|
|
202
205
|
}
|
|
203
206
|
}
|
|
204
|
-
let
|
|
205
|
-
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, {
|
|
206
209
|
perm: "view.manage.productManagement.storageUnit",
|
|
207
210
|
children: [
|
|
208
|
-
/* @__PURE__ */ n(
|
|
211
|
+
/* @__PURE__ */ n(ui, {
|
|
209
212
|
title: "Storage Units",
|
|
210
213
|
subtitle: "Cold-chain equipment for storing vaccine and product batches. Currently managed per facility.",
|
|
211
214
|
chips: ["Catalog", "Facility-owned"],
|
|
@@ -214,30 +217,30 @@ function Di() {
|
|
|
214
217
|
spacing: 1,
|
|
215
218
|
children: [/* @__PURE__ */ i(g, {
|
|
216
219
|
variant: "outlined",
|
|
217
|
-
startIcon: /* @__PURE__ */ i(
|
|
218
|
-
onClick: () => void
|
|
220
|
+
startIcon: /* @__PURE__ */ i(fi, {}),
|
|
221
|
+
onClick: () => void z(),
|
|
219
222
|
children: "Refresh"
|
|
220
|
-
}),
|
|
223
|
+
}), q ? /* @__PURE__ */ i(g, {
|
|
221
224
|
variant: "contained",
|
|
222
|
-
startIcon: /* @__PURE__ */ i(
|
|
223
|
-
onClick:
|
|
225
|
+
startIcon: /* @__PURE__ */ i(Ae, {}),
|
|
226
|
+
onClick: G,
|
|
224
227
|
children: "New Storage Unit"
|
|
225
228
|
}) : null]
|
|
226
229
|
}),
|
|
227
|
-
children: [
|
|
230
|
+
children: [_ ? /* @__PURE__ */ i($, {
|
|
228
231
|
severity: "error",
|
|
229
232
|
sx: { mb: 2 },
|
|
230
|
-
children:
|
|
231
|
-
}) : null, /* @__PURE__ */ i(
|
|
233
|
+
children: _
|
|
234
|
+
}) : null, /* @__PURE__ */ i(je, {
|
|
232
235
|
eyebrow: "Cold-chain network",
|
|
233
236
|
title: "Storage units",
|
|
234
|
-
subtitle:
|
|
237
|
+
subtitle: Q ? "Loading…" : `${R.length} ${R.length === 1 ? "unit" : "units"}`,
|
|
235
238
|
actions: /* @__PURE__ */ i(xe, {
|
|
236
|
-
control: /* @__PURE__ */ i(
|
|
237
|
-
checked:
|
|
238
|
-
onChange: (e) =>
|
|
239
|
+
control: /* @__PURE__ */ i(yi, {
|
|
240
|
+
checked: K,
|
|
241
|
+
onChange: (e) => Re(e.target.checked)
|
|
239
242
|
}),
|
|
240
|
-
label: /* @__PURE__ */ i(
|
|
243
|
+
label: /* @__PURE__ */ i(T, {
|
|
241
244
|
variant: "body2",
|
|
242
245
|
sx: { fontWeight: 600 },
|
|
243
246
|
children: "Show inactive"
|
|
@@ -248,7 +251,7 @@ function Di() {
|
|
|
248
251
|
ml: 0
|
|
249
252
|
}
|
|
250
253
|
}),
|
|
251
|
-
children: /* @__PURE__ */ n(
|
|
254
|
+
children: /* @__PURE__ */ n(He, { children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ n(W, { children: [
|
|
252
255
|
/* @__PURE__ */ i(a, { children: "Code" }),
|
|
253
256
|
/* @__PURE__ */ i(a, { children: "Name" }),
|
|
254
257
|
/* @__PURE__ */ i(a, { children: "Facility" }),
|
|
@@ -259,22 +262,22 @@ function Di() {
|
|
|
259
262
|
align: "right",
|
|
260
263
|
children: "Action"
|
|
261
264
|
})
|
|
262
|
-
] }) }), /* @__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, {
|
|
263
266
|
colSpan: 7,
|
|
264
|
-
icon:
|
|
265
|
-
title:
|
|
266
|
-
hint:
|
|
267
|
-
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, {
|
|
268
271
|
variant: "contained",
|
|
269
272
|
size: "small",
|
|
270
|
-
startIcon: /* @__PURE__ */ i(
|
|
271
|
-
onClick:
|
|
273
|
+
startIcon: /* @__PURE__ */ i(Ae, {}),
|
|
274
|
+
onClick: G,
|
|
272
275
|
children: "Create first unit"
|
|
273
276
|
}) : null
|
|
274
|
-
}) :
|
|
277
|
+
}) : R.map((e) => /* @__PURE__ */ n(W, {
|
|
275
278
|
hover: !0,
|
|
276
279
|
children: [
|
|
277
|
-
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(
|
|
280
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(H, {
|
|
278
281
|
component: "span",
|
|
279
282
|
sx: {
|
|
280
283
|
display: "inline-flex",
|
|
@@ -288,19 +291,19 @@ function Di() {
|
|
|
288
291
|
},
|
|
289
292
|
children: e.unitCode
|
|
290
293
|
}) }),
|
|
291
|
-
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(
|
|
294
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(T, {
|
|
292
295
|
variant: "body2",
|
|
293
296
|
sx: { fontWeight: 700 },
|
|
294
297
|
children: e.unitName
|
|
295
298
|
}) }),
|
|
296
|
-
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(
|
|
299
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(T, {
|
|
297
300
|
variant: "caption",
|
|
298
301
|
color: "text.secondary",
|
|
299
|
-
children:
|
|
302
|
+
children: Ue(e.ownerId)
|
|
300
303
|
}) }),
|
|
301
|
-
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(
|
|
304
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(be, {
|
|
302
305
|
size: "small",
|
|
303
|
-
label:
|
|
306
|
+
label: qe(e.unitType),
|
|
304
307
|
variant: "outlined",
|
|
305
308
|
sx: {
|
|
306
309
|
fontWeight: 700,
|
|
@@ -308,7 +311,7 @@ function Di() {
|
|
|
308
311
|
height: 22
|
|
309
312
|
}
|
|
310
313
|
}) }),
|
|
311
|
-
/* @__PURE__ */ i(a, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(
|
|
314
|
+
/* @__PURE__ */ i(a, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(T, {
|
|
312
315
|
variant: "caption",
|
|
313
316
|
sx: {
|
|
314
317
|
fontWeight: 700,
|
|
@@ -320,12 +323,12 @@ function Di() {
|
|
|
320
323
|
e.operatingTempMaxCelsius,
|
|
321
324
|
"°C"
|
|
322
325
|
]
|
|
323
|
-
}) : /* @__PURE__ */ i(
|
|
326
|
+
}) : /* @__PURE__ */ i(T, {
|
|
324
327
|
variant: "caption",
|
|
325
328
|
color: "text.disabled",
|
|
326
329
|
children: "—"
|
|
327
330
|
}) }),
|
|
328
|
-
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(
|
|
331
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(be, {
|
|
329
332
|
size: "small",
|
|
330
333
|
label: e.isActive ? "Active" : "Inactive",
|
|
331
334
|
color: e.isActive ? "success" : "default",
|
|
@@ -342,17 +345,17 @@ function Di() {
|
|
|
342
345
|
direction: "row",
|
|
343
346
|
spacing: 1,
|
|
344
347
|
justifyContent: "flex-end",
|
|
345
|
-
children: [
|
|
348
|
+
children: [q ? /* @__PURE__ */ i(g, {
|
|
346
349
|
size: "small",
|
|
347
350
|
variant: "outlined",
|
|
348
351
|
color: "info",
|
|
349
|
-
startIcon: /* @__PURE__ */ i(
|
|
350
|
-
onClick: () =>
|
|
352
|
+
startIcon: /* @__PURE__ */ i(bi, {}),
|
|
353
|
+
onClick: () => Ve(e),
|
|
351
354
|
children: "Log temp"
|
|
352
|
-
}) : null,
|
|
355
|
+
}) : null, q ? /* @__PURE__ */ i(g, {
|
|
353
356
|
size: "small",
|
|
354
357
|
variant: "outlined",
|
|
355
|
-
onClick: () =>
|
|
358
|
+
onClick: () => Le(e),
|
|
356
359
|
children: "Edit"
|
|
357
360
|
}) : null]
|
|
358
361
|
})
|
|
@@ -361,23 +364,23 @@ function Di() {
|
|
|
361
364
|
}, e.id)) })] })
|
|
362
365
|
})]
|
|
363
366
|
}),
|
|
364
|
-
/* @__PURE__ */ n(
|
|
365
|
-
open:
|
|
367
|
+
/* @__PURE__ */ n(Me, {
|
|
368
|
+
open: Se,
|
|
366
369
|
onClose: () => k(!1),
|
|
367
370
|
fullWidth: !0,
|
|
368
371
|
maxWidth: "sm",
|
|
369
372
|
children: [
|
|
370
|
-
/* @__PURE__ */ i(
|
|
371
|
-
/* @__PURE__ */ i(
|
|
373
|
+
/* @__PURE__ */ i(ke, { children: I ? "Edit Storage Unit" : "New Storage Unit" }),
|
|
374
|
+
/* @__PURE__ */ i(Ie, {
|
|
372
375
|
dividers: !0,
|
|
373
376
|
children: /* @__PURE__ */ n(v, {
|
|
374
377
|
spacing: 2,
|
|
375
378
|
sx: { pt: 1 },
|
|
376
379
|
children: [
|
|
377
|
-
/* @__PURE__ */ i(
|
|
380
|
+
/* @__PURE__ */ i(fe, {
|
|
378
381
|
label: "Owner Type",
|
|
379
382
|
required: !0,
|
|
380
|
-
disabled: !!
|
|
383
|
+
disabled: !!I,
|
|
381
384
|
value: t.ownerType,
|
|
382
385
|
onChange: (e) => m({
|
|
383
386
|
...t,
|
|
@@ -387,11 +390,11 @@ function Di() {
|
|
|
387
390
|
onBlur: l.onBlur("ownerType"),
|
|
388
391
|
error: l.show("ownerType") && !!o.ownerType,
|
|
389
392
|
helperText: l.show("ownerType") && o.ownerType ? o.ownerType : "Only Facility is available currently.",
|
|
390
|
-
options:
|
|
393
|
+
options: xi
|
|
391
394
|
}),
|
|
392
|
-
/* @__PURE__ */ i(
|
|
395
|
+
/* @__PURE__ */ i(ci, {
|
|
393
396
|
required: !0,
|
|
394
|
-
disabled: !!
|
|
397
|
+
disabled: !!I || t.ownerType !== "FACILITY",
|
|
395
398
|
value: t.ownerId,
|
|
396
399
|
onChange: (e) => m({
|
|
397
400
|
...t,
|
|
@@ -401,8 +404,8 @@ function Di() {
|
|
|
401
404
|
error: l.show("ownerId") && !!o.ownerId,
|
|
402
405
|
helperText: l.show("ownerId") && o.ownerId ? o.ownerId : "Search by name. The owner cannot be changed once created."
|
|
403
406
|
}),
|
|
404
|
-
/* @__PURE__ */ i(
|
|
405
|
-
/* @__PURE__ */ i(
|
|
407
|
+
/* @__PURE__ */ i(mi, {}),
|
|
408
|
+
/* @__PURE__ */ i(w, {
|
|
406
409
|
required: !0,
|
|
407
410
|
label: "Unit name",
|
|
408
411
|
size: "small",
|
|
@@ -413,14 +416,14 @@ function Di() {
|
|
|
413
416
|
m((u) => ({
|
|
414
417
|
...u,
|
|
415
418
|
unitName: s,
|
|
416
|
-
unitCode:
|
|
419
|
+
unitCode: I ? u.unitCode : r
|
|
417
420
|
}));
|
|
418
421
|
},
|
|
419
422
|
onBlur: l.onBlur("unitName"),
|
|
420
423
|
error: l.show("unitName") && !!o.unitName,
|
|
421
424
|
helperText: l.show("unitName") ? o.unitName : ""
|
|
422
425
|
}),
|
|
423
|
-
/* @__PURE__ */ i(
|
|
426
|
+
/* @__PURE__ */ i(w, {
|
|
424
427
|
required: !0,
|
|
425
428
|
label: "Unit code (unique within facility)",
|
|
426
429
|
size: "small",
|
|
@@ -434,7 +437,7 @@ function Di() {
|
|
|
434
437
|
error: l.show("unitCode") && !!o.unitCode,
|
|
435
438
|
helperText: l.show("unitCode") && o.unitCode ? o.unitCode : "Auto-generated from the name. Edit if needed to make it unique within this facility."
|
|
436
439
|
}),
|
|
437
|
-
/* @__PURE__ */ i(
|
|
440
|
+
/* @__PURE__ */ i(fe, {
|
|
438
441
|
label: "Type",
|
|
439
442
|
required: !0,
|
|
440
443
|
value: t.unitType,
|
|
@@ -444,12 +447,12 @@ function Di() {
|
|
|
444
447
|
}),
|
|
445
448
|
onBlur: l.onBlur("unitType"),
|
|
446
449
|
error: l.show("unitType") && !!o.unitType,
|
|
447
|
-
options:
|
|
450
|
+
options: De
|
|
448
451
|
}),
|
|
449
452
|
/* @__PURE__ */ n(v, {
|
|
450
453
|
direction: "row",
|
|
451
454
|
spacing: 2,
|
|
452
|
-
children: [/* @__PURE__ */ i(
|
|
455
|
+
children: [/* @__PURE__ */ i(w, {
|
|
453
456
|
label: "Make",
|
|
454
457
|
size: "small",
|
|
455
458
|
fullWidth: !0,
|
|
@@ -459,7 +462,7 @@ function Di() {
|
|
|
459
462
|
make: e.target.value
|
|
460
463
|
}),
|
|
461
464
|
helperText: "Example: Godrej, Vestfrost"
|
|
462
|
-
}), /* @__PURE__ */ i(
|
|
465
|
+
}), /* @__PURE__ */ i(w, {
|
|
463
466
|
label: "Model",
|
|
464
467
|
size: "small",
|
|
465
468
|
fullWidth: !0,
|
|
@@ -474,7 +477,7 @@ function Di() {
|
|
|
474
477
|
/* @__PURE__ */ n(v, {
|
|
475
478
|
direction: "row",
|
|
476
479
|
spacing: 2,
|
|
477
|
-
children: [/* @__PURE__ */ i(
|
|
480
|
+
children: [/* @__PURE__ */ i(w, {
|
|
478
481
|
label: "Min °C",
|
|
479
482
|
size: "small",
|
|
480
483
|
type: "number",
|
|
@@ -492,7 +495,7 @@ function Di() {
|
|
|
492
495
|
onBlur: l.onBlur("operatingTempMinCelsius"),
|
|
493
496
|
error: l.show("operatingTempMinCelsius") && !!o.operatingTempMinCelsius,
|
|
494
497
|
helperText: l.show("operatingTempMinCelsius") && o.operatingTempMinCelsius ? o.operatingTempMinCelsius : "Allowed range: −90°C to +30°C"
|
|
495
|
-
}), /* @__PURE__ */ i(
|
|
498
|
+
}), /* @__PURE__ */ i(w, {
|
|
496
499
|
label: "Max °C",
|
|
497
500
|
size: "small",
|
|
498
501
|
type: "number",
|
|
@@ -512,7 +515,7 @@ function Di() {
|
|
|
512
515
|
helperText: l.show("operatingTempMaxCelsius") && o.operatingTempMaxCelsius ? o.operatingTempMaxCelsius : "Allowed range: −90°C to +30°C"
|
|
513
516
|
})]
|
|
514
517
|
}),
|
|
515
|
-
/* @__PURE__ */ i(
|
|
518
|
+
/* @__PURE__ */ i(w, {
|
|
516
519
|
label: "Comments",
|
|
517
520
|
size: "small",
|
|
518
521
|
multiline: !0,
|
|
@@ -525,37 +528,57 @@ function Di() {
|
|
|
525
528
|
}),
|
|
526
529
|
helperText: "Notes about placement, maintenance schedule, or other details."
|
|
527
530
|
}),
|
|
528
|
-
/* @__PURE__ */ i(xe, {
|
|
529
|
-
control: /* @__PURE__ */ i(
|
|
531
|
+
/* @__PURE__ */ n(H, { children: [/* @__PURE__ */ i(xe, {
|
|
532
|
+
control: /* @__PURE__ */ i(hi, {
|
|
530
533
|
checked: t.isActive,
|
|
534
|
+
disabled: ee,
|
|
531
535
|
onChange: (e) => m({
|
|
532
536
|
...t,
|
|
533
537
|
isActive: e.target.checked
|
|
534
538
|
})
|
|
535
539
|
}),
|
|
536
540
|
label: "Active"
|
|
537
|
-
})
|
|
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] })
|
|
538
561
|
]
|
|
539
562
|
})
|
|
540
563
|
}),
|
|
541
|
-
/* @__PURE__ */ n(
|
|
564
|
+
/* @__PURE__ */ n(Ne, { children: [/* @__PURE__ */ i(g, {
|
|
542
565
|
onClick: () => k(!1),
|
|
543
566
|
children: "Cancel"
|
|
544
567
|
}), /* @__PURE__ */ i(g, {
|
|
545
568
|
variant: "contained",
|
|
546
|
-
disabled: !
|
|
547
|
-
onClick: () => void
|
|
569
|
+
disabled: !re,
|
|
570
|
+
onClick: () => void Oe(),
|
|
548
571
|
children: "Save"
|
|
549
572
|
})] })
|
|
550
573
|
]
|
|
551
574
|
}),
|
|
552
|
-
/* @__PURE__ */ n(
|
|
575
|
+
/* @__PURE__ */ n(Me, {
|
|
553
576
|
open: d.open,
|
|
554
|
-
onClose:
|
|
577
|
+
onClose: se,
|
|
555
578
|
fullWidth: !0,
|
|
556
579
|
maxWidth: "sm",
|
|
557
580
|
children: [
|
|
558
|
-
/* @__PURE__ */ n(
|
|
581
|
+
/* @__PURE__ */ n(ke, { children: ["Log Temperature", d.unit ? /* @__PURE__ */ n(T, {
|
|
559
582
|
variant: "caption",
|
|
560
583
|
color: "text.secondary",
|
|
561
584
|
sx: {
|
|
@@ -564,22 +587,22 @@ function Di() {
|
|
|
564
587
|
},
|
|
565
588
|
children: [d.unit.unitName, d.unit.operatingTempMinCelsius != null && d.unit.operatingTempMaxCelsius != null ? ` · operates ${d.unit.operatingTempMinCelsius}°C → ${d.unit.operatingTempMaxCelsius}°C` : ""]
|
|
566
589
|
}) : null] }),
|
|
567
|
-
/* @__PURE__ */ n(
|
|
590
|
+
/* @__PURE__ */ n(Ie, {
|
|
568
591
|
dividers: !0,
|
|
569
|
-
children: [
|
|
592
|
+
children: [oe ? /* @__PURE__ */ i($, {
|
|
570
593
|
severity: "error",
|
|
571
594
|
sx: { mb: 2 },
|
|
572
|
-
children:
|
|
573
|
-
}) : null,
|
|
595
|
+
children: oe
|
|
596
|
+
}) : null, ae === "input" ? /* @__PURE__ */ n(v, {
|
|
574
597
|
spacing: 2,
|
|
575
598
|
sx: { pt: 1 },
|
|
576
599
|
children: [
|
|
577
|
-
/* @__PURE__ */ i(
|
|
600
|
+
/* @__PURE__ */ i(T, {
|
|
578
601
|
variant: "body2",
|
|
579
602
|
color: "text.secondary",
|
|
580
603
|
children: "Record the current temperature reading for this storage unit. We will check whether any stored product batch falls outside its required range."
|
|
581
604
|
}),
|
|
582
|
-
/* @__PURE__ */ i(
|
|
605
|
+
/* @__PURE__ */ i(w, {
|
|
583
606
|
required: !0,
|
|
584
607
|
autoFocus: !0,
|
|
585
608
|
label: "Temperature (°C)",
|
|
@@ -592,27 +615,27 @@ function Di() {
|
|
|
592
615
|
max: 30
|
|
593
616
|
},
|
|
594
617
|
value: M.temperatureCelsius,
|
|
595
|
-
onChange: (e) =>
|
|
618
|
+
onChange: (e) => V({
|
|
596
619
|
...M,
|
|
597
620
|
temperatureCelsius: e.target.value
|
|
598
621
|
}),
|
|
599
|
-
onBlur:
|
|
600
|
-
error:
|
|
601
|
-
helperText:
|
|
622
|
+
onBlur: D.onBlur("temperatureCelsius"),
|
|
623
|
+
error: ce,
|
|
624
|
+
helperText: ce ? Y : `Enter the reading in degrees Celsius.${Pe}`
|
|
602
625
|
}),
|
|
603
|
-
|
|
626
|
+
ue ? /* @__PURE__ */ i($, {
|
|
604
627
|
severity: "warning",
|
|
605
|
-
icon: /* @__PURE__ */ i(
|
|
606
|
-
children:
|
|
628
|
+
icon: /* @__PURE__ */ i($e, {}),
|
|
629
|
+
children: ue
|
|
607
630
|
}) : null,
|
|
608
|
-
/* @__PURE__ */ i(
|
|
631
|
+
/* @__PURE__ */ i(w, {
|
|
609
632
|
label: "Notes (optional)",
|
|
610
633
|
size: "small",
|
|
611
634
|
multiline: !0,
|
|
612
635
|
minRows: 2,
|
|
613
636
|
fullWidth: !0,
|
|
614
637
|
value: M.notes,
|
|
615
|
-
onChange: (e) =>
|
|
638
|
+
onChange: (e) => V({
|
|
616
639
|
...M,
|
|
617
640
|
notes: e.target.value
|
|
618
641
|
}),
|
|
@@ -622,7 +645,7 @@ function Di() {
|
|
|
622
645
|
}) : /* @__PURE__ */ n(v, {
|
|
623
646
|
spacing: 2,
|
|
624
647
|
sx: { pt: 1 },
|
|
625
|
-
children: [/* @__PURE__ */ n(
|
|
648
|
+
children: [/* @__PURE__ */ n(T, {
|
|
626
649
|
variant: "body2",
|
|
627
650
|
sx: { fontWeight: 700 },
|
|
628
651
|
children: [
|
|
@@ -630,25 +653,25 @@ function Di() {
|
|
|
630
653
|
C == null ? void 0 : C.temperatureCelsius,
|
|
631
654
|
"°C"
|
|
632
655
|
]
|
|
633
|
-
}),
|
|
656
|
+
}), A.length === 0 ? /* @__PURE__ */ i($, {
|
|
634
657
|
severity: "success",
|
|
635
|
-
icon: /* @__PURE__ */ i(
|
|
658
|
+
icon: /* @__PURE__ */ i(vi, {}),
|
|
636
659
|
children: "Every stored product tolerates this temperature. Nothing will be wasted — you can still log the reading for the record."
|
|
637
|
-
}) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n(
|
|
660
|
+
}) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n($, {
|
|
638
661
|
severity: "warning",
|
|
639
|
-
icon: /* @__PURE__ */ i(
|
|
662
|
+
icon: /* @__PURE__ */ i($e, {}),
|
|
640
663
|
children: [
|
|
641
664
|
"At ",
|
|
642
665
|
C == null ? void 0 : C.temperatureCelsius,
|
|
643
666
|
"°C the following ",
|
|
644
|
-
|
|
667
|
+
A.length === 1 ? "batch is" : "batches are",
|
|
645
668
|
" out of range. Confirming will mark ",
|
|
646
|
-
|
|
669
|
+
A.length === 1 ? "it" : "them",
|
|
647
670
|
" — and any open vials — as wastage. This cannot be undone."
|
|
648
671
|
]
|
|
649
|
-
}), /* @__PURE__ */ n(
|
|
672
|
+
}), /* @__PURE__ */ n(Ci, {
|
|
650
673
|
size: "small",
|
|
651
|
-
children: [/* @__PURE__ */ i(
|
|
674
|
+
children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ n(W, { children: [
|
|
652
675
|
/* @__PURE__ */ i(a, { children: "Product" }),
|
|
653
676
|
/* @__PURE__ */ i(a, { children: "Lot" }),
|
|
654
677
|
/* @__PURE__ */ i(a, { children: "Expiry" }),
|
|
@@ -661,7 +684,7 @@ function Di() {
|
|
|
661
684
|
children: "Open vials"
|
|
662
685
|
}),
|
|
663
686
|
/* @__PURE__ */ i(a, { children: "Required" })
|
|
664
|
-
] }) }), /* @__PURE__ */ i(
|
|
687
|
+
] }) }), /* @__PURE__ */ i(ve, { children: A.map((e) => /* @__PURE__ */ n(W, { children: [
|
|
665
688
|
/* @__PURE__ */ i(a, {
|
|
666
689
|
sx: { fontWeight: 700 },
|
|
667
690
|
children: e.productName
|
|
@@ -673,7 +696,7 @@ function Di() {
|
|
|
673
696
|
},
|
|
674
697
|
children: e.lotNumber || "—"
|
|
675
698
|
}),
|
|
676
|
-
/* @__PURE__ */ i(a, { children: e.expiryDate ?
|
|
699
|
+
/* @__PURE__ */ i(a, { children: e.expiryDate ? Ge(e.expiryDate) : "—" }),
|
|
677
700
|
/* @__PURE__ */ i(a, {
|
|
678
701
|
align: "right",
|
|
679
702
|
sx: { fontVariantNumeric: "tabular-nums" },
|
|
@@ -692,29 +715,29 @@ function Di() {
|
|
|
692
715
|
})] })]
|
|
693
716
|
})]
|
|
694
717
|
}),
|
|
695
|
-
/* @__PURE__ */ i(
|
|
696
|
-
onClick:
|
|
718
|
+
/* @__PURE__ */ i(Ne, { children: ae === "input" ? /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
|
|
719
|
+
onClick: se,
|
|
697
720
|
disabled: f,
|
|
698
721
|
children: "Cancel"
|
|
699
722
|
}), /* @__PURE__ */ i(g, {
|
|
700
723
|
variant: "contained",
|
|
701
|
-
disabled: !
|
|
702
|
-
onClick: () => void
|
|
724
|
+
disabled: !de || f,
|
|
725
|
+
onClick: () => void Ye(),
|
|
703
726
|
children: f ? "Checking…" : "Check"
|
|
704
727
|
})] }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
|
|
705
|
-
onClick: () =>
|
|
728
|
+
onClick: () => P("input"),
|
|
706
729
|
disabled: f,
|
|
707
730
|
children: "Back"
|
|
708
|
-
}),
|
|
731
|
+
}), A.length === 0 ? /* @__PURE__ */ i(g, {
|
|
709
732
|
variant: "contained",
|
|
710
733
|
disabled: f,
|
|
711
|
-
onClick: () => void
|
|
734
|
+
onClick: () => void pe(!1),
|
|
712
735
|
children: f ? "Logging…" : "Log reading"
|
|
713
736
|
}) : /* @__PURE__ */ i(g, {
|
|
714
737
|
variant: "contained",
|
|
715
738
|
color: "error",
|
|
716
739
|
disabled: f,
|
|
717
|
-
onClick: () => void
|
|
740
|
+
onClick: () => void pe(!0),
|
|
718
741
|
children: f ? "Processing…" : "Confirm & mark wastage"
|
|
719
742
|
})] }) })
|
|
720
743
|
]
|
|
@@ -723,6 +746,6 @@ function Di() {
|
|
|
723
746
|
})] });
|
|
724
747
|
}
|
|
725
748
|
export {
|
|
726
|
-
|
|
749
|
+
Yi as default
|
|
727
750
|
};
|
|
728
|
-
//# sourceMappingURL=StorageUnitsPage-
|
|
751
|
+
//# sourceMappingURL=StorageUnitsPage-CTEVuemZ-B4osG74N.js.map
|