@zimyo/manage 0.2.0 → 0.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/main.js CHANGED
@@ -21824,32 +21824,33 @@ const OTe = (e) => {
21824
21824
  top: 70,
21825
21825
  right: 40
21826
21826
  }, children: H.jsxs(DQ, { sx: { zIndex: 9999999 }, iconMapping: n === "error" ? { error: H.jsx(jxe, { fontSize: "inherit" }) } : { success: H.jsx(Nxe, { fontSize: "inherit" }) }, severity: n === "error" ? "error" : "success", onClose: r, children: [H.jsx(_Q, { children: n === "error" ? "Error" : "Success" }), H.jsx("span", { style: { fontSize: 16, fontWeight: 600 }, children: t })] }) });
21827
- }, TTe = ({ children: e, token: n, API_BASE_URL: t, ASSETS_BASE_URL: r, HRMS_BASE_URL: o }) => {
21828
- const { setSession: i } = Ob((d) => d), { alert: { message: a, type: s }, clearAlert: l } = aM((d) => d), c = Tb();
21827
+ }, TTe = ({ children: e, token: n, API_BASE_URL: t, ASSETS_BASE_URL: r, HRMS_BASE_URL: o, mode: i }) => {
21828
+ const { setSession: a } = Ob((p) => p), { alert: { message: s, type: l }, clearAlert: c } = aM((p) => p), d = Tb();
21829
21829
  return _p(Dh, {
21830
21830
  url: `${o}${Sye}`,
21831
21831
  isNativeEndpoint: !1,
21832
21832
  token: n
21833
21833
  }, "authenticateToken", {
21834
- onSuccess: (d) => {
21835
- var p;
21836
- return i({
21834
+ onSuccess: (p) => {
21835
+ var f;
21836
+ return a({
21837
21837
  token: n,
21838
- user: (p = d == null ? void 0 : d.data) == null ? void 0 : p.data,
21838
+ user: (f = p == null ? void 0 : p.data) == null ? void 0 : f.data,
21839
21839
  API_BASE_URL: t,
21840
21840
  ASSETS_BASE_URL: r,
21841
- HRMS_BASE_URL: o
21841
+ HRMS_BASE_URL: o,
21842
+ mode: i
21842
21843
  });
21843
21844
  },
21844
- onError: () => c("Error, while authenticateing the user!"),
21845
+ onError: () => d("Error, while authenticateing the user!"),
21845
21846
  enabled: !!o && !!n
21846
21847
  }), ue.useEffect(() => {
21847
- if (a) {
21848
- const d = setTimeout(l, 2e3);
21849
- return () => clearTimeout(d);
21848
+ if (s) {
21849
+ const p = setTimeout(c, 2e3);
21850
+ return () => clearTimeout(p);
21850
21851
  }
21851
- }, [a]), H.jsxs(H.Fragment, { children: [a && H.jsx(OTe, { message: a, type: s }), e] });
21852
- }, Xpt = ({ queryClient: e, token: n, API_BASE_URL: t, ASSETS_BASE_URL: r, HRMS_BASE_URL: o, children: i }) => H.jsx(R0e, { client: e, contextSharing: !0, children: H.jsx(TTe, { token: n, API_BASE_URL: t, ASSETS_BASE_URL: r, HRMS_BASE_URL: o, children: i }) }), ETe = "_card_container_1wpz6_1", MTe = "_card_count_1wpz6_25", kTe = "_card_subtitles_1wpz6_35", ITe = "_icons_background_1wpz6_45", PTe = "_listing_icons_1wpz6_63", RTe = "_sub_icons_background_1wpz6_85", Ki = {
21852
+ }, [s]), H.jsxs(H.Fragment, { children: [s && H.jsx(OTe, { message: s, type: l }), e] });
21853
+ }, Xpt = ({ queryClient: e, token: n, API_BASE_URL: t, ASSETS_BASE_URL: r, HRMS_BASE_URL: o, children: i, mode: a }) => H.jsx(R0e, { client: e, contextSharing: !0, children: H.jsx(TTe, { token: n, API_BASE_URL: t, ASSETS_BASE_URL: r, HRMS_BASE_URL: o, mode: a, children: i }) }), ETe = "_card_container_1wpz6_1", MTe = "_card_count_1wpz6_25", kTe = "_card_subtitles_1wpz6_35", ITe = "_icons_background_1wpz6_45", PTe = "_listing_icons_1wpz6_63", RTe = "_sub_icons_background_1wpz6_85", Ki = {
21853
21854
  card_container: ETe,
21854
21855
  card_count: MTe,
21855
21856
  card_subtitles: kTe,
@@ -78013,16 +78014,16 @@ Object.defineProperty(jr, "cashfreePayment", {
78013
78014
  enumerable: !0,
78014
78015
  configurable: !0,
78015
78016
  writable: !0,
78016
- value: (e, n, t, r) => xc(void 0, null, function* () {
78017
- let o = {
78017
+ value: (e, n, t, r, o) => xc(void 0, null, function* () {
78018
+ let i = {
78018
78019
  paymentSessionId: e,
78019
78020
  returnUrl: `${n}${_ye}/{order_id}`
78020
78021
  };
78021
78022
  (yield Rut({
78022
- mode: "sandbox"
78023
- //or production
78024
- })).checkout(o).then(function(a) {
78025
- a.error && r(a.error.message), a.redirect && t();
78023
+ mode: o
78024
+ //sandbox or production
78025
+ })).checkout(i).then(function(s) {
78026
+ s.error && r(s.error.message), s.redirect && t();
78026
78027
  });
78027
78028
  })
78028
78029
  });
@@ -82339,25 +82340,25 @@ const YA = {
82339
82340
  2: H.jsx(Wfe, { sx: { color: "#335AFF", fontSize: "1.5rem" } }),
82340
82341
  3: H.jsx(Hfe, { sx: { color: "#335AFF", fontSize: "1.5rem" } })
82341
82342
  }, Jpt = (e) => {
82342
- var p, f, m, h, g, v, b, x, w, O, C;
82343
- const { onTabChange: n } = e, { session: { API_BASE_URL: t } } = Ob(), r = Tb(), { data: o, isFetching: i } = _p(Dh, {
82343
+ var f, m, h, g, v, b, x, w, O, C, E;
82344
+ const { onTabChange: n } = e, { session: { API_BASE_URL: t, mode: r } } = Ob(), o = Tb(), { data: i, isFetching: a } = _p(Dh, {
82344
82345
  url: Eye,
82345
82346
  params: {}
82346
- }, "subsription-overview"), { handleSubmit: a, isDisabled: s, isLoading: l } = j5({
82347
+ }, "subsription-overview"), { handleSubmit: s, isDisabled: l, isLoading: c } = j5({
82347
82348
  url: CJ
82348
- }), c = () => {
82349
- const E = {
82350
- plan_id: o == null ? void 0 : o.plan_id,
82351
- add_on_id: o == null ? void 0 : o.add_on_id
82349
+ }), d = () => {
82350
+ const M = {
82351
+ plan_id: i == null ? void 0 : i.plan_id,
82352
+ add_on_id: i == null ? void 0 : i.add_on_id
82352
82353
  };
82353
- a(E, null, (M) => {
82354
- var P;
82355
- jr.cashfreePayment((P = M == null ? void 0 : M.data) == null ? void 0 : P.payment_session_id, t, () => {
82356
- }, r);
82354
+ s(M, null, (P) => {
82355
+ var A;
82356
+ jr.cashfreePayment((A = P == null ? void 0 : P.data) == null ? void 0 : A.payment_session_id, t, () => {
82357
+ }, o, r);
82357
82358
  }, null);
82358
- }, d = Mo(() => {
82359
- var M, P;
82360
- const { wallet: E = {} } = o != null ? o : {
82359
+ }, p = Mo(() => {
82360
+ var P, A;
82361
+ const { wallet: M = {} } = i != null ? i : {
82361
82362
  employee_details: {},
82362
82363
  wallet: {}
82363
82364
  };
@@ -82382,46 +82383,46 @@ const YA = {
82382
82383
  // },
82383
82384
  {
82384
82385
  label: "Wallet Balance",
82385
- count: `Rs ${(M = E == null ? void 0 : E.balance) != null ? M : "-"}`,
82386
- description: H.jsxs(H.Fragment, { children: [H.jsxs("span", { style: { color: "#009017" }, children: ["+ Rs ", (P = E == null ? void 0 : E.openingBalance) != null ? P : "- "] }), " ", "last gained"] }),
82386
+ count: `Rs ${(P = M == null ? void 0 : M.balance) != null ? P : "-"}`,
82387
+ description: H.jsxs(H.Fragment, { children: [H.jsxs("span", { style: { color: "#009017" }, children: ["+ Rs ", (A = M == null ? void 0 : M.openingBalance) != null ? A : "- "] }), " ", "last gained"] }),
82387
82388
  icon: H.jsx("span", { style: { background: "#FAC8001A", margin: "inherit" }, className: os.icons_background, children: H.jsx(_fe, { sx: { color: "#FAC800", fontSize: "2rem" } }) }),
82388
- progress: (E == null ? void 0 : E.percentage) * 100
82389
+ progress: (M == null ? void 0 : M.percentage) * 100
82389
82390
  }
82390
82391
  ];
82391
- }, [o]);
82392
- return H.jsxs("div", { className: "w-100", children: [H.jsx(Qb, { visible: i || l }), H.jsxs(In, { container: !0, spacing: 2, children: [d.map((E) => H.jsx(In, { item: !0, xs: 12, sm: 6, lg: 4, children: H.jsx(Xut, { data: E }) })), H.jsx(hdt, { orgDetails: o == null ? void 0 : o.orgInfo }), H.jsxs(In, { item: !0, xs: 12, sm: 6, lg: 8, children: [H.jsxs("div", { className: `${os.card_container}`, style: { marginBlockEnd: "1rem" }, children: [H.jsx("div", { className: "flex-between-center mb-10", children: H.jsx("span", { className: `${os.card_count}`, children: "Open Invoices" }) }), H.jsx(Ya, {}), H.jsxs("div", { className: "flex-between-center", children: [H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { children: "Due By" }), H.jsx("span", { className: `${os.card_subtitles}`, children: (f = (p = o == null ? void 0 : o.openInvoice) == null ? void 0 : p.due_by) != null ? f : "-" })] }), H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { children: "Amount" }), H.jsxs("span", { className: `${os.card_subtitles}`, children: ["Rs ", (h = (m = o == null ? void 0 : o.openInvoice) == null ? void 0 : m.Amount) != null ? h : "-"] })] }), H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { children: "Invoice" }), H.jsx("div", { style: { margin: "auto" }, children: H.jsx("span", { children: H.jsx(xdt, { style: { fontSize: "24px", color: "red" } }) }) })] }), H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", {}), H.jsx("span", { children: H.jsx(Hi, { disabled: s, label: "Pay Here", style: { height: "36px" }, onClick: c }) })] })] })] }), H.jsxs("div", { className: `${os.card_container} g-10`, style: { marginBlockEnd: "1rem" }, children: [H.jsxs("div", { className: "flex-between-center", children: [H.jsx("span", { className: `${os.card_count}`, children: "Plan Details" }), H.jsxs("div", { className: "flex-end-center g-10", children: [H.jsx(Hi, { label: "Upgrade Plan", endIcon: H.jsx(Ffe, {}), onClick: () => {
82392
+ }, [i]);
82393
+ return H.jsxs("div", { className: "w-100", children: [H.jsx(Qb, { visible: a || c }), H.jsxs(In, { container: !0, spacing: 2, children: [p.map((M) => H.jsx(In, { item: !0, xs: 12, sm: 6, lg: 4, children: H.jsx(Xut, { data: M }) })), H.jsx(hdt, { orgDetails: i == null ? void 0 : i.orgInfo }), H.jsxs(In, { item: !0, xs: 12, sm: 6, lg: 8, children: [H.jsxs("div", { className: `${os.card_container}`, style: { marginBlockEnd: "1rem" }, children: [H.jsx("div", { className: "flex-between-center mb-10", children: H.jsx("span", { className: `${os.card_count}`, children: "Open Invoices" }) }), H.jsx(Ya, {}), H.jsxs("div", { className: "flex-between-center", children: [H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { children: "Due By" }), H.jsx("span", { className: `${os.card_subtitles}`, children: (m = (f = i == null ? void 0 : i.openInvoice) == null ? void 0 : f.due_by) != null ? m : "-" })] }), H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { children: "Amount" }), H.jsxs("span", { className: `${os.card_subtitles}`, children: ["Rs ", (g = (h = i == null ? void 0 : i.openInvoice) == null ? void 0 : h.Amount) != null ? g : "-"] })] }), H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { children: "Invoice" }), H.jsx("div", { style: { margin: "auto" }, children: H.jsx("span", { children: H.jsx(xdt, { style: { fontSize: "24px", color: "red" } }) }) })] }), H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", {}), H.jsx("span", { children: H.jsx(Hi, { disabled: l, label: "Pay Here", style: { height: "36px" }, onClick: d }) })] })] })] }), H.jsxs("div", { className: `${os.card_container} g-10`, style: { marginBlockEnd: "1rem" }, children: [H.jsxs("div", { className: "flex-between-center", children: [H.jsx("span", { className: `${os.card_count}`, children: "Plan Details" }), H.jsxs("div", { className: "flex-end-center g-10", children: [H.jsx(Hi, { label: "Upgrade Plan", endIcon: H.jsx(Ffe, {}), onClick: () => {
82393
82394
  n(2);
82394
82395
  }, sx: { height: "2rem" } }), H.jsx(Hi, { label: "View Plan", variant: "outlined", onClick: () => {
82395
82396
  n(1);
82396
82397
  }, sx: { height: "2rem" } })] })] }), H.jsx(Ya, {}), H.jsx("div", { className: "flex-between-center", children: [
82397
82398
  {
82398
82399
  label: "Current Plan",
82399
- value: (g = o == null ? void 0 : o.planDetails) == null ? void 0 : g.current_plan,
82400
+ value: (v = i == null ? void 0 : i.planDetails) == null ? void 0 : v.current_plan,
82400
82401
  icon: H.jsx(w3, { sx: { color: "#335AFF", fontSize: "1.5rem" } })
82401
82402
  },
82402
82403
  {
82403
82404
  label: "Billing Cycle",
82404
- value: (v = o == null ? void 0 : o.planDetails) == null ? void 0 : v.billing_cycle,
82405
+ value: (b = i == null ? void 0 : i.planDetails) == null ? void 0 : b.billing_cycle,
82405
82406
  icon: H.jsx(Lfe, { sx: { color: "#335AFF", fontSize: "1.5rem" } })
82406
82407
  },
82407
82408
  {
82408
82409
  label: "Plan Cost",
82409
- value: `Rs ${(x = (b = o == null ? void 0 : o.planDetails) == null ? void 0 : b.plan_cost) != null ? x : "-"}`,
82410
+ value: `Rs ${(w = (x = i == null ? void 0 : i.planDetails) == null ? void 0 : x.plan_cost) != null ? w : "-"}`,
82410
82411
  icon: H.jsx(Bfe, { sx: { color: "#335AFF", fontSize: "1.5rem" } })
82411
82412
  },
82412
82413
  {
82413
82414
  label: "Plan Expiring",
82414
- value: (w = o == null ? void 0 : o.planDetails) == null ? void 0 : w.plan_expiring_date,
82415
+ value: (O = i == null ? void 0 : i.planDetails) == null ? void 0 : O.plan_expiring_date,
82415
82416
  icon: H.jsx(Vfe, { sx: { color: "#335AFF", fontSize: "1.5rem" } })
82416
82417
  }
82417
- ].map((E) => H.jsxs("div", { className: "flex-start-center g-10", children: [H.jsx("span", { style: { background: "#335AFF1A" }, className: `${os.sub_icons_background}`, children: E.icon }), H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { className: `${os.card_subtitles}`, children: E.value }), H.jsx("span", { children: E.label })] })] })) })] }), H.jsxs("div", { className: `${os.card_container}`, children: [H.jsxs("div", { className: "flex-between-center mb-10", children: [H.jsx("span", { className: `${os.card_count}`, children: "Add Ons" }), H.jsx("div", { className: "flex-end-center g-10", children: H.jsx(Hi, { label: "Add New Add Ons", variant: "outlined", startIcon: H.jsx(e1, {}), onClick: () => {
82418
+ ].map((M) => H.jsxs("div", { className: "flex-start-center g-10", children: [H.jsx("span", { style: { background: "#335AFF1A" }, className: `${os.sub_icons_background}`, children: M.icon }), H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { className: `${os.card_subtitles}`, children: M.value }), H.jsx("span", { children: M.label })] })] })) })] }), H.jsxs("div", { className: `${os.card_container}`, children: [H.jsxs("div", { className: "flex-between-center mb-10", children: [H.jsx("span", { className: `${os.card_count}`, children: "Add Ons" }), H.jsx("div", { className: "flex-end-center g-10", children: H.jsx(Hi, { label: "Add New Add Ons", variant: "outlined", startIcon: H.jsx(e1, {}), onClick: () => {
82418
82419
  n(2);
82419
- }, sx: { height: "2rem" } }) })] }), H.jsx(Ya, { className: "mb-10" }), H.jsx("div", { className: "flex-start-center g-20", style: { overflowX: "auto", overflowY: "hidden" }, children: jr.validateDataType(o == null ? void 0 : o.addOnProduct, No.ARRAY) ? o.addOnProduct.map((E) => H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { style: { background: "#335AFF1A" }, className: `${os.sub_icons_background}`, children: YA == null ? void 0 : YA[Math.floor(Math.random() * 4)] }), H.jsx("span", { className: `${os.card_subtitles}`, children: E })] })) : H.jsx(t0, { message: "No Add Ons Found" }) })] })] }), H.jsx(In, { item: !0, xs: 6, sm: 6, lg: 4, children: H.jsx("div", { className: `${os.card_container} g-10`, style: { height: "100%" }, children: jr.validateDataType(o == null ? void 0 : o.usageCredit, No.ARRAY) ? H.jsxs(H.Fragment, { children: [H.jsxs("span", { className: `${os.card_count}`, children: ["User Counts", " ", H.jsx(LM, { title: "Active Employees", children: H.jsxs("span", { children: ["(", (C = (O = o == null ? void 0 : o.employee_details) == null ? void 0 : O.active_employee) != null ? C : "--", ")"] }) })] }), H.jsx(mit, { type: Tut.COLUMN, data: o.usageCredit, xField: "APP_MODULE", yField: "TOTAL_USER_COUNT", xAxisTitle: "", styles: {
82420
+ }, sx: { height: "2rem" } }) })] }), H.jsx(Ya, { className: "mb-10" }), H.jsx("div", { className: "flex-start-center g-20", style: { overflowX: "auto", overflowY: "hidden" }, children: jr.validateDataType(i == null ? void 0 : i.addOnProduct, No.ARRAY) ? i.addOnProduct.map((M) => H.jsxs("div", { className: "flex-start-column g-10", children: [H.jsx("span", { style: { background: "#335AFF1A" }, className: `${os.sub_icons_background}`, children: YA == null ? void 0 : YA[Math.floor(Math.random() * 4)] }), H.jsx("span", { className: `${os.card_subtitles}`, children: M })] })) : H.jsx(t0, { message: "No Add Ons Found" }) })] })] }), H.jsx(In, { item: !0, xs: 6, sm: 6, lg: 4, children: H.jsx("div", { className: `${os.card_container} g-10`, style: { height: "100%" }, children: jr.validateDataType(i == null ? void 0 : i.usageCredit, No.ARRAY) ? H.jsxs(H.Fragment, { children: [H.jsxs("span", { className: `${os.card_count}`, children: ["User Counts", " ", H.jsx(LM, { title: "Active Employees", children: H.jsxs("span", { children: ["(", (E = (C = i == null ? void 0 : i.employee_details) == null ? void 0 : C.active_employee) != null ? E : "--", ")"] }) })] }), H.jsx(mit, { type: Tut.COLUMN, data: i.usageCredit, xField: "APP_MODULE", yField: "TOTAL_USER_COUNT", xAxisTitle: "", styles: {
82420
82421
  height: "310px",
82421
82422
  width: "100%"
82422
- }, defaultGroupBy: "", selectedGroupBy: "" }), H.jsx(In, { container: !0, spacing: 1, children: o.usageCredit.map((E) => {
82423
- var M, P;
82424
- return H.jsx(In, { item: !0, xs: 6, children: H.jsxs("div", { className: "flex-start-center g-10", children: [H.jsxs("span", { className: `${os.card_subtitles}`, children: [(M = E == null ? void 0 : E.APP_MODULE) != null ? M : "-", " :"] }), H.jsx("span", { children: (P = E == null ? void 0 : E.TOTAL_USER_COUNT) != null ? P : "-" })] }) });
82423
+ }, defaultGroupBy: "", selectedGroupBy: "" }), H.jsx(In, { container: !0, spacing: 1, children: i.usageCredit.map((M) => {
82424
+ var P, A;
82425
+ return H.jsx(In, { item: !0, xs: 6, children: H.jsxs("div", { className: "flex-start-center g-10", children: [H.jsxs("span", { className: `${os.card_subtitles}`, children: [(P = M == null ? void 0 : M.APP_MODULE) != null ? P : "-", " :"] }), H.jsx("span", { children: (A = M == null ? void 0 : M.TOTAL_USER_COUNT) != null ? A : "-" })] }) });
82425
82426
  }) })] }) : H.jsx(t0, { message: "No Records Found" }) }) })] })] });
