@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
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
import { A as fe, K as I, G as D, a7 as be, a8 as xe, a9 as ge, a as Ie, x as ve, O as Ne, _ as Se, f as Te } from "./ImmunizationConfigurationBase-lKsJZMak.js";
|
|
2
|
+
import { C as we, o as Fe, a as K } from "./constants-BTpJFQe_-CYPZIqQF.js";
|
|
3
|
+
import { t as Z } from "./format-UOyOu75i-D0GyylyQ.js";
|
|
4
|
+
import { Z as Re, $ as Ce, e as qe, Y as ke } from "./PmGuard-BvUUbU80-BpYNaDzl.js";
|
|
5
|
+
import { f as J } from "./FacilityPicker-BXa2VF7i-Dab_Jwa5.js";
|
|
6
|
+
import { useState as p, useMemo as P, useEffect as De } from "react";
|
|
7
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
8
|
+
import { Box as Pe, Alert as V, Card as v, CardContent as N, ToggleButtonGroup as Ae, ToggleButton as Ee, Grid as l, Autocomplete as Ue, TextField as m, InputAdornment as Be, Tooltip as $e, IconButton as Le, Stack as ee, Chip as A, Button as te } from "@mui/material";
|
|
9
|
+
import { v4 as Oe } from "uuid";
|
|
10
|
+
import { useNavigate as We } from "react-router-dom";
|
|
11
|
+
import ze from "@mui/icons-material/SaveRounded";
|
|
12
|
+
import Me from "@mui/icons-material/AutorenewRounded";
|
|
13
|
+
function Xe(y) {
|
|
14
|
+
return !(y.ownerType !== "FACILITY" || Number(y.qtyRemaining ?? 0) <= 0 || y.status === "EXPIRED" || y.status === "EXHAUSTED" || y.status === "QUARANTINED");
|
|
15
|
+
}
|
|
16
|
+
var Ge = [
|
|
17
|
+
{
|
|
18
|
+
value: "INTERNAL",
|
|
19
|
+
label: "Between my facilities"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
value: "EXTERNAL_OUT",
|
|
23
|
+
label: "Send outside the system"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
value: "EXTERNAL_IN",
|
|
27
|
+
label: "Receive from outside"
|
|
28
|
+
}
|
|
29
|
+
], re = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
30
|
+
function at() {
|
|
31
|
+
let y = We(), [E, ae] = p([]), [C, ie] = p([]), [M, le] = p([]), [U, ne] = p([]), [oe, se] = p(!0), [X, G] = p(!1), [_, q] = p(""), [S, de] = p("INTERNAL"), [t, T] = p({
|
|
32
|
+
id: Oe(),
|
|
33
|
+
sourceFacilityId: "",
|
|
34
|
+
sourceBatchId: "",
|
|
35
|
+
destFacilityId: "",
|
|
36
|
+
destStorageUnitId: "",
|
|
37
|
+
qty: 1,
|
|
38
|
+
notes: "",
|
|
39
|
+
externalPartyName: "",
|
|
40
|
+
externalReference: "",
|
|
41
|
+
productId: "",
|
|
42
|
+
lotNumber: "",
|
|
43
|
+
expiryDate: "",
|
|
44
|
+
manufactureDate: ""
|
|
45
|
+
}), f = S === "INTERNAL", b = S === "EXTERNAL_OUT", c = S === "EXTERNAL_IN", k = f || b;
|
|
46
|
+
Re("update.manage.productManagement.transfer", () => {
|
|
47
|
+
async function e() {
|
|
48
|
+
var i, n;
|
|
49
|
+
try {
|
|
50
|
+
let [d, me, pe, ye] = await Promise.all([
|
|
51
|
+
ve(),
|
|
52
|
+
Ne(),
|
|
53
|
+
Se({ activeOnly: !0 }),
|
|
54
|
+
Te()
|
|
55
|
+
]);
|
|
56
|
+
ae(d), ie(me), le(pe), ne(ye);
|
|
57
|
+
} catch (d) {
|
|
58
|
+
q(((n = (i = d == null ? void 0 : d.response) == null ? void 0 : i.data) == null ? void 0 : n.message) ?? (d == null ? void 0 : d.message) ?? "Failed to load reference data");
|
|
59
|
+
} finally {
|
|
60
|
+
se(!1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
e();
|
|
64
|
+
}, []);
|
|
65
|
+
function ce(e) {
|
|
66
|
+
!e || e === S || (de(e), q(""), T((i) => ({
|
|
67
|
+
...i,
|
|
68
|
+
destFacilityId: "",
|
|
69
|
+
destStorageUnitId: "",
|
|
70
|
+
sourceBatchId: e === "EXTERNAL_IN" ? "" : i.sourceBatchId,
|
|
71
|
+
sourceFacilityId: e === "EXTERNAL_IN" ? "" : i.sourceFacilityId,
|
|
72
|
+
externalPartyName: "",
|
|
73
|
+
externalReference: "",
|
|
74
|
+
productId: "",
|
|
75
|
+
lotNumber: "",
|
|
76
|
+
expiryDate: "",
|
|
77
|
+
manufactureDate: "",
|
|
78
|
+
qty: 1
|
|
79
|
+
})));
|
|
80
|
+
}
|
|
81
|
+
function s(e, i) {
|
|
82
|
+
T((n) => ({
|
|
83
|
+
...n,
|
|
84
|
+
[e]: i
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
function ue(e) {
|
|
88
|
+
T((i) => ({
|
|
89
|
+
...i,
|
|
90
|
+
sourceFacilityId: e,
|
|
91
|
+
sourceBatchId: ""
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
function Q(e) {
|
|
95
|
+
T((i) => ({
|
|
96
|
+
...i,
|
|
97
|
+
destFacilityId: e,
|
|
98
|
+
destStorageUnitId: ""
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
let Y = P(() => t.sourceFacilityId ? C.filter(Xe).filter((e) => e.ownerId === t.sourceFacilityId) : [], [C, t.sourceFacilityId]), u = P(() => C.find((e) => e.id === t.sourceBatchId) ?? null, [C, t.sourceBatchId]), w = P(() => t.destFacilityId ? M.filter((e) => e.ownerId === t.destFacilityId) : [], [M, t.destFacilityId]), j = !!t.destFacilityId && !E.some((e) => e.id === t.destFacilityId), a = P(() => U.find((e) => e.id === t.productId) ?? null, [U, t.productId]), h = (a == null ? void 0 : a.expiryMode) === "FROM_MANUFACTURE", B = h ? we(t.manufactureDate, a == null ? void 0 : a.expiryInterval, a == null ? void 0 : a.expiryIntervalUnit) : "", x = Number(t.qty), F = Number((u == null ? void 0 : u.qtyRemaining) ?? 0), R = !Number.isInteger(x) || x <= 0 ? "Enter a whole number greater than 0." : k && u && x > F ? `Only ${F} available in this batch.` : "", $ = f || t.externalPartyName.trim() ? "" : b ? "Name who the stock is going to." : "Name who the stock came from.", L = !c || h || !(a != null && a.hasExpiry) || t.expiryDate ? "" : "Required for this product.", O = c ? (h || a != null && a.hasManufactureDate) && !t.manufactureDate ? "Required for this product." : t.manufactureDate && t.manufactureDate > re ? "Cannot be in the future." : "" : "", W = c && (a != null && a.needsStorageUnit) && !t.destStorageUnitId ? "Required for this product." : "", g = Fe(fe()), z = c && !g && !t.lotNumber.trim() ? "Lot number is required." : "";
|
|
102
|
+
De(() => {
|
|
103
|
+
c && g && !t.lotNumber && T((e) => e.lotNumber ? e : {
|
|
104
|
+
...e,
|
|
105
|
+
lotNumber: K()
|
|
106
|
+
});
|
|
107
|
+
}, [
|
|
108
|
+
c,
|
|
109
|
+
g,
|
|
110
|
+
t.lotNumber
|
|
111
|
+
]);
|
|
112
|
+
let H = !R && !$ && (k ? !!t.sourceFacilityId && !!t.sourceBatchId && (f ? !!t.destFacilityId : !0) : !!t.destFacilityId && !!t.productId && !L && !O && !W && !z);
|
|
113
|
+
async function he() {
|
|
114
|
+
var e, i;
|
|
115
|
+
if (H) {
|
|
116
|
+
G(!0), q("");
|
|
117
|
+
try {
|
|
118
|
+
let n, d;
|
|
119
|
+
f ? (n = await be({
|
|
120
|
+
id: t.id,
|
|
121
|
+
sourceBatchId: t.sourceBatchId,
|
|
122
|
+
destFacilityId: t.destFacilityId,
|
|
123
|
+
destStorageUnitId: t.destStorageUnitId || null,
|
|
124
|
+
qty: x,
|
|
125
|
+
notes: t.notes || null
|
|
126
|
+
}), d = `to ${n.destFacilityName ?? "destination"}`) : b ? (n = await xe({
|
|
127
|
+
id: t.id,
|
|
128
|
+
sourceBatchId: t.sourceBatchId,
|
|
129
|
+
qty: x,
|
|
130
|
+
externalPartyName: t.externalPartyName.trim(),
|
|
131
|
+
externalReference: t.externalReference.trim() || null,
|
|
132
|
+
notes: t.notes || null
|
|
133
|
+
}), d = `to ${n.externalPartyName}`) : (n = await ge({
|
|
134
|
+
id: t.id,
|
|
135
|
+
destFacilityId: t.destFacilityId,
|
|
136
|
+
productId: t.productId,
|
|
137
|
+
qty: x,
|
|
138
|
+
lotNumber: t.lotNumber.trim() || null,
|
|
139
|
+
expiryDate: (h ? B : t.expiryDate) || null,
|
|
140
|
+
manufactureDate: t.manufactureDate || null,
|
|
141
|
+
destStorageUnitId: t.destStorageUnitId || null,
|
|
142
|
+
externalPartyName: t.externalPartyName.trim(),
|
|
143
|
+
externalReference: t.externalReference.trim() || null,
|
|
144
|
+
notes: t.notes || null
|
|
145
|
+
}), d = `from ${n.externalPartyName}`), Ie({
|
|
146
|
+
message: `${c ? "Received" : "Shipped"} ${n.qty} ${n.qty === 1 ? "unit" : "units"} ${d}.`,
|
|
147
|
+
type: "success"
|
|
148
|
+
}), y("/ui/medplat/manage/pm/transfers");
|
|
149
|
+
} catch (n) {
|
|
150
|
+
q(((i = (e = n == null ? void 0 : n.response) == null ? void 0 : e.data) == null ? void 0 : i.message) ?? (n == null ? void 0 : n.message) ?? "Failed to record transfer");
|
|
151
|
+
} finally {
|
|
152
|
+
G(!1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return /* @__PURE__ */ o(Pe, { children: [/* @__PURE__ */ r(Ce, {}), /* @__PURE__ */ r(qe, {
|
|
157
|
+
perm: "update.manage.productManagement.transfer",
|
|
158
|
+
title: "You don’t have permission to ship transfers",
|
|
159
|
+
children: /* @__PURE__ */ o(ke, {
|
|
160
|
+
title: c ? "Receive Stock From Outside" : "Ship Stock Transfer",
|
|
161
|
+
subtitle: f ? "Send stock between facilities. The sender loses stock right away. The receiver creates the batch when they confirm receipt." : b ? "Record stock leaving for a facility this system does not hold. The stock comes off your shelf right away and there is nothing further to confirm." : "Record stock arriving from a facility this system does not hold. A new batch is created straight away.",
|
|
162
|
+
actions: /* @__PURE__ */ o(ee, {
|
|
163
|
+
direction: "row",
|
|
164
|
+
spacing: 1,
|
|
165
|
+
children: [/* @__PURE__ */ r(te, {
|
|
166
|
+
variant: "outlined",
|
|
167
|
+
onClick: () => y("/ui/medplat/manage/pm/transfers"),
|
|
168
|
+
children: "Cancel"
|
|
169
|
+
}), /* @__PURE__ */ r(te, {
|
|
170
|
+
variant: "contained",
|
|
171
|
+
startIcon: /* @__PURE__ */ r(ze, {}),
|
|
172
|
+
disabled: !H || X,
|
|
173
|
+
onClick: () => void he(),
|
|
174
|
+
children: X ? c ? "Receiving…" : "Shipping…" : c ? "Receive Stock" : "Ship Transfer"
|
|
175
|
+
})]
|
|
176
|
+
}),
|
|
177
|
+
children: [
|
|
178
|
+
_ ? /* @__PURE__ */ r(V, {
|
|
179
|
+
severity: "error",
|
|
180
|
+
sx: { mb: 2 },
|
|
181
|
+
children: _
|
|
182
|
+
}) : null,
|
|
183
|
+
/* @__PURE__ */ r(v, {
|
|
184
|
+
sx: {
|
|
185
|
+
borderRadius: 1.5,
|
|
186
|
+
mb: 2,
|
|
187
|
+
border: "1px solid",
|
|
188
|
+
borderColor: "divider",
|
|
189
|
+
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.045)"
|
|
190
|
+
},
|
|
191
|
+
children: /* @__PURE__ */ o(N, {
|
|
192
|
+
sx: { p: 2.5 },
|
|
193
|
+
children: [/* @__PURE__ */ r(I, {
|
|
194
|
+
eyebrow: "Step 1",
|
|
195
|
+
title: "What kind of transfer",
|
|
196
|
+
hint: "Stock can move between your own facilities, or to and from a facility outside this system.",
|
|
197
|
+
sx: { mb: 2 }
|
|
198
|
+
}), /* @__PURE__ */ r(Ae, {
|
|
199
|
+
exclusive: !0,
|
|
200
|
+
size: "small",
|
|
201
|
+
value: S,
|
|
202
|
+
onChange: (e, i) => ce(i),
|
|
203
|
+
sx: { flexWrap: "wrap" },
|
|
204
|
+
children: Ge.map((e) => /* @__PURE__ */ r(Ee, {
|
|
205
|
+
value: e.value,
|
|
206
|
+
children: e.label
|
|
207
|
+
}, e.value))
|
|
208
|
+
})]
|
|
209
|
+
})
|
|
210
|
+
}),
|
|
211
|
+
k ? /* @__PURE__ */ r(v, {
|
|
212
|
+
sx: {
|
|
213
|
+
borderRadius: 1.5,
|
|
214
|
+
mb: 2,
|
|
215
|
+
border: "1px solid",
|
|
216
|
+
borderColor: "divider",
|
|
217
|
+
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.045)"
|
|
218
|
+
},
|
|
219
|
+
children: /* @__PURE__ */ o(N, {
|
|
220
|
+
sx: { p: 2.5 },
|
|
221
|
+
children: [/* @__PURE__ */ r(I, {
|
|
222
|
+
eyebrow: "Step 2",
|
|
223
|
+
title: "Source",
|
|
224
|
+
hint: "Select the sending facility and the batch.",
|
|
225
|
+
sx: { mb: 2 }
|
|
226
|
+
}), /* @__PURE__ */ o(l, {
|
|
227
|
+
container: !0,
|
|
228
|
+
spacing: 2,
|
|
229
|
+
children: [/* @__PURE__ */ r(l, {
|
|
230
|
+
item: !0,
|
|
231
|
+
xs: 12,
|
|
232
|
+
md: 5,
|
|
233
|
+
children: /* @__PURE__ */ r(Ue, {
|
|
234
|
+
size: "small",
|
|
235
|
+
options: E,
|
|
236
|
+
getOptionLabel: (e) => (e == null ? void 0 : e.name) ?? "",
|
|
237
|
+
isOptionEqualToValue: (e, i) => (e == null ? void 0 : e.id) === (i == null ? void 0 : i.id),
|
|
238
|
+
value: E.find((e) => e.id === t.sourceFacilityId) ?? null,
|
|
239
|
+
onChange: (e, i) => ue((i == null ? void 0 : i.id) ?? ""),
|
|
240
|
+
loading: oe,
|
|
241
|
+
renderInput: (e) => /* @__PURE__ */ r(m, {
|
|
242
|
+
...e,
|
|
243
|
+
required: !0,
|
|
244
|
+
label: "Source Facility",
|
|
245
|
+
placeholder: "Pick the shipping facility"
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
}), /* @__PURE__ */ r(l, {
|
|
249
|
+
item: !0,
|
|
250
|
+
xs: 12,
|
|
251
|
+
md: 7,
|
|
252
|
+
children: /* @__PURE__ */ r(D, {
|
|
253
|
+
label: "Source Batch",
|
|
254
|
+
required: !0,
|
|
255
|
+
disabled: !t.sourceFacilityId,
|
|
256
|
+
value: t.sourceBatchId,
|
|
257
|
+
onChange: (e) => s("sourceBatchId", e),
|
|
258
|
+
options: Y.map((e) => ({
|
|
259
|
+
value: e.id,
|
|
260
|
+
label: `${e.productName} · qty ${e.qtyRemaining}${e.lotNumber ? ` · ${e.lotNumber}` : ""}${e.expiryDate ? ` · exp ${Z(e.expiryDate)}` : ""}`
|
|
261
|
+
})),
|
|
262
|
+
noOptionsText: "No shippable stock at this facility",
|
|
263
|
+
helperText: t.sourceFacilityId ? Y.length === 0 ? "This facility has no shippable batches." : "Active facility batches only — quarantined / expired / exhausted stock is hidden." : "Pick a source facility first."
|
|
264
|
+
})
|
|
265
|
+
})]
|
|
266
|
+
})]
|
|
267
|
+
})
|
|
268
|
+
}) : null,
|
|
269
|
+
c ? /* @__PURE__ */ r(v, {
|
|
270
|
+
sx: {
|
|
271
|
+
borderRadius: 1.5,
|
|
272
|
+
mb: 2,
|
|
273
|
+
border: "1px solid",
|
|
274
|
+
borderColor: "divider",
|
|
275
|
+
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.045)"
|
|
276
|
+
},
|
|
277
|
+
children: /* @__PURE__ */ o(N, {
|
|
278
|
+
sx: { p: 2.5 },
|
|
279
|
+
children: [/* @__PURE__ */ r(I, {
|
|
280
|
+
eyebrow: "Step 2",
|
|
281
|
+
title: "What is arriving",
|
|
282
|
+
hint: "A new batch is created from these details, the same way a purchase does. No cost is recorded, because a transfer moves stock and not money.",
|
|
283
|
+
sx: { mb: 2 }
|
|
284
|
+
}), /* @__PURE__ */ o(l, {
|
|
285
|
+
container: !0,
|
|
286
|
+
spacing: 2,
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ r(l, {
|
|
289
|
+
item: !0,
|
|
290
|
+
xs: 12,
|
|
291
|
+
md: 5,
|
|
292
|
+
children: /* @__PURE__ */ r(J, {
|
|
293
|
+
required: !0,
|
|
294
|
+
label: "Receiving Facility",
|
|
295
|
+
value: t.destFacilityId,
|
|
296
|
+
onChange: Q,
|
|
297
|
+
helperText: "The stock lands here, so it has to be a facility assigned to you."
|
|
298
|
+
})
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ r(l, {
|
|
301
|
+
item: !0,
|
|
302
|
+
xs: 12,
|
|
303
|
+
md: 5,
|
|
304
|
+
children: /* @__PURE__ */ r(D, {
|
|
305
|
+
label: "Product",
|
|
306
|
+
required: !0,
|
|
307
|
+
value: t.productId,
|
|
308
|
+
onChange: (e) => s("productId", e),
|
|
309
|
+
options: U.filter((e) => e.isActive !== !1).map((e) => ({
|
|
310
|
+
value: e.id,
|
|
311
|
+
label: e.name
|
|
312
|
+
})),
|
|
313
|
+
noOptionsText: "No active products"
|
|
314
|
+
})
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ r(l, {
|
|
317
|
+
item: !0,
|
|
318
|
+
xs: 12,
|
|
319
|
+
md: 2,
|
|
320
|
+
children: /* @__PURE__ */ r(m, {
|
|
321
|
+
required: !0,
|
|
322
|
+
fullWidth: !0,
|
|
323
|
+
size: "small",
|
|
324
|
+
type: "number",
|
|
325
|
+
label: "Quantity",
|
|
326
|
+
inputProps: { min: 1 },
|
|
327
|
+
value: t.qty,
|
|
328
|
+
onChange: (e) => s("qty", e.target.value),
|
|
329
|
+
error: !!R,
|
|
330
|
+
helperText: R
|
|
331
|
+
})
|
|
332
|
+
}),
|
|
333
|
+
/* @__PURE__ */ r(l, {
|
|
334
|
+
item: !0,
|
|
335
|
+
xs: 12,
|
|
336
|
+
md: 3,
|
|
337
|
+
children: /* @__PURE__ */ r(m, {
|
|
338
|
+
fullWidth: !0,
|
|
339
|
+
size: "small",
|
|
340
|
+
label: "Lot #",
|
|
341
|
+
required: !g,
|
|
342
|
+
value: t.lotNumber,
|
|
343
|
+
onChange: (e) => s("lotNumber", e.target.value),
|
|
344
|
+
error: !!z && t.productId !== "",
|
|
345
|
+
helperText: g ? "Generated automatically." : z,
|
|
346
|
+
InputProps: g ? {
|
|
347
|
+
readOnly: !0,
|
|
348
|
+
sx: { fontFamily: "monospace" },
|
|
349
|
+
endAdornment: /* @__PURE__ */ r(Be, {
|
|
350
|
+
position: "end",
|
|
351
|
+
children: /* @__PURE__ */ r($e, {
|
|
352
|
+
title: "Generate a different lot number",
|
|
353
|
+
children: /* @__PURE__ */ r(Le, {
|
|
354
|
+
size: "small",
|
|
355
|
+
edge: "end",
|
|
356
|
+
"aria-label": "Generate a different lot number",
|
|
357
|
+
onClick: () => s("lotNumber", K()),
|
|
358
|
+
children: /* @__PURE__ */ r(Me, { fontSize: "small" })
|
|
359
|
+
})
|
|
360
|
+
})
|
|
361
|
+
})
|
|
362
|
+
} : { sx: { fontFamily: "monospace" } }
|
|
363
|
+
})
|
|
364
|
+
}),
|
|
365
|
+
/* @__PURE__ */ r(l, {
|
|
366
|
+
item: !0,
|
|
367
|
+
xs: 12,
|
|
368
|
+
md: 3,
|
|
369
|
+
children: /* @__PURE__ */ r(m, {
|
|
370
|
+
fullWidth: !0,
|
|
371
|
+
size: "small",
|
|
372
|
+
type: "date",
|
|
373
|
+
label: "Manufactured",
|
|
374
|
+
required: h || (a == null ? void 0 : a.hasManufactureDate) === !0,
|
|
375
|
+
InputLabelProps: { shrink: !0 },
|
|
376
|
+
inputProps: { max: re },
|
|
377
|
+
value: t.manufactureDate,
|
|
378
|
+
onChange: (e) => s("manufactureDate", e.target.value),
|
|
379
|
+
error: !!O,
|
|
380
|
+
helperText: O || (h ? "The expiry is worked out from this." : "Optional")
|
|
381
|
+
})
|
|
382
|
+
}),
|
|
383
|
+
/* @__PURE__ */ r(l, {
|
|
384
|
+
item: !0,
|
|
385
|
+
xs: 12,
|
|
386
|
+
md: 3,
|
|
387
|
+
children: /* @__PURE__ */ r(m, {
|
|
388
|
+
fullWidth: !0,
|
|
389
|
+
size: "small",
|
|
390
|
+
type: "date",
|
|
391
|
+
label: "Expiry",
|
|
392
|
+
required: !h && (a == null ? void 0 : a.hasExpiry) === !0,
|
|
393
|
+
InputLabelProps: { shrink: !0 },
|
|
394
|
+
inputProps: h ? { readOnly: !0 } : void 0,
|
|
395
|
+
value: h ? B : t.expiryDate,
|
|
396
|
+
onChange: (e) => s("expiryDate", e.target.value),
|
|
397
|
+
error: !!L,
|
|
398
|
+
helperText: L || (h ? B ? `${a.expiryInterval} ${String(a.expiryIntervalUnit ?? "").toLowerCase()} after manufacture` : "Fill in the manufacture date" : "")
|
|
399
|
+
})
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ r(l, {
|
|
402
|
+
item: !0,
|
|
403
|
+
xs: 12,
|
|
404
|
+
md: 3,
|
|
405
|
+
children: /* @__PURE__ */ r(D, {
|
|
406
|
+
label: "Storage",
|
|
407
|
+
required: (a == null ? void 0 : a.needsStorageUnit) === !0,
|
|
408
|
+
disabled: !t.destFacilityId,
|
|
409
|
+
value: t.destStorageUnitId,
|
|
410
|
+
onChange: (e) => s("destStorageUnitId", e),
|
|
411
|
+
options: w.map((e) => ({
|
|
412
|
+
value: e.id,
|
|
413
|
+
label: e.unitName
|
|
414
|
+
})),
|
|
415
|
+
slotProps: { popper: { style: {
|
|
416
|
+
width: "auto",
|
|
417
|
+
minWidth: 240
|
|
418
|
+
} } },
|
|
419
|
+
error: !!W,
|
|
420
|
+
helperText: W || (t.destFacilityId ? w.length === 0 ? "No storage units at this facility." : "" : "Pick a facility first.")
|
|
421
|
+
})
|
|
422
|
+
})
|
|
423
|
+
]
|
|
424
|
+
})]
|
|
425
|
+
})
|
|
426
|
+
}) : null,
|
|
427
|
+
f ? null : /* @__PURE__ */ r(v, {
|
|
428
|
+
sx: {
|
|
429
|
+
borderRadius: 1.5,
|
|
430
|
+
mb: 2,
|
|
431
|
+
border: "1px solid",
|
|
432
|
+
borderColor: "divider",
|
|
433
|
+
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.045)"
|
|
434
|
+
},
|
|
435
|
+
children: /* @__PURE__ */ o(N, {
|
|
436
|
+
sx: { p: 2.5 },
|
|
437
|
+
children: [/* @__PURE__ */ r(I, {
|
|
438
|
+
eyebrow: "Step 3",
|
|
439
|
+
title: b ? "Where it is going" : "Where it came from",
|
|
440
|
+
hint: "This facility is not in the system, so type its name. It is recorded on the transfer and in the stock ledger.",
|
|
441
|
+
sx: { mb: 2 }
|
|
442
|
+
}), /* @__PURE__ */ o(l, {
|
|
443
|
+
container: !0,
|
|
444
|
+
spacing: 2,
|
|
445
|
+
children: [
|
|
446
|
+
/* @__PURE__ */ r(l, {
|
|
447
|
+
item: !0,
|
|
448
|
+
xs: 12,
|
|
449
|
+
md: 7,
|
|
450
|
+
children: /* @__PURE__ */ r(m, {
|
|
451
|
+
required: !0,
|
|
452
|
+
fullWidth: !0,
|
|
453
|
+
size: "small",
|
|
454
|
+
label: b ? "Sent to" : "Received from",
|
|
455
|
+
placeholder: "District store, a facility outside the pilot, and so on",
|
|
456
|
+
inputProps: { maxLength: 200 },
|
|
457
|
+
value: t.externalPartyName,
|
|
458
|
+
onChange: (e) => s("externalPartyName", e.target.value),
|
|
459
|
+
error: !!$ && t.externalPartyName !== "",
|
|
460
|
+
helperText: $ || "Recorded on the ledger entry."
|
|
461
|
+
})
|
|
462
|
+
}),
|
|
463
|
+
/* @__PURE__ */ r(l, {
|
|
464
|
+
item: !0,
|
|
465
|
+
xs: 12,
|
|
466
|
+
md: 5,
|
|
467
|
+
children: /* @__PURE__ */ r(m, {
|
|
468
|
+
fullWidth: !0,
|
|
469
|
+
size: "small",
|
|
470
|
+
label: "Reference (optional)",
|
|
471
|
+
placeholder: "Challan or gate pass number",
|
|
472
|
+
inputProps: { maxLength: 100 },
|
|
473
|
+
value: t.externalReference,
|
|
474
|
+
onChange: (e) => s("externalReference", e.target.value),
|
|
475
|
+
helperText: "So the paperwork can be matched up later."
|
|
476
|
+
})
|
|
477
|
+
}),
|
|
478
|
+
c ? /* @__PURE__ */ r(l, {
|
|
479
|
+
item: !0,
|
|
480
|
+
xs: 12,
|
|
481
|
+
children: /* @__PURE__ */ r(m, {
|
|
482
|
+
fullWidth: !0,
|
|
483
|
+
size: "small",
|
|
484
|
+
label: "Notes (optional)",
|
|
485
|
+
placeholder: "Anything worth recording about this consignment",
|
|
486
|
+
value: t.notes,
|
|
487
|
+
onChange: (e) => s("notes", e.target.value)
|
|
488
|
+
})
|
|
489
|
+
}) : null
|
|
490
|
+
]
|
|
491
|
+
})]
|
|
492
|
+
})
|
|
493
|
+
}),
|
|
494
|
+
f ? /* @__PURE__ */ r(v, {
|
|
495
|
+
sx: {
|
|
496
|
+
borderRadius: 1.5,
|
|
497
|
+
mb: 2,
|
|
498
|
+
border: "1px solid",
|
|
499
|
+
borderColor: "divider",
|
|
500
|
+
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.045)"
|
|
501
|
+
},
|
|
502
|
+
children: /* @__PURE__ */ o(N, {
|
|
503
|
+
sx: { p: 2.5 },
|
|
504
|
+
children: [/* @__PURE__ */ r(I, {
|
|
505
|
+
eyebrow: "Step 3",
|
|
506
|
+
title: "Destination",
|
|
507
|
+
hint: "Choose the receiving facility and where to store it. The receiver can change the storage location when they confirm.",
|
|
508
|
+
sx: { mb: 2 }
|
|
509
|
+
}), /* @__PURE__ */ o(l, {
|
|
510
|
+
container: !0,
|
|
511
|
+
spacing: 2,
|
|
512
|
+
children: [/* @__PURE__ */ r(l, {
|
|
513
|
+
item: !0,
|
|
514
|
+
xs: 12,
|
|
515
|
+
md: 6,
|
|
516
|
+
children: /* @__PURE__ */ r(J, {
|
|
517
|
+
scope: "all",
|
|
518
|
+
required: !0,
|
|
519
|
+
label: "Destination Facility",
|
|
520
|
+
value: t.destFacilityId,
|
|
521
|
+
onChange: Q,
|
|
522
|
+
helperText: j ? "Someone assigned to this facility has to receive the stock before it lands." : "Any active facility can be chosen. Type to search."
|
|
523
|
+
})
|
|
524
|
+
}), /* @__PURE__ */ r(l, {
|
|
525
|
+
item: !0,
|
|
526
|
+
xs: 12,
|
|
527
|
+
md: 6,
|
|
528
|
+
children: j ? /* @__PURE__ */ r(V, {
|
|
529
|
+
severity: "info",
|
|
530
|
+
sx: { height: "100%" },
|
|
531
|
+
children: "The receiving facility will choose where to store this when they confirm it."
|
|
532
|
+
}) : /* @__PURE__ */ r(D, {
|
|
533
|
+
label: "Suggested Storage",
|
|
534
|
+
disabled: !t.destFacilityId || w.length === 0,
|
|
535
|
+
value: t.destStorageUnitId,
|
|
536
|
+
onChange: (e) => s("destStorageUnitId", e),
|
|
537
|
+
options: w.map((e) => ({
|
|
538
|
+
value: e.id,
|
|
539
|
+
label: e.unitName
|
|
540
|
+
})),
|
|
541
|
+
helperText: t.destFacilityId ? w.length === 0 ? "No storage units configured at this facility." : "The receiver can override on confirm." : "Pick a destination facility first."
|
|
542
|
+
})
|
|
543
|
+
})]
|
|
544
|
+
})]
|
|
545
|
+
})
|
|
546
|
+
}) : null,
|
|
547
|
+
k && u ? /* @__PURE__ */ r(v, {
|
|
548
|
+
sx: {
|
|
549
|
+
borderRadius: 1.5,
|
|
550
|
+
mb: 2,
|
|
551
|
+
border: "1px solid",
|
|
552
|
+
borderColor: "divider",
|
|
553
|
+
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.045)"
|
|
554
|
+
},
|
|
555
|
+
children: /* @__PURE__ */ o(N, {
|
|
556
|
+
sx: { p: 2.5 },
|
|
557
|
+
children: [
|
|
558
|
+
/* @__PURE__ */ r(I, {
|
|
559
|
+
eyebrow: "Step 4",
|
|
560
|
+
title: "Quantity",
|
|
561
|
+
hint: `Available: ${F}. You can send up to this amount.`,
|
|
562
|
+
sx: { mb: 2 }
|
|
563
|
+
}),
|
|
564
|
+
/* @__PURE__ */ o(l, {
|
|
565
|
+
container: !0,
|
|
566
|
+
spacing: 2,
|
|
567
|
+
children: [/* @__PURE__ */ r(l, {
|
|
568
|
+
item: !0,
|
|
569
|
+
xs: 12,
|
|
570
|
+
md: 4,
|
|
571
|
+
children: /* @__PURE__ */ r(m, {
|
|
572
|
+
required: !0,
|
|
573
|
+
fullWidth: !0,
|
|
574
|
+
size: "small",
|
|
575
|
+
type: "number",
|
|
576
|
+
label: "Ship Quantity",
|
|
577
|
+
inputProps: {
|
|
578
|
+
min: 1,
|
|
579
|
+
max: F
|
|
580
|
+
},
|
|
581
|
+
value: t.qty,
|
|
582
|
+
onChange: (e) => s("qty", e.target.value),
|
|
583
|
+
error: !!R,
|
|
584
|
+
helperText: R || `Out of ${F} available`
|
|
585
|
+
})
|
|
586
|
+
}), /* @__PURE__ */ r(l, {
|
|
587
|
+
item: !0,
|
|
588
|
+
xs: 12,
|
|
589
|
+
md: 8,
|
|
590
|
+
children: /* @__PURE__ */ r(m, {
|
|
591
|
+
fullWidth: !0,
|
|
592
|
+
size: "small",
|
|
593
|
+
label: "Notes (optional)",
|
|
594
|
+
placeholder: "Tracking number, courier, anything worth recording",
|
|
595
|
+
value: t.notes,
|
|
596
|
+
onChange: (e) => s("notes", e.target.value)
|
|
597
|
+
})
|
|
598
|
+
})]
|
|
599
|
+
}),
|
|
600
|
+
/* @__PURE__ */ o(ee, {
|
|
601
|
+
direction: "row",
|
|
602
|
+
spacing: 1,
|
|
603
|
+
sx: { mt: 2 },
|
|
604
|
+
flexWrap: "wrap",
|
|
605
|
+
useFlexGap: !0,
|
|
606
|
+
children: [
|
|
607
|
+
/* @__PURE__ */ r(A, {
|
|
608
|
+
size: "small",
|
|
609
|
+
label: `Product · ${u.productName}`
|
|
610
|
+
}),
|
|
611
|
+
u.lotNumber ? /* @__PURE__ */ r(A, {
|
|
612
|
+
size: "small",
|
|
613
|
+
label: `Lot · ${u.lotNumber}`
|
|
614
|
+
}) : null,
|
|
615
|
+
u.expiryDate ? /* @__PURE__ */ r(A, {
|
|
616
|
+
size: "small",
|
|
617
|
+
label: `Expiry · ${Z(u.expiryDate)}`
|
|
618
|
+
}) : null,
|
|
619
|
+
u.storageUnitName ? /* @__PURE__ */ r(A, {
|
|
620
|
+
size: "small",
|
|
621
|
+
label: `From · ${u.storageUnitName}`
|
|
622
|
+
}) : null
|
|
623
|
+
]
|
|
624
|
+
})
|
|
625
|
+
]
|
|
626
|
+
})
|
|
627
|
+
}) : null
|
|
628
|
+
]
|
|
629
|
+
})
|
|
630
|
+
})] });
|
|
631
|
+
}
|
|
632
|
+
export {
|
|
633
|
+
at as default
|
|
634
|
+
};
|
|
635
|
+
//# sourceMappingURL=TransferCreatePage-DlT0nCDj-B2SdPgYB.js.map
|