@argusoft/medplat-product-management 1.0.2 → 1.0.3

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.
Files changed (79) hide show
  1. package/dist/{BrandsPage-CSA3meke.js → BrandsPage-NSvaMXWg.js} +76 -75
  2. package/dist/BrandsPage-NSvaMXWg.js.map +1 -0
  3. package/dist/{CategoriesPage-BrspzkJL.js → CategoriesPage-aZBZrDOi.js} +8 -8
  4. package/dist/{CategoriesPage-BrspzkJL.js.map → CategoriesPage-aZBZrDOi.js.map} +1 -1
  5. package/dist/{DashboardPage-CqaquOs2.js → DashboardPage-DjwlOhrd.js} +22 -22
  6. package/dist/DashboardPage-DjwlOhrd.js.map +1 -0
  7. package/dist/{FacilityPicker-Dv_H95WW.js → FacilityPicker-Chh-ZaR0.js} +2 -2
  8. package/dist/{FacilityPicker-Dv_H95WW.js.map → FacilityPicker-Chh-ZaR0.js.map} +1 -1
  9. package/dist/{InventoryPage-CPbzfDMR.js → InventoryPage-cy76UsMp.js} +109 -119
  10. package/dist/InventoryPage-cy76UsMp.js.map +1 -0
  11. package/dist/{MemberProfileCard-0vjO3Gzd.js → MemberProfileCard-CinPt09F.js} +6 -6
  12. package/dist/MemberProfileCard-CinPt09F.js.map +1 -0
  13. package/dist/{PaymentCreatePage-BYmDZAIB.js → PaymentCreatePage-BJe3LyFF.js} +148 -153
  14. package/dist/PaymentCreatePage-BJe3LyFF.js.map +1 -0
  15. package/dist/{PaymentsPage-BXPvKon-.js → PaymentsPage-DxHoKksN.js} +11 -11
  16. package/dist/{PaymentsPage-BXPvKon-.js.map → PaymentsPage-DxHoKksN.js.map} +1 -1
  17. package/dist/PickupCreatePage-Cq8zJ62Y.js +705 -0
  18. package/dist/PickupCreatePage-Cq8zJ62Y.js.map +1 -0
  19. package/dist/{PickupsPage-D66_Wta4.js → PickupsPage-BOygBQAb.js} +66 -74
  20. package/dist/PickupsPage-BOygBQAb.js.map +1 -0
  21. package/dist/{PmTable-B9970kPY.js → PmTable-CCpaJEA_.js} +4 -4
  22. package/dist/PmTable-CCpaJEA_.js.map +1 -0
  23. package/dist/{ProductEditPage-B8qFTCW9.js → ProductEditPage-DmdHO-fS.js} +109 -109
  24. package/dist/ProductEditPage-DmdHO-fS.js.map +1 -0
  25. package/dist/{ProductsPage-C7_r9cKn.js → ProductsPage-BglMe8EM.js} +6 -6
  26. package/dist/{ProductsPage-C7_r9cKn.js.map → ProductsPage-BglMe8EM.js.map} +1 -1
  27. package/dist/PurchaseCreatePage-1tYk41RS.js +590 -0
  28. package/dist/PurchaseCreatePage-1tYk41RS.js.map +1 -0
  29. package/dist/{PurchaseRequestDetailPage-C7aAwEqw.js → PurchaseRequestDetailPage-BYLx3aBI.js} +14 -14
  30. package/dist/PurchaseRequestDetailPage-BYLx3aBI.js.map +1 -0
  31. package/dist/{PurchaseRequestsPage-BwCkbpaX.js → PurchaseRequestsPage-D2yorc4s.js} +4 -4
  32. package/dist/{PurchaseRequestsPage-BwCkbpaX.js.map → PurchaseRequestsPage-D2yorc4s.js.map} +1 -1
  33. package/dist/{PurchasesPage-CvaZouVy.js → PurchasesPage-CanQTjlw.js} +3 -3
  34. package/dist/{PurchasesPage-CvaZouVy.js.map → PurchasesPage-CanQTjlw.js.map} +1 -1
  35. package/dist/{SaleCreatePage-DP1Qmltu.js → SaleCreatePage-DxFvPvju.js} +145 -170
  36. package/dist/SaleCreatePage-DxFvPvju.js.map +1 -0
  37. package/dist/{SalesPage-CO3cdYX5.js → SalesPage-CPMrdr5-.js} +12 -12
  38. package/dist/SalesPage-CPMrdr5-.js.map +1 -0
  39. package/dist/SettingsPage-CEy922rW.js +662 -0
  40. package/dist/SettingsPage-CEy922rW.js.map +1 -0
  41. package/dist/{StorageUnitsPage-B9Hr_RkW.js → StorageUnitsPage-DfLT6xC_.js} +13 -13
  42. package/dist/{StorageUnitsPage-B9Hr_RkW.js.map → StorageUnitsPage-DfLT6xC_.js.map} +1 -1
  43. package/dist/{TransactionsPage-HKIGwEZN.js → TransactionsPage-KFUJ4O5g.js} +4 -4
  44. package/dist/TransactionsPage-KFUJ4O5g.js.map +1 -0
  45. package/dist/TransferCreatePage-k1tsRGB3.js +315 -0
  46. package/dist/TransferCreatePage-k1tsRGB3.js.map +1 -0
  47. package/dist/TransfersPage-CDafSVO9.js +470 -0
  48. package/dist/TransfersPage-CDafSVO9.js.map +1 -0
  49. package/dist/VialsPage-DPsYFgaQ.js +897 -0
  50. package/dist/VialsPage-DPsYFgaQ.js.map +1 -0
  51. package/dist/{currency-ClRLIEg2.js → currency-bVQ7aEk2.js} +141 -506
  52. package/dist/currency-bVQ7aEk2.js.map +1 -0
  53. package/dist/index.js +1 -1
  54. package/package.json +1 -1
  55. package/dist/BrandsPage-CSA3meke.js.map +0 -1
  56. package/dist/DashboardPage-CqaquOs2.js.map +0 -1
  57. package/dist/InventoryPage-CPbzfDMR.js.map +0 -1
  58. package/dist/MemberProfileCard-0vjO3Gzd.js.map +0 -1
  59. package/dist/PaymentCreatePage-BYmDZAIB.js.map +0 -1
  60. package/dist/PickupCreatePage-CMGwoAXj.js +0 -426
  61. package/dist/PickupCreatePage-CMGwoAXj.js.map +0 -1
  62. package/dist/PickupsPage-D66_Wta4.js.map +0 -1
  63. package/dist/PmTable-B9970kPY.js.map +0 -1
  64. package/dist/ProductEditPage-B8qFTCW9.js.map +0 -1
  65. package/dist/PurchaseCreatePage-CDfNDcKG.js +0 -627
  66. package/dist/PurchaseCreatePage-CDfNDcKG.js.map +0 -1
  67. package/dist/PurchaseRequestDetailPage-C7aAwEqw.js.map +0 -1
  68. package/dist/SaleCreatePage-DP1Qmltu.js.map +0 -1
  69. package/dist/SalesPage-CO3cdYX5.js.map +0 -1
  70. package/dist/SettingsPage-DvVRwSFw.js +0 -711
  71. package/dist/SettingsPage-DvVRwSFw.js.map +0 -1
  72. package/dist/TransactionsPage-HKIGwEZN.js.map +0 -1
  73. package/dist/TransferCreatePage-DMuZqQ3c.js +0 -363
  74. package/dist/TransferCreatePage-DMuZqQ3c.js.map +0 -1
  75. package/dist/TransfersPage-COIyouL4.js +0 -480
  76. package/dist/TransfersPage-COIyouL4.js.map +0 -1
  77. package/dist/VialsPage-BNPUwGCU.js +0 -922
  78. package/dist/VialsPage-BNPUwGCU.js.map +0 -1
  79. package/dist/currency-ClRLIEg2.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import { A as e, C as t, S as n, T as ee, ct as r, i, l as a, n as o, o as s, r as c } from "./currency-ClRLIEg2.js";
