ubk.erp.webpack 1.1.9 → 1.2.1

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/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { jsxs as l, jsx as t, Fragment as qe } from "react/jsx-runtime";
2
- import { Card as pe, Typography as re, Divider as st, Row as Et, Col as He, Tag as Ee, Button as X, Progress as Ol, Image as oi, Drawer as rt, Modal as Ke, Select as Vt, Input as Ze, Pagination as Pl, message as zt, Empty as Ss, Table as Ie, Popconfirm as pt, Checkbox as yt, DatePicker as Qe, Spin as vs, Upload as Mt, TimePicker as Pe, Radio as je, Form as W, Space as Ue, AutoComplete as si, InputNumber as hn, Steps as El, Tooltip as _s, Skeleton as kl, Switch as ua, Tabs as ws } from "antd";
2
+ import { Card as pe, Typography as re, Divider as st, Row as Et, Col as He, Tag as Ee, Button as X, Progress as Ol, Image as oi, Drawer as rt, Modal as Ke, Select as Wt, Input as Ze, Pagination as Pl, message as Yt, Empty as Ss, Table as Ie, Popconfirm as pt, Checkbox as yt, DatePicker as Qe, Spin as vs, Upload as Mt, TimePicker as Pe, Radio as je, Form as W, Space as Ue, AutoComplete as si, InputNumber as hn, Steps as El, Tooltip as _s, Skeleton as kl, Switch as ua, Tabs as ws } from "antd";
3
3
  import Q, { mutate as Ni } from "swr";
4
+ import P, { Toaster as Te } from "react-hot-toast";
4
5
  import lt, { forwardRef as dr, useState as u, createContext as $l, useRef as et, useMemo as E, useEffect as at, useCallback as At } from "react";
5
6
  import vt from "swr/mutation";
6
7
  import { PrinterOutlined as cr, FileTextOutlined as li, SendOutlined as Nl, EditOutlined as ze, DeleteOutlined as ot, EyeOutlined as Cs, CloseOutlined as xs, SearchOutlined as As, PlusOutlined as wn, UploadOutlined as Un, PlusCircleOutlined as Fl, MinusCircleOutlined as Ul, DownloadOutlined as Is, BarcodeOutlined as Ia, FilterOutlined as Ts, UserAddOutlined as Ll, CheckOutlined as Rs, FileExcelOutlined as Ml, ReloadOutlined as Qt, ClockCircleOutlined as yi, CalendarOutlined as Ds, UserOutlined as jl, HomeOutlined as Os, SaveOutlined as Cn, SyncOutlined as fa, ExportOutlined as un } from "@ant-design/icons";
7
8
  import oe from "dayjs";
8
9
  import Bl from "react-dom/server";
9
10
  import { useReactToPrint as qn } from "react-to-print";
10
- import P, { Toaster as Te } from "react-hot-toast";
11
11
  import ql, { components as zl } from "react-select";
12
12
  import Ps from "react-barcode";
13
13
  const qy = () => /* @__PURE__ */ l(pe, { style: { borderRadius: 16 }, children: [
@@ -102,11 +102,11 @@ function ks(e, n) {
102
102
  const { toString: Yl } = Object.prototype, { getPrototypeOf: ur } = Object, { iterator: pr, toStringTag: $s } = Symbol, mr = /* @__PURE__ */ ((e) => (n) => {
103
103
  const a = Yl.call(n);
104
104
  return e[a] || (e[a] = a.slice(8, -1).toLowerCase());
105
- })(/* @__PURE__ */ Object.create(null)), Bt = (e) => (e = e.toLowerCase(), (n) => mr(n) === e), fr = (e) => (n) => typeof n === e, { isArray: zn } = Array, Ln = fr("undefined");
105
+ })(/* @__PURE__ */ Object.create(null)), qt = (e) => (e = e.toLowerCase(), (n) => mr(n) === e), fr = (e) => (n) => typeof n === e, { isArray: zn } = Array, Ln = fr("undefined");
106
106
  function ya(e) {
107
107
  return e !== null && !Ln(e) && e.constructor !== null && !Ln(e.constructor) && It(e.constructor.isBuffer) && e.constructor.isBuffer(e);
108
108
  }
109
- const Ns = Bt("ArrayBuffer");
109
+ const Ns = qt("ArrayBuffer");
110
110
  function Vl(e) {
111
111
  let n;
112
112
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? n = ArrayBuffer.isView(e) : n = e && e.buffer && Ns(e.buffer), n;
@@ -124,7 +124,7 @@ const Wl = fr("string"), It = fr("function"), Fs = fr("number"), ha = (e) => e !
124
124
  } catch {
125
125
  return !1;
126
126
  }
127
- }, Gl = Bt("Date"), Jl = Bt("File"), Ql = (e) => !!(e && typeof e.uri < "u"), Xl = (e) => e && typeof e.getParts < "u", Zl = Bt("Blob"), ed = Bt("FileList"), td = (e) => ha(e) && It(e.pipe);
127
+ }, Gl = qt("Date"), Jl = qt("File"), Ql = (e) => !!(e && typeof e.uri < "u"), Xl = (e) => e && typeof e.getParts < "u", Zl = qt("Blob"), ed = qt("FileList"), td = (e) => ha(e) && It(e.pipe);
128
128
  function nd() {
129
129
  return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
130
130
  }