82426
82427
  }, Gdt = "_card_container_t78fp_1", Ydt = "_plan_card_t78fp_25", Udt = "_discount_card_t78fp_53", Xdt = "_plan_total_count_t78fp_79", qdt = "_card_count_t78fp_89", Zdt = "_card_subtitles_t78fp_99", Kdt = "_icons_background_t78fp_109", Us = {
82427
82428
  card_container: Gdt,
@@ -82553,9 +82554,7 @@ const bpt = {
82553
82554
  }) : H.jsx(In, { item: !0, xs: 12, children: H.jsx(t0, { message: "No Add Ons Found" }) }), H.jsx(In, { item: !0, xs: 12, children: H.jsx("div", { className: "flex-between-center", children: H.jsx("span", { className: Sa.card_subtitles, children: "Add Ons" }) }) }), jr.validateDataType(i == null ? void 0 : i.add_on_product, No.OBJECT) ? Object.entries(i.add_on_product).map(([f, m]) => {
82554
82555
  var h, g, v, b, x;
82555
82556
  return H.jsx(In, { item: !0, xs: 12, sm: 6, md: 6, lg: 3, children: H.jsxs("div", { className: `${Sa.card_container} g-10 ${Sa.add_ons}`, style: {
82556
- /**@ts-ignore */
82557
82557
  backgroundColor: r.add_ons.includes(String((h = i == null ? void 0 : i.add_on_product_id) == null ? void 0 : h[f])) ? "#0055FF1A" : "",
82558
- /**@ts-ignore */
82559
82558
  border: r.add_ons.includes(String((g = i == null ? void 0 : i.add_on_product_id) == null ? void 0 : g[f])) ? "1px solid #335AFF" : ""
82560
82559
  }, children: [H.jsxs("div", { className: "flex-between-center g-10", children: [H.jsxs("div", { className: Sa.plan_headers, children: [H.jsx("span", { className: `${Sa.card_subtitles}`, children: f }), H.jsxs("span", { className: `${Sa.add_ons_title}`, children: ["Rs ", (b = (v = i == null ? void 0 : i.add_on_product_amount) == null ? void 0 : v[f]) != null ? b : "--", "/mth"] })] }), r.add_ons.includes(String((x = i == null ? void 0 : i.add_on_product_id) == null ? void 0 : x[f])) ? H.jsx(H.Fragment, {}) : (
82561
82560
  // <CustomButton
@@ -82591,62 +82590,62 @@ const bpt = {
82591
82590
  card_headers: Tpt,
82592
82591
  card_content: Ept
82593
82592
  }, Xfe = (e) => {
82594
- const { open: n, setIsOpen: t } = e, r = Tb(), { session: { API_BASE_URL: o } } = Ob(), i = FC(), [a, s] = Cn({
82593
+ const { open: n, setIsOpen: t } = e, r = Tb(), { session: { API_BASE_URL: o, mode: i } } = Ob(), a = FC(), [s, l] = Cn({
82595
82594
  amount: "",
82596
82595
  remarks: ""
82597
- }), { handleSubmit: l, isDisabled: c } = j5({
82596
+ }), { handleSubmit: c, isDisabled: d } = j5({
82598
82597
  url: Pye
82599
- }), d = () => {
82598
+ }), p = () => {
82600
82599
  t(!1);
82601
- }, p = () => {
82602
- if (!a.amount.length) {
82600
+ }, f = () => {
82601
+ if (!s.amount.length) {
82603
82602
  r("Please Enter Amount");
82604
82603
  return;
82605
82604
  }
82606
- const m = {
82607
- amount: a.amount,
82608
- remarks: a.remarks
82605
+ const h = {
82606
+ amount: s.amount,
82607
+ remarks: s.remarks
82609
82608
  };
82610
- l(m, null, (h) => {
82611
- var g;
82612
- i.invalidateQueries("transaction-history"), jr.cashfreePayment((g = h == null ? void 0 : h.data) == null ? void 0 : g.payment_session_id, o, d, r);
82609
+ c(h, null, (g) => {
82610
+ var v;
82611
+ a.invalidateQueries("transaction-history"), jr.cashfreePayment((v = g == null ? void 0 : g.data) == null ? void 0 : v.payment_session_id, o, p, r, i);
82613
82612
  }, null);
82614
- }, f = (m, h) => {
82615
- s((g) => Yn(Lt({}, g), {
82616
- [m]: h
82613
+ }, m = (h, g) => {
82614
+ l((v) => Yn(Lt({}, v), {
82615
+ [h]: g
82617
82616
  }));
82618
82617
  };
82619
- return H.jsx(ZF, { open: n, title: "Add Money", size: "xs", onModalclose: d, children: H.jsxs("div", { children: [H.jsx(Rp, { label: "Amount", name: "amount", required: !0, value: a.amount, onChange: (m) => {
82620
- const { name: h, value: g } = m.target;
82621
- (g === "" || /^[0-9\b]+$/.test(g)) && f(h, g);
82622
- }, className: "w-100 mb-10 mt-10" }), H.jsx(Rp, { label: "Remarks", name: "remarks", value: a.remarks, onChange: (m) => {
82623
- const { name: h, value: g } = m.target;
82624
- f(h, g);
82625
- }, className: "w-100 mb-10" }), H.jsxs("div", { className: "flex-end-center g-10", children: [H.jsx(Hi, { label: "Cancel", variant: "outlined", onClick: d }), H.jsx(Hi, { label: "Submit", disabled: c, onClick: p })] })] }) });
82618
+ return H.jsx(ZF, { open: n, title: "Add Money", size: "xs", onModalclose: p, children: H.jsxs("div", { children: [H.jsx(Rp, { label: "Amount", name: "amount", required: !0, value: s.amount, onChange: (h) => {
82619
+ const { name: g, value: v } = h.target;
82620
+ (v === "" || /^[0-9\b]+$/.test(v)) && m(g, v);
82621
+ }, className: "w-100 mb-10 mt-10" }), H.jsx(Rp, { label: "Remarks", name: "remarks", value: s.remarks, onChange: (h) => {
82622
+ const { name: g, value: v } = h.target;
82623
+ m(g, v);
82624
+ }, className: "w-100 mb-10" }), H.jsxs("div", { className: "flex-end-center g-10", children: [H.jsx(Hi, { label: "Cancel", variant: "outlined", onClick: p }), H.jsx(Hi, { label: "Submit", disabled: d, onClick: f })] })] }) });
82626
82625
  }, tft = (e) => {
82627
- const { onTabChange: n } = e, t = Tb(), { session: { API_BASE_URL: r } } = Ob(), [o, i] = Cn(!1), { data: a, isFetching: s } = _p(Dh, {
82626
+ const { onTabChange: n } = e, t = Tb(), { session: { API_BASE_URL: r, mode: o } } = Ob(), [i, a] = Cn(!1), { data: s, isFetching: l } = _p(Dh, {
82628
82627
  url: Mye,
82629
82628
  params: {}
82630
- }, "customer-subsription"), { handleSubmit: l, isDisabled: c, isLoading: d } = j5({
82629
+ }, "customer-subsription"), { handleSubmit: c, isDisabled: d, isLoading: p } = j5({
82631
82630
  url: CJ
82632
- }), p = () => {
82633
- i(!0);
82634
- }, f = () => {
82635
- const m = {
82636
- plan_id: a == null ? void 0 : a.plan_id,
82637
- add_on_id: a == null ? void 0 : a.add_on_product_id
82631
+ }), f = () => {
82632
+ a(!0);
82633
+ }, m = () => {
82634
+ const h = {
82635
+ plan_id: s == null ? void 0 : s.plan_id,
82636
+ add_on_id: s == null ? void 0 : s.add_on_product_id
82638
82637
  };
82639
- l(m, null, (h) => {
82640
- var g;
82641
- jr.cashfreePayment((g = h == null ? void 0 : h.data) == null ? void 0 : g.payment_session_id, r, () => {
82642
- }, t);
82638
+ c(h, null, (g) => {
82639
+ var v;
82640
+ jr.cashfreePayment((v = g == null ? void 0 : g.data) == null ? void 0 : v.payment_session_id, r, () => {
82641
+ }, t, o);
82643
82642
  }, null);
82644
82643
  };
82645
- return H.jsxs("div", { children: [H.jsx(Qb, { visible: s || d }), H.jsxs(In, { container: !0, spacing: 2, children: [H.jsx(In, { item: !0, xs: 12, children: H.jsx("div", { className: "flex-end-center", children: H.jsx(Hi, { label: "Top Up Wallet", startIcon: H.jsx(e1, {}), onClick: () => {
82646
- p();
82647
- } }) }) }), jr.validateDataType(a == null ? void 0 : a.header, No.ARRAY) ? a == null ? void 0 : a.header.map((m) => H.jsx(In, { item: !0, xs: 12, sm: 12, md: 4, lg: 4, children: H.jsxs("div", { className: Gm.card_container, children: [H.jsx("div", { className: Gm.card_headers, children: H.jsx("span", { className: Gm.card_titles, style: { color: "#335AFF" }, children: m }) }), H.jsx(Ya, { className: "mb-10" }), jr.validateDataType(a == null ? void 0 : a.resultRows, No.ARRAY) ? a.resultRows.map((h, g, v) => H.jsxs(H.Fragment, { children: [H.jsx("div", { className: Gm.card_content, children: jr.validateDataType(h == null ? void 0 : h[m], No.ARRAY) ? h == null ? void 0 : h[m].map((b) => H.jsx(H.Fragment, { children: H.jsx("span", { className: `${m === "Plan" ? Gm.card_titles : ""}`, children: m === "Price" ? `Rs ${b}` : b }) })) : H.jsx(H.Fragment, {}) }), g !== v.length - 1 ? H.jsx(Ya, { className: "mb-10" }) : H.jsx(H.Fragment, {})] })) : H.jsx(H.Fragment, {})] }) })) : H.jsx(t0, { message: "No Plans Found" }), jr.validateDataType(a == null ? void 0 : a.subtotal, No.ARRAY) ? a.subtotal.map((m) => H.jsxs(In, { item: !0, xs: 12, children: [H.jsxs("div", { className: `flex-between-center mb-10 ${m.name === "Total" ? Gm.card_subtitles : Gm.card_subtotal}`, children: [H.jsx("span", { children: m.name }), H.jsxs("span", { children: ["Rs ", m.amount] })] }), H.jsx(Ya, {})] })) : H.jsx(H.Fragment, {}), H.jsx(In, { item: !0, xs: 12, children: H.jsxs("div", { className: "flex-end-center g-10", children: [H.jsx(Hi, { label: "Renew", variant: "outlined", disabled: c, onClick: f }), H.jsx(Hi, { label: "Modify Subscription", onClick: () => {
82644
+ return H.jsxs("div", { children: [H.jsx(Qb, { visible: l || p }), H.jsxs(In, { container: !0, spacing: 2, children: [H.jsx(In, { item: !0, xs: 12, children: H.jsx("div", { className: "flex-end-center", children: H.jsx(Hi, { label: "Top Up Wallet", startIcon: H.jsx(e1, {}), onClick: () => {
82645
+ f();
82646
+ } }) }) }), jr.validateDataType(s == null ? void 0 : s.header, No.ARRAY) ? s == null ? void 0 : s.header.map((h) => H.jsx(In, { item: !0, xs: 12, sm: 12, md: 4, lg: 4, children: H.jsxs("div", { className: Gm.card_container, children: [H.jsx("div", { className: Gm.card_headers, children: H.jsx("span", { className: Gm.card_titles, style: { color: "#335AFF" }, children: h }) }), H.jsx(Ya, { className: "mb-10" }), jr.validateDataType(s == null ? void 0 : s.resultRows, No.ARRAY) ? s.resultRows.map((g, v, b) => H.jsxs(H.Fragment, { children: [H.jsx("div", { className: Gm.card_content, children: jr.validateDataType(g == null ? void 0 : g[h], No.ARRAY) ? g == null ? void 0 : g[h].map((x) => H.jsx(H.Fragment, { children: H.jsx("span", { className: `${h === "Plan" ? Gm.card_titles : ""}`, children: h === "Price" ? `Rs ${x}` : x }) })) : H.jsx(H.Fragment, {}) }), v !== b.length - 1 ? H.jsx(Ya, { className: "mb-10" }) : H.jsx(H.Fragment, {})] })) : H.jsx(H.Fragment, {})] }) })) : H.jsx(t0, { message: "No Plans Found" }), jr.validateDataType(s == null ? void 0 : s.subtotal, No.ARRAY) ? s.subtotal.map((h) => H.jsxs(In, { item: !0, xs: 12, children: [H.jsxs("div", { className: `flex-between-center mb-10 ${h.name === "Total" ? Gm.card_subtitles : Gm.card_subtotal}`, children: [H.jsx("span", { children: h.name }), H.jsxs("span", { children: ["Rs ", h.amount] })] }), H.jsx(Ya, {})] })) : H.jsx(H.Fragment, {}), H.jsx(In, { item: !0, xs: 12, children: H.jsxs("div", { className: "flex-end-center g-10", children: [H.jsx(Hi, { label: "Renew", variant: "outlined", disabled: d, onClick: m }), H.jsx(Hi, { label: "Modify Subscription", onClick: () => {
82648
82647
  n(2);
82649
- } })] }) })] }), o && H.jsx(Xfe, { open: o, setIsOpen: i })] });
82648
+ } })] }) })] }), i && H.jsx(Xfe, { open: i, setIsOpen: a })] });
82650
82649
  }, Mpt = "_card_container_16wzw_1", kpt = "_card_count_16wzw_25", Ipt = "_card_subtitles_16wzw_35", Ppt = "_icons_background_16wzw_45", Rpt = "_credit_card_16wzw_67", Apt = "_circle_16wzw_81", Dpt = "_circle1_16wzw_99", _pt = "_circle2_16wzw_111", Npt = "_circle_container_16wzw_123", jpt = "_credit_card_holder_name_16wzw_143", Fpt = "_credit_card_holder_name_absolute_16wzw_165", xu = {
82651
82650
  card_container: Mpt,
82652
82651
  card_count: kpt,
@@ -7,6 +7,7 @@ interface AuthProviderProps {
7
7
  ASSETS_BASE_URL: string;
8
8
  children: ReactNode;
9
9
  HRMS_BASE_URL: string;
10
+ mode: string;
10
11
  }
11
- declare const ManageProvider: ({ queryClient, token, API_BASE_URL, ASSETS_BASE_URL, HRMS_BASE_URL, children, }: AuthProviderProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const ManageProvider: ({ queryClient, token, API_BASE_URL, ASSETS_BASE_URL, HRMS_BASE_URL, children, mode }: AuthProviderProps) => import("react/jsx-runtime").JSX.Element;
12
13
  export default ManageProvider;
@@ -1,9 +1,10 @@
1
1
  import { ReactNode } from "react";
2
- declare const AuthProvider: ({ children, token, API_BASE_URL, ASSETS_BASE_URL, HRMS_BASE_URL, }: {
2
+ declare const AuthProvider: ({ children, token, API_BASE_URL, ASSETS_BASE_URL, HRMS_BASE_URL, mode, }: {
3
3
  token: string;
4
4
  API_BASE_URL: string;
5
5
  ASSETS_BASE_URL: string;
6
6
  children: ReactNode;
7
7
  HRMS_BASE_URL: string;
8
+ mode: string;
8
9
  }) => import("react/jsx-runtime").JSX.Element;
9
10
  export default AuthProvider;
@@ -16,5 +16,5 @@ export declare class util {
16
16
  };
17
17
  static convertToMinutes: (timeString: string) => number;
18
18
  static getDarkenColor: (color: string, factor?: number) => string;
19
- static cashfreePayment: (sessionId: string, BASE_URL: string | undefined, suceesCallback: () => void, errorCallback: (value: string) => void) => Promise<void>;
19
+ static cashfreePayment: (sessionId: string, BASE_URL: string | undefined, suceesCallback: () => void, errorCallback: (value: string) => void, mode?: string) => Promise<void>;
20
20
  }
@@ -4,6 +4,7 @@ export type State = {
4
4
  token?: string;
5
5
  API_BASE_URL?: string;
6
6
  ASSETS_BASE_URL?: string;
7
+ mode?: string;
7
8
  };
8
9
  };
9
10
  type Actions = {
@@ -13,6 +14,7 @@ type Actions = {
13
14
  API_BASE_URL: string;
14
15
  ASSETS_BASE_URL: string;
15
16
  HRMS_BASE_URL: string;
17
+ mode?: string;
16
18
  }) => void;
17
19
  clearSession: () => void;
18
20
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zimyo/manage",
3
3
  "private": false,
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"