2
- import { n as l, o as u } from "./PmTable-B9970kPY.js";
3
- import { c as te, g as ne, h as re, m as d, p as ie, r as f, s as ae, t as oe } from "./validation-Ba7puFIO.js";
4
- import { t as p } from "./useFieldErrors-hDG8ox_x.js";
5
- import { i as m, l as h, u as g } from "./constants-5ZCZo-Zm.js";
6
- import { useEffect as se, useMemo as _, useState as v } from "react";
7
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
8
- import { Alert as x, Box as ce, Button as S, Card as C, CardContent as w, Checkbox as T, Divider as E, FormControlLabel as D, Grid as O, Stack as k, TextField as A, Typography as j } from "@mui/material";
1
+ import { D as e, S as t, at as n, b as ee, i as r, l as i, n as te, o as ne, r as a, y as o } from "./currency-bVQ7aEk2.js";
2
+ import { n as s, o as c } from "./PmTable-CCpaJEA_.js";
3
+ import { c as re, g as ie, h as ae, m as l, p as oe, r as u, s as se, t as d } from "./validation-Ba7puFIO.js";
4
+ import { t as f } from "./useFieldErrors-hDG8ox_x.js";
5
+ import { i as p, l as m, u as ce } from "./constants-5ZCZo-Zm.js";
6
+ import { useEffect as h, useMemo as g, useState as _ } from "react";
7
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
8
+ import { Alert as b, Box as x, Button as S, Card as C, CardContent as w, Checkbox as T, Divider as E, FormControlLabel as D, Grid as O, Stack as k, TextField as A, Typography as j } from "@mui/material";
9
9
  import { showToast as le } from "@/common/toaster/toaster";
10
10
  import { useNavigate as ue, useParams as M } from "react-router-dom";
11
11
  import N from "@mui/icons-material/SaveRounded";
@@ -25,7 +25,7 @@ var P = {
25
25
  comments: ""
26
26
  };