@@ -136,12 +136,12 @@ const Fi = nd(), Ui = typeof Fi.FormData < "u" ? Fi.FormData : void 0, ad = (e)
136
136
  const a = mr(e);
137
137
  return a === "formdata" || // detect form-data instance
138
138
  a === "object" && It(e.toString) && e.toString() === "[object FormData]";
139
- }, rd = Bt("URLSearchParams"), [id, od, sd, ld] = [
139
+ }, rd = qt("URLSearchParams"), [id, od, sd, ld] = [
140
140
  "ReadableStream",
141
141
  "Request",
142
142
  "Response",
143
143
  "Headers"
144
- ].map(Bt), dd = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
144
+ ].map(qt), dd = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
145
145
  function ga(e, n, { allOwnKeys: a = !1 } = {}) {
146
146
  if (e === null || typeof e > "u")
147
147
  return;
@@ -242,9 +242,9 @@ const cd = (e, n, a, { allOwnKeys: r } = {}) => (ga(
242
242
  for (; (a = e.exec(n)) !== null; )
243
243
  r.push(a);
244
244
  return r;
245
- }, Sd = Bt("HTMLFormElement"), vd = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(a, r, i) {
245
+ }, Sd = qt("HTMLFormElement"), vd = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(a, r, i) {
246
246
  return r.toUpperCase() + i;
247
- }), Li = (({ hasOwnProperty: e }) => (n, a) => e.call(n, a))(Object.prototype), _d = Bt("RegExp"), Ms = (e, n) => {
247
+ }), Li = (({ hasOwnProperty: e }) => (n, a) => e.call(n, a))(Object.prototype), _d = qt("RegExp"), Ms = (e, n) => {
248
248
  const a = Object.getOwnPropertyDescriptors(e), r = {};
249
249
  ga(a, (i, o) => {
250
250
  let s;
@@ -296,7 +296,7 @@ const Td = (e) => {
296
296
  return r;
297
297
  };
298
298
  return a(e, 0);
299
- }, Rd = Bt("AsyncFunction"), Dd = (e) => e && (ha(e) || It(e)) && It(e.then) && It(e.catch), js = ((e, n) => e ? setImmediate : n ? ((a, r) => (gn.addEventListener(
299
+ }, Rd = qt("AsyncFunction"), Dd = (e) => e && (ha(e) || It(e)) && It(e.then) && It(e.catch), js = ((e, n) => e ? setImmediate : n ? ((a, r) => (gn.addEventListener(
300
300
  "message",
301
301
  ({ source: i, data: o }) => {
302
302
  i === gn && o === a && r.length && r.shift()();
@@ -340,7 +340,7 @@ const Td = (e) => {
340
340
  inherits: pd,
341
341
  toFlatObject: md,
342
342
  kindOf: mr,
343
- kindOfTest: Bt,
343
+ kindOfTest: qt,
344
344
  endsWith: fd,
345
345
  toArray: yd,
346
346
  forEachEntry: gd,
@@ -2033,11 +2033,11 @@ const {
2033
2033
  } = tt, Ac = () => new Promise((e) => setTimeout(() => e(), 800));
2034
2034
  let mi = null;
2035
2035
  const lh = (e) => {
2036
- mi = e, Wt.defaults.baseURL = vi();
2037
- }, vi = () => mi || "https://npmapi.ubkerp.com/", Wt = tt.create({
2036
+ mi = e, jt.defaults.baseURL = vi();
2037
+ }, vi = () => mi || "https://npmapi.ubkerp.com/", jt = tt.create({
2038
2038
  baseURL: vi()
2039
2039
  }), Rt = () => vi(), mt = async (e, n, a) => {
2040
- const r = await Wt.post(e, n, {
2040
+ const r = await jt.post(e, n, {
2041
2041
  headers: {
2042
2042
  Authorization: a
2043
2043
  }
@@ -2052,7 +2052,7 @@ const lh = (e) => {
2052
2052
  const o = e.includes("?") ? "&" : "?";
2053
2053
  r = `${e}${o}session_id=1`;
2054
2054
  }
2055
- return (await Wt.get(r, {
2055
+ return (await jt.get(r, {
2056
2056
  headers: {
2057
2057
  Authorization: n
2058
2058
  }
@@ -2061,7 +2061,7 @@ const lh = (e) => {
2061
2061
  throw a.response?.status === 401 && console.error("401 Unauthorized"), a;
2062
2062
  }
2063
2063
  }, Ic = async (e, n) => {
2064
- const a = await Wt.post(e, "", {
2064
+ const a = await jt.post(e, "", {
2065
2065
  headers: {
2066
2066
  Authorization: n
2067
2067
  }
@@ -2069,38 +2069,55 @@ const lh = (e) => {
2069
2069
  if (a.data?.Status == "Success")
2070
2070
  return a?.data?.data || a?.data;
2071
2071
  throw new Error(a.data?.msg);
2072
- }, gr = async (e, n, a) => (await Wt.post(e, n, {
2073
- headers: {
2074
- Authorization: a
2072
+ }, gr = async (e, n, a) => {
2073
+ try {
2074
+ console.log("========== ISSUE BOOK REQUEST =========="), console.log("URL:", jt.defaults.baseURL + e), console.log("DATA:", n), console.log("TOKEN:", a ? "Present" : "Missing");
2075
+ const r = await jt.post(e, n, {
2076
+ headers: {
2077
+ Authorization: a,
2078
+ "Content-Type": "application/json"
2079
+ }
2080
+ });
2081
+ return console.log("========== ISSUE BOOK RESPONSE =========="), console.log("STATUS:", r.status), console.log("DATA:", r.data), r.data?.Status === "Success" ? r.data : (P.error(
2082
+ r.data?.msg || "Unable to issue library book",
2083
+ { duration: 2e3 }
2084
+ ), !1);
2085
+ } catch (r) {
2086
+ throw console.error("========== ISSUE BOOK ERROR =========="), console.error("HTTP STATUS:", r.response?.status), console.error("ERROR DATA:", r.response?.data), console.error("ERROR MESSAGE:", r.message), console.error("REQUEST DATA:", n), P.error(
2087
+ r.response?.data?.msg || r.response?.data?.message || "Request failed",
2088
+ { duration: 2e3 }
2089
+ ), r;
2075
2090
  }
2076
- }))?.data, ca = async (e, n, a) => {
2091
+ }, ca = async (e, n, a) => {
2077
2092
  const r = n?.arg;
2078
- return (await Wt.post(e, r, {
2093
+ return (await jt.post(e, r, {
2079
2094
  headers: {
2080
2095
  Authorization: a
2081
2096
  }
2082
2097
  }))?.data;
2083
2098
  }, Sn = async (e, n, a) => {
2084
2099
  const r = n?.arg, i = e.includes("?") ? "&" : "?";
2085
- return (await Wt.get(e + i, {
2100
+ return (await jt.get(e + i, {
2086
2101
  params: r,
2087
2102
  headers: {
2088
2103
  Authorization: a
2089
2104
  }
2090
2105
  }))?.data;
2091
2106
  }, Tc = "api/branchapi/GeneralSettings/getsetting_allowances_dedectionBranch", _i = async (e, n, a) => {
2092
- const r = n?.arg, i = e.includes("?") ? "&" : "?";
2093
- return (await Wt.get(e + i, {
2107
+ const r = n?.arg, i = e.includes("?") ? "&" : "?", o = await jt.get(e + i, {
2094
2108
  params: r,
2095
2109
  headers: {
2096
2110
  Authorization: a
2097
2111
  }
2098
- }))?.data;
2099
- }, Lt = async (e, n, a) => (await Ac(), (await Wt.post(e, n, {
2112
+ });
2113
+ if (console.log("ddddfdfdfd", o.data?.Status), o.data?.Status == "Success")
2114
+ return o?.data?.data || o?.data;
2115
+ throw new Error(o.data?.msg);
2116
+ }, Lt = async (e, n, a) => (await Ac(), (await jt.post(e, n, {
2100
2117
  headers: {
2101
2118
  Authorization: a
2102
2119
  }
2103
- }))?.data), Dt = async (e, n, a) => (await Wt.delete(`${e}/${n}`, {
2120
+ }))?.data), Dt = async (e, n, a) => (await jt.delete(`${e}/${n}`, {
2104
2121
  headers: {
2105
2122
  Authorization: a
2106
2123
  }
@@ -3054,7 +3071,7 @@ const ol = (e) => {
3054
3071
  default:
3055
3072
  return "";
3056
3073
  }
3057
- }, Yt = (e) => {
3074
+ }, Vt = (e) => {
3058
3075
  const n = JSON.parse(localStorage.getItem("genrall_settings"));
3059
3076
  return console.log("amount______", e), /* @__PURE__ */ l(qe, { children: [
3060
3077
  n?.currency_icon,
@@ -3324,7 +3341,7 @@ const br = (e) => {
3324
3341
  }, se = (ae, he) => {
3325
3342
  z(ae), r?.(he);
3326
3343
  }, ye = async (ae, he, ve, Ne) => {
3327
- r?.(!0), ve !== "" && ((await Ne({ id: ae, admission_no: he, ec_no: ve }))?.Status === "Success" ? zt.success("Ec No updated successfully") : zt.error("Failed to Update Ec No."));
3344
+ r?.(!0), ve !== "" && ((await Ne({ id: ae, admission_no: he, ec_no: ve }))?.Status === "Success" ? Yt.success("Ec No updated successfully") : Yt.error("Failed to Update Ec No."));
3328
3345
  }, Re = () => /* @__PURE__ */ t(Yc.Provider, { value: V, children: i }), { trigger: de } = vt(
3329
3346
  "branchapi/staff/updateStaffPassword",
3330
3347
  ca
@@ -3337,9 +3354,9 @@ const br = (e) => {
3337
3354
  ), ue = async (ae) => {
3338
3355
  ae.preventDefault(), k(!1);
3339
3356
  try {
3340
- (await de({ staff_id: _, new_passwod: ae.target.password.value }))?.Status === "Success" ? zt.success("Password updated successfully") : zt.error("Failed to update password");
3357
+ (await de({ staff_id: _, new_passwod: ae.target.password.value }))?.Status === "Success" ? Yt.success("Password updated successfully") : Yt.error("Failed to update password");
3341
3358
  } catch {
3342
- zt.error("Failed to update password");
3359
+ Yt.error("Failed to update password");
3343
3360
  }
3344
3361
  }, ke = async (ae) => {
3345
3362
  ae.preventDefault(), M(!1);
@@ -3349,9 +3366,9 @@ const br = (e) => {
3349
3366
  new_passwod: ae.target.password.value,
3350
3367
  username: ae.target.username.value,
3351
3368
  branch_id: JSON.parse(localStorage.getItem("genrall_settings"))?.fk_branchID
3352
- }))?.Status === "Success" ? zt.success("Password updated successfully") : zt.error("Failed to update password");
3369
+ }))?.Status === "Success" ? Yt.success("Password updated successfully") : Yt.error("Failed to update password");
3353
3370
  } catch (he) {
3354
- zt.error(he?.response?.data?.msg ?? "Failed to update password");
3371
+ Yt.error(he?.response?.data?.msg ?? "Failed to update password");
3355
3372
  }
3356
3373
  }, Ye = (Array.isArray(n) ? n : []).some((ae) => ae?.fixed === "left"), Ve = [
3357
3374
  {
@@ -3396,7 +3413,7 @@ const br = (e) => {
3396
3413
  case "fine_amount":
3397
3414
  case "basic_pay":
3398
3415
  case "net_amount":
3399
- return Yt(he);
3416
+ return Vt(he);
3400
3417
  case "full_name":
3401
3418
  return /* @__PURE__ */ t(
3402
3419
  "span",
@@ -3517,7 +3534,7 @@ const br = (e) => {
3517
3534
  return;
3518
3535
  }
3519
3536
  S?.(he.id);
3520
- }, qt = () => {
3537
+ }, zt = () => {
3521
3538
  b?.(he?.id);
3522
3539
  };
3523
3540
  return /* @__PURE__ */ l("div", { style: { display: "flex", gap: "5px" }, children: [
@@ -3537,7 +3554,7 @@ const br = (e) => {
3537
3554
  size: "small",
3538
3555
  danger: !0,
3539
3556
  disabled: ve,
3540
- onClick: qt
3557
+ onClick: zt
3541
3558
  }
3542
3559
  ),
3543
3560
  c?.[2]?.status && /* @__PURE__ */ t(X, { icon: /* @__PURE__ */ t(Cs, {}), size: "small", onClick: Fe })
@@ -3686,7 +3703,7 @@ const br = (e) => {
3686
3703
  /* @__PURE__ */ l("div", { style: { display: "flex", alignItems: "center", gap: 8, fontSize: 12, color: "#222" }, children: [
3687
3704
  /* @__PURE__ */ t("span", { children: "Show" }),
3688
3705
  /* @__PURE__ */ t(
3689
- Vt,
3706
+ Wt,
3690
3707
  {
3691
3708
  size: "small",
3692
3709
  value: O.rowsPerPage,
@@ -3881,9 +3898,9 @@ const br = (e) => {
3881
3898
  }
3882
3899
  ) })), $t = ({ id: e, funcName: n, disabled: a = !1 }) => {
3883
3900
  const r = "Data", [i, o] = u(!1), s = () => {
3884
- o(!0), n(e), zt.success(`${r} deleted successfully!`);
3901
+ o(!0), n(e), Yt.success(`${r} deleted successfully!`);
3885
3902
  }, d = () => {
3886
- zt.info(`Deletion of ${r} cancelled`);
3903
+ Yt.info(`Deletion of ${r} cancelled`);
3887
3904
  };
3888
3905
  return /* @__PURE__ */ t(
3889
3906
  pt,
@@ -5347,7 +5364,7 @@ function fh({
5347
5364
  ), ve = e && y ? `${y}&page=${B.page}&per_page=${B.rowsPerPage}` : null, {
5348
5365
  isLoading: Ne,
5349
5366
  error: Fe,
5350
- data: qt,
5367
+ data: zt,
5351
5368
  mutate: en
5352
5369
  } = Q(
5353
5370
  ve ? [ve, e] : null,
@@ -5684,7 +5701,7 @@ function fh({
5684
5701
  {
5685
5702
  parentCallback: Rr,
5686
5703
  data: {
5687
- newData: qt,
5704
+ newData: zt,
5688
5705
  columns: Kt,
5689
5706
  columnstype: "antd",
5690
5707
  action: !1,
@@ -6150,8 +6167,8 @@ function hh({ token: e }) {
6150
6167
  ), Fe = E(() => {
6151
6168
  const fe = ve?.data ?? ve;
6152
6169
  return Array.isArray(fe) ? fe[0] ?? null : Array.isArray(fe?.data) ? fe.data[0] ?? null : fe ?? null;
6153
- }, [ve]), qt = E(() => F ? `${K}?route_id=${F}` : null, [F, K]), { data: en } = Q(
6154
- e && qt ? [qt, e] : null,
6170
+ }, [ve]), zt = E(() => F ? `${K}?route_id=${F}` : null, [F, K]), { data: en } = Q(
6171
+ e && zt ? [zt, e] : null,
6155
6172
  ([fe, xe]) => ee(fe, xe)
6156
6173
  ), tn = E(
6157
6174
  () => Ea(en),
@@ -7410,7 +7427,7 @@ function vh({ token: e, onReturn: n }) {
7410
7427
  amount: Number(le?.totalfine ?? 0)
7411
7428
  }))), Fe = (le) => {
7412
7429
  C((Ae) => Ae.filter((Be) => String(Be?.id) !== String(le)));
7413
- }, qt = async (le) => {
7430
+ }, zt = async (le) => {
7414
7431
  if (a) {
7415
7432
  if (!le) {
7416
7433
  S(null);
@@ -7456,7 +7473,7 @@ function vh({ token: e, onReturn: n }) {
7456
7473
  fine: !1,
7457
7474
  books: w
7458
7475
  });
7459
- le?.Status === "Success" ? (P.success(String(le?.msg ?? "Success"), { duration: 1e3 }), C([]), S(null), y([]), R([]), D(0)) : P.error(String(le?.msg ?? "Failed"), { duration: 1e3 });
7476
+ le?.Status === "Success" && (P.success(String(le?.msg ?? "Success"), { duration: 1e3 }), C([]), S(null), y([]), R([]), D(0));
7460
7477
  }, xe = async () => {
7461
7478
  if (!c?.member_id) {
7462
7479
  P.error("Select a student first.", { duration: 1e3 });
@@ -7501,7 +7518,7 @@ function vh({ token: e, onReturn: n }) {
7501
7518
  }
7502
7519
  const le = await we({
7503
7520
  member_id: c.member_id,
7504
- collection_type: "FINE_PAY_LATER__",
7521
+ collection_type: "FINE_PAY_LATER",
7505
7522
  amount: 0,
7506
7523
  books: JSON.stringify(h)
7507
7524
  });
@@ -7519,10 +7536,9 @@ function vh({ token: e, onReturn: n }) {
7519
7536
  render: (le, Ae) => /* @__PURE__ */ t(
7520
7537
  Mn,
7521
7538
  {
7522
- defaultValue: oe(Ae?.return_date || oe()),
7539
+ defaultValue: oe(Ae?.return_date || oe().add(30, "day")),
7523
7540
  Desplay: "",
7524
7541
  format: "YYYY-MM-DD",
7525
- minDate: oe(),
7526
7542
  allowClear: !1,
7527
7543
  onChange: (Be, ge) => {
7528
7544
  C(
@@ -7721,7 +7737,7 @@ function vh({ token: e, onReturn: n }) {
7721
7737
  {
7722
7738
  options: _e,
7723
7739
  onSelect: tn,
7724
- onSearch: qt,
7740
+ onSearch: zt,
7725
7741
  style: { width: "100%" },
7726
7742
  allowClear: !0,
7727
7743
  children: /* @__PURE__ */ t(
@@ -9504,8 +9520,8 @@ function Mu({ token: e }) {
9504
9520
  if (!Array.isArray(ae) || ae.length === 0) {
9505
9521
  const ve = be.toLowerCase();
9506
9522
  ae = (Array.isArray(G) ? G : []).filter((Ne) => {
9507
- const Fe = String(Ne?.name ?? "").toLowerCase(), qt = String(Ne?.barcode ?? "").toLowerCase();
9508
- return Fe.includes(ve) || qt.includes(ve);
9523
+ const Fe = String(Ne?.name ?? "").toLowerCase(), zt = String(Ne?.barcode ?? "").toLowerCase();
9524
+ return Fe.includes(ve) || zt.includes(ve);
9509
9525
  }).slice(0, 30);
9510
9526
  }
9511
9527
  const he = ae.slice(0, 30).map((ve) => ({
@@ -9821,7 +9837,7 @@ function Mu({ token: e }) {
9821
9837
  ),
9822
9838
  /* @__PURE__ */ l("div", { style: { justifySelf: "end", fontWeight: 700 }, children: [
9823
9839
  "Total: ",
9824
- Yt(ye)
9840
+ Vt(ye)
9825
9841
  ] })
9826
9842
  ]
9827
9843
  }
@@ -9857,7 +9873,7 @@ function Mu({ token: e }) {
9857
9873
  ] }),
9858
9874
  /* @__PURE__ */ l("div", { style: { display: "flex", justifyContent: "space-between", fontWeight: 700, marginTop: 6 }, children: [
9859
9875
  /* @__PURE__ */ t("span", { children: "Total Amount" }),
9860
- /* @__PURE__ */ t("span", { children: Yt(ye) })
9876
+ /* @__PURE__ */ t("span", { children: Vt(ye) })
9861
9877
  ] }),
9862
9878
  /* @__PURE__ */ l("div", { style: { display: "flex", gap: 12, marginTop: 12 }, children: [
9863
9879
  /* @__PURE__ */ t(
@@ -9903,7 +9919,7 @@ function Mu({ token: e }) {
9903
9919
  /* @__PURE__ */ l("div", { children: [
9904
9920
  /* @__PURE__ */ t("div", { style: { fontSize: 12, fontWeight: 600, marginBottom: 6 }, children: "Payment Type" }),
9905
9921
  /* @__PURE__ */ t(
9906
- Vt,
9922
+ Wt,
9907
9923
  {
9908
9924
  value: D || void 0,
9909
9925
  onChange: x,
@@ -9968,15 +9984,15 @@ function Mu({ token: e }) {
9968
9984
  /* @__PURE__ */ t(pe, { style: { borderRadius: 12, background: "#fafcff" }, children: /* @__PURE__ */ l("div", { style: { display: "grid", gap: 8 }, children: [
9969
9985
  /* @__PURE__ */ l("div", { style: { display: "flex", justifyContent: "space-between" }, children: [
9970
9986
  /* @__PURE__ */ t("span", { children: "Total Amount" }),
9971
- /* @__PURE__ */ t("span", { children: Yt(ye) })
9987
+ /* @__PURE__ */ t("span", { children: Vt(ye) })
9972
9988
  ] }),
9973
9989
  /* @__PURE__ */ l("div", { style: { display: "flex", justifyContent: "space-between" }, children: [
9974
9990
  /* @__PURE__ */ t("span", { children: "Discount" }),
9975
- /* @__PURE__ */ t("span", { children: Yt(Re) })
9991
+ /* @__PURE__ */ t("span", { children: Vt(Re) })
9976
9992
  ] }),
9977
9993
  /* @__PURE__ */ l("div", { style: { display: "flex", justifyContent: "space-between", fontWeight: 700 }, children: [
9978
9994
  /* @__PURE__ */ t("span", { children: "Net Amount" }),
9979
- /* @__PURE__ */ t("span", { children: Yt(de) })
9995
+ /* @__PURE__ */ t("span", { children: Vt(de) })
9980
9996
  ] })
9981
9997
  ] }) })
9982
9998
  ] })
@@ -12742,7 +12758,7 @@ function om({ token: e, staffId: n }) {
12742
12758
  key: "basic_salary",
12743
12759
  width: 140,
12744
12760
  align: "center",
12745
- render: (k, q) => /* @__PURE__ */ t("div", { style: { fontSize: 11 }, children: Yt(q?.basic_salary) })
12761
+ render: (k, q) => /* @__PURE__ */ t("div", { style: { fontSize: 11 }, children: Vt(q?.basic_salary) })
12746
12762
  },
12747
12763
  {
12748
12764
  title: "Gross Salary",
@@ -12750,7 +12766,7 @@ function om({ token: e, staffId: n }) {
12750
12766
  key: "gross_salary",
12751
12767
  width: 140,
12752
12768
  align: "center",
12753
- render: (k, q) => /* @__PURE__ */ t("div", { style: { fontSize: 11 }, children: Yt(q?.gross_salary) })
12769
+ render: (k, q) => /* @__PURE__ */ t("div", { style: { fontSize: 11 }, children: Vt(q?.gross_salary) })
12754
12770
  },
12755
12771
  {
12756
12772
  title: "Net Salary",
@@ -12758,7 +12774,7 @@ function om({ token: e, staffId: n }) {
12758
12774
  key: "net_amount",
12759
12775
  width: 140,
12760
12776
  align: "center",
12761
- render: (k, q) => /* @__PURE__ */ t("div", { style: { fontSize: 11 }, children: Yt(q?.net_amount) })
12777
+ render: (k, q) => /* @__PURE__ */ t("div", { style: { fontSize: 11 }, children: Vt(q?.net_amount) })
12762
12778
  },
12763
12779
  {
12764
12780
  title: "Payable",
@@ -12766,7 +12782,7 @@ function om({ token: e, staffId: n }) {
12766
12782
  key: "Total_Payable_Amount",
12767
12783
  width: 140,
12768
12784
  align: "center",
12769
- render: (k, q) => /* @__PURE__ */ t("div", { style: { fontSize: 11 }, children: Yt(q?.Total_Payable_Amount) })
12785
+ render: (k, q) => /* @__PURE__ */ t("div", { style: { fontSize: 11 }, children: Vt(q?.Total_Payable_Amount) })
12770
12786
  },
12771
12787
  {
12772
12788
  title: "Status",
@@ -13153,7 +13169,7 @@ function gm({
13153
13169
  render: (m, c, S) => {
13154
13170
  const w = c?.student_session_id ?? c?.student_id ?? c?.id ?? S;
13155
13171
  return /* @__PURE__ */ t(
13156
- Vt,
13172
+ Wt,
13157
13173
  {
13158
13174
  size: "small",
13159
13175
  style: { width: "100%" },
@@ -14098,7 +14114,7 @@ const xr = (e) => e ?? localStorage.getItem("authToken") ?? "", Om = (e, n) => {
14098
14114
  }, Pm = () => Om(Rt(), Oe.uploadNotes), Em = async ({ baseUrl: e, page: n = 1, perPage: a = 10 }, r) => {
14099
14115
  const i = e.includes("?") ? "&" : "?", o = `${e}${i}page=${encodeURIComponent(String(n))}&per_page=${encodeURIComponent(String(a))}`;
14100
14116
  return ee(o, xr(r));
14101
- }, jt = async (e, n, a, { includeSession: r = !1 } = {}) => {
14117
+ }, Bt = async (e, n, a, { includeSession: r = !1 } = {}) => {
14102
14118
  const i = n instanceof FormData ? n : new FormData();
14103
14119
  return r && !i.has("session_id") && i.append("session_id", Sl()), mt(e, i, xr(a));
14104
14120
  }, dn = async (e, n, a, { includeSession: r = !1 } = {}) => {
@@ -14117,7 +14133,7 @@ function Nm({ token: e }) {
14117
14133
  T.preventDefault();
14118
14134
  const D = new FormData(T.target);
14119
14135
  try {
14120
- await jt(ar.add, D, e), P.success("Success! Added new item.", { duration: 1e3 }), T.target.reset(), c();
14136
+ await Bt(ar.add, D, e), P.success("Success! Added new item.", { duration: 1e3 }), T.target.reset(), c();
14121
14137
  } catch (x) {
14122
14138
  P.error(x?.response?.data?.msg ?? x?.message ?? "Failed to add the new item.", { duration: 1500 });
14123
14139
  }
@@ -14264,7 +14280,7 @@ function Mm({ token: e }) {
14264
14280
  const k = new FormData();
14265
14281
  k.append("name", A.name ?? ""), (A.section ?? []).forEach((q) => k.append("section[]", String(q)));
14266
14282
  try {
14267
- await jt(oa.add, k, e), P.success("Success! Added new item.", { duration: 1e3 }), d.resetFields(), p();
14283
+ await Bt(oa.add, k, e), P.success("Success! Added new item.", { duration: 1e3 }), d.resetFields(), p();
14268
14284
  } catch (q) {
14269
14285
  P.error(q?.response?.data?.msg ?? q?.message ?? "Failed to add the new item.", { duration: 1500 });
14270
14286
  }
@@ -14594,7 +14610,7 @@ function Vm({ token: e }) {
14594
14610
  const f = new FormData();
14595
14611
  f.append("title", g.title ?? ""), f.append("description", g.description ?? ""), f.append("from", g.from ? oe(g.from).format("YYYY-MM-DD") : ""), f.append("to", g.to ? oe(g.to).format("YYYY-MM-DD") : "");
14596
14612
  try {
14597
- await jt(la.add, f, e, { includeSession: !0 }), P.success("Success! Added new item.", { duration: 1e3 }), d.resetFields(), S();
14613
+ await Bt(la.add, f, e, { includeSession: !0 }), P.success("Success! Added new item.", { duration: 1e3 }), d.resetFields(), S();
14598
14614
  } catch (v) {
14599
14615
  P.error(v?.response?.data?.msg ?? v?.message ?? "Failed to add the new item.", { duration: 1500 });
14600
14616
  }
@@ -14954,7 +14970,7 @@ function Jm({ token: e }) {
14954
14970
  const K = new FormData();
14955
14971
  K.append("teacher_id", String(n)), K.append("class_id", String(r)), K.append("section_id", String(o)), K.append("isClassTeacher", String(d ?? "No")), ta(m).forEach((ue) => K.append("subject_ids[]", String(ue))), ta(S).forEach((ue) => K.append("delete_subject[]", String(ue)));
14956
14972
  try {
14957
- await jt($n.assignClassToTeacher, K, e, { includeSession: !0 }), P.success("Success! Added new item.", { duration: 1e3 }), x(""), ie();
14973
+ await Bt($n.assignClassToTeacher, K, e, { includeSession: !0 }), P.success("Success! Added new item.", { duration: 1e3 }), x(""), ie();
14958
14974
  } catch (ue) {
14959
14975
  P.error(ue?.response?.data?.msg ?? ue?.message ?? "Failed to add the new item.", { duration: 1500 });
14960
14976
  }
@@ -15171,7 +15187,7 @@ function Xm({ token: e }) {
15171
15187
  const v = new FormData();
15172
15188
  v.append("title", f.title ?? ""), v.append("start_time_from", rn(f.start_time_from)), v.append("start_time_to", rn(f.start_time_to)), v.append("end_time_from", rn(f.end_time_from)), v.append("end_time_to", rn(f.end_time_to));
15173
15189
  try {
15174
- await jt(na.add, v, e), P.success("Success! Added new item.", { duration: 1e3 }), d.resetFields(), w();
15190
+ await Bt(na.add, v, e), P.success("Success! Added new item.", { duration: 1e3 }), d.resetFields(), w();
15175
15191
  } catch (A) {
15176
15192
  P.error(A?.response?.data?.msg ?? A?.message ?? "Failed to add the new item.", { duration: 1500 });
15177
15193
  }
@@ -15324,7 +15340,7 @@ function nf({ token: e }) {
15324
15340
  const H = new FormData();
15325
15341
  H.append("timegroup_id", String(r.value)), o.forEach((te) => H.append("class_ids[]", String(te)));
15326
15342
  try {
15327
- await jt(aa.assign, H, e), P.success("Success! Added new item.", { duration: 1e3 }), s([]), i(null), c(""), B();
15343
+ await Bt(aa.assign, H, e), P.success("Success! Added new item.", { duration: 1e3 }), s([]), i(null), c(""), B();
15328
15344
  } catch (te) {
15329
15345
  P.error(te?.response?.data?.msg ?? te?.message ?? "Failed to add the new item.", { duration: 1500 });
15330
15346
  }
@@ -15395,7 +15411,7 @@ function nf({ token: e }) {
15395
15411
  /* @__PURE__ */ l("div", { children: [
15396
15412
  /* @__PURE__ */ t("div", { style: { fontSize: 14, fontWeight: 500, marginBottom: 8 }, children: "Select Classes" }),
15397
15413
  /* @__PURE__ */ t(
15398
- Vt,
15414
+ Wt,
15399
15415
  {
15400
15416
  mode: "multiple",
15401
15417
  style: { width: "100%" },
@@ -15620,7 +15636,7 @@ function of({ token: e }) {
15620
15636
  render: (j, Y) => {
15621
15637
  const ie = String(Y?.id ?? ""), G = w.has(ie), H = !!C?.[ie], se = (y?.[ie] ?? {}).section_id ?? "", ye = Array.isArray(A) ? A : [];
15622
15638
  return /* @__PURE__ */ t(
15623
- Vt,
15639
+ Wt,
15624
15640
  {
15625
15641
  options: ye,
15626
15642
  placeholder: G && !H ? "Select Section" : "Section",
@@ -15872,7 +15888,7 @@ function df({ token: e }) {
15872
15888
  const k = new FormData(v.target);
15873
15889
  k.append("scholastic_catid", String(r)), k.append("class_id", String(o));
15874
15890
  try {
15875
- await jt(Nn.addSkill, k, e), P.success("Success! Added new item.", { duration: 1e3 }), v.target.reset(), s(null), w();
15891
+ await Bt(Nn.addSkill, k, e), P.success("Success! Added new item.", { duration: 1e3 }), v.target.reset(), s(null), w();
15876
15892
  } catch (q) {
15877
15893
  P.error(q?.response?.data?.msg ?? q?.message ?? "Failed to add the new item.", { duration: 1500 });
15878
15894
  }
@@ -16025,7 +16041,7 @@ function mf({ token: e }) {
16025
16041
  const se = new FormData();
16026
16042
  se.append("class_id", String(j)), se.append("section_id", String(Y)), se.append("sub_id", String(ie)), se.append("title", String(H)), se.append("remark", String(te)), se.append("status", String(G)), se.append("file", String(m));
16027
16043
  try {
16028
- await jt(as.add, se, e), P.success("Success! Added new item.", { duration: 1e3 }), b(!1), D();
16044
+ await Bt(as.add, se, e), P.success("Success! Added new item.", { duration: 1e3 }), b(!1), D();
16029
16045
  } catch (ye) {
16030
16046
  P.error(ye?.response?.data?.msg ?? ye?.message ?? "Failed to add the new item.", { duration: 1500 });
16031
16047
  }
@@ -16311,7 +16327,7 @@ function gf({
16311
16327
  }
16312
16328
  });
16313
16329
  try {
16314
- await jt(rs.addData, U, e), P.success("Success! Added new item.", { duration: 1e3 }), q(!1), _(null), f();
16330
+ await Bt(rs.addData, U, e), P.success("Success! Added new item.", { duration: 1e3 }), q(!1), _(null), f();
16315
16331
  } catch (j) {
16316
16332
  P.error(j?.response?.data?.msg ?? j?.message ?? "Failed to add the new item.", { duration: 1500 });
16317
16333
  }
@@ -16461,7 +16477,7 @@ function vf({ token: e }) {
16461
16477
  const I = new FormData();
16462
16478
  I.append("class_id", String(B)), I.append("sub_id", String(V)), I.append("title", String(z)), I.append("description", String(O)), I.append("file", String(S));
16463
16479
  try {
16464
- m?.id ? (I.append("id", String(m.id)), await jt(Qr.edit, I, e), P.success("Success! Updated item.", { duration: 1e3 })) : (await jt(Qr.add, I, e), P.success("Success! Added new item.", { duration: 1e3 })), b(!1), c(null), T();
16480
+ m?.id ? (I.append("id", String(m.id)), await Bt(Qr.edit, I, e), P.success("Success! Updated item.", { duration: 1e3 })) : (await Bt(Qr.add, I, e), P.success("Success! Added new item.", { duration: 1e3 })), b(!1), c(null), T();
16465
16481
  } catch (U) {
16466
16482
  P.error(U?.response?.data?.msg ?? U?.message ?? "Failed to save", { duration: 1500 });
16467
16483
  }
@@ -16975,7 +16991,7 @@ const ir = (e) => {
16975
16991
  String(n)
16976
16992
  )}&section_id=${encodeURIComponent(String(a))}` : null, { data: b, isLoading: m } = Q(d ? [d, e] : null, ([S, w]) => ee(S, w), { revalidateOnFocus: !1 }), c = E(() => ir(b?.data ?? b).map((w) => ({ value: w?.value ?? w?.id, label: w?.label ?? w?.name ?? w?.teacher_name ?? "" })), [b]);
16977
16993
  return /* @__PURE__ */ t(
16978
- Vt,
16994
+ Wt,
16979
16995
  {
16980
16996
  placeholder: s ? "-" : "Select Teacher",
16981
16997
  loading: m,
@@ -17202,7 +17218,7 @@ function Of({ token: e }) {
17202
17218
  key: "subject_id",
17203
17219
  width: 220,
17204
17220
  render: (_, F, $) => /* @__PURE__ */ t(
17205
- Vt,
17221
+ Wt,
17206
17222
  {
17207
17223
  placeholder: F?.is_break ? "-" : "Select Subject",
17208
17224
  disabled: !!F?.is_break,
@@ -17269,7 +17285,7 @@ function Of({ token: e }) {
17269
17285
  },
17270
17286
  children: /* @__PURE__ */ l("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))", gap: 20, alignItems: "end" }, children: [
17271
17287
  /* @__PURE__ */ t(W.Item, { label: "Class", required: !0, children: /* @__PURE__ */ t(
17272
- Vt,
17288
+ Wt,
17273
17289
  {
17274
17290
  placeholder: "Select Class",
17275
17291
  options: w,
@@ -17282,7 +17298,7 @@ function Of({ token: e }) {
17282
17298
  }
17283
17299
  ) }),
17284
17300
  /* @__PURE__ */ t(W.Item, { label: "Section", required: !0, children: /* @__PURE__ */ t(
17285
- Vt,
17301
+ Wt,
17286
17302
  {
17287
17303
  placeholder: "Select Section",
17288
17304
  options: y,
@@ -17370,7 +17386,7 @@ function Of({ token: e }) {
17370
17386
  extra: /* @__PURE__ */ l(Ue, { children: [
17371
17387
  /* @__PURE__ */ t(re.Text, { type: "secondary", children: "Day" }),
17372
17388
  /* @__PURE__ */ t(
17373
- Vt,
17389
+ Wt,
17374
17390
  {
17375
17391
  style: { width: 160 },
17376
17392
  value: a.dayKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ubk.erp.webpack",
3
- "version": "1.1.9",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",