@argusoft/medplat-product-management 1.0.2 → 1.0.4
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/{BrandsPage-CSA3meke.js → BrandsPage-BE3kn-8b.js} +77 -75
- package/dist/BrandsPage-BE3kn-8b.js.map +1 -0
- package/dist/{CategoriesPage-BrspzkJL.js → CategoriesPage-COqi3pMi.js} +71 -70
- package/dist/{CategoriesPage-BrspzkJL.js.map → CategoriesPage-COqi3pMi.js.map} +1 -1
- package/dist/{DashboardPage-CqaquOs2.js → DashboardPage-C_H1Jrey.js} +90 -89
- package/dist/DashboardPage-C_H1Jrey.js.map +1 -0
- package/dist/{FacilityPicker-Dv_H95WW.js → FacilityPicker-Diq2hnYg.js} +2 -2
- package/dist/{FacilityPicker-Dv_H95WW.js.map → FacilityPicker-Diq2hnYg.js.map} +1 -1
- package/dist/{InventoryPage-CPbzfDMR.js → InventoryPage-Bjpw6vTz.js} +106 -115
- package/dist/InventoryPage-Bjpw6vTz.js.map +1 -0
- package/dist/{MemberProfileCard-0vjO3Gzd.js → MemberProfileCard-BLUVRILO.js} +10 -9
- package/dist/MemberProfileCard-BLUVRILO.js.map +1 -0
- package/dist/{PaymentCreatePage-BYmDZAIB.js → PaymentCreatePage-B5VOgTx9.js} +173 -177
- package/dist/PaymentCreatePage-B5VOgTx9.js.map +1 -0
- package/dist/{PaymentsPage-BXPvKon-.js → PaymentsPage-DY6BclkN.js} +24 -23
- package/dist/{PaymentsPage-BXPvKon-.js.map → PaymentsPage-DY6BclkN.js.map} +1 -1
- package/dist/PickupCreatePage-CCSiyFQF.js +706 -0
- package/dist/PickupCreatePage-CCSiyFQF.js.map +1 -0
- package/dist/{PickupsPage-D66_Wta4.js → PickupsPage-DGi6T5Of.js} +83 -90
- package/dist/PickupsPage-DGi6T5Of.js.map +1 -0
- package/dist/PmGuard-C90yhpsN.js +592 -0
- package/dist/PmGuard-C90yhpsN.js.map +1 -0
- package/dist/{PmTable-B9970kPY.js → PmTable-BkK65bJQ.js} +98 -98
- package/dist/PmTable-BkK65bJQ.js.map +1 -0
- package/dist/{ProductEditPage-B8qFTCW9.js → ProductEditPage-CQj9egzW.js} +138 -137
- package/dist/ProductEditPage-CQj9egzW.js.map +1 -0
- package/dist/{ProductsPage-C7_r9cKn.js → ProductsPage-i8QVw_Jm.js} +65 -64
- package/dist/{ProductsPage-C7_r9cKn.js.map → ProductsPage-i8QVw_Jm.js.map} +1 -1
- package/dist/PurchaseCreatePage-Bp6bl9n8.js +591 -0
- package/dist/PurchaseCreatePage-Bp6bl9n8.js.map +1 -0
- package/dist/{PurchaseRequestDetailPage-C7aAwEqw.js → PurchaseRequestDetailPage-CNAqIFef.js} +216 -215
- package/dist/PurchaseRequestDetailPage-CNAqIFef.js.map +1 -0
- package/dist/{PurchaseRequestsPage-BwCkbpaX.js → PurchaseRequestsPage-BJqDlNrc.js} +57 -56
- package/dist/{PurchaseRequestsPage-BwCkbpaX.js.map → PurchaseRequestsPage-BJqDlNrc.js.map} +1 -1
- package/dist/{PurchasesPage-CvaZouVy.js → PurchasesPage-BQEToymQ.js} +76 -75
- package/dist/{PurchasesPage-CvaZouVy.js.map → PurchasesPage-BQEToymQ.js.map} +1 -1
- package/dist/{SaleCreatePage-DP1Qmltu.js → SaleCreatePage-DbfBK4PH.js} +149 -173
- package/dist/SaleCreatePage-DbfBK4PH.js.map +1 -0
- package/dist/{SalesPage-CO3cdYX5.js → SalesPage-CTBJMxZe.js} +50 -49
- package/dist/SalesPage-CTBJMxZe.js.map +1 -0
- package/dist/SettingsPage-CiwVmzM3.js +663 -0
- package/dist/SettingsPage-CiwVmzM3.js.map +1 -0
- package/dist/{StorageUnitsPage-B9Hr_RkW.js → StorageUnitsPage-BV7nK_iE.js} +57 -56
- package/dist/{StorageUnitsPage-B9Hr_RkW.js.map → StorageUnitsPage-BV7nK_iE.js.map} +1 -1
- package/dist/{TransactionsPage-HKIGwEZN.js → TransactionsPage-Cocn4901.js} +55 -54
- package/dist/TransactionsPage-Cocn4901.js.map +1 -0
- package/dist/TransferCreatePage-DbjcjuOg.js +316 -0
- package/dist/TransferCreatePage-DbjcjuOg.js.map +1 -0
- package/dist/TransfersPage-BFVF7Xvc.js +471 -0
- package/dist/TransfersPage-BFVF7Xvc.js.map +1 -0
- package/dist/VialsPage-BNzYTLVd.js +321 -0
- package/dist/VialsPage-BNzYTLVd.js.map +1 -0
- package/dist/index.js +652 -34
- package/dist/index.js.map +1 -1
- package/dist/settingsStore-KW217unV.js +417 -0
- package/dist/settingsStore-KW217unV.js.map +1 -0
- package/package.json +1 -1
- package/dist/BrandsPage-CSA3meke.js.map +0 -1
- package/dist/DashboardPage-CqaquOs2.js.map +0 -1
- package/dist/InventoryPage-CPbzfDMR.js.map +0 -1
- package/dist/MemberProfileCard-0vjO3Gzd.js.map +0 -1
- package/dist/PaymentCreatePage-BYmDZAIB.js.map +0 -1
- package/dist/PickupCreatePage-CMGwoAXj.js +0 -426
- package/dist/PickupCreatePage-CMGwoAXj.js.map +0 -1
- package/dist/PickupsPage-D66_Wta4.js.map +0 -1
- package/dist/PmTable-B9970kPY.js.map +0 -1
- package/dist/ProductEditPage-B8qFTCW9.js.map +0 -1
- package/dist/PurchaseCreatePage-CDfNDcKG.js +0 -627
- package/dist/PurchaseCreatePage-CDfNDcKG.js.map +0 -1
- package/dist/PurchaseRequestDetailPage-C7aAwEqw.js.map +0 -1
- package/dist/SaleCreatePage-DP1Qmltu.js.map +0 -1
- package/dist/SalesPage-CO3cdYX5.js.map +0 -1
- package/dist/SettingsPage-DvVRwSFw.js +0 -711
- package/dist/SettingsPage-DvVRwSFw.js.map +0 -1
- package/dist/TransactionsPage-HKIGwEZN.js.map +0 -1
- package/dist/TransferCreatePage-DMuZqQ3c.js +0 -363
- package/dist/TransferCreatePage-DMuZqQ3c.js.map +0 -1
- package/dist/TransfersPage-COIyouL4.js +0 -480
- package/dist/TransfersPage-COIyouL4.js.map +0 -1
- package/dist/VialsPage-BNPUwGCU.js +0 -922
- package/dist/VialsPage-BNPUwGCU.js.map +0 -1
- package/dist/currency-ClRLIEg2.js +0 -1372
- package/dist/currency-ClRLIEg2.js.map +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { $ as e, g as t, m as n, p as ee, r, x as i } from "./settingsStore-KW217unV.js";
|
|
2
|
+
import { n as a, o } from "./PmTable-BkK65bJQ.js";
|
|
3
|
+
import { i as te, l as ne, u as s } from "./constants-5ZCZo-Zm.js";
|
|
4
|
+
import { c as re, g as ie, h as ae, m as c, p as oe, r as l, s as se, t as u } from "./validation-Ba7puFIO.js";
|
|
5
|
+
import { t as d } from "./useFieldErrors-hDG8ox_x.js";
|
|
6
|
+
import { a as f, n as ce, r as p, t as m } from "./PmGuard-C90yhpsN.js";
|
|
7
|
+
import { useEffect as le, useMemo as h, useState as g } from "react";
|
|
8
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
9
|
+
import { Alert as y, Box as b, Button as x, Card as S, CardContent as C, Checkbox as w, Divider as T, FormControlLabel as E, Grid as D, Stack as O, TextField as k, Typography as A } from "@mui/material";
|
|
10
|
+
import { showToast as ue } from "@/common/toaster/toaster";
|
|
11
|
+
import { useNavigate as j, useParams as M } from "react-router-dom";
|
|
11
12
|
import N from "@mui/icons-material/SaveRounded";
|
|
12
13
|
//#region src/views/ProductEditPage.jsx
|
|
13
14
|
var P = {
|
|
@@ -25,7 +26,7 @@ var P = {
|
|
|
25
26
|
comments: ""
|
|
26
27
|
};
|
|
27
28
|
function F() {
|
|
28
|
-
let { productId: F } = M(), I =
|
|
29
|
+
let { productId: F } = M(), I = j(), [L, R] = g(!0), [z, B] = g(""), [V, H] = g(!1), [U, de] = g([]), [fe, pe] = g([]), [me, he] = g([]), W = d(), G = r()?.manageSales !== !1, [K, q] = g({
|
|
29
30
|
id: F,
|
|
30
31
|
name: "",
|
|
31
32
|
categoryId: "",
|
|
@@ -39,45 +40,45 @@ function F() {
|
|
|
39
40
|
isActive: !0,
|
|
40
41
|
imageUuids: [],
|
|
41
42
|
vaccineConfig: null
|
|
42
|
-
}), J =
|
|
43
|
-
|
|
44
|
-
async function
|
|
43
|
+
}), J = h(() => U.find((e) => e.id === K.categoryId), [U, K.categoryId]), Y = J?.code?.toUpperCase() === ne;
|
|
44
|
+
p("update.manage.productManagement.product", () => {
|
|
45
|
+
async function e() {
|
|
45
46
|
R(!0);
|
|
46
47
|
try {
|
|
47
|
-
let [
|
|
48
|
-
t(),
|
|
48
|
+
let [e, r, a] = await Promise.all([
|
|
49
49
|
n(),
|
|
50
|
-
ee()
|
|
50
|
+
ee(),
|
|
51
|
+
t().catch(() => [])
|
|
51
52
|
]);
|
|
52
|
-
de(
|
|
53
|
+
de(e), pe(r), he(a);
|
|
53
54
|
try {
|
|
54
|
-
let
|
|
55
|
+
let e = await i(F);
|
|
55
56
|
H(!1), q({
|
|
56
|
-
id:
|
|
57
|
-
name:
|
|
58
|
-
categoryId:
|
|
59
|
-
brandId:
|
|
60
|
-
description:
|
|
61
|
-
unit:
|
|
62
|
-
unitOther:
|
|
63
|
-
hasExpiry:
|
|
64
|
-
needsStorageUnit:
|
|
65
|
-
notForSale:
|
|
66
|
-
isActive:
|
|
67
|
-
imageUuids:
|
|
68
|
-
vaccineConfig:
|
|
69
|
-
vaccineCode:
|
|
70
|
-
vialVolumeMl:
|
|
71
|
-
adultDoseMl:
|
|
72
|
-
childDoseMl:
|
|
73
|
-
openVialValidityHours:
|
|
74
|
-
maxConcurrentOpenVials:
|
|
75
|
-
requiresReconstitution:
|
|
76
|
-
reconstitutedValidityHours:
|
|
77
|
-
route:
|
|
78
|
-
storageTempMinCelsius:
|
|
79
|
-
storageTempMaxCelsius:
|
|
80
|
-
comments:
|
|
57
|
+
id: e.id,
|
|
58
|
+
name: e.name ?? "",
|
|
59
|
+
categoryId: e.categoryId ?? "",
|
|
60
|
+
brandId: e.brandId ?? "",
|
|
61
|
+
description: e.description ?? "",
|
|
62
|
+
unit: e.unit ?? "PIECE",
|
|
63
|
+
unitOther: e.unitOther ?? "",
|
|
64
|
+
hasExpiry: e.hasExpiry ?? !1,
|
|
65
|
+
needsStorageUnit: e.needsStorageUnit ?? !1,
|
|
66
|
+
notForSale: e.notForSale ?? !1,
|
|
67
|
+
isActive: e.isActive ?? !0,
|
|
68
|
+
imageUuids: e.imageUuids ?? [],
|
|
69
|
+
vaccineConfig: e.vaccineConfig ? {
|
|
70
|
+
vaccineCode: e.vaccineConfig.vaccineCode ?? "",
|
|
71
|
+
vialVolumeMl: e.vaccineConfig.vialVolumeMl ?? "",
|
|
72
|
+
adultDoseMl: e.vaccineConfig.adultDoseMl ?? "",
|
|
73
|
+
childDoseMl: e.vaccineConfig.childDoseMl ?? "",
|
|
74
|
+
openVialValidityHours: e.vaccineConfig.openVialValidityHours ?? 6,
|
|
75
|
+
maxConcurrentOpenVials: e.vaccineConfig.maxConcurrentOpenVials ?? 2,
|
|
76
|
+
requiresReconstitution: e.vaccineConfig.requiresReconstitution ?? !1,
|
|
77
|
+
reconstitutedValidityHours: e.vaccineConfig.reconstitutedValidityHours ?? "",
|
|
78
|
+
route: e.vaccineConfig.route ?? "",
|
|
79
|
+
storageTempMinCelsius: e.vaccineConfig.storageTempMinCelsius ?? "",
|
|
80
|
+
storageTempMaxCelsius: e.vaccineConfig.storageTempMaxCelsius ?? "",
|
|
81
|
+
comments: e.vaccineConfig.comments ?? ""
|
|
81
82
|
} : null
|
|
82
83
|
});
|
|
83
84
|
} catch {
|
|
@@ -89,8 +90,8 @@ function F() {
|
|
|
89
90
|
R(!1);
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
|
|
93
|
-
}, [F]),
|
|
93
|
+
e();
|
|
94
|
+
}, [F]), le(() => {
|
|
94
95
|
q(Y ? (e) => ({
|
|
95
96
|
...e,
|
|
96
97
|
unit: "VIAL",
|
|
@@ -116,37 +117,37 @@ function F() {
|
|
|
116
117
|
}
|
|
117
118
|
}));
|
|
118
119
|
}
|
|
119
|
-
let Q =
|
|
120
|
+
let Q = h(() => {
|
|
120
121
|
let e = {
|
|
121
|
-
name:
|
|
122
|
-
categoryId:
|
|
123
|
-
brandId:
|
|
124
|
-
unit:
|
|
125
|
-
unitOther: K.unit === "OTHER" ?
|
|
122
|
+
name: c(K.name, "Product name"),
|
|
123
|
+
categoryId: c(K.categoryId, "Category"),
|
|
124
|
+
brandId: c(K.brandId, "Brand"),
|
|
125
|
+
unit: c(K.unit, "Unit"),
|
|
126
|
+
unitOther: K.unit === "OTHER" ? c(K.unitOther, "Custom unit") : ""
|
|
126
127
|
};
|
|
127
128
|
if (Y && K.vaccineConfig) {
|
|
128
|
-
let t = K.vaccineConfig, n =
|
|
129
|
+
let t = K.vaccineConfig, n = ae(t.storageTempMinCelsius, t.storageTempMaxCelsius);
|
|
129
130
|
Object.assign(e, {
|
|
130
|
-
vaccineCode:
|
|
131
|
-
vialVolumeMl:
|
|
132
|
-
adultDoseMl:
|
|
133
|
-
childDoseMl:
|
|
134
|
-
openVialValidityHours:
|
|
135
|
-
maxConcurrentOpenVials:
|
|
136
|
-
reconstitutedValidityHours:
|
|
131
|
+
vaccineCode: c(t.vaccineCode, "Vaccine"),
|
|
132
|
+
vialVolumeMl: ie(t.vialVolumeMl),
|
|
133
|
+
adultDoseMl: l(t.adultDoseMl, "Adult dose", t.vialVolumeMl),
|
|
134
|
+
childDoseMl: l(t.childDoseMl, "Child dose", t.vialVolumeMl),
|
|
135
|
+
openVialValidityHours: re(t.openVialValidityHours),
|
|
136
|
+
maxConcurrentOpenVials: se(t.maxConcurrentOpenVials),
|
|
137
|
+
reconstitutedValidityHours: oe(t.reconstitutedValidityHours, t.requiresReconstitution),
|
|
137
138
|
storageTempMinCelsius: n.min,
|
|
138
139
|
storageTempMaxCelsius: n.max
|
|
139
140
|
}), !t.adultDoseMl && !t.childDoseMl && (e.adultDoseMl = e.adultDoseMl || "Provide at least one dose (adult or child)", e.childDoseMl = e.childDoseMl || "Provide at least one dose (adult or child)");
|
|
140
141
|
}
|
|
141
142
|
return e;
|
|
142
|
-
}, [K, Y]), $ =
|
|
143
|
+
}, [K, Y]), $ = u(Q);
|
|
143
144
|
async function ge() {
|
|
144
145
|
if (!$) {
|
|
145
146
|
W.markAllTouched(), B("Please fix the highlighted fields and try again.");
|
|
146
147
|
return;
|
|
147
148
|
}
|
|
148
149
|
try {
|
|
149
|
-
await
|
|
150
|
+
await e({
|
|
150
151
|
id: K.id,
|
|
151
152
|
name: K.name.trim(),
|
|
152
153
|
categoryId: K.categoryId,
|
|
@@ -173,7 +174,7 @@ function F() {
|
|
|
173
174
|
storageTempMaxCelsius: K.vaccineConfig.storageTempMaxCelsius === "" ? null : Number(K.vaccineConfig.storageTempMaxCelsius),
|
|
174
175
|
comments: K.vaccineConfig.comments || null
|
|
175
176
|
} : null
|
|
176
|
-
}),
|
|
177
|
+
}), ue({
|
|
177
178
|
message: "Product saved.",
|
|
178
179
|
type: "success"
|
|
179
180
|
}), I("/ui/medplat/manage/pm/products");
|
|
@@ -181,58 +182,58 @@ function F() {
|
|
|
181
182
|
B(e?.response?.data?.message ?? e?.message ?? "Failed to save product");
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
|
-
return /* @__PURE__ */ b
|
|
185
|
+
return /* @__PURE__ */ v(b, { children: [/* @__PURE__ */ _(ce, {}), /* @__PURE__ */ _(m, {
|
|
185
186
|
perm: "update.manage.productManagement.product",
|
|
186
187
|
title: "You don’t have permission to create or edit products",
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ v(f, {
|
|
188
189
|
title: V ? "Add Product" : "Edit Product",
|
|
189
190
|
subtitle: `Category: ${J?.code ?? "—"}`,
|
|
190
|
-
actions: /* @__PURE__ */
|
|
191
|
+
actions: /* @__PURE__ */ v(O, {
|
|
191
192
|
direction: "row",
|
|
192
193
|
spacing: 1,
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ _(x, {
|
|
194
195
|
variant: "outlined",
|
|
195
196
|
onClick: () => I("/ui/medplat/manage/pm/products"),
|
|
196
197
|
children: "Cancel"
|
|
197
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ _(x, {
|
|
198
199
|
variant: "contained",
|
|
199
|
-
startIcon: /* @__PURE__ */
|
|
200
|
+
startIcon: /* @__PURE__ */ _(N, {}),
|
|
200
201
|
disabled: !$,
|
|
201
202
|
onClick: () => void ge(),
|
|
202
203
|
children: "Save"
|
|
203
204
|
})]
|
|
204
205
|
}),
|
|
205
206
|
children: [
|
|
206
|
-
L ? /* @__PURE__ */ y
|
|
207
|
+
L ? /* @__PURE__ */ _(y, {
|
|
207
208
|
severity: "info",
|
|
208
209
|
children: "Loading…"
|
|
209
210
|
}) : null,
|
|
210
|
-
z ? /* @__PURE__ */ y
|
|
211
|
+
z ? /* @__PURE__ */ _(y, {
|
|
211
212
|
severity: "error",
|
|
212
213
|
sx: { mb: 2 },
|
|
213
214
|
children: z
|
|
214
215
|
}) : null,
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ _(S, {
|
|
216
217
|
sx: {
|
|
217
|
-
borderRadius:
|
|
218
|
+
borderRadius: 1.5,
|
|
218
219
|
mb: 2
|
|
219
220
|
},
|
|
220
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ v(C, { children: [/* @__PURE__ */ _(A, {
|
|
221
222
|
variant: "h6",
|
|
222
223
|
sx: {
|
|
223
224
|
fontWeight: 800,
|
|
224
225
|
mb: 2
|
|
225
226
|
},
|
|
226
227
|
children: "Basic Details"
|
|
227
|
-
}), /* @__PURE__ */
|
|
228
|
+
}), /* @__PURE__ */ v(D, {
|
|
228
229
|
container: !0,
|
|
229
230
|
spacing: 2,
|
|
230
231
|
children: [
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ _(D, {
|
|
232
233
|
item: !0,
|
|
233
234
|
xs: 12,
|
|
234
235
|
md: 6,
|
|
235
|
-
children: /* @__PURE__ */
|
|
236
|
+
children: /* @__PURE__ */ _(k, {
|
|
236
237
|
required: !0,
|
|
237
238
|
fullWidth: !0,
|
|
238
239
|
size: "small",
|
|
@@ -243,18 +244,18 @@ function F() {
|
|
|
243
244
|
onBlur: W.onBlur("name"),
|
|
244
245
|
error: W.show("name") && !!Q.name,
|
|
245
246
|
FormHelperTextProps: { component: "div" },
|
|
246
|
-
helperText: /* @__PURE__ */
|
|
247
|
+
helperText: /* @__PURE__ */ _(a, {
|
|
247
248
|
message: W.show("name") ? Q.name : "",
|
|
248
249
|
value: K.name,
|
|
249
250
|
max: 255
|
|
250
251
|
})
|
|
251
252
|
})
|
|
252
253
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ _(D, {
|
|
254
255
|
item: !0,
|
|
255
256
|
xs: 12,
|
|
256
257
|
md: 3,
|
|
257
|
-
children: /* @__PURE__ */
|
|
258
|
+
children: /* @__PURE__ */ _(o, {
|
|
258
259
|
label: "Category",
|
|
259
260
|
required: !0,
|
|
260
261
|
value: K.categoryId,
|
|
@@ -268,11 +269,11 @@ function F() {
|
|
|
268
269
|
}))
|
|
269
270
|
})
|
|
270
271
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ _(D, {
|
|
272
273
|
item: !0,
|
|
273
274
|
xs: 12,
|
|
274
275
|
md: 3,
|
|
275
|
-
children: /* @__PURE__ */
|
|
276
|
+
children: /* @__PURE__ */ _(o, {
|
|
276
277
|
label: "Brand",
|
|
277
278
|
required: !0,
|
|
278
279
|
value: K.brandId,
|
|
@@ -286,11 +287,11 @@ function F() {
|
|
|
286
287
|
}))
|
|
287
288
|
})
|
|
288
289
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ _(D, {
|
|
290
291
|
item: !0,
|
|
291
292
|
xs: 12,
|
|
292
293
|
md: 3,
|
|
293
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ _(o, {
|
|
294
295
|
label: "Unit",
|
|
295
296
|
required: !0,
|
|
296
297
|
disabled: Y,
|
|
@@ -299,14 +300,14 @@ function F() {
|
|
|
299
300
|
onBlur: W.onBlur("unit"),
|
|
300
301
|
error: W.show("unit") && !!Q.unit,
|
|
301
302
|
helperText: W.show("unit") && Q.unit ? Q.unit : Y ? "Vaccines must use VIAL" : "",
|
|
302
|
-
options:
|
|
303
|
+
options: te
|
|
303
304
|
})
|
|
304
305
|
}),
|
|
305
|
-
K.unit === "OTHER" ? /* @__PURE__ */
|
|
306
|
+
K.unit === "OTHER" ? /* @__PURE__ */ _(D, {
|
|
306
307
|
item: !0,
|
|
307
308
|
xs: 12,
|
|
308
309
|
md: 3,
|
|
309
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ _(k, {
|
|
310
311
|
required: !0,
|
|
311
312
|
fullWidth: !0,
|
|
312
313
|
size: "small",
|
|
@@ -317,19 +318,19 @@ function F() {
|
|
|
317
318
|
onBlur: W.onBlur("unitOther"),
|
|
318
319
|
error: W.show("unitOther") && !!Q.unitOther,
|
|
319
320
|
FormHelperTextProps: { component: "div" },
|
|
320
|
-
helperText: /* @__PURE__ */
|
|
321
|
+
helperText: /* @__PURE__ */ _(a, {
|
|
321
322
|
message: W.show("unitOther") && Q.unitOther ? Q.unitOther : "e.g. Strip, Ampoule, Sachet",
|
|
322
323
|
value: K.unitOther,
|
|
323
324
|
max: 50
|
|
324
325
|
})
|
|
325
326
|
})
|
|
326
327
|
}) : null,
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ _(D, {
|
|
328
329
|
item: !0,
|
|
329
330
|
xs: 6,
|
|
330
331
|
md: 3,
|
|
331
|
-
children: /* @__PURE__ */
|
|
332
|
-
control: /* @__PURE__ */
|
|
332
|
+
children: /* @__PURE__ */ _(E, {
|
|
333
|
+
control: /* @__PURE__ */ _(w, {
|
|
333
334
|
checked: !!K.hasExpiry,
|
|
334
335
|
disabled: Y,
|
|
335
336
|
onChange: (e) => X("hasExpiry", e.target.checked)
|
|
@@ -337,12 +338,12 @@ function F() {
|
|
|
337
338
|
label: Y ? "Has expiry (vaccine)" : "Has expiry"
|
|
338
339
|
})
|
|
339
340
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ _(D, {
|
|
341
342
|
item: !0,
|
|
342
343
|
xs: 6,
|
|
343
344
|
md: 3,
|
|
344
|
-
children: /* @__PURE__ */
|
|
345
|
-
control: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ _(E, {
|
|
346
|
+
control: /* @__PURE__ */ _(w, {
|
|
346
347
|
checked: !!K.needsStorageUnit,
|
|
347
348
|
disabled: Y,
|
|
348
349
|
onChange: (e) => X("needsStorageUnit", e.target.checked)
|
|
@@ -350,34 +351,34 @@ function F() {
|
|
|
350
351
|
label: Y ? "Needs storage unit (vaccine)" : "Needs storage unit"
|
|
351
352
|
})
|
|
352
353
|
}),
|
|
353
|
-
G ? /* @__PURE__ */
|
|
354
|
+
G ? /* @__PURE__ */ _(D, {
|
|
354
355
|
item: !0,
|
|
355
356
|
xs: 6,
|
|
356
357
|
md: 3,
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
-
control: /* @__PURE__ */
|
|
358
|
+
children: /* @__PURE__ */ _(E, {
|
|
359
|
+
control: /* @__PURE__ */ _(w, {
|
|
359
360
|
checked: !!K.notForSale,
|
|
360
361
|
onChange: (e) => X("notForSale", e.target.checked)
|
|
361
362
|
}),
|
|
362
363
|
label: "Not for sale"
|
|
363
364
|
})
|
|
364
365
|
}) : null,
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ _(D, {
|
|
366
367
|
item: !0,
|
|
367
368
|
xs: 6,
|
|
368
369
|
md: 3,
|
|
369
|
-
children: /* @__PURE__ */
|
|
370
|
-
control: /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ _(E, {
|
|
371
|
+
control: /* @__PURE__ */ _(w, {
|
|
371
372
|
checked: !!K.isActive,
|
|
372
373
|
onChange: (e) => X("isActive", e.target.checked)
|
|
373
374
|
}),
|
|
374
375
|
label: "Active"
|
|
375
376
|
})
|
|
376
377
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ _(D, {
|
|
378
379
|
item: !0,
|
|
379
380
|
xs: 12,
|
|
380
|
-
children: /* @__PURE__ */
|
|
381
|
+
children: /* @__PURE__ */ _(k, {
|
|
381
382
|
fullWidth: !0,
|
|
382
383
|
size: "small",
|
|
383
384
|
multiline: !0,
|
|
@@ -390,34 +391,34 @@ function F() {
|
|
|
390
391
|
]
|
|
391
392
|
})] })
|
|
392
393
|
}),
|
|
393
|
-
Y ? /* @__PURE__ */
|
|
394
|
-
sx: { borderRadius:
|
|
395
|
-
children: /* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
394
|
+
Y ? /* @__PURE__ */ _(S, {
|
|
395
|
+
sx: { borderRadius: 1.5 },
|
|
396
|
+
children: /* @__PURE__ */ v(C, { children: [
|
|
397
|
+
/* @__PURE__ */ v(O, {
|
|
397
398
|
direction: "row",
|
|
398
399
|
justifyContent: "space-between",
|
|
399
400
|
alignItems: "center",
|
|
400
401
|
sx: { mb: 2 },
|
|
401
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ _(A, {
|
|
402
403
|
variant: "h6",
|
|
403
404
|
sx: { fontWeight: 800 },
|
|
404
405
|
children: "Vaccine Configuration"
|
|
405
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ _(A, {
|
|
406
407
|
variant: "caption",
|
|
407
408
|
color: "text.secondary",
|
|
408
409
|
children: "Required for vaccine products. Controls vial size, dosing, and shelf life rules."
|
|
409
410
|
})]
|
|
410
411
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ _(T, { sx: { mb: 2 } }),
|
|
413
|
+
/* @__PURE__ */ v(D, {
|
|
413
414
|
container: !0,
|
|
414
415
|
spacing: 2,
|
|
415
416
|
children: [
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ _(D, {
|
|
417
418
|
item: !0,
|
|
418
419
|
xs: 12,
|
|
419
420
|
md: 3,
|
|
420
|
-
children: /* @__PURE__ */
|
|
421
|
+
children: /* @__PURE__ */ _(o, {
|
|
421
422
|
label: "Vaccine",
|
|
422
423
|
required: !0,
|
|
423
424
|
value: K.vaccineConfig?.vaccineCode || "",
|
|
@@ -432,11 +433,11 @@ function F() {
|
|
|
432
433
|
}))
|
|
433
434
|
})
|
|
434
435
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ _(D, {
|
|
436
437
|
item: !0,
|
|
437
438
|
xs: 12,
|
|
438
439
|
md: 3,
|
|
439
|
-
children: /* @__PURE__ */
|
|
440
|
+
children: /* @__PURE__ */ _(k, {
|
|
440
441
|
required: !0,
|
|
441
442
|
fullWidth: !0,
|
|
442
443
|
size: "small",
|
|
@@ -453,11 +454,11 @@ function F() {
|
|
|
453
454
|
helperText: W.show("vialVolumeMl") ? Q.vialVolumeMl : ""
|
|
454
455
|
})
|
|
455
456
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ _(D, {
|
|
457
458
|
item: !0,
|
|
458
459
|
xs: 12,
|
|
459
460
|
md: 3,
|
|
460
|
-
children: /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ _(k, {
|
|
461
462
|
fullWidth: !0,
|
|
462
463
|
size: "small",
|
|
463
464
|
type: "number",
|
|
@@ -473,11 +474,11 @@ function F() {
|
|
|
473
474
|
helperText: W.show("adultDoseMl") ? Q.adultDoseMl : ""
|
|
474
475
|
})
|
|
475
476
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ _(D, {
|
|
477
478
|
item: !0,
|
|
478
479
|
xs: 12,
|
|
479
480
|
md: 3,
|
|
480
|
-
children: /* @__PURE__ */
|
|
481
|
+
children: /* @__PURE__ */ _(k, {
|
|
481
482
|
fullWidth: !0,
|
|
482
483
|
size: "small",
|
|
483
484
|
type: "number",
|
|
@@ -493,11 +494,11 @@ function F() {
|
|
|
493
494
|
helperText: W.show("childDoseMl") ? Q.childDoseMl : ""
|
|
494
495
|
})
|
|
495
496
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ _(D, {
|
|
497
498
|
item: !0,
|
|
498
499
|
xs: 12,
|
|
499
500
|
md: 3,
|
|
500
|
-
children: /* @__PURE__ */
|
|
501
|
+
children: /* @__PURE__ */ _(k, {
|
|
501
502
|
required: !0,
|
|
502
503
|
fullWidth: !0,
|
|
503
504
|
size: "small",
|
|
@@ -514,11 +515,11 @@ function F() {
|
|
|
514
515
|
helperText: W.show("openVialValidityHours") && Q.openVialValidityHours ? Q.openVialValidityHours : "0 = single-use; max 720 (~30 days)"
|
|
515
516
|
})
|
|
516
517
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ _(D, {
|
|
518
519
|
item: !0,
|
|
519
520
|
xs: 12,
|
|
520
521
|
md: 3,
|
|
521
|
-
children: /* @__PURE__ */
|
|
522
|
+
children: /* @__PURE__ */ _(k, {
|
|
522
523
|
required: !0,
|
|
523
524
|
fullWidth: !0,
|
|
524
525
|
size: "small",
|
|
@@ -535,23 +536,23 @@ function F() {
|
|
|
535
536
|
helperText: W.show("maxConcurrentOpenVials") ? Q.maxConcurrentOpenVials : ""
|
|
536
537
|
})
|
|
537
538
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ _(D, {
|
|
539
540
|
item: !0,
|
|
540
541
|
xs: 12,
|
|
541
542
|
md: 3,
|
|
542
|
-
children: /* @__PURE__ */
|
|
543
|
-
control: /* @__PURE__ */
|
|
543
|
+
children: /* @__PURE__ */ _(E, {
|
|
544
|
+
control: /* @__PURE__ */ _(w, {
|
|
544
545
|
checked: !!K.vaccineConfig?.requiresReconstitution,
|
|
545
546
|
onChange: (e) => Z("requiresReconstitution", e.target.checked)
|
|
546
547
|
}),
|
|
547
548
|
label: "Requires reconstitution"
|
|
548
549
|
})
|
|
549
550
|
}),
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ _(D, {
|
|
551
552
|
item: !0,
|
|
552
553
|
xs: 12,
|
|
553
554
|
md: 3,
|
|
554
|
-
children: /* @__PURE__ */
|
|
555
|
+
children: /* @__PURE__ */ _(k, {
|
|
555
556
|
fullWidth: !0,
|
|
556
557
|
size: "small",
|
|
557
558
|
type: "number",
|
|
@@ -569,22 +570,22 @@ function F() {
|
|
|
569
570
|
helperText: W.show("reconstitutedValidityHours") ? Q.reconstitutedValidityHours : ""
|
|
570
571
|
})
|
|
571
572
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ _(D, {
|
|
573
574
|
item: !0,
|
|
574
575
|
xs: 12,
|
|
575
576
|
md: 3,
|
|
576
|
-
children: /* @__PURE__ */
|
|
577
|
+
children: /* @__PURE__ */ _(o, {
|
|
577
578
|
label: "Route of Administration",
|
|
578
579
|
value: K.vaccineConfig?.route || "",
|
|
579
580
|
onChange: (e) => Z("route", e),
|
|
580
|
-
options:
|
|
581
|
+
options: s
|
|
581
582
|
})
|
|
582
583
|
}),
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ _(D, {
|
|
584
585
|
item: !0,
|
|
585
586
|
xs: 12,
|
|
586
587
|
md: 3,
|
|
587
|
-
children: /* @__PURE__ */
|
|
588
|
+
children: /* @__PURE__ */ _(k, {
|
|
588
589
|
fullWidth: !0,
|
|
589
590
|
size: "small",
|
|
590
591
|
type: "number",
|
|
@@ -601,11 +602,11 @@ function F() {
|
|
|
601
602
|
helperText: W.show("storageTempMinCelsius") && Q.storageTempMinCelsius ? Q.storageTempMinCelsius : "Allowed range: −90°C to +30°C"
|
|
602
603
|
})
|
|
603
604
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ _(D, {
|
|
605
606
|
item: !0,
|
|
606
607
|
xs: 12,
|
|
607
608
|
md: 3,
|
|
608
|
-
children: /* @__PURE__ */
|
|
609
|
+
children: /* @__PURE__ */ _(k, {
|
|
609
610
|
fullWidth: !0,
|
|
610
611
|
size: "small",
|
|
611
612
|
type: "number",
|
|
@@ -622,10 +623,10 @@ function F() {
|
|
|
622
623
|
helperText: W.show("storageTempMaxCelsius") && Q.storageTempMaxCelsius ? Q.storageTempMaxCelsius : "Allowed range: −90°C to +30°C"
|
|
623
624
|
})
|
|
624
625
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ _(D, {
|
|
626
627
|
item: !0,
|
|
627
628
|
xs: 12,
|
|
628
|
-
children: /* @__PURE__ */
|
|
629
|
+
children: /* @__PURE__ */ _(k, {
|
|
629
630
|
fullWidth: !0,
|
|
630
631
|
size: "small",
|
|
631
632
|
multiline: !0,
|
|
@@ -646,4 +647,4 @@ function F() {
|
|
|
646
647
|
//#endregion
|
|
647
648
|
export { F as default };
|
|
648
649
|
|
|
649
|
-
//# sourceMappingURL=ProductEditPage-
|
|
650
|
+
//# sourceMappingURL=ProductEditPage-CQj9egzW.js.map
|