27
27
  function F() {
28
- let { productId: F } = M(), I = ue(), [L, R] = v(!0), [z, B] = v(""), [V, H] = v(!1), [U, de] = v([]), [fe, pe] = v([]), [me, he] = v([]), W = p(), G = a()?.manageSales !== !1, [K, q] = v({
28
+ let { productId: F } = M(), I = ue(), [L, R] = _(!0), [z, B] = _(""), [V, H] = _(!1), [U, de] = _([]), [fe, pe] = _([]), [me, he] = _([]), W = f(), G = i()?.manageSales !== !1, [K, q] = _({
29
29
  id: F,
30
30
  name: "",
31
31
  categoryId: "",
@@ -39,17 +39,17 @@ function F() {
39
39
  isActive: !0,
40
40
  imageUuids: [],
41
41
  vaccineConfig: null
42
- }), J = _(() => U.find((e) => e.id === K.categoryId), [U, K.categoryId]), Y = J?.code?.toUpperCase() === h;
43
- i("update.manage.productManagement.product", () => {
44
- async function r() {
42
+ }), J = g(() => U.find((e) => e.id === K.categoryId), [U, K.categoryId]), Y = J?.code?.toUpperCase() === m;
43
+ r("update.manage.productManagement.product", () => {
44
+ async function n() {
45
45
  R(!0);
46
46
  try {
47
- let [r, i, a] = await Promise.all([
48
- t(),
49
- n(),
50
- ee().catch(() => [])
47
+ let [n, r, i] = await Promise.all([
48
+ ee(),
49
+ o(),
50
+ t().catch(() => [])
51
51
  ]);
52
- de(r), pe(i), he(a);
52
+ de(n), pe(r), he(i);
53
53
  try {
54
54
  let t = await e(F);
55
55
  H(!1), q({
@@ -89,8 +89,8 @@ function F() {
89
89
  R(!1);
90
90
  }
91
91
  }
92
- r();
93
- }, [F]), se(() => {
92
+ n();
93
+ }, [F]), h(() => {
94
94
  q(Y ? (e) => ({
95
95
  ...e,
96
96
  unit: "VIAL",
@@ -116,37 +116,37 @@ function F() {
116
116
  }
117
117
  }));
118
118
  }
119
- let Q = _(() => {
119
+ let Q = g(() => {
120
120
  let e = {
121
- name: d(K.name, "Product name"),
122
- categoryId: d(K.categoryId, "Category"),
123
- brandId: d(K.brandId, "Brand"),
124
- unit: d(K.unit, "Unit"),
125
- unitOther: K.unit === "OTHER" ? d(K.unitOther, "Custom unit") : ""
121
+ name: l(K.name, "Product name"),
122
+ categoryId: l(K.categoryId, "Category"),
123
+ brandId: l(K.brandId, "Brand"),
124
+ unit: l(K.unit, "Unit"),
125
+ unitOther: K.unit === "OTHER" ? l(K.unitOther, "Custom unit") : ""
126
126
  };
127
127
  if (Y && K.vaccineConfig) {
128
- let t = K.vaccineConfig, n = re(t.storageTempMinCelsius, t.storageTempMaxCelsius);
128
+ let t = K.vaccineConfig, n = ae(t.storageTempMinCelsius, t.storageTempMaxCelsius);
129
129
  Object.assign(e, {
130
- vaccineCode: d(t.vaccineCode, "Vaccine"),
131
- vialVolumeMl: ne(t.vialVolumeMl),
132
- adultDoseMl: f(t.adultDoseMl, "Adult dose", t.vialVolumeMl),
133
- childDoseMl: f(t.childDoseMl, "Child dose", t.vialVolumeMl),
134
- openVialValidityHours: te(t.openVialValidityHours),
135
- maxConcurrentOpenVials: ae(t.maxConcurrentOpenVials),
136
- reconstitutedValidityHours: ie(t.reconstitutedValidityHours, t.requiresReconstitution),
130
+ vaccineCode: l(t.vaccineCode, "Vaccine"),
131
+ vialVolumeMl: ie(t.vialVolumeMl),
132
+ adultDoseMl: u(t.adultDoseMl, "Adult dose", t.vialVolumeMl),
133
+ childDoseMl: u(t.childDoseMl, "Child dose", t.vialVolumeMl),
134
+ openVialValidityHours: re(t.openVialValidityHours),
135
+ maxConcurrentOpenVials: se(t.maxConcurrentOpenVials),
136
+ reconstitutedValidityHours: oe(t.reconstitutedValidityHours, t.requiresReconstitution),
137
137
  storageTempMinCelsius: n.min,
138
138
  storageTempMaxCelsius: n.max
139
139
  }), !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
140
  }
141
141
  return e;
142
- }, [K, Y]), $ = oe(Q);
142
+ }, [K, Y]), $ = d(Q);
143
143
  async function ge() {
144
144
  if (!$) {
145
145
  W.markAllTouched(), B("Please fix the highlighted fields and try again.");
146
146
  return;
147
147
  }
148
148
  try {
149
- await r({
149
+ await n({
150
150
  id: K.id,
151
151
  name: K.name.trim(),
152
152
  categoryId: K.categoryId,
@@ -181,58 +181,58 @@ function F() {
181
181
  B(e?.response?.data?.message ?? e?.message ?? "Failed to save product");
182
182
  }
183
183
  }
184
- return /* @__PURE__ */ b(ce, { children: [/* @__PURE__ */ y(c, {}), /* @__PURE__ */ y(o, {
184
+ return /* @__PURE__ */ y(x, { children: [/* @__PURE__ */ v(a, {}), /* @__PURE__ */ v(te, {
185
185
  perm: "update.manage.productManagement.product",
186
186
  title: "You don’t have permission to create or edit products",
187
- children: /* @__PURE__ */ b(s, {
187
+ children: /* @__PURE__ */ y(ne, {
188
188
  title: V ? "Add Product" : "Edit Product",
189
189
  subtitle: `Category: ${J?.code ?? "—"}`,
190
- actions: /* @__PURE__ */ b(k, {
190
+ actions: /* @__PURE__ */ y(k, {
191
191
  direction: "row",
192
192
  spacing: 1,
193
- children: [/* @__PURE__ */ y(S, {
193
+ children: [/* @__PURE__ */ v(S, {
194
194
  variant: "outlined",
195
195
  onClick: () => I("/ui/medplat/manage/pm/products"),
196
196
  children: "Cancel"
197
- }), /* @__PURE__ */ y(S, {
197
+ }), /* @__PURE__ */ v(S, {
198
198
  variant: "contained",
199
- startIcon: /* @__PURE__ */ y(N, {}),
199
+ startIcon: /* @__PURE__ */ v(N, {}),
200
200
  disabled: !$,
201
201
  onClick: () => void ge(),
202
202
  children: "Save"
203
203
  })]
204
204
  }),
205
205
  children: [
206
- L ? /* @__PURE__ */ y(x, {
206
+ L ? /* @__PURE__ */ v(b, {
207
207
  severity: "info",
208
208
  children: "Loading…"
209
209
  }) : null,
210
- z ? /* @__PURE__ */ y(x, {
210
+ z ? /* @__PURE__ */ v(b, {
211
211
  severity: "error",
212
212
  sx: { mb: 2 },
213
213
  children: z
214
214
  }) : null,
215
- /* @__PURE__ */ y(C, {
215
+ /* @__PURE__ */ v(C, {
216
216
  sx: {
217
- borderRadius: 4,
217
+ borderRadius: 1.5,
218
218
  mb: 2
219
219
  },
220
- children: /* @__PURE__ */ b(w, { children: [/* @__PURE__ */ y(j, {
220
+ children: /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v(j, {
221
221
  variant: "h6",
222
222
  sx: {
223
223
  fontWeight: 800,
224
224
  mb: 2
225
225
  },
226
226
  children: "Basic Details"
227
- }), /* @__PURE__ */ b(O, {
227
+ }), /* @__PURE__ */ y(O, {
228
228
  container: !0,
229
229
  spacing: 2,
230
230
  children: [
231
- /* @__PURE__ */ y(O, {
231
+ /* @__PURE__ */ v(O, {
232
232
  item: !0,
233
233
  xs: 12,
234
234
  md: 6,
235
- children: /* @__PURE__ */ y(A, {
235
+ children: /* @__PURE__ */ v(A, {
236
236
  required: !0,
237
237
  fullWidth: !0,
238
238
  size: "small",
@@ -243,18 +243,18 @@ function F() {
243
243
  onBlur: W.onBlur("name"),
244
244
  error: W.show("name") && !!Q.name,
245
245
  FormHelperTextProps: { component: "div" },
246
- helperText: /* @__PURE__ */ y(l, {
246
+ helperText: /* @__PURE__ */ v(s, {
247
247
  message: W.show("name") ? Q.name : "",
248
248
  value: K.name,
249
249
  max: 255
250
250
  })
251
251
  })
252
252
  }),
253
- /* @__PURE__ */ y(O, {
253
+ /* @__PURE__ */ v(O, {
254
254
  item: !0,
255
255
  xs: 12,
256
256
  md: 3,
257
- children: /* @__PURE__ */ y(u, {
257
+ children: /* @__PURE__ */ v(c, {
258
258
  label: "Category",
259
259
  required: !0,
260
260
  value: K.categoryId,
@@ -268,11 +268,11 @@ function F() {
268
268
  }))
269
269
  })
270
270
  }),
271
- /* @__PURE__ */ y(O, {
271
+ /* @__PURE__ */ v(O, {
272
272
  item: !0,
273
273
  xs: 12,
274
274
  md: 3,
275
- children: /* @__PURE__ */ y(u, {
275
+ children: /* @__PURE__ */ v(c, {
276
276
  label: "Brand",
277
277
  required: !0,
278
278
  value: K.brandId,
@@ -286,11 +286,11 @@ function F() {
286
286
  }))
287
287
  })
288
288
  }),
289
- /* @__PURE__ */ y(O, {
289
+ /* @__PURE__ */ v(O, {
290
290
  item: !0,
291
291
  xs: 12,
292
292
  md: 3,
293
- children: /* @__PURE__ */ y(u, {
293
+ children: /* @__PURE__ */ v(c, {
294
294
  label: "Unit",
295
295
  required: !0,
296
296
  disabled: Y,
@@ -299,14 +299,14 @@ function F() {
299
299
  onBlur: W.onBlur("unit"),
300
300
  error: W.show("unit") && !!Q.unit,
301
301
  helperText: W.show("unit") && Q.unit ? Q.unit : Y ? "Vaccines must use VIAL" : "",
302
- options: m
302
+ options: p
303
303
  })
304
304
  }),
305
- K.unit === "OTHER" ? /* @__PURE__ */ y(O, {
305
+ K.unit === "OTHER" ? /* @__PURE__ */ v(O, {
306
306
  item: !0,
307
307
  xs: 12,
308
308
  md: 3,
309
- children: /* @__PURE__ */ y(A, {
309
+ children: /* @__PURE__ */ v(A, {
310
310
  required: !0,
311
311
  fullWidth: !0,
312
312
  size: "small",
@@ -317,19 +317,19 @@ function F() {
317
317
  onBlur: W.onBlur("unitOther"),
318
318
  error: W.show("unitOther") && !!Q.unitOther,
319
319
  FormHelperTextProps: { component: "div" },
320
- helperText: /* @__PURE__ */ y(l, {
320
+ helperText: /* @__PURE__ */ v(s, {
321
321
  message: W.show("unitOther") && Q.unitOther ? Q.unitOther : "e.g. Strip, Ampoule, Sachet",
322
322
  value: K.unitOther,
323
323
  max: 50
324
324
  })
325
325
  })
326
326
  }) : null,
327
- /* @__PURE__ */ y(O, {
327
+ /* @__PURE__ */ v(O, {
328
328
  item: !0,
329
329
  xs: 6,
330
330
  md: 3,
331
- children: /* @__PURE__ */ y(D, {
332
- control: /* @__PURE__ */ y(T, {
331
+ children: /* @__PURE__ */ v(D, {
332
+ control: /* @__PURE__ */ v(T, {
333
333
  checked: !!K.hasExpiry,
334
334
  disabled: Y,
335
335
  onChange: (e) => X("hasExpiry", e.target.checked)
@@ -337,12 +337,12 @@ function F() {
337
337
  label: Y ? "Has expiry (vaccine)" : "Has expiry"
338
338
  })
339
339
  }),
340
- /* @__PURE__ */ y(O, {
340
+ /* @__PURE__ */ v(O, {
341
341
  item: !0,
342
342
  xs: 6,
343
343
  md: 3,
344
- children: /* @__PURE__ */ y(D, {
345
- control: /* @__PURE__ */ y(T, {
344
+ children: /* @__PURE__ */ v(D, {
345
+ control: /* @__PURE__ */ v(T, {
346
346
  checked: !!K.needsStorageUnit,
347
347
  disabled: Y,
348
348
  onChange: (e) => X("needsStorageUnit", e.target.checked)
@@ -350,34 +350,34 @@ function F() {
350
350
  label: Y ? "Needs storage unit (vaccine)" : "Needs storage unit"
351
351
  })
352
352
  }),
353
- G ? /* @__PURE__ */ y(O, {
353
+ G ? /* @__PURE__ */ v(O, {
354
354
  item: !0,
355
355
  xs: 6,
356
356
  md: 3,
357
- children: /* @__PURE__ */ y(D, {
358
- control: /* @__PURE__ */ y(T, {
357
+ children: /* @__PURE__ */ v(D, {
358
+ control: /* @__PURE__ */ v(T, {
359
359
  checked: !!K.notForSale,
360
360
  onChange: (e) => X("notForSale", e.target.checked)
361
361
  }),
362
362
  label: "Not for sale"
363
363
  })
364
364
  }) : null,
365
- /* @__PURE__ */ y(O, {
365
+ /* @__PURE__ */ v(O, {
366
366
  item: !0,
367
367
  xs: 6,
368
368
  md: 3,
369
- children: /* @__PURE__ */ y(D, {
370
- control: /* @__PURE__ */ y(T, {
369
+ children: /* @__PURE__ */ v(D, {
370
+ control: /* @__PURE__ */ v(T, {
371
371
  checked: !!K.isActive,
372
372
  onChange: (e) => X("isActive", e.target.checked)
373
373
  }),
374
374
  label: "Active"
375
375
  })
376
376
  }),
377
- /* @__PURE__ */ y(O, {
377
+ /* @__PURE__ */ v(O, {
378
378
  item: !0,
379
379
  xs: 12,
380
- children: /* @__PURE__ */ y(A, {
380
+ children: /* @__PURE__ */ v(A, {
381
381
  fullWidth: !0,
382
382
  size: "small",
383
383
  multiline: !0,
@@ -390,34 +390,34 @@ function F() {
390
390
  ]
391
391
  })] })
392
392
  }),
393
- Y ? /* @__PURE__ */ y(C, {
394
- sx: { borderRadius: 4 },
395
- children: /* @__PURE__ */ b(w, { children: [
396
- /* @__PURE__ */ b(k, {
393
+ Y ? /* @__PURE__ */ v(C, {
394
+ sx: { borderRadius: 1.5 },
395
+ children: /* @__PURE__ */ y(w, { children: [
396
+ /* @__PURE__ */ y(k, {
397
397
  direction: "row",
398
398
  justifyContent: "space-between",
399
399
  alignItems: "center",
400
400
  sx: { mb: 2 },
401
- children: [/* @__PURE__ */ y(j, {
401
+ children: [/* @__PURE__ */ v(j, {
402
402
  variant: "h6",
403
403
  sx: { fontWeight: 800 },
404
404
  children: "Vaccine Configuration"
405
- }), /* @__PURE__ */ y(j, {
405
+ }), /* @__PURE__ */ v(j, {
406
406
  variant: "caption",
407
407
  color: "text.secondary",
408
408
  children: "Required for vaccine products. Controls vial size, dosing, and shelf life rules."
409
409
  })]
410
410
  }),
411
- /* @__PURE__ */ y(E, { sx: { mb: 2 } }),
412
- /* @__PURE__ */ b(O, {
411
+ /* @__PURE__ */ v(E, { sx: { mb: 2 } }),
412
+ /* @__PURE__ */ y(O, {
413
413
  container: !0,
414
414
  spacing: 2,
415
415
  children: [
416
- /* @__PURE__ */ y(O, {
416
+ /* @__PURE__ */ v(O, {
417
417
  item: !0,
418
418
  xs: 12,
419
419
  md: 3,
420
- children: /* @__PURE__ */ y(u, {
420
+ children: /* @__PURE__ */ v(c, {
421
421
  label: "Vaccine",
422
422
  required: !0,
423
423
  value: K.vaccineConfig?.vaccineCode || "",
@@ -432,11 +432,11 @@ function F() {
432
432
  }))
433
433
  })
434
434
  }),
435
- /* @__PURE__ */ y(O, {
435
+ /* @__PURE__ */ v(O, {
436
436
  item: !0,
437
437
  xs: 12,
438
438
  md: 3,
439
- children: /* @__PURE__ */ y(A, {
439
+ children: /* @__PURE__ */ v(A, {
440
440
  required: !0,
441
441
  fullWidth: !0,
442
442
  size: "small",
@@ -453,11 +453,11 @@ function F() {
453
453
  helperText: W.show("vialVolumeMl") ? Q.vialVolumeMl : ""
454
454
  })
455
455
  }),
456
- /* @__PURE__ */ y(O, {
456
+ /* @__PURE__ */ v(O, {
457
457
  item: !0,
458
458
  xs: 12,
459
459
  md: 3,
460
- children: /* @__PURE__ */ y(A, {
460
+ children: /* @__PURE__ */ v(A, {
461
461
  fullWidth: !0,
462
462
  size: "small",
463
463
  type: "number",
@@ -473,11 +473,11 @@ function F() {
473
473
  helperText: W.show("adultDoseMl") ? Q.adultDoseMl : ""
474
474
  })
475
475
  }),
476
- /* @__PURE__ */ y(O, {
476
+ /* @__PURE__ */ v(O, {
477
477
  item: !0,
478
478
  xs: 12,
479
479
  md: 3,
480
- children: /* @__PURE__ */ y(A, {
480
+ children: /* @__PURE__ */ v(A, {
481
481
  fullWidth: !0,
482
482
  size: "small",
483
483
  type: "number",
@@ -493,11 +493,11 @@ function F() {
493
493
  helperText: W.show("childDoseMl") ? Q.childDoseMl : ""
494
494
  })
495
495
  }),
496
- /* @__PURE__ */ y(O, {
496
+ /* @__PURE__ */ v(O, {
497
497
  item: !0,
498
498
  xs: 12,
499
499
  md: 3,
500
- children: /* @__PURE__ */ y(A, {
500
+ children: /* @__PURE__ */ v(A, {
501
501
  required: !0,
502
502
  fullWidth: !0,
503
503
  size: "small",
@@ -514,11 +514,11 @@ function F() {
514
514
  helperText: W.show("openVialValidityHours") && Q.openVialValidityHours ? Q.openVialValidityHours : "0 = single-use; max 720 (~30 days)"
515
515
  })
516
516
  }),
517
- /* @__PURE__ */ y(O, {
517
+ /* @__PURE__ */ v(O, {
518
518
  item: !0,
519
519
  xs: 12,
520
520
  md: 3,
521
- children: /* @__PURE__ */ y(A, {
521
+ children: /* @__PURE__ */ v(A, {
522
522
  required: !0,
523
523
  fullWidth: !0,
524
524
  size: "small",
@@ -535,23 +535,23 @@ function F() {
535
535
  helperText: W.show("maxConcurrentOpenVials") ? Q.maxConcurrentOpenVials : ""
536
536
  })
537
537
  }),
538
- /* @__PURE__ */ y(O, {
538
+ /* @__PURE__ */ v(O, {
539
539
  item: !0,
540
540
  xs: 12,
541
541
  md: 3,
542
- children: /* @__PURE__ */ y(D, {
543
- control: /* @__PURE__ */ y(T, {
542
+ children: /* @__PURE__ */ v(D, {
543
+ control: /* @__PURE__ */ v(T, {
544
544
  checked: !!K.vaccineConfig?.requiresReconstitution,
545
545
  onChange: (e) => Z("requiresReconstitution", e.target.checked)
546
546
  }),
547
547
  label: "Requires reconstitution"
548
548
  })
549
549
  }),
550
- /* @__PURE__ */ y(O, {
550
+ /* @__PURE__ */ v(O, {
551
551
  item: !0,
552
552
  xs: 12,
553
553
  md: 3,
554
- children: /* @__PURE__ */ y(A, {
554
+ children: /* @__PURE__ */ v(A, {
555
555
  fullWidth: !0,
556
556
  size: "small",
557
557
  type: "number",
@@ -569,22 +569,22 @@ function F() {
569
569
  helperText: W.show("reconstitutedValidityHours") ? Q.reconstitutedValidityHours : ""
570
570
  })
571
571
  }),
572
- /* @__PURE__ */ y(O, {
572
+ /* @__PURE__ */ v(O, {
573
573
  item: !0,
574
574
  xs: 12,
575
575
  md: 3,
576
- children: /* @__PURE__ */ y(u, {
576
+ children: /* @__PURE__ */ v(c, {
577
577
  label: "Route of Administration",
578
578
  value: K.vaccineConfig?.route || "",
579
579
  onChange: (e) => Z("route", e),
580
- options: g
580
+ options: ce
581
581
  })
582
582
  }),
583
- /* @__PURE__ */ y(O, {
583
+ /* @__PURE__ */ v(O, {
584
584
  item: !0,
585
585
  xs: 12,
586
586
  md: 3,
587
- children: /* @__PURE__ */ y(A, {
587
+ children: /* @__PURE__ */ v(A, {
588
588
  fullWidth: !0,
589
589
  size: "small",
590
590
  type: "number",
@@ -601,11 +601,11 @@ function F() {
601
601
  helperText: W.show("storageTempMinCelsius") && Q.storageTempMinCelsius ? Q.storageTempMinCelsius : "Allowed range: −90°C to +30°C"
602
602
  })
603
603
  }),
604
- /* @__PURE__ */ y(O, {
604
+ /* @__PURE__ */ v(O, {
605
605
  item: !0,
606
606
  xs: 12,
607
607
  md: 3,
608
- children: /* @__PURE__ */ y(A, {
608
+ children: /* @__PURE__ */ v(A, {
609
609
  fullWidth: !0,
610
610
  size: "small",
611
611
  type: "number",
@@ -622,10 +622,10 @@ function F() {
622
622
  helperText: W.show("storageTempMaxCelsius") && Q.storageTempMaxCelsius ? Q.storageTempMaxCelsius : "Allowed range: −90°C to +30°C"
623
623
  })
624
624
  }),
625
- /* @__PURE__ */ y(O, {
625
+ /* @__PURE__ */ v(O, {
626
626
  item: !0,
627
627
  xs: 12,
628
- children: /* @__PURE__ */ y(A, {
628
+ children: /* @__PURE__ */ v(A, {
629
629
  fullWidth: !0,
630
630
  size: "small",
631
631
  multiline: !0,
@@ -646,4 +646,4 @@ function F() {
646
646
  //#endregion
647
647
  export { F as default };
648
648
 
649
- //# sourceMappingURL=ProductEditPage-B8qFTCW9.js.map
649
+ //# sourceMappingURL=ProductEditPage-DmdHO-fS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductEditPage-DmdHO-fS.js","names":[],"sources":["../src/views/ProductEditPage.jsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { usePermissionedEffect } from '@pm/utils/permissions';\nimport {\n Alert,\n Box,\n Button,\n Card,\n CardContent,\n Checkbox,\n Divider,\n FormControlLabel,\n Grid,\n Stack,\n TextField,\n Typography,\n} from '@mui/material';\nimport SaveRoundedIcon from '@mui/icons-material/SaveRounded';\nimport { showToast } from '@/common/toaster/toaster';\nimport PmPageShell from '@pm/components/PmPageShell';\nimport PmNav from '@pm/components/PmNav';\nimport PmGuard from '@pm/components/PmGuard';\nimport {\n getBrands,\n getCategories,\n getImmunizationMaster,\n getProduct,\n upsertProduct,\n} from '@pm/services/pmApi';\nimport { PRODUCT_UNITS, VACCINES_CATEGORY_CODE, VACCINE_ROUTES } from '@pm/utils/constants';\nimport {\n isClean,\n validateDose,\n validateMaxConcurrentVials,\n validateOpenVialValidity,\n validateReconstitutedValidity,\n validateRequired,\n validateTempRange,\n validateVialVolume,\n} from '@pm/utils/validation';\nimport { useFieldErrors } from '@pm/utils/useFieldErrors';\nimport { usePmSettings } from '@pm/utils/settingsStore';\nimport { PmFieldHelp, PmSelect } from '@pm/components/PmTable';\n\nconst EMPTY_VACCINE = {\n vaccineCode: '',\n vialVolumeMl: '',\n adultDoseMl: '',\n childDoseMl: '',\n openVialValidityHours: 6,\n maxConcurrentOpenVials: 2,\n requiresReconstitution: false,\n reconstitutedValidityHours: '',\n route: '',\n storageTempMinCelsius: '',\n storageTempMaxCelsius: '',\n comments: '',\n};\n\nexport default function ProductEditPage() {\n const { productId } = useParams();\n const navigate = useNavigate();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState('');\n // Whether this page is creating a brand-new product (no existing row) vs\n // editing an existing one. Drives the \"Add\" vs \"Edit\" header. The route\n // always carries a product id (even for new), so we can't infer it from\n // the id alone — it's resolved by whether getProduct found a record.\n const [isNew, setIsNew] = useState(false);\n const [categories, setCategories] = useState([]);\n const [brands, setBrands] = useState([]);\n const [vaccineMaster, setVaccineMaster] = useState([]);\n const fieldErrors = useFieldErrors();\n const settings = usePmSettings();\n const manageSales = settings?.manageSales !== false;\n const [form, setForm] = useState({\n id: productId,\n name: '',\n categoryId: '',\n brandId: '',\n description: '',\n unit: '',\n unitOther: '',\n hasExpiry: true,\n needsStorageUnit: false,\n notForSale: false,\n isActive: true,\n imageUuids: [],\n vaccineConfig: null,\n });\n\n const selectedCategory = useMemo(\n () => categories.find((c) => c.id === form.categoryId),\n [categories, form.categoryId]\n );\n const isVaccine = selectedCategory?.code?.toUpperCase() === VACCINES_CATEGORY_CODE;\n\n usePermissionedEffect('update.manage.productManagement.product', () => {\n async function load() {\n setLoading(true);\n try {\n const [cats, brandList, vaccines] = await Promise.all([\n getCategories(),\n getBrands(),\n getImmunizationMaster().catch(() => []),\n ]);\n setCategories(cats);\n setBrands(brandList);\n setVaccineMaster(vaccines);\n\n // Try fetching existing product; if it returns 404 we treat it as new.\n try {\n const existing = await getProduct(productId);\n setIsNew(false);\n setForm({\n id: existing.id,\n name: existing.name ?? '',\n categoryId: existing.categoryId ?? '',\n brandId: existing.brandId ?? '',\n description: existing.description ?? '',\n unit: existing.unit ?? 'PIECE',\n unitOther: existing.unitOther ?? '',\n hasExpiry: existing.hasExpiry ?? false,\n needsStorageUnit: existing.needsStorageUnit ?? false,\n notForSale: existing.notForSale ?? false,\n isActive: existing.isActive ?? true,\n imageUuids: existing.imageUuids ?? [],\n vaccineConfig: existing.vaccineConfig\n ? {\n vaccineCode: existing.vaccineConfig.vaccineCode ?? '',\n vialVolumeMl: existing.vaccineConfig.vialVolumeMl ?? '',\n adultDoseMl: existing.vaccineConfig.adultDoseMl ?? '',\n childDoseMl: existing.vaccineConfig.childDoseMl ?? '',\n openVialValidityHours: existing.vaccineConfig.openVialValidityHours ?? 6,\n maxConcurrentOpenVials: existing.vaccineConfig.maxConcurrentOpenVials ?? 2,\n requiresReconstitution: existing.vaccineConfig.requiresReconstitution ?? false,\n reconstitutedValidityHours: existing.vaccineConfig.reconstitutedValidityHours ?? '',\n route: existing.vaccineConfig.route ?? '',\n storageTempMinCelsius: existing.vaccineConfig.storageTempMinCelsius ?? '',\n storageTempMaxCelsius: existing.vaccineConfig.storageTempMaxCelsius ?? '',\n comments: existing.vaccineConfig.comments ?? '',\n }\n : null,\n });\n } catch {\n // new product – fall through with default form\n setIsNew(true);\n }\n } catch (err) {\n setError(err?.response?.data?.message ?? err?.message ?? 'Failed to load product');\n } finally {\n setLoading(false);\n }\n }\n void load();\n }, [productId]);\n\n useEffect(() => {\n if (isVaccine) {\n // Vaccines are dispensed per vial and live in cold-chain storage — pin both\n // the unit and needsStorageUnit so they can't drift away from those rules.\n setForm((f) => ({\n ...f,\n unit: 'VIAL',\n needsStorageUnit: true,\n vaccineConfig: f.vaccineConfig ?? { ...EMPTY_VACCINE },\n }));\n } else {\n // Switched to (or loaded as) a non-vaccine category — drop any vaccine\n // config so it isn't sent on save. Persisting half-filled config for a\n // non-vaccine product would error on the backend.\n setForm((f) => (f.vaccineConfig ? { ...f, vaccineConfig: null } : f));\n }\n }, [isVaccine]);\n\n function patch(k, v) {\n setForm((f) => ({ ...f, [k]: v }));\n }\n\n function patchVaccine(k, v) {\n setForm((f) => ({ ...f, vaccineConfig: { ...(f.vaccineConfig ?? EMPTY_VACCINE), [k]: v } }));\n }\n\n // -------------------- Field-level error map --------------------\n const errors = useMemo(() => {\n const base = {\n name: validateRequired(form.name, 'Product name'),\n categoryId: validateRequired(form.categoryId, 'Category'),\n brandId: validateRequired(form.brandId, 'Brand'),\n unit: validateRequired(form.unit, 'Unit'),\n // Custom unit label is required only when unit is OTHER.\n unitOther: form.unit === 'OTHER' ? validateRequired(form.unitOther, 'Custom unit') : '',\n };\n if (isVaccine && form.vaccineConfig) {\n const v = form.vaccineConfig;\n const temps = validateTempRange(v.storageTempMinCelsius, v.storageTempMaxCelsius);\n Object.assign(base, {\n vaccineCode: validateRequired(v.vaccineCode, 'Vaccine'),\n vialVolumeMl: validateVialVolume(v.vialVolumeMl),\n adultDoseMl: validateDose(v.adultDoseMl, 'Adult dose', v.vialVolumeMl),\n childDoseMl: validateDose(v.childDoseMl, 'Child dose', v.vialVolumeMl),\n openVialValidityHours: validateOpenVialValidity(v.openVialValidityHours),\n maxConcurrentOpenVials: validateMaxConcurrentVials(v.maxConcurrentOpenVials),\n reconstitutedValidityHours: validateReconstitutedValidity(\n v.reconstitutedValidityHours,\n v.requiresReconstitution\n ),\n storageTempMinCelsius: temps.min,\n storageTempMaxCelsius: temps.max,\n });\n // Either an adult or a child dose must be configured.\n if (!v.adultDoseMl && !v.childDoseMl) {\n base.adultDoseMl = base.adultDoseMl || 'Provide at least one dose (adult or child)';\n base.childDoseMl = base.childDoseMl || 'Provide at least one dose (adult or child)';\n }\n }\n return base;\n }, [form, isVaccine]);\n\n const formIsValid = isClean(errors);\n\n async function save() {\n if (!formIsValid) {\n fieldErrors.markAllTouched();\n setError('Please fix the highlighted fields and try again.');\n return;\n }\n try {\n const payload = {\n id: form.id,\n name: form.name.trim(),\n categoryId: form.categoryId,\n brandId: form.brandId,\n description: form.description || null,\n unit: form.unit,\n unitOther: form.unit === 'OTHER' ? (form.unitOther?.trim() || null) : null,\n hasExpiry: !!form.hasExpiry,\n needsStorageUnit: !!form.needsStorageUnit,\n notForSale: manageSales ? !!form.notForSale : false,\n isActive: !!form.isActive,\n imageUuids: form.imageUuids ?? [],\n vaccineConfig: form.vaccineConfig\n ? {\n vaccineCode: form.vaccineConfig.vaccineCode?.trim().toUpperCase(),\n vialVolumeMl: Number(form.vaccineConfig.vialVolumeMl),\n adultDoseMl: form.vaccineConfig.adultDoseMl === '' ? null : Number(form.vaccineConfig.adultDoseMl),\n childDoseMl: form.vaccineConfig.childDoseMl === '' ? null : Number(form.vaccineConfig.childDoseMl),\n openVialValidityHours: Number(form.vaccineConfig.openVialValidityHours ?? 6),\n maxConcurrentOpenVials: Number(form.vaccineConfig.maxConcurrentOpenVials ?? 2),\n requiresReconstitution: !!form.vaccineConfig.requiresReconstitution,\n reconstitutedValidityHours: form.vaccineConfig.reconstitutedValidityHours === ''\n ? null\n : Number(form.vaccineConfig.reconstitutedValidityHours),\n route: form.vaccineConfig.route || null,\n storageTempMinCelsius: form.vaccineConfig.storageTempMinCelsius === ''\n ? null\n : Number(form.vaccineConfig.storageTempMinCelsius),\n storageTempMaxCelsius: form.vaccineConfig.storageTempMaxCelsius === ''\n ? null\n : Number(form.vaccineConfig.storageTempMaxCelsius),\n comments: form.vaccineConfig.comments || null,\n }\n : null,\n };\n await upsertProduct(payload);\n showToast({ message: 'Product saved.', type: 'success' });\n navigate('/ui/medplat/manage/pm/products');\n } catch (err) {\n setError(err?.response?.data?.message ?? err?.message ?? 'Failed to save product');\n }\n }\n\n return (\n <Box>\n <PmNav />\n <PmGuard perm={'update.manage.productManagement.product'} title=\"You don’t have permission to create or edit products\">\n <PmPageShell\n title={isNew ? 'Add Product' : 'Edit Product'}\n subtitle={`Category: ${selectedCategory?.code ?? '—'}`}\n actions={\n <Stack direction=\"row\" spacing={1}>\n <Button variant=\"outlined\" onClick={() => navigate('/ui/medplat/manage/pm/products')}>Cancel</Button>\n <Button variant=\"contained\" startIcon={<SaveRoundedIcon />}\n disabled={!formIsValid}\n onClick={() => void save()}>Save</Button>\n </Stack>\n }\n >\n {loading ? <Alert severity=\"info\">Loading…</Alert> : null}\n {error ? <Alert severity=\"error\" sx={{ mb: 2 }}>{error}</Alert> : null}\n\n <Card sx={{ borderRadius: 1.5, mb: 2 }}>\n <CardContent>\n <Typography variant=\"h6\" sx={{ fontWeight: 800, mb: 2 }}>Basic Details</Typography>\n <Grid container spacing={2}>\n <Grid item xs={12} md={6}>\n <TextField\n required\n fullWidth size=\"small\" label=\"Product Name\"\n value={form.name}\n inputProps={{ maxLength: 255 }}\n onChange={(e) => patch('name', e.target.value)}\n onBlur={fieldErrors.onBlur('name')}\n error={fieldErrors.show('name') && !!errors.name}\n FormHelperTextProps={{ component: 'div' }}\n helperText={<PmFieldHelp message={fieldErrors.show('name') ? errors.name : ''} value={form.name} max={255} />}\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <PmSelect\n label=\"Category\"\n required\n value={form.categoryId}\n onChange={(v) => patch('categoryId', v)}\n onBlur={fieldErrors.onBlur('categoryId')}\n error={fieldErrors.show('categoryId') && !!errors.categoryId}\n helperText={fieldErrors.show('categoryId') ? errors.categoryId : ''}\n options={categories.map((c) => ({ value: c.id, label: `${c.name} (${c.code})` }))}\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <PmSelect\n label=\"Brand\"\n required\n value={form.brandId}\n onChange={(v) => patch('brandId', v)}\n onBlur={fieldErrors.onBlur('brandId')}\n error={fieldErrors.show('brandId') && !!errors.brandId}\n helperText={fieldErrors.show('brandId') ? errors.brandId : ''}\n options={brands.map((b) => ({ value: b.id, label: b.name }))}\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <PmSelect\n label=\"Unit\"\n required\n disabled={isVaccine}\n value={form.unit}\n onChange={(v) => patch('unit', v)}\n onBlur={fieldErrors.onBlur('unit')}\n error={fieldErrors.show('unit') && !!errors.unit}\n helperText={fieldErrors.show('unit') && errors.unit\n ? errors.unit\n : isVaccine ? 'Vaccines must use VIAL' : ''}\n options={PRODUCT_UNITS}\n />\n </Grid>\n {form.unit === 'OTHER' ? (\n <Grid item xs={12} md={3}>\n <TextField\n required fullWidth size=\"small\" label=\"Custom unit name\"\n value={form.unitOther}\n inputProps={{ maxLength: 50 }}\n onChange={(e) => patch('unitOther', e.target.value)}\n onBlur={fieldErrors.onBlur('unitOther')}\n error={fieldErrors.show('unitOther') && !!errors.unitOther}\n FormHelperTextProps={{ component: 'div' }}\n helperText={<PmFieldHelp\n message={fieldErrors.show('unitOther') && errors.unitOther ? errors.unitOther : 'e.g. Strip, Ampoule, Sachet'}\n value={form.unitOther} max={50} />}\n />\n </Grid>\n ) : null}\n <Grid item xs={6} md={3}>\n <FormControlLabel\n control={<Checkbox\n checked={!!form.hasExpiry}\n disabled={isVaccine}\n onChange={(e) => patch('hasExpiry', e.target.checked)} />}\n label={isVaccine ? 'Has expiry (vaccine)' : 'Has expiry'} />\n </Grid>\n <Grid item xs={6} md={3}>\n <FormControlLabel\n control={<Checkbox\n checked={!!form.needsStorageUnit}\n disabled={isVaccine}\n onChange={(e) => patch('needsStorageUnit', e.target.checked)} />}\n label={isVaccine ? 'Needs storage unit (vaccine)' : 'Needs storage unit'} />\n </Grid>\n {manageSales ? (\n <Grid item xs={6} md={3}>\n <FormControlLabel control={<Checkbox checked={!!form.notForSale}\n onChange={(e) => patch('notForSale', e.target.checked)} />} label=\"Not for sale\" />\n </Grid>\n ) : null}\n <Grid item xs={6} md={3}>\n <FormControlLabel control={<Checkbox checked={!!form.isActive}\n onChange={(e) => patch('isActive', e.target.checked)} />} label=\"Active\" />\n </Grid>\n <Grid item xs={12}>\n <TextField fullWidth size=\"small\" multiline minRows={2} label=\"Description\" value={form.description}\n onChange={(e) => patch('description', e.target.value)} />\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n\n {isVaccine ? (\n <Card sx={{ borderRadius: 1.5 }}>\n <CardContent>\n <Stack direction=\"row\" justifyContent=\"space-between\" alignItems=\"center\" sx={{ mb: 2 }}>\n <Typography variant=\"h6\" sx={{ fontWeight: 800 }}>Vaccine Configuration</Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n Required for vaccine products. Controls vial size, dosing, and shelf life rules.\n </Typography>\n </Stack>\n <Divider sx={{ mb: 2 }} />\n <Grid container spacing={2}>\n <Grid item xs={12} md={3}>\n <PmSelect\n label=\"Vaccine\"\n required\n value={form.vaccineConfig?.vaccineCode || ''}\n onChange={(v) => patchVaccine('vaccineCode', v)}\n onBlur={fieldErrors.onBlur('vaccineCode')}\n error={fieldErrors.show('vaccineCode') && !!errors.vaccineCode}\n helperText={fieldErrors.show('vaccineCode') && errors.vaccineCode\n ? errors.vaccineCode\n : 'Sourced from medplat_immunization_master'}\n noOptionsText=\"No vaccines configured in immunization master\"\n options={vaccineMaster.map((v) => ({ value: v.vaccineCode, label: `${v.vaccineName} (${v.vaccineCode})` }))}\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <TextField required fullWidth size=\"small\" type=\"number\" inputProps={{ step: '0.01', min: 0 }}\n label=\"Vial Volume (ml)\"\n value={form.vaccineConfig?.vialVolumeMl ?? ''}\n onChange={(e) => patchVaccine('vialVolumeMl', e.target.value)}\n onBlur={fieldErrors.onBlur('vialVolumeMl')}\n error={fieldErrors.show('vialVolumeMl') && !!errors.vialVolumeMl}\n helperText={fieldErrors.show('vialVolumeMl') ? errors.vialVolumeMl : ''}\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <TextField fullWidth size=\"small\" type=\"number\" inputProps={{ step: '0.01', min: 0 }}\n label=\"Adult Dose (ml)\"\n value={form.vaccineConfig?.adultDoseMl ?? ''}\n onChange={(e) => patchVaccine('adultDoseMl', e.target.value)}\n onBlur={fieldErrors.onBlur('adultDoseMl')}\n error={fieldErrors.show('adultDoseMl') && !!errors.adultDoseMl}\n helperText={fieldErrors.show('adultDoseMl') ? errors.adultDoseMl : ''}\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <TextField fullWidth size=\"small\" type=\"number\" inputProps={{ step: '0.01', min: 0 }}\n label=\"Child Dose (ml)\"\n value={form.vaccineConfig?.childDoseMl ?? ''}\n onChange={(e) => patchVaccine('childDoseMl', e.target.value)}\n onBlur={fieldErrors.onBlur('childDoseMl')}\n error={fieldErrors.show('childDoseMl') && !!errors.childDoseMl}\n helperText={fieldErrors.show('childDoseMl') ? errors.childDoseMl : ''}\n />\n </Grid>\n\n <Grid item xs={12} md={3}>\n <TextField required fullWidth size=\"small\" type=\"number\" inputProps={{ min: 0, max: 720 }}\n label=\"Open vial validity (hours)\"\n value={form.vaccineConfig?.openVialValidityHours ?? ''}\n onChange={(e) => patchVaccine('openVialValidityHours', e.target.value)}\n onBlur={fieldErrors.onBlur('openVialValidityHours')}\n error={fieldErrors.show('openVialValidityHours') && !!errors.openVialValidityHours}\n helperText={\n fieldErrors.show('openVialValidityHours') && errors.openVialValidityHours\n ? errors.openVialValidityHours\n : '0 = single-use; max 720 (~30 days)'\n }\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <TextField required fullWidth size=\"small\" type=\"number\" inputProps={{ min: 1, max: 20 }}\n label=\"Max concurrent open vials\"\n value={form.vaccineConfig?.maxConcurrentOpenVials ?? ''}\n onChange={(e) => patchVaccine('maxConcurrentOpenVials', e.target.value)}\n onBlur={fieldErrors.onBlur('maxConcurrentOpenVials')}\n error={fieldErrors.show('maxConcurrentOpenVials') && !!errors.maxConcurrentOpenVials}\n helperText={fieldErrors.show('maxConcurrentOpenVials') ? errors.maxConcurrentOpenVials : ''}\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <FormControlLabel control={<Checkbox checked={!!form.vaccineConfig?.requiresReconstitution}\n onChange={(e) => patchVaccine('requiresReconstitution', e.target.checked)} />} label=\"Requires reconstitution\" />\n </Grid>\n <Grid item xs={12} md={3}>\n <TextField fullWidth size=\"small\" type=\"number\" inputProps={{ min: 1, max: 720 }}\n required={!!form.vaccineConfig?.requiresReconstitution}\n disabled={!form.vaccineConfig?.requiresReconstitution}\n label=\"Reconstituted validity (hours)\"\n value={form.vaccineConfig?.reconstitutedValidityHours ?? ''}\n onChange={(e) => patchVaccine('reconstitutedValidityHours', e.target.value)}\n onBlur={fieldErrors.onBlur('reconstitutedValidityHours')}\n error={fieldErrors.show('reconstitutedValidityHours') && !!errors.reconstitutedValidityHours}\n helperText={fieldErrors.show('reconstitutedValidityHours') ? errors.reconstitutedValidityHours : ''}\n />\n </Grid>\n\n <Grid item xs={12} md={3}>\n <PmSelect\n label=\"Route of Administration\"\n value={form.vaccineConfig?.route || ''}\n onChange={(v) => patchVaccine('route', v)}\n options={VACCINE_ROUTES}\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <TextField fullWidth size=\"small\" type=\"number\" inputProps={{ step: '0.1', min: -90, max: 30 }}\n label=\"Storage temp min (°C)\"\n value={form.vaccineConfig?.storageTempMinCelsius ?? ''}\n onChange={(e) => patchVaccine('storageTempMinCelsius', e.target.value)}\n onBlur={fieldErrors.onBlur('storageTempMinCelsius')}\n error={fieldErrors.show('storageTempMinCelsius') && !!errors.storageTempMinCelsius}\n helperText={\n fieldErrors.show('storageTempMinCelsius') && errors.storageTempMinCelsius\n ? errors.storageTempMinCelsius\n : 'Allowed range: −90°C to +30°C'\n }\n />\n </Grid>\n <Grid item xs={12} md={3}>\n <TextField fullWidth size=\"small\" type=\"number\" inputProps={{ step: '0.1', min: -90, max: 30 }}\n label=\"Storage temp max (°C)\"\n value={form.vaccineConfig?.storageTempMaxCelsius ?? ''}\n onChange={(e) => patchVaccine('storageTempMaxCelsius', e.target.value)}\n onBlur={fieldErrors.onBlur('storageTempMaxCelsius')}\n error={fieldErrors.show('storageTempMaxCelsius') && !!errors.storageTempMaxCelsius}\n helperText={\n fieldErrors.show('storageTempMaxCelsius') && errors.storageTempMaxCelsius\n ? errors.storageTempMaxCelsius\n : 'Allowed range: −90°C to +30°C'\n }\n />\n </Grid>\n\n <Grid item xs={12}>\n <TextField fullWidth size=\"small\" multiline minRows={2}\n label=\"Comments\" value={form.vaccineConfig?.comments || ''}\n onChange={(e) => patchVaccine('comments', e.target.value)} />\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n ) : null}\n </PmPageShell>\n </PmGuard>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4CA,IAAM,IAAgB;CACpB,aAAa;CACb,cAAc;CACd,aAAa;CACb,aAAa;CACb,uBAAuB;CACvB,wBAAwB;CACxB,wBAAwB;CACxB,4BAA4B;CAC5B,OAAO;CACP,uBAAuB;CACvB,uBAAuB;CACvB,UAAU;AACZ;AAEA,SAAwB,IAAkB;CACxC,IAAM,EAAE,iBAAc,EAAU,GAC1B,IAAW,GAAY,GACvB,CAAC,GAAS,KAAc,EAAS,EAAI,GACrC,CAAC,GAAO,KAAY,EAAS,EAAE,GAK/B,CAAC,GAAO,KAAY,EAAS,EAAK,GAClC,CAAC,GAAY,MAAiB,EAAS,CAAC,CAAC,GACzC,CAAC,IAAQ,MAAa,EAAS,CAAC,CAAC,GACjC,CAAC,IAAe,MAAoB,EAAS,CAAC,CAAC,GAC/C,IAAc,EAAe,GAE7B,IADW,EACG,GAAU,gBAAgB,IACxC,CAAC,GAAM,KAAW,EAAS;EAC/B,IAAI;EACJ,MAAM;EACN,YAAY;EACZ,SAAS;EACT,aAAa;EACb,MAAM;EACN,WAAW;EACX,WAAW;EACX,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,YAAY,CAAC;EACb,eAAe;CACjB,CAAC,GAEK,IAAmB,QACjB,EAAW,MAAM,MAAM,EAAE,OAAO,EAAK,UAAU,GACrD,CAAC,GAAY,EAAK,UAAU,CAC9B,GAC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