warqadui 0.0.90 → 0.0.91

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 (3) hide show
  1. package/dist/index.js +309 -311
  2. package/dist/index.mjs +312 -314
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -8080,126 +8080,19 @@ var AdminProtectedRoute = () => {
8080
8080
  };
8081
8081
 
8082
8082
  // src/components/accounts/Accounts.tsx
8083
- import { useNavigate as useNavigate4, useParams } from "react-router-dom";
8083
+ import { Navigate as Navigate2, useNavigate as useNavigate4, useParams } from "react-router-dom";
8084
8084
  import { Cable, EllipsisVertical, FilePenLine, Trash2 as Trash22 } from "lucide-react";
8085
8085
  import { useState as useState26 } from "react";
8086
8086
  import { message as message4 } from "antd";
8087
-
8088
- // src/components/ErrorPage/ErrorPage.tsx
8089
- import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
8090
- var ErrorPageBase = ({
8091
- title,
8092
- message: message16,
8093
- statusCode,
8094
- action,
8095
- className = ""
8096
- }) => {
8097
- return /* @__PURE__ */ jsx43(
8098
- "div",
8099
- {
8100
- className: `flex-1 m-auto h-full w-full min-h-[50vh] flex flex-col items-center justify-center p-6 text-zinc-900 dark:text-zinc-100 ${className}`,
8101
- children: /* @__PURE__ */ jsxs33("div", { className: "relative flex flex-col items-center justify-center w-full max-w-2xl text-center", children: [
8102
- statusCode && /* @__PURE__ */ jsx43("div", { className: "absolute inset-0 flex items-center justify-center z-0 select-none pointer-events-none opacity-[0.03] dark:opacity-5", children: /* @__PURE__ */ jsx43("span", { className: "text-[12rem] sm:text-[16rem] md:text-[20rem] font-bold leading-none tracking-tighter", children: statusCode }) }),
8103
- /* @__PURE__ */ jsxs33("div", { className: "relative z-10 space-y-6", children: [
8104
- statusCode && /* @__PURE__ */ jsxs33("h2", { className: "text-xl md:text-2xl font-semibold text-zinc-500 dark:text-zinc-400", children: [
8105
- "Error ",
8106
- statusCode
8107
- ] }),
8108
- title && /* @__PURE__ */ jsx43("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight drop-shadow-sm", children: title }),
8109
- message16 && /* @__PURE__ */ jsx43("p", { className: "text-lg md:text-xl text-zinc-600 dark:text-zinc-400 max-w-md mx-auto", children: message16 }),
8110
- action && /* @__PURE__ */ jsx43("div", { className: "pt-8", children: /* @__PURE__ */ jsx43(
8111
- "button",
8112
- {
8113
- onClick: action.onClick,
8114
- className: "px-8 py-3.5 rounded-full text-white font-semibold shadow-[0_4px_14px_0_rgba(0,0,0,0.1)] hover:shadow-[0_6px_20px_rgba(0,0,0,0.15)] transition-all hover:-translate-y-0.5 active:translate-y-0 focus:outline-none focus:ring-2 focus:ring-offset-2",
8115
- style: { backgroundColor: "var(--primary-color, #3b82f6)" },
8116
- children: action.label
8117
- }
8118
- ) })
8119
- ] })
8120
- ] })
8121
- }
8122
- );
8123
- };
8124
-
8125
- // src/components/ErrorPage/ErrorPage.500.tsx
8126
- import { jsx as jsx44 } from "react/jsx-runtime";
8127
- var ErrorPage500 = (props) => {
8128
- return /* @__PURE__ */ jsx44(
8129
- ErrorPageBase,
8130
- {
8131
- statusCode: 500,
8132
- title: "Internal Server Error",
8133
- message: "Oops, something went wrong on our end. Please try again later.",
8134
- action: { label: "Go Home", onClick: () => window.location.href = "/" },
8135
- ...props
8136
- }
8137
- );
8138
- };
8139
-
8140
- // src/components/ErrorPage/ErrorPage.404.tsx
8141
- import { jsx as jsx45 } from "react/jsx-runtime";
8142
- var ErrorPage404 = (props) => {
8143
- return /* @__PURE__ */ jsx45(
8144
- ErrorPageBase,
8145
- {
8146
- statusCode: 404,
8147
- title: "Page Not Found",
8148
- message: "The page you are looking for doesn't exist or has been moved.",
8149
- action: { label: "Go Home", onClick: () => window.location.href = "/" },
8150
- ...props
8151
- }
8152
- );
8153
- };
8154
-
8155
- // src/components/ErrorPage/ErrorPage.401.tsx
8156
- import { jsx as jsx46 } from "react/jsx-runtime";
8157
- var ErrorPage401 = (props) => {
8158
- return /* @__PURE__ */ jsx46(
8159
- ErrorPageBase,
8160
- {
8161
- statusCode: 401,
8162
- title: "Unauthorized",
8163
- message: "You don't have permission to access this page.",
8164
- action: { label: "Go Home", onClick: () => window.location.href = "/" },
8165
- ...props
8166
- }
8167
- );
8168
- };
8169
-
8170
- // src/components/ErrorPage/ErrorPage.400.tsx
8171
- import { jsx as jsx47 } from "react/jsx-runtime";
8172
- var ErrorPage400 = (props) => {
8173
- return /* @__PURE__ */ jsx47(
8174
- ErrorPageBase,
8175
- {
8176
- statusCode: 400,
8177
- title: "Bad Request",
8178
- message: "Your request could not be processed. Please try again.",
8179
- action: { label: "Go Home", onClick: () => window.location.href = "/" },
8180
- ...props
8181
- }
8182
- );
8183
- };
8184
-
8185
- // src/components/ErrorPage/index.ts
8186
- var ErrorPage = Object.assign(ErrorPageBase, {
8187
- 500: ErrorPage500,
8188
- 404: ErrorPage404,
8189
- 401: ErrorPage401,
8190
- 400: ErrorPage400
8191
- });
8192
-
8193
- // src/components/accounts/Accounts.tsx
8194
- import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
8195
- var ErrorPage5002 = ErrorPage[500];
8087
+ import { Fragment as Fragment9, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
8196
8088
  function Accounts({ v, url }) {
8197
8089
  const { enums } = useWarqadConfig();
8198
8090
  const { branchId } = useParams();
8199
8091
  const navigate = useNavigate4();
8200
8092
  const { type } = useParams();
8201
8093
  if (!enums.accountTypes.includes(type)) {
8202
- return /* @__PURE__ */ jsx48(ErrorPage5002, { title: `${type} page not found` });
8094
+ message4.error("Invalid account type");
8095
+ return /* @__PURE__ */ jsx43(Navigate2, { to: "/accounts", replace: true });
8203
8096
  }
8204
8097
  const [deleteAccount, setDeleteAccount] = useState26(null);
8205
8098
  const { isLoading, remove } = useApis_default();
@@ -8213,17 +8106,17 @@ function Accounts({ v, url }) {
8213
8106
  const items = (data2) => [
8214
8107
  {
8215
8108
  label: `Edit ${type}`,
8216
- icon: /* @__PURE__ */ jsx48(FilePenLine, { size: 16 }),
8109
+ icon: /* @__PURE__ */ jsx43(FilePenLine, { size: 16 }),
8217
8110
  onClick: () => navigate(`update?id=${data2?._id}`)
8218
8111
  },
8219
8112
  {
8220
8113
  label: `Delete ${type}`,
8221
- icon: /* @__PURE__ */ jsx48(Trash22, { className: "text-red-500", size: 16 }),
8114
+ icon: /* @__PURE__ */ jsx43(Trash22, { className: "text-red-500", size: 16 }),
8222
8115
  onClick: () => setDeleteAccount(data2)
8223
8116
  },
8224
8117
  isEmployee && !data2?.user && {
8225
8118
  label: `Link User`,
8226
- icon: /* @__PURE__ */ jsx48(Cable, { size: 16 }),
8119
+ icon: /* @__PURE__ */ jsx43(Cable, { size: 16 }),
8227
8120
  onClick: () => navigate(`link-user?id=${data2?._id}`)
8228
8121
  }
8229
8122
  ].filter(Boolean);
@@ -8233,7 +8126,7 @@ function Accounts({ v, url }) {
8233
8126
  header: "Name",
8234
8127
  cell: ({ row }) => {
8235
8128
  const account = row.original;
8236
- return /* @__PURE__ */ jsx48("span", { children: account?.name });
8129
+ return /* @__PURE__ */ jsx43("span", { children: account?.name });
8237
8130
  }
8238
8131
  },
8239
8132
  {
@@ -8241,7 +8134,7 @@ function Accounts({ v, url }) {
8241
8134
  header: "Sex",
8242
8135
  cell: ({ row }) => {
8243
8136
  const account = row.original;
8244
- return /* @__PURE__ */ jsx48("span", { children: account?.sex });
8137
+ return /* @__PURE__ */ jsx43("span", { children: account?.sex });
8245
8138
  }
8246
8139
  },
8247
8140
  {
@@ -8249,7 +8142,7 @@ function Accounts({ v, url }) {
8249
8142
  header: "Email",
8250
8143
  cell: ({ row }) => {
8251
8144
  const account = row.original;
8252
- return /* @__PURE__ */ jsx48("span", { children: account?.email || "N/A" });
8145
+ return /* @__PURE__ */ jsx43("span", { children: account?.email || "N/A" });
8253
8146
  }
8254
8147
  },
8255
8148
  {
@@ -8257,7 +8150,7 @@ function Accounts({ v, url }) {
8257
8150
  header: "Phone",
8258
8151
  cell: ({ row }) => {
8259
8152
  const account = row.original;
8260
- return /* @__PURE__ */ jsx48("span", { children: account?.phoneNumber || "N/A" });
8153
+ return /* @__PURE__ */ jsx43("span", { children: account?.phoneNumber || "N/A" });
8261
8154
  }
8262
8155
  },
8263
8156
  isEmployee && {
@@ -8265,7 +8158,7 @@ function Accounts({ v, url }) {
8265
8158
  header: "User",
8266
8159
  cell: ({ row }) => {
8267
8160
  const account = row.original;
8268
- return /* @__PURE__ */ jsx48(Badge, { variant: account?.user ? "success" : "danger", size: "sm", children: account?.user ? "Linked" : "Not Linked" });
8161
+ return /* @__PURE__ */ jsx43(Badge, { variant: account?.user ? "success" : "danger", size: "sm", children: account?.user ? "Linked" : "Not Linked" });
8269
8162
  }
8270
8163
  },
8271
8164
  {
@@ -8273,13 +8166,13 @@ function Accounts({ v, url }) {
8273
8166
  header: "Actions",
8274
8167
  cell: ({ row }) => {
8275
8168
  const data2 = row.original;
8276
- return /* @__PURE__ */ jsx48(
8169
+ return /* @__PURE__ */ jsx43(
8277
8170
  Dropdown,
8278
8171
  {
8279
8172
  className: "cursor-pointer w-[150px]",
8280
8173
  items: items(data2),
8281
8174
  triggerMode: "hover",
8282
- children: /* @__PURE__ */ jsx48(EllipsisVertical, {})
8175
+ children: /* @__PURE__ */ jsx43(EllipsisVertical, {})
8283
8176
  }
8284
8177
  );
8285
8178
  }
@@ -8297,9 +8190,9 @@ function Accounts({ v, url }) {
8297
8190
  return error;
8298
8191
  }
8299
8192
  };
8300
- return /* @__PURE__ */ jsxs34(Fragment9, { children: [
8301
- /* @__PURE__ */ jsx48(Modal2, {}),
8302
- /* @__PURE__ */ jsx48(
8193
+ return /* @__PURE__ */ jsxs33(Fragment9, { children: [
8194
+ /* @__PURE__ */ jsx43(Modal2, {}),
8195
+ /* @__PURE__ */ jsx43(
8303
8196
  ConfirmModal,
8304
8197
  {
8305
8198
  isOpen: !!deleteAccount,
@@ -8312,7 +8205,7 @@ function Accounts({ v, url }) {
8312
8205
  children: null
8313
8206
  }
8314
8207
  ),
8315
- /* @__PURE__ */ jsx48(
8208
+ /* @__PURE__ */ jsx43(
8316
8209
  TransactionViewComponent,
8317
8210
  {
8318
8211
  columns,
@@ -8405,7 +8298,7 @@ var Formats_default = Formats;
8405
8298
 
8406
8299
  // src/hooks/useAccountBalance.tsx
8407
8300
  import { useEffect as useEffect19, useState as useState27 } from "react";
8408
- import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
8301
+ import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
8409
8302
  var useAccountbalance = ({
8410
8303
  url,
8411
8304
  showBalance,
@@ -8439,15 +8332,15 @@ var useAccountbalance = ({
8439
8332
  return null;
8440
8333
  }
8441
8334
  if (isLoading) {
8442
- return /* @__PURE__ */ jsx49("h2", { className: "text-gray-500", children: "Getting Balance..." });
8335
+ return /* @__PURE__ */ jsx44("h2", { className: "text-gray-500", children: "Getting Balance..." });
8443
8336
  }
8444
8337
  if (error) {
8445
- return /* @__PURE__ */ jsxs35("h2", { className: "text-red-500", children: [
8338
+ return /* @__PURE__ */ jsxs34("h2", { className: "text-red-500", children: [
8446
8339
  "Error: ",
8447
8340
  error
8448
8341
  ] });
8449
8342
  }
8450
- return /* @__PURE__ */ jsxs35(
8343
+ return /* @__PURE__ */ jsxs34(
8451
8344
  "h2",
8452
8345
  {
8453
8346
  className: `${balance.startsWith("-") ? "text-red-500" : "text-green-500"}`,
@@ -8464,7 +8357,7 @@ var useAccountBalance_default = useAccountbalance;
8464
8357
 
8465
8358
  // src/components/accounts/Feilds/Account.tsx
8466
8359
  import { useParams as useParams3 } from "react-router-dom";
8467
- import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
8360
+ import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
8468
8361
  function Account({
8469
8362
  name,
8470
8363
  label,
@@ -8484,8 +8377,8 @@ function Account({
8484
8377
  showBalance,
8485
8378
  accountId
8486
8379
  });
8487
- return /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-2", children: [
8488
- /* @__PURE__ */ jsx50(
8380
+ return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-2", children: [
8381
+ /* @__PURE__ */ jsx45(
8489
8382
  Fields_default.SearchApi,
8490
8383
  {
8491
8384
  name,
@@ -8502,13 +8395,13 @@ function Account({
8502
8395
  disabled
8503
8396
  }
8504
8397
  ),
8505
- /* @__PURE__ */ jsx50(BalanceView, {})
8398
+ /* @__PURE__ */ jsx45(BalanceView, {})
8506
8399
  ] });
8507
8400
  }
8508
8401
  var Account_default = Account;
8509
8402
 
8510
8403
  // src/components/accounts/Feilds/Customers.tsx
8511
- import { jsx as jsx51 } from "react/jsx-runtime";
8404
+ import { jsx as jsx46 } from "react/jsx-runtime";
8512
8405
  function Customer({
8513
8406
  name = "customer",
8514
8407
  label = "Customer",
@@ -8521,7 +8414,7 @@ function Customer({
8521
8414
  disabled,
8522
8415
  v
8523
8416
  }) {
8524
- return /* @__PURE__ */ jsx51(
8417
+ return /* @__PURE__ */ jsx46(
8525
8418
  Account_default,
8526
8419
  {
8527
8420
  name,
@@ -8540,7 +8433,7 @@ function Customer({
8540
8433
  var Customers_default = Customer;
8541
8434
 
8542
8435
  // src/components/accounts/Feilds/Employee.tsx
8543
- import { jsx as jsx52 } from "react/jsx-runtime";
8436
+ import { jsx as jsx47 } from "react/jsx-runtime";
8544
8437
  function Employee({
8545
8438
  name = "employee",
8546
8439
  label = "Employee",
@@ -8553,7 +8446,7 @@ function Employee({
8553
8446
  disabled,
8554
8447
  v
8555
8448
  }) {
8556
- return /* @__PURE__ */ jsx52(
8449
+ return /* @__PURE__ */ jsx47(
8557
8450
  Account_default,
8558
8451
  {
8559
8452
  name,
@@ -8572,7 +8465,7 @@ function Employee({
8572
8465
  var Employee_default = Employee;
8573
8466
 
8574
8467
  // src/components/accounts/Feilds/Branches.tsx
8575
- import { jsx as jsx53 } from "react/jsx-runtime";
8468
+ import { jsx as jsx48 } from "react/jsx-runtime";
8576
8469
  function Branches({
8577
8470
  name = "branch",
8578
8471
  label = "Branch",
@@ -8585,7 +8478,7 @@ function Branches({
8585
8478
  v,
8586
8479
  disabled
8587
8480
  }) {
8588
- return /* @__PURE__ */ jsx53(
8481
+ return /* @__PURE__ */ jsx48(
8589
8482
  Account_default,
8590
8483
  {
8591
8484
  name,
@@ -8613,9 +8506,8 @@ var AccountFields = {
8613
8506
  var Feilds_default = AccountFields;
8614
8507
 
8615
8508
  // src/components/accounts/AccountForm.tsx
8616
- import { useParams as useParams4 } from "react-router-dom";
8617
- import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
8618
- var ErrorPage5003 = ErrorPage[500];
8509
+ import { Navigate as Navigate3, useParams as useParams4 } from "react-router-dom";
8510
+ import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
8619
8511
  function AccountForm() {
8620
8512
  const { enums } = useWarqadConfig();
8621
8513
  const { branchId } = useParams4();
@@ -8624,7 +8516,8 @@ function AccountForm() {
8624
8516
  const type = getParams("type");
8625
8517
  const isEdit = !!id;
8626
8518
  if (!enums.accountTypes.includes(type)) {
8627
- return /* @__PURE__ */ jsx54(ErrorPage5003, { title: `${type} page not found` });
8519
+ message5.error("Invalid account type");
8520
+ return /* @__PURE__ */ jsx49(Navigate3, { to: "/accounts", replace: true });
8628
8521
  }
8629
8522
  const { post, put, isLoading } = useApis_default();
8630
8523
  const { isLoading: isLoadingGet, get } = useApis_default();
@@ -8679,24 +8572,24 @@ function AccountForm() {
8679
8572
  fetches();
8680
8573
  }
8681
8574
  }, [id]);
8682
- return /* @__PURE__ */ jsxs37(
8575
+ return /* @__PURE__ */ jsxs36(
8683
8576
  Card,
8684
8577
  {
8685
8578
  className: "max-w-4xl mx-auto mt-10 relative",
8686
8579
  isLoading: isLoadingGet,
8687
8580
  loadingText: "Processing...",
8688
8581
  children: [
8689
- /* @__PURE__ */ jsxs37(Card.Header, { children: [
8690
- /* @__PURE__ */ jsx54(Card.Title, { children: `${isEdit ? "Edit" : "Add"} ${type}` }),
8691
- /* @__PURE__ */ jsx54(Card.Description, { children: isEdit ? `Update the details for this ${type}` : `Create a new ${type} and add it to your list` })
8582
+ /* @__PURE__ */ jsxs36(Card.Header, { children: [
8583
+ /* @__PURE__ */ jsx49(Card.Title, { children: `${isEdit ? "Edit" : "Add"} ${type}` }),
8584
+ /* @__PURE__ */ jsx49(Card.Description, { children: isEdit ? `Update the details for this ${type}` : `Create a new ${type} and add it to your list` })
8692
8585
  ] }),
8693
- /* @__PURE__ */ jsx54(Card.Content, { children: /* @__PURE__ */ jsxs37(
8586
+ /* @__PURE__ */ jsx49(Card.Content, { children: /* @__PURE__ */ jsxs36(
8694
8587
  "form",
8695
8588
  {
8696
8589
  onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)),
8697
8590
  children: [
8698
- /* @__PURE__ */ jsxs37("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
8699
- /* @__PURE__ */ jsx54(
8591
+ /* @__PURE__ */ jsxs36("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
8592
+ /* @__PURE__ */ jsx49(
8700
8593
  Fields_default.Input,
8701
8594
  {
8702
8595
  label: "Name",
@@ -8707,7 +8600,7 @@ function AccountForm() {
8707
8600
  required: true
8708
8601
  }
8709
8602
  ),
8710
- /* @__PURE__ */ jsx54(
8603
+ /* @__PURE__ */ jsx49(
8711
8604
  Fields_default.Select,
8712
8605
  {
8713
8606
  label: "Sex",
@@ -8716,7 +8609,7 @@ function AccountForm() {
8716
8609
  enumName: "sex"
8717
8610
  }
8718
8611
  ),
8719
- /* @__PURE__ */ jsx54(
8612
+ /* @__PURE__ */ jsx49(
8720
8613
  Fields_default.Input,
8721
8614
  {
8722
8615
  label: "Email",
@@ -8726,7 +8619,7 @@ function AccountForm() {
8726
8619
  placeholder: "e.g maoo@exapmle.com"
8727
8620
  }
8728
8621
  ),
8729
- /* @__PURE__ */ jsx54(
8622
+ /* @__PURE__ */ jsx49(
8730
8623
  Fields_default.PhoneInput,
8731
8624
  {
8732
8625
  label: "Phone Number",
@@ -8735,7 +8628,7 @@ function AccountForm() {
8735
8628
  placeholder: "Enter phone number"
8736
8629
  }
8737
8630
  ),
8738
- !branchId && /* @__PURE__ */ jsx54(
8631
+ !branchId && /* @__PURE__ */ jsx49(
8739
8632
  Feilds_default.Branches,
8740
8633
  {
8741
8634
  label: "Branch",
@@ -8746,7 +8639,7 @@ function AccountForm() {
8746
8639
  }
8747
8640
  )
8748
8641
  ] }),
8749
- /* @__PURE__ */ jsx54("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx54(
8642
+ /* @__PURE__ */ jsx49("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx49(
8750
8643
  Button,
8751
8644
  {
8752
8645
  isLoading,
@@ -8805,7 +8698,7 @@ import { useForm as useForm3 } from "react-hook-form";
8805
8698
  import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
8806
8699
  import { message as message6 } from "antd";
8807
8700
  import { useEffect as useEffect21 } from "react";
8808
- import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
8701
+ import { jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
8809
8702
  function LinkUser({ type: initialType = "employee" }) {
8810
8703
  const { getQuery, navigate, getParams } = useApp_default();
8811
8704
  const id = getQuery("id");
@@ -8861,26 +8754,26 @@ function LinkUser({ type: initialType = "employee" }) {
8861
8754
  navigate(-1);
8862
8755
  }
8863
8756
  }, [id]);
8864
- return /* @__PURE__ */ jsxs38(
8757
+ return /* @__PURE__ */ jsxs37(
8865
8758
  Card,
8866
8759
  {
8867
8760
  className: "max-w-4xl mx-auto mt-10 relative",
8868
8761
  isLoading: isLoadingGet,
8869
8762
  loadingText: "Processing...",
8870
8763
  children: [
8871
- /* @__PURE__ */ jsxs38(Card.Header, { children: [
8872
- /* @__PURE__ */ jsx55(Card.Title, { children: `Link User ` }),
8873
- /* @__PURE__ */ jsx55(Card.Description, { children: "Link User Employee and add it to your list" })
8764
+ /* @__PURE__ */ jsxs37(Card.Header, { children: [
8765
+ /* @__PURE__ */ jsx50(Card.Title, { children: `Link User ` }),
8766
+ /* @__PURE__ */ jsx50(Card.Description, { children: "Link User Employee and add it to your list" })
8874
8767
  ] }),
8875
- /* @__PURE__ */ jsx55(Card.Content, { children: /* @__PURE__ */ jsxs38(
8768
+ /* @__PURE__ */ jsx50(Card.Content, { children: /* @__PURE__ */ jsxs37(
8876
8769
  "form",
8877
8770
  {
8878
8771
  onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)),
8879
8772
  className: "space-y-4",
8880
8773
  children: [
8881
- /* @__PURE__ */ jsxs38("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
8774
+ /* @__PURE__ */ jsxs37("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
8882
8775
  " ",
8883
- /* @__PURE__ */ jsx55(
8776
+ /* @__PURE__ */ jsx50(
8884
8777
  Fields_default.Input,
8885
8778
  {
8886
8779
  label: "Name",
@@ -8891,7 +8784,7 @@ function LinkUser({ type: initialType = "employee" }) {
8891
8784
  disabled: true
8892
8785
  }
8893
8786
  ),
8894
- /* @__PURE__ */ jsx55(
8787
+ /* @__PURE__ */ jsx50(
8895
8788
  Fields_default.Input,
8896
8789
  {
8897
8790
  label: "Email",
@@ -8902,7 +8795,7 @@ function LinkUser({ type: initialType = "employee" }) {
8902
8795
  required: true
8903
8796
  }
8904
8797
  ),
8905
- /* @__PURE__ */ jsx55(
8798
+ /* @__PURE__ */ jsx50(
8906
8799
  Fields_default.Select,
8907
8800
  {
8908
8801
  label: "Role",
@@ -8913,7 +8806,7 @@ function LinkUser({ type: initialType = "employee" }) {
8913
8806
  }
8914
8807
  )
8915
8808
  ] }),
8916
- /* @__PURE__ */ jsx55("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx55(
8809
+ /* @__PURE__ */ jsx50("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx50(
8917
8810
  Button,
8918
8811
  {
8919
8812
  isLoading,
@@ -8942,7 +8835,7 @@ import { useForm as useForm4 } from "react-hook-form";
8942
8835
  import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
8943
8836
  import { message as message7, Statistic } from "antd";
8944
8837
  import { useState as useState28, useEffect as useEffect22 } from "react";
8945
- import { jsx as jsx56, jsxs as jsxs39 } from "react/jsx-runtime";
8838
+ import { jsx as jsx51, jsxs as jsxs38 } from "react/jsx-runtime";
8946
8839
  var { Countdown } = Statistic;
8947
8840
  function VerifyEmailForm({
8948
8841
  data,
@@ -9010,9 +8903,9 @@ function VerifyEmailForm({
9010
8903
  message7.error(error?.message || "Something went wrong");
9011
8904
  }
9012
8905
  };
9013
- return /* @__PURE__ */ jsxs39("form", { onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)), children: [
9014
- /* @__PURE__ */ jsxs39("div", { className: "space-y-2", children: [
9015
- oldEmail && /* @__PURE__ */ jsx56("div", { className: "border-b-2 pb-2", children: /* @__PURE__ */ jsx56(
8906
+ return /* @__PURE__ */ jsxs38("form", { onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)), children: [
8907
+ /* @__PURE__ */ jsxs38("div", { className: "space-y-2", children: [
8908
+ oldEmail && /* @__PURE__ */ jsx51("div", { className: "border-b-2 pb-2", children: /* @__PURE__ */ jsx51(
9016
8909
  Fields_default.Input,
9017
8910
  {
9018
8911
  label: "Current Email",
@@ -9022,7 +8915,7 @@ function VerifyEmailForm({
9022
8915
  disabled: true
9023
8916
  }
9024
8917
  ) }),
9025
- /* @__PURE__ */ jsx56(
8918
+ /* @__PURE__ */ jsx51(
9026
8919
  Fields_default.Input,
9027
8920
  {
9028
8921
  label: "New Email",
@@ -9033,7 +8926,7 @@ function VerifyEmailForm({
9033
8926
  disabled: true
9034
8927
  }
9035
8928
  ),
9036
- /* @__PURE__ */ jsx56(
8929
+ /* @__PURE__ */ jsx51(
9037
8930
  Fields_default.Input,
9038
8931
  {
9039
8932
  label: "Token",
@@ -9044,19 +8937,19 @@ function VerifyEmailForm({
9044
8937
  }
9045
8938
  )
9046
8939
  ] }),
9047
- /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2 mt-2", children: [
9048
- /* @__PURE__ */ jsxs39("h1", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
8940
+ /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2 mt-2", children: [
8941
+ /* @__PURE__ */ jsxs38("h1", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
9049
8942
  "Didn't receive a verification token or expired?",
9050
8943
  " "
9051
8944
  ] }),
9052
- hasPassed || !threeMinutesLater ? /* @__PURE__ */ jsx56(
8945
+ hasPassed || !threeMinutesLater ? /* @__PURE__ */ jsx51(
9053
8946
  "span",
9054
8947
  {
9055
8948
  onClick: resend,
9056
8949
  className: "text-blue-600 cursor-pointer underline text-sm",
9057
8950
  children: "Resend"
9058
8951
  }
9059
- ) : /* @__PURE__ */ jsx56("span", { className: "text-blue-600 cursor-pointer underline text-sm", children: /* @__PURE__ */ jsx56(
8952
+ ) : /* @__PURE__ */ jsx51("span", { className: "text-blue-600 cursor-pointer underline text-sm", children: /* @__PURE__ */ jsx51(
9060
8953
  Countdown,
9061
8954
  {
9062
8955
  styles: { content: { fontSize: 14, color: "#3b82f6" } },
@@ -9066,7 +8959,7 @@ function VerifyEmailForm({
9066
8959
  threeMinutesLater
9067
8960
  ) })
9068
8961
  ] }),
9069
- /* @__PURE__ */ jsx56("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx56(
8962
+ /* @__PURE__ */ jsx51("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx51(
9070
8963
  Button,
9071
8964
  {
9072
8965
  isLoading,
@@ -9084,7 +8977,7 @@ var VerifyEmailForm_default = VerifyEmailForm;
9084
8977
  import { useForm as useForm5 } from "react-hook-form";
9085
8978
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
9086
8979
  import { message as message8 } from "antd";
9087
- import { jsx as jsx57, jsxs as jsxs40 } from "react/jsx-runtime";
8980
+ import { jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
9088
8981
  function UpdateEmailForm({
9089
8982
  data,
9090
8983
  close,
@@ -9117,9 +9010,9 @@ function UpdateEmailForm({
9117
9010
  message8.error(error?.message || "Something went wrong");
9118
9011
  }
9119
9012
  };
9120
- return /* @__PURE__ */ jsxs40("form", { onSubmit: handleSubmit(onSubmit), children: [
9121
- /* @__PURE__ */ jsxs40("div", { className: "space-y-4", children: [
9122
- /* @__PURE__ */ jsx57(
9013
+ return /* @__PURE__ */ jsxs39("form", { onSubmit: handleSubmit(onSubmit), children: [
9014
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-4", children: [
9015
+ /* @__PURE__ */ jsx52(
9123
9016
  Fields_default.Input,
9124
9017
  {
9125
9018
  label: "Current Email",
@@ -9128,7 +9021,7 @@ function UpdateEmailForm({
9128
9021
  disabled: true
9129
9022
  }
9130
9023
  ),
9131
- /* @__PURE__ */ jsx57(
9024
+ /* @__PURE__ */ jsx52(
9132
9025
  Fields_default.Input,
9133
9026
  {
9134
9027
  label: "New Email Address",
@@ -9139,10 +9032,10 @@ function UpdateEmailForm({
9139
9032
  required: true
9140
9033
  }
9141
9034
  ),
9142
- /* @__PURE__ */ jsx57("div", { className: "bg-blue-50 dark:bg-blue-900/10 border-l-4 border-blue-400 p-3 rounded", children: /* @__PURE__ */ jsx57("p", { className: "text-xs text-blue-700 dark:text-blue-400", children: "Note: You will need to verify the new email address before it becomes primary." }) })
9035
+ /* @__PURE__ */ jsx52("div", { className: "bg-blue-50 dark:bg-blue-900/10 border-l-4 border-blue-400 p-3 rounded", children: /* @__PURE__ */ jsx52("p", { className: "text-xs text-blue-700 dark:text-blue-400", children: "Note: You will need to verify the new email address before it becomes primary." }) })
9143
9036
  ] }),
9144
- /* @__PURE__ */ jsxs40("footer", { className: "flex justify-end mt-6 gap-3", children: [
9145
- /* @__PURE__ */ jsx57(
9037
+ /* @__PURE__ */ jsxs39("footer", { className: "flex justify-end mt-6 gap-3", children: [
9038
+ /* @__PURE__ */ jsx52(
9146
9039
  Button,
9147
9040
  {
9148
9041
  type: "button",
@@ -9152,7 +9045,7 @@ function UpdateEmailForm({
9152
9045
  children: "Cancel"
9153
9046
  }
9154
9047
  ),
9155
- /* @__PURE__ */ jsx57(
9048
+ /* @__PURE__ */ jsx52(
9156
9049
  Button,
9157
9050
  {
9158
9051
  isLoading,
@@ -9171,7 +9064,7 @@ var UpdateEmailForm_default = UpdateEmailForm;
9171
9064
  import { useForm as useForm6 } from "react-hook-form";
9172
9065
  import { message as message9, Statistic as Statistic2 } from "antd";
9173
9066
  import { useState as useState29, useEffect as useEffect23 } from "react";
9174
- import { jsx as jsx58, jsxs as jsxs41 } from "react/jsx-runtime";
9067
+ import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
9175
9068
  var { Countdown: Countdown2 } = Statistic2;
9176
9069
  function ResetPasswordForm({
9177
9070
  data,
@@ -9226,9 +9119,9 @@ function ResetPasswordForm({
9226
9119
  message9.error(error?.message || "Something went wrong");
9227
9120
  }
9228
9121
  };
9229
- return /* @__PURE__ */ jsxs41("form", { onSubmit: handleSubmit(onSubmit), children: [
9230
- /* @__PURE__ */ jsxs41("div", { className: "space-y-4", children: [
9231
- /* @__PURE__ */ jsx58("div", { className: "border-b-2 pb-4 dark:border-zinc-800", children: /* @__PURE__ */ jsx58(
9122
+ return /* @__PURE__ */ jsxs40("form", { onSubmit: handleSubmit(onSubmit), children: [
9123
+ /* @__PURE__ */ jsxs40("div", { className: "space-y-4", children: [
9124
+ /* @__PURE__ */ jsx53("div", { className: "border-b-2 pb-4 dark:border-zinc-800", children: /* @__PURE__ */ jsx53(
9232
9125
  Fields_default.Input,
9233
9126
  {
9234
9127
  label: "Target Email",
@@ -9237,10 +9130,10 @@ function ResetPasswordForm({
9237
9130
  disabled: true
9238
9131
  }
9239
9132
  ) }),
9240
- /* @__PURE__ */ jsx58("div", { className: "bg-orange-50 dark:bg-orange-900/10 border-l-4 border-orange-400 p-4 rounded-xl", children: /* @__PURE__ */ jsx58("p", { className: "text-sm text-orange-700 dark:text-orange-300", children: "Click context below to send a secure password reset link to this user." }) }),
9241
- !hasPassed && threeMinutesLater && /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2 mt-2 bg-blue-50 dark:bg-blue-900/10 p-2 rounded-lg", children: [
9242
- /* @__PURE__ */ jsx58("p", { className: "text-xs text-blue-600 dark:text-blue-400 font-medium", children: "You can request another link in:" }),
9243
- /* @__PURE__ */ jsx58("span", { className: "text-blue-600 font-bold text-xs", children: /* @__PURE__ */ jsx58(
9133
+ /* @__PURE__ */ jsx53("div", { className: "bg-orange-50 dark:bg-orange-900/10 border-l-4 border-orange-400 p-4 rounded-xl", children: /* @__PURE__ */ jsx53("p", { className: "text-sm text-orange-700 dark:text-orange-300", children: "Click context below to send a secure password reset link to this user." }) }),
9134
+ !hasPassed && threeMinutesLater && /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2 mt-2 bg-blue-50 dark:bg-blue-900/10 p-2 rounded-lg", children: [
9135
+ /* @__PURE__ */ jsx53("p", { className: "text-xs text-blue-600 dark:text-blue-400 font-medium", children: "You can request another link in:" }),
9136
+ /* @__PURE__ */ jsx53("span", { className: "text-blue-600 font-bold text-xs", children: /* @__PURE__ */ jsx53(
9244
9137
  Countdown2,
9245
9138
  {
9246
9139
  styles: { content: { fontSize: 12, color: "#3b82f6" } },
@@ -9251,8 +9144,8 @@ function ResetPasswordForm({
9251
9144
  ) })
9252
9145
  ] })
9253
9146
  ] }),
9254
- /* @__PURE__ */ jsxs41("footer", { className: "flex justify-end mt-8 gap-3", children: [
9255
- /* @__PURE__ */ jsx58(
9147
+ /* @__PURE__ */ jsxs40("footer", { className: "flex justify-end mt-8 gap-3", children: [
9148
+ /* @__PURE__ */ jsx53(
9256
9149
  Button,
9257
9150
  {
9258
9151
  type: "button",
@@ -9262,7 +9155,7 @@ function ResetPasswordForm({
9262
9155
  children: "Cancel"
9263
9156
  }
9264
9157
  ),
9265
- /* @__PURE__ */ jsx58(
9158
+ /* @__PURE__ */ jsx53(
9266
9159
  Button,
9267
9160
  {
9268
9161
  isLoading,
@@ -9280,11 +9173,11 @@ var ResetPasswordForm_default = ResetPasswordForm;
9280
9173
  // src/components/users/Activate.tsx
9281
9174
  import { message as message10, Switch } from "antd";
9282
9175
  import { useState as useState30 } from "react";
9283
- import { Fragment as Fragment10, jsx as jsx59 } from "react/jsx-runtime";
9176
+ import { Fragment as Fragment10, jsx as jsx54 } from "react/jsx-runtime";
9284
9177
  var ActivateUser = ({ data }) => {
9285
9178
  const [checked, setChecked] = useState30(data?.isActive);
9286
9179
  const { put, isLoading } = useApis_default();
9287
- return /* @__PURE__ */ jsx59(Fragment10, { children: /* @__PURE__ */ jsx59(
9180
+ return /* @__PURE__ */ jsx54(Fragment10, { children: /* @__PURE__ */ jsx54(
9288
9181
  Switch,
9289
9182
  {
9290
9183
  onChange: async (e) => {
@@ -9312,7 +9205,7 @@ var Activate_default = ActivateUser;
9312
9205
 
9313
9206
  // src/components/users/users.tsx
9314
9207
  import { useNavigate as useNavigate6 } from "react-router-dom";
9315
- import { Fragment as Fragment11, jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
9208
+ import { Fragment as Fragment11, jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
9316
9209
  function Users() {
9317
9210
  const navigate = useNavigate6();
9318
9211
  const { data, TransactionViewComponent, reload } = useTransaction_default({
@@ -9324,11 +9217,11 @@ function Users() {
9324
9217
  const items = (data2) => [
9325
9218
  {
9326
9219
  label: `Reset Password`,
9327
- icon: /* @__PURE__ */ jsx60(Key, { size: 16 }),
9220
+ icon: /* @__PURE__ */ jsx55(Key, { size: 16 }),
9328
9221
  onClick: () => openState({
9329
9222
  title: "Request Password Reset",
9330
9223
  type: "form",
9331
- content: /* @__PURE__ */ jsx60(
9224
+ content: /* @__PURE__ */ jsx55(
9332
9225
  ResetPasswordForm_default,
9333
9226
  {
9334
9227
  data: data2,
@@ -9341,11 +9234,11 @@ function Users() {
9341
9234
  },
9342
9235
  {
9343
9236
  label: `Update Email`,
9344
- icon: /* @__PURE__ */ jsx60(Mail2, { size: 16 }),
9237
+ icon: /* @__PURE__ */ jsx55(Mail2, { size: 16 }),
9345
9238
  onClick: () => openState({
9346
9239
  title: "Update Email Address",
9347
9240
  type: "form",
9348
- content: /* @__PURE__ */ jsx60(
9241
+ content: /* @__PURE__ */ jsx55(
9349
9242
  UpdateEmailForm_default,
9350
9243
  {
9351
9244
  data: data2,
@@ -9358,11 +9251,11 @@ function Users() {
9358
9251
  },
9359
9252
  data2?.emailVerification && {
9360
9253
  label: `Verify Email`,
9361
- icon: /* @__PURE__ */ jsx60(ShieldCheck, {}),
9254
+ icon: /* @__PURE__ */ jsx55(ShieldCheck, {}),
9362
9255
  onClick: () => openState({
9363
9256
  title: "Verify Email",
9364
9257
  type: "form",
9365
- content: /* @__PURE__ */ jsx60(
9258
+ content: /* @__PURE__ */ jsx55(
9366
9259
  VerifyEmailForm_default,
9367
9260
  {
9368
9261
  data: data2,
@@ -9383,16 +9276,16 @@ function Users() {
9383
9276
  const data2 = row.original;
9384
9277
  const emailVerification = data2?.emailVerification;
9385
9278
  const newEmail = emailVerification?.email !== data2?.email ? emailVerification?.email : null;
9386
- return /* @__PURE__ */ jsxs42("div", { className: "space-y-1", children: [
9387
- /* @__PURE__ */ jsxs42("section", { className: "flex items-center gap-2", children: [
9279
+ return /* @__PURE__ */ jsxs41("div", { className: "space-y-1", children: [
9280
+ /* @__PURE__ */ jsxs41("section", { className: "flex items-center gap-2", children: [
9388
9281
  " ",
9389
- /* @__PURE__ */ jsx60("p", { children: data2?.email }),
9390
- data2?.isEmailVerified && /* @__PURE__ */ jsx60(Badge, { variant: "success", size: "sm", children: "Verified" }),
9391
- !data2?.isEmailVerified && /* @__PURE__ */ jsx60(Badge, { variant: "warning", size: "sm", children: "Not Verified" })
9282
+ /* @__PURE__ */ jsx55("p", { children: data2?.email }),
9283
+ data2?.isEmailVerified && /* @__PURE__ */ jsx55(Badge, { variant: "success", size: "sm", children: "Verified" }),
9284
+ !data2?.isEmailVerified && /* @__PURE__ */ jsx55(Badge, { variant: "warning", size: "sm", children: "Not Verified" })
9392
9285
  ] }),
9393
- newEmail && /* @__PURE__ */ jsxs42("section", { className: "flex items-center gap-2", children: [
9394
- /* @__PURE__ */ jsx60(Info, { size: 16, className: "text-orange-600" }),
9395
- /* @__PURE__ */ jsx60("p", { children: newEmail })
9286
+ newEmail && /* @__PURE__ */ jsxs41("section", { className: "flex items-center gap-2", children: [
9287
+ /* @__PURE__ */ jsx55(Info, { size: 16, className: "text-orange-600" }),
9288
+ /* @__PURE__ */ jsx55("p", { children: newEmail })
9396
9289
  ] })
9397
9290
  ] });
9398
9291
  }
@@ -9402,7 +9295,7 @@ function Users() {
9402
9295
  header: "Role",
9403
9296
  cell: ({ row }) => {
9404
9297
  const data2 = row.original;
9405
- return /* @__PURE__ */ jsx60(
9298
+ return /* @__PURE__ */ jsx55(
9406
9299
  Badge,
9407
9300
  {
9408
9301
  variant: data2?.role === "admin" ? "primary" : "warning",
@@ -9417,7 +9310,7 @@ function Users() {
9417
9310
  header: "Employee Name",
9418
9311
  cell: ({ row }) => {
9419
9312
  const account = row.original?.account;
9420
- return /* @__PURE__ */ jsx60("span", { children: account?.name || "N/A" });
9313
+ return /* @__PURE__ */ jsx55("span", { children: account?.name || "N/A" });
9421
9314
  }
9422
9315
  },
9423
9316
  {
@@ -9425,7 +9318,7 @@ function Users() {
9425
9318
  header: "Status",
9426
9319
  cell: ({ row }) => {
9427
9320
  const data2 = row.original;
9428
- return /* @__PURE__ */ jsx60(Activate_default, { data: data2 });
9321
+ return /* @__PURE__ */ jsx55(Activate_default, { data: data2 });
9429
9322
  }
9430
9323
  },
9431
9324
  {
@@ -9433,13 +9326,13 @@ function Users() {
9433
9326
  header: "Actions",
9434
9327
  cell: ({ row }) => {
9435
9328
  const data2 = row.original;
9436
- return /* @__PURE__ */ jsx60(
9329
+ return /* @__PURE__ */ jsx55(
9437
9330
  Dropdown,
9438
9331
  {
9439
9332
  className: "w-fit! cursor-pointer",
9440
9333
  items: items(data2),
9441
9334
  triggerMode: "hover",
9442
- children: /* @__PURE__ */ jsx60(EllipsisVertical2, {})
9335
+ children: /* @__PURE__ */ jsx55(EllipsisVertical2, {})
9443
9336
  }
9444
9337
  );
9445
9338
  }
@@ -9448,9 +9341,9 @@ function Users() {
9448
9341
  [items]
9449
9342
  );
9450
9343
  const users = data?.data || [];
9451
- return /* @__PURE__ */ jsxs42(Fragment11, { children: [
9452
- /* @__PURE__ */ jsx60(Modal2, {}),
9453
- /* @__PURE__ */ jsx60(
9344
+ return /* @__PURE__ */ jsxs41(Fragment11, { children: [
9345
+ /* @__PURE__ */ jsx55(Modal2, {}),
9346
+ /* @__PURE__ */ jsx55(
9454
9347
  TransactionViewComponent,
9455
9348
  {
9456
9349
  columns,
@@ -9471,7 +9364,7 @@ var users_default = Users;
9471
9364
  import { useForm as useForm7 } from "react-hook-form";
9472
9365
  import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
9473
9366
  import { message as message11 } from "antd";
9474
- import { jsx as jsx61, jsxs as jsxs43 } from "react/jsx-runtime";
9367
+ import { jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
9475
9368
  function UserForm() {
9476
9369
  const { navigate } = useApp_default();
9477
9370
  const { post, isLoading } = useApis_default();
@@ -9496,14 +9389,14 @@ function UserForm() {
9496
9389
  message11.error(error?.message || "Something went wrong");
9497
9390
  }
9498
9391
  };
9499
- return /* @__PURE__ */ jsxs43(Card, { className: "max-w-xl mx-auto mt-10 relative", children: [
9500
- /* @__PURE__ */ jsxs43(Card.Header, { children: [
9501
- /* @__PURE__ */ jsx61(Card.Title, { children: "Add User" }),
9502
- /* @__PURE__ */ jsx61(Card.Description, { children: "Create a new user by providing their email and phone number." })
9392
+ return /* @__PURE__ */ jsxs42(Card, { className: "max-w-xl mx-auto mt-10 relative", children: [
9393
+ /* @__PURE__ */ jsxs42(Card.Header, { children: [
9394
+ /* @__PURE__ */ jsx56(Card.Title, { children: "Add User" }),
9395
+ /* @__PURE__ */ jsx56(Card.Description, { children: "Create a new user by providing their email and phone number." })
9503
9396
  ] }),
9504
- /* @__PURE__ */ jsx61(Card.Content, { children: /* @__PURE__ */ jsxs43("form", { onSubmit: handleSubmit(onSubmit), children: [
9505
- /* @__PURE__ */ jsxs43("div", { className: "space-y-4", children: [
9506
- /* @__PURE__ */ jsx61(
9397
+ /* @__PURE__ */ jsx56(Card.Content, { children: /* @__PURE__ */ jsxs42("form", { onSubmit: handleSubmit(onSubmit), children: [
9398
+ /* @__PURE__ */ jsxs42("div", { className: "space-y-4", children: [
9399
+ /* @__PURE__ */ jsx56(
9507
9400
  Fields_default.Input,
9508
9401
  {
9509
9402
  label: "Email",
@@ -9514,7 +9407,7 @@ function UserForm() {
9514
9407
  required: true
9515
9408
  }
9516
9409
  ),
9517
- /* @__PURE__ */ jsx61(
9410
+ /* @__PURE__ */ jsx56(
9518
9411
  Fields_default.PhoneInput,
9519
9412
  {
9520
9413
  label: "Phone Number",
@@ -9523,7 +9416,7 @@ function UserForm() {
9523
9416
  placeholder: "Enter phone number"
9524
9417
  }
9525
9418
  ),
9526
- /* @__PURE__ */ jsx61(
9419
+ /* @__PURE__ */ jsx56(
9527
9420
  Fields_default.Select,
9528
9421
  {
9529
9422
  label: "Role",
@@ -9534,7 +9427,7 @@ function UserForm() {
9534
9427
  }
9535
9428
  )
9536
9429
  ] }),
9537
- /* @__PURE__ */ jsx61("footer", { className: "flex justify-end mt-6", children: /* @__PURE__ */ jsx61(
9430
+ /* @__PURE__ */ jsx56("footer", { className: "flex justify-end mt-6", children: /* @__PURE__ */ jsx56(
9538
9431
  Button,
9539
9432
  {
9540
9433
  isLoading,
@@ -9557,7 +9450,7 @@ import { useForm as useForm8 } from "react-hook-form";
9557
9450
  import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
9558
9451
  import * as z4 from "zod";
9559
9452
  import { message as message12, Spin } from "antd";
9560
- import { Fragment as Fragment12, jsx as jsx62, jsxs as jsxs44 } from "react/jsx-runtime";
9453
+ import { Fragment as Fragment12, jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
9561
9454
  var resetPageSchema = z4.object({
9562
9455
  password: z4.string().min(6, "Password must be at least 6 characters"),
9563
9456
  confirmPassword: z4.string().min(6, "Password must be at least 6 characters")
@@ -9623,14 +9516,14 @@ function ResetPasswordPage() {
9623
9516
  }
9624
9517
  };
9625
9518
  if (verifying) {
9626
- return /* @__PURE__ */ jsx62("div", { className: "h-screen w-full flex items-center justify-center bg-slate-50 dark:bg-[#0A0B10]", children: /* @__PURE__ */ jsxs44("div", { className: "text-center space-y-4", children: [
9627
- /* @__PURE__ */ jsx62(Spin, { size: "large" }),
9628
- /* @__PURE__ */ jsx62("p", { className: "text-slate-500 animate-pulse", children: "Verifying reset link..." })
9519
+ return /* @__PURE__ */ jsx57("div", { className: "h-screen w-full flex items-center justify-center bg-slate-50 dark:bg-[#0A0B10]", children: /* @__PURE__ */ jsxs43("div", { className: "text-center space-y-4", children: [
9520
+ /* @__PURE__ */ jsx57(Spin, { size: "large" }),
9521
+ /* @__PURE__ */ jsx57("p", { className: "text-slate-500 animate-pulse", children: "Verifying reset link..." })
9629
9522
  ] }) });
9630
9523
  }
9631
- return /* @__PURE__ */ jsxs44("div", { className: "flex h-screen w-full overflow-hidden bg-white dark:bg-[#0A0B10]", children: [
9632
- /* @__PURE__ */ jsxs44("div", { className: "hidden lg:flex lg:w-1/2 relative overflow-hidden bg-slate-900 border-r border-slate-800", children: [
9633
- /* @__PURE__ */ jsx62(
9524
+ return /* @__PURE__ */ jsxs43("div", { className: "flex h-screen w-full overflow-hidden bg-white dark:bg-[#0A0B10]", children: [
9525
+ /* @__PURE__ */ jsxs43("div", { className: "hidden lg:flex lg:w-1/2 relative overflow-hidden bg-slate-900 border-r border-slate-800", children: [
9526
+ /* @__PURE__ */ jsx57(
9634
9527
  "div",
9635
9528
  {
9636
9529
  className: "absolute inset-0 z-0 opacity-40 bg-cover bg-center",
@@ -9639,35 +9532,35 @@ function ResetPasswordPage() {
9639
9532
  }
9640
9533
  }
9641
9534
  ),
9642
- /* @__PURE__ */ jsx62("div", { className: "absolute inset-0 bg-linear-to-tr from-[#0A0B10] via-transparent to-indigo-500/10 z-10" }),
9643
- /* @__PURE__ */ jsxs44("div", { className: "relative z-20 p-12 flex flex-col justify-between w-full h-full", children: [
9644
- /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-3", children: [
9645
- /* @__PURE__ */ jsx62("div", { className: "h-10 w-10 bg-indigo-600 rounded-lg flex items-center justify-center shadow-indigo-500/20 shadow-xl", children: /* @__PURE__ */ jsx62(Terminal2, { className: "text-white w-6 h-6" }) }),
9646
- /* @__PURE__ */ jsx62("span", { className: "text-2xl font-bold text-white tracking-widest uppercase", children: "Warqad UI" })
9535
+ /* @__PURE__ */ jsx57("div", { className: "absolute inset-0 bg-linear-to-tr from-[#0A0B10] via-transparent to-indigo-500/10 z-10" }),
9536
+ /* @__PURE__ */ jsxs43("div", { className: "relative z-20 p-12 flex flex-col justify-between w-full h-full", children: [
9537
+ /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
9538
+ /* @__PURE__ */ jsx57("div", { className: "h-10 w-10 bg-indigo-600 rounded-lg flex items-center justify-center shadow-indigo-500/20 shadow-xl", children: /* @__PURE__ */ jsx57(Terminal2, { className: "text-white w-6 h-6" }) }),
9539
+ /* @__PURE__ */ jsx57("span", { className: "text-2xl font-bold text-white tracking-widest uppercase", children: "Warqad UI" })
9647
9540
  ] }),
9648
- /* @__PURE__ */ jsxs44("div", { className: "max-w-md", children: [
9649
- /* @__PURE__ */ jsxs44("h1", { className: "text-5xl font-extrabold text-white mb-6 leading-tight", children: [
9541
+ /* @__PURE__ */ jsxs43("div", { className: "max-w-md", children: [
9542
+ /* @__PURE__ */ jsxs43("h1", { className: "text-5xl font-extrabold text-white mb-6 leading-tight", children: [
9650
9543
  "Secure ",
9651
- /* @__PURE__ */ jsx62("span", { className: "text-indigo-400", children: "Access" }),
9544
+ /* @__PURE__ */ jsx57("span", { className: "text-indigo-400", children: "Access" }),
9652
9545
  " ",
9653
- /* @__PURE__ */ jsx62("br", {}),
9546
+ /* @__PURE__ */ jsx57("br", {}),
9654
9547
  " ",
9655
9548
  "Simplified."
9656
9549
  ] }),
9657
- /* @__PURE__ */ jsx62("p", { className: "text-slate-400 text-lg leading-relaxed", children: "Reset your credentials securely and regain access to your dashboard in minutes." })
9550
+ /* @__PURE__ */ jsx57("p", { className: "text-slate-400 text-lg leading-relaxed", children: "Reset your credentials securely and regain access to your dashboard in minutes." })
9658
9551
  ] }),
9659
- /* @__PURE__ */ jsx62("div", { className: "text-slate-500 text-sm italic", children: "Trusted by developers worldwide." })
9552
+ /* @__PURE__ */ jsx57("div", { className: "text-slate-500 text-sm italic", children: "Trusted by developers worldwide." })
9660
9553
  ] })
9661
9554
  ] }),
9662
- /* @__PURE__ */ jsxs44("div", { className: "w-full lg:w-1/2 p-8 lg:p-16 flex flex-col justify-center bg-white dark:bg-[#0A0B10] relative", children: [
9663
- /* @__PURE__ */ jsx62("div", { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx62(ThemeToggle, {}) }),
9664
- /* @__PURE__ */ jsx62("div", { className: "max-w-md w-full mx-auto", children: !isVerified || error ? /* @__PURE__ */ jsxs44("div", { className: "text-center space-y-6", children: [
9665
- /* @__PURE__ */ jsx62("div", { className: "mx-auto w-16 h-16 bg-red-100 dark:bg-red-900/20 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx62(ShieldCheck2, { className: "text-red-600 dark:text-red-400 w-8 h-8" }) }),
9666
- /* @__PURE__ */ jsxs44("div", { children: [
9667
- /* @__PURE__ */ jsx62("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-2", children: "Link Invalid" }),
9668
- /* @__PURE__ */ jsx62("p", { className: "text-slate-500 dark:text-slate-400", children: error || "The reset link is invalid or has already been used." })
9555
+ /* @__PURE__ */ jsxs43("div", { className: "w-full lg:w-1/2 p-8 lg:p-16 flex flex-col justify-center bg-white dark:bg-[#0A0B10] relative", children: [
9556
+ /* @__PURE__ */ jsx57("div", { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx57(ThemeToggle, {}) }),
9557
+ /* @__PURE__ */ jsx57("div", { className: "max-w-md w-full mx-auto", children: !isVerified || error ? /* @__PURE__ */ jsxs43("div", { className: "text-center space-y-6", children: [
9558
+ /* @__PURE__ */ jsx57("div", { className: "mx-auto w-16 h-16 bg-red-100 dark:bg-red-900/20 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx57(ShieldCheck2, { className: "text-red-600 dark:text-red-400 w-8 h-8" }) }),
9559
+ /* @__PURE__ */ jsxs43("div", { children: [
9560
+ /* @__PURE__ */ jsx57("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-2", children: "Link Invalid" }),
9561
+ /* @__PURE__ */ jsx57("p", { className: "text-slate-500 dark:text-slate-400", children: error || "The reset link is invalid or has already been used." })
9669
9562
  ] }),
9670
- /* @__PURE__ */ jsx62(
9563
+ /* @__PURE__ */ jsx57(
9671
9564
  Button,
9672
9565
  {
9673
9566
  onClick: () => navigate("/login"),
@@ -9675,22 +9568,22 @@ function ResetPasswordPage() {
9675
9568
  children: "Back to Login"
9676
9569
  }
9677
9570
  )
9678
- ] }) : /* @__PURE__ */ jsxs44(Fragment12, { children: [
9679
- /* @__PURE__ */ jsxs44("div", { className: "mb-10", children: [
9680
- /* @__PURE__ */ jsx62("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-3 tracking-tight", children: "Reset Password" }),
9681
- /* @__PURE__ */ jsxs44("p", { className: "text-slate-500 dark:text-slate-400", children: [
9571
+ ] }) : /* @__PURE__ */ jsxs43(Fragment12, { children: [
9572
+ /* @__PURE__ */ jsxs43("div", { className: "mb-10", children: [
9573
+ /* @__PURE__ */ jsx57("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-3 tracking-tight", children: "Reset Password" }),
9574
+ /* @__PURE__ */ jsxs43("p", { className: "text-slate-500 dark:text-slate-400", children: [
9682
9575
  "Set a new, strong password for",
9683
9576
  " ",
9684
- /* @__PURE__ */ jsx62("span", { className: "text-indigo-600 font-medium", children: email })
9577
+ /* @__PURE__ */ jsx57("span", { className: "text-indigo-600 font-medium", children: email })
9685
9578
  ] })
9686
9579
  ] }),
9687
- /* @__PURE__ */ jsxs44(
9580
+ /* @__PURE__ */ jsxs43(
9688
9581
  "form",
9689
9582
  {
9690
9583
  onSubmit: methods.handleSubmit(onSubmit),
9691
9584
  className: "space-y-6",
9692
9585
  children: [
9693
- /* @__PURE__ */ jsx62(
9586
+ /* @__PURE__ */ jsx57(
9694
9587
  Fields_default.Input,
9695
9588
  {
9696
9589
  form: methods,
@@ -9699,11 +9592,11 @@ function ResetPasswordPage() {
9699
9592
  type: "password",
9700
9593
  placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
9701
9594
  required: true,
9702
- icon: /* @__PURE__ */ jsx62(Lock2, { size: 18, className: "text-slate-400" }),
9595
+ icon: /* @__PURE__ */ jsx57(Lock2, { size: 18, className: "text-slate-400" }),
9703
9596
  className: "bg-slate-50 dark:bg-slate-900/50 h-12"
9704
9597
  }
9705
9598
  ),
9706
- /* @__PURE__ */ jsx62(
9599
+ /* @__PURE__ */ jsx57(
9707
9600
  Fields_default.Input,
9708
9601
  {
9709
9602
  form: methods,
@@ -9712,11 +9605,11 @@ function ResetPasswordPage() {
9712
9605
  type: "password",
9713
9606
  placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
9714
9607
  required: true,
9715
- icon: /* @__PURE__ */ jsx62(ShieldCheck2, { size: 18, className: "text-slate-400" }),
9608
+ icon: /* @__PURE__ */ jsx57(ShieldCheck2, { size: 18, className: "text-slate-400" }),
9716
9609
  className: "bg-slate-50 dark:bg-slate-900/50 h-12"
9717
9610
  }
9718
9611
  ),
9719
- /* @__PURE__ */ jsxs44(
9612
+ /* @__PURE__ */ jsxs43(
9720
9613
  Button,
9721
9614
  {
9722
9615
  type: "submit",
@@ -9724,7 +9617,7 @@ function ResetPasswordPage() {
9724
9617
  className: "w-full h-12 bg-indigo-600 hover:bg-indigo-500 text-white font-semibold flex items-center justify-center gap-2",
9725
9618
  children: [
9726
9619
  "Update Password",
9727
- !isLoading && /* @__PURE__ */ jsx62(ArrowRight2, { size: 18 })
9620
+ !isLoading && /* @__PURE__ */ jsx57(ArrowRight2, { size: 18 })
9728
9621
  ]
9729
9622
  }
9730
9623
  )
@@ -9741,7 +9634,7 @@ var ResetPasswordPage_default = ResetPasswordPage;
9741
9634
  import { LogOut, User as User2 } from "lucide-react";
9742
9635
  import { useNavigate as useNavigate8 } from "react-router-dom";
9743
9636
  import { message as message13 } from "antd";
9744
- import { jsx as jsx63, jsxs as jsxs45 } from "react/jsx-runtime";
9637
+ import { jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
9745
9638
  var UserProfile = ({
9746
9639
  items,
9747
9640
  name,
@@ -9774,21 +9667,21 @@ var UserProfile = ({
9774
9667
  const defaultItems = [
9775
9668
  {
9776
9669
  label: "My Profile",
9777
- icon: /* @__PURE__ */ jsx63(User2, { size: 18 }),
9670
+ icon: /* @__PURE__ */ jsx58(User2, { size: 18 }),
9778
9671
  onClick: () => navigate("profile"),
9779
9672
  className: "min-w-[150px]"
9780
9673
  },
9781
9674
  {
9782
9675
  label: "Logout",
9783
- icon: /* @__PURE__ */ jsx63(LogOut, { size: 18 }),
9676
+ icon: /* @__PURE__ */ jsx58(LogOut, { size: 18 }),
9784
9677
  onClick: logout,
9785
9678
  className: "text-red-500 hover:bg-red-50 dark:hover:bg-red-950/20"
9786
9679
  }
9787
9680
  ];
9788
- return /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-3", children: [
9789
- showThemeToggle && /* @__PURE__ */ jsx63(ThemeToggle, {}),
9790
- showThemeToggle && /* @__PURE__ */ jsx63("div", { className: "w-px h-6 mx-2 bg-gray-200 dark:bg-gray-800" }),
9791
- /* @__PURE__ */ jsx63(
9681
+ return /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-3", children: [
9682
+ showThemeToggle && /* @__PURE__ */ jsx58(ThemeToggle, {}),
9683
+ showThemeToggle && /* @__PURE__ */ jsx58("div", { className: "w-px h-6 mx-2 bg-gray-200 dark:bg-gray-800" }),
9684
+ /* @__PURE__ */ jsx58(
9792
9685
  ProfileDropdown,
9793
9686
  {
9794
9687
  name: name || account?.name || "User",
@@ -9806,12 +9699,12 @@ var UserProfile_default = UserProfile;
9806
9699
  // src/components/users/ProfilePage.tsx
9807
9700
  import { useNavigate as useNavigate9 } from "react-router-dom";
9808
9701
  import { ArrowLeft as ArrowLeft3 } from "lucide-react";
9809
- import { jsx as jsx64, jsxs as jsxs46 } from "react/jsx-runtime";
9702
+ import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
9810
9703
  var ProfilePage = () => {
9811
9704
  const navigate = useNavigate9();
9812
9705
  const { user, account } = useAuth();
9813
9706
  if (!user) {
9814
- return /* @__PURE__ */ jsx64("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsx64("h1", { children: "Please login to view your profile" }) });
9707
+ return /* @__PURE__ */ jsx59("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsx59("h1", { children: "Please login to view your profile" }) });
9815
9708
  }
9816
9709
  const extraInfo = [
9817
9710
  {
@@ -9830,19 +9723,19 @@ var ProfilePage = () => {
9830
9723
  copiable: false
9831
9724
  }
9832
9725
  ];
9833
- return /* @__PURE__ */ jsxs46("div", { className: "p-4 sm:p-8 space-y-6", children: [
9834
- /* @__PURE__ */ jsx64("div", { className: "max-w-5xl mx-auto", children: /* @__PURE__ */ jsx64(
9726
+ return /* @__PURE__ */ jsxs45("div", { className: "p-4 sm:p-8 space-y-6", children: [
9727
+ /* @__PURE__ */ jsx59("div", { className: "max-w-5xl mx-auto", children: /* @__PURE__ */ jsx59(
9835
9728
  Button,
9836
9729
  {
9837
9730
  variant: "outline",
9838
9731
  size: "sm",
9839
9732
  onClick: () => navigate(-1),
9840
- icon: /* @__PURE__ */ jsx64(ArrowLeft3, { size: 16 }),
9733
+ icon: /* @__PURE__ */ jsx59(ArrowLeft3, { size: 16 }),
9841
9734
  className: "rounded-full font-bold px-5",
9842
9735
  children: "Back"
9843
9736
  }
9844
9737
  ) }),
9845
- /* @__PURE__ */ jsx64(
9738
+ /* @__PURE__ */ jsx59(
9846
9739
  ProfileView,
9847
9740
  {
9848
9741
  name: account?.name || "User Account",
@@ -9862,7 +9755,7 @@ import { useNavigate as useNavigate10, useParams as useParams6 } from "react-rou
9862
9755
  import { EllipsisVertical as EllipsisVertical3, FilePenLine as FilePenLine2, Trash2 as Trash23 } from "lucide-react";
9863
9756
  import { useState as useState32 } from "react";
9864
9757
  import { message as message14 } from "antd";
9865
- import { Fragment as Fragment13, jsx as jsx65, jsxs as jsxs47 } from "react/jsx-runtime";
9758
+ import { Fragment as Fragment13, jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
9866
9759
  function Wallets({ v, url }) {
9867
9760
  const { branchId } = useParams6();
9868
9761
  const [deleteWallet, setDeleteWallet] = useState32(null);
@@ -9877,12 +9770,12 @@ function Wallets({ v, url }) {
9877
9770
  const items = (data2) => [
9878
9771
  {
9879
9772
  label: `Edit Wallet`,
9880
- icon: /* @__PURE__ */ jsx65(FilePenLine2, { size: 16 }),
9773
+ icon: /* @__PURE__ */ jsx60(FilePenLine2, { size: 16 }),
9881
9774
  onClick: () => navigate(`update?id=${data2?._id}`)
9882
9775
  },
9883
9776
  {
9884
9777
  label: `Delete Wallet`,
9885
- icon: /* @__PURE__ */ jsx65(Trash23, { className: "text-red-500", size: 16 }),
9778
+ icon: /* @__PURE__ */ jsx60(Trash23, { className: "text-red-500", size: 16 }),
9886
9779
  onClick: () => setDeleteWallet(data2)
9887
9780
  }
9888
9781
  ].filter(Boolean);
@@ -9892,7 +9785,7 @@ function Wallets({ v, url }) {
9892
9785
  header: "Name",
9893
9786
  cell: ({ row }) => {
9894
9787
  const wallet = row.original;
9895
- return /* @__PURE__ */ jsx65("span", { children: wallet?.name });
9788
+ return /* @__PURE__ */ jsx60("span", { children: wallet?.name });
9896
9789
  }
9897
9790
  },
9898
9791
  {
@@ -9900,7 +9793,7 @@ function Wallets({ v, url }) {
9900
9793
  header: "Type",
9901
9794
  cell: ({ row }) => {
9902
9795
  const wallet = row.original;
9903
- return /* @__PURE__ */ jsx65("span", { className: "capitalize", children: wallet?.type });
9796
+ return /* @__PURE__ */ jsx60("span", { className: "capitalize", children: wallet?.type });
9904
9797
  }
9905
9798
  },
9906
9799
  {
@@ -9908,7 +9801,7 @@ function Wallets({ v, url }) {
9908
9801
  header: "Currency",
9909
9802
  cell: ({ row }) => {
9910
9803
  const wallet = row.original;
9911
- return /* @__PURE__ */ jsx65("span", { children: wallet?.currency });
9804
+ return /* @__PURE__ */ jsx60("span", { children: wallet?.currency });
9912
9805
  }
9913
9806
  },
9914
9807
  {
@@ -9916,7 +9809,7 @@ function Wallets({ v, url }) {
9916
9809
  header: "Account No",
9917
9810
  cell: ({ row }) => {
9918
9811
  const wallet = row.original;
9919
- return /* @__PURE__ */ jsx65("span", { children: wallet?.accountNo || "N/A" });
9812
+ return /* @__PURE__ */ jsx60("span", { children: wallet?.accountNo || "N/A" });
9920
9813
  }
9921
9814
  },
9922
9815
  {
@@ -9924,13 +9817,13 @@ function Wallets({ v, url }) {
9924
9817
  header: "Actions",
9925
9818
  cell: ({ row }) => {
9926
9819
  const data2 = row.original;
9927
- return /* @__PURE__ */ jsx65(
9820
+ return /* @__PURE__ */ jsx60(
9928
9821
  Dropdown,
9929
9822
  {
9930
9823
  className: "cursor-pointer w-[150px]",
9931
9824
  items: items(data2),
9932
9825
  triggerMode: "hover",
9933
- children: /* @__PURE__ */ jsx65(EllipsisVertical3, {})
9826
+ children: /* @__PURE__ */ jsx60(EllipsisVertical3, {})
9934
9827
  }
9935
9828
  );
9936
9829
  }
@@ -9948,9 +9841,9 @@ function Wallets({ v, url }) {
9948
9841
  return error;
9949
9842
  }
9950
9843
  };
9951
- return /* @__PURE__ */ jsxs47(Fragment13, { children: [
9952
- /* @__PURE__ */ jsx65(Modal2, {}),
9953
- /* @__PURE__ */ jsx65(
9844
+ return /* @__PURE__ */ jsxs46(Fragment13, { children: [
9845
+ /* @__PURE__ */ jsx60(Modal2, {}),
9846
+ /* @__PURE__ */ jsx60(
9954
9847
  ConfirmModal,
9955
9848
  {
9956
9849
  isOpen: !!deleteWallet,
@@ -9963,7 +9856,7 @@ function Wallets({ v, url }) {
9963
9856
  children: null
9964
9857
  }
9965
9858
  ),
9966
- /* @__PURE__ */ jsx65(
9859
+ /* @__PURE__ */ jsx60(
9967
9860
  TransactionViewComponent,
9968
9861
  {
9969
9862
  columns,
@@ -9997,7 +9890,7 @@ import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
9997
9890
  import { message as message15 } from "antd";
9998
9891
  import { useEffect as useEffect25 } from "react";
9999
9892
  import { useParams as useParams7 } from "react-router-dom";
10000
- import { jsx as jsx66, jsxs as jsxs48 } from "react/jsx-runtime";
9893
+ import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
10001
9894
  function WalletForm() {
10002
9895
  const { enums } = useWarqadConfig();
10003
9896
  const { branchId } = useParams7();
@@ -10059,24 +9952,24 @@ function WalletForm() {
10059
9952
  fetches();
10060
9953
  }
10061
9954
  }, [id]);
10062
- return /* @__PURE__ */ jsxs48(
9955
+ return /* @__PURE__ */ jsxs47(
10063
9956
  Card,
10064
9957
  {
10065
9958
  className: "max-w-4xl mx-auto mt-10 relative",
10066
9959
  isLoading: isLoadingGet,
10067
9960
  loadingText: "Processing...",
10068
9961
  children: [
10069
- /* @__PURE__ */ jsxs48(Card.Header, { children: [
10070
- /* @__PURE__ */ jsx66(Card.Title, { children: `${isEdit ? "Edit" : "Add"} Wallet` }),
10071
- /* @__PURE__ */ jsx66(Card.Description, { children: isEdit ? `Update the details for this wallet` : `Create a new wallet and add it to your list` })
9962
+ /* @__PURE__ */ jsxs47(Card.Header, { children: [
9963
+ /* @__PURE__ */ jsx61(Card.Title, { children: `${isEdit ? "Edit" : "Add"} Wallet` }),
9964
+ /* @__PURE__ */ jsx61(Card.Description, { children: isEdit ? `Update the details for this wallet` : `Create a new wallet and add it to your list` })
10072
9965
  ] }),
10073
- /* @__PURE__ */ jsx66(Card.Content, { children: /* @__PURE__ */ jsxs48(
9966
+ /* @__PURE__ */ jsx61(Card.Content, { children: /* @__PURE__ */ jsxs47(
10074
9967
  "form",
10075
9968
  {
10076
9969
  onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)),
10077
9970
  children: [
10078
- /* @__PURE__ */ jsxs48("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
10079
- /* @__PURE__ */ jsx66(
9971
+ /* @__PURE__ */ jsxs47("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
9972
+ /* @__PURE__ */ jsx61(
10080
9973
  Fields_default.Input,
10081
9974
  {
10082
9975
  label: "Name",
@@ -10087,7 +9980,7 @@ function WalletForm() {
10087
9980
  required: true
10088
9981
  }
10089
9982
  ),
10090
- /* @__PURE__ */ jsx66(
9983
+ /* @__PURE__ */ jsx61(
10091
9984
  Fields_default.Select,
10092
9985
  {
10093
9986
  label: "Wallet Type",
@@ -10097,7 +9990,7 @@ function WalletForm() {
10097
9990
  enumName: "walletTypes"
10098
9991
  }
10099
9992
  ),
10100
- /* @__PURE__ */ jsx66(
9993
+ /* @__PURE__ */ jsx61(
10101
9994
  Fields_default.Select,
10102
9995
  {
10103
9996
  label: "Currency",
@@ -10107,7 +10000,7 @@ function WalletForm() {
10107
10000
  enumName: "currencies"
10108
10001
  }
10109
10002
  ),
10110
- /* @__PURE__ */ jsx66(
10003
+ /* @__PURE__ */ jsx61(
10111
10004
  Fields_default.Input,
10112
10005
  {
10113
10006
  label: "Account Number",
@@ -10117,7 +10010,7 @@ function WalletForm() {
10117
10010
  placeholder: "Enter account number (optional)"
10118
10011
  }
10119
10012
  ),
10120
- !branchId && /* @__PURE__ */ jsx66(
10013
+ !branchId && /* @__PURE__ */ jsx61(
10121
10014
  Feilds_default.Branches,
10122
10015
  {
10123
10016
  label: "Branch",
@@ -10128,7 +10021,7 @@ function WalletForm() {
10128
10021
  }
10129
10022
  )
10130
10023
  ] }),
10131
- /* @__PURE__ */ jsx66("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx66(
10024
+ /* @__PURE__ */ jsx61("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx61(
10132
10025
  Button,
10133
10026
  {
10134
10027
  isLoading,
@@ -10150,7 +10043,7 @@ var WalletForm_default = WalletForm;
10150
10043
 
10151
10044
  // src/components/wallets/Feilds/Wallet.tsx
10152
10045
  import { useParams as useParams8 } from "react-router-dom";
10153
- import { jsx as jsx67, jsxs as jsxs49 } from "react/jsx-runtime";
10046
+ import { jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
10154
10047
  function Wallet({
10155
10048
  name,
10156
10049
  label,
@@ -10170,8 +10063,8 @@ function Wallet({
10170
10063
  showBalance,
10171
10064
  accountId: walletId
10172
10065
  });
10173
- return /* @__PURE__ */ jsxs49("div", { className: "flex flex-col gap-2", children: [
10174
- /* @__PURE__ */ jsx67(
10066
+ return /* @__PURE__ */ jsxs48("div", { className: "flex flex-col gap-2", children: [
10067
+ /* @__PURE__ */ jsx62(
10175
10068
  Fields_default.SearchApi,
10176
10069
  {
10177
10070
  name,
@@ -10188,7 +10081,7 @@ function Wallet({
10188
10081
  disabled
10189
10082
  }
10190
10083
  ),
10191
- /* @__PURE__ */ jsx67(BalanceView, {})
10084
+ /* @__PURE__ */ jsx62(BalanceView, {})
10192
10085
  ] });
10193
10086
  }
10194
10087
  var Wallet_default = Wallet;
@@ -10198,6 +10091,111 @@ var WalletField = {
10198
10091
  Wallet: Wallet_default
10199
10092
  };
10200
10093
  var Feilds_default2 = WalletField;
10094
+
10095
+ // src/components/ErrorPage/ErrorPage.tsx
10096
+ import { jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
10097
+ var ErrorPageBase = ({
10098
+ title,
10099
+ message: message16,
10100
+ statusCode,
10101
+ action,
10102
+ className = ""
10103
+ }) => {
10104
+ return /* @__PURE__ */ jsx63(
10105
+ "div",
10106
+ {
10107
+ className: `flex-1 m-auto h-full w-full min-h-[50vh] flex flex-col items-center justify-center p-6 text-zinc-900 dark:text-zinc-100 ${className}`,
10108
+ children: /* @__PURE__ */ jsxs49("div", { className: "relative flex flex-col items-center justify-center w-full max-w-2xl text-center", children: [
10109
+ statusCode && /* @__PURE__ */ jsx63("div", { className: "absolute inset-0 flex items-center justify-center z-0 select-none pointer-events-none opacity-[0.03] dark:opacity-5", children: /* @__PURE__ */ jsx63("span", { className: "text-[12rem] sm:text-[16rem] md:text-[20rem] font-bold leading-none tracking-tighter", children: statusCode }) }),
10110
+ /* @__PURE__ */ jsxs49("div", { className: "relative z-10 space-y-6", children: [
10111
+ statusCode && /* @__PURE__ */ jsxs49("h2", { className: "text-xl md:text-2xl font-semibold text-zinc-500 dark:text-zinc-400", children: [
10112
+ "Error ",
10113
+ statusCode
10114
+ ] }),
10115
+ title && /* @__PURE__ */ jsx63("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight drop-shadow-sm", children: title }),
10116
+ message16 && /* @__PURE__ */ jsx63("p", { className: "text-lg md:text-xl text-zinc-600 dark:text-zinc-400 max-w-md mx-auto", children: message16 }),
10117
+ action && /* @__PURE__ */ jsx63("div", { className: "pt-8", children: /* @__PURE__ */ jsx63(
10118
+ "button",
10119
+ {
10120
+ onClick: action.onClick,
10121
+ className: "px-8 py-3.5 rounded-full text-white font-semibold shadow-[0_4px_14px_0_rgba(0,0,0,0.1)] hover:shadow-[0_6px_20px_rgba(0,0,0,0.15)] transition-all hover:-translate-y-0.5 active:translate-y-0 focus:outline-none focus:ring-2 focus:ring-offset-2",
10122
+ style: { backgroundColor: "var(--primary-color, #3b82f6)" },
10123
+ children: action.label
10124
+ }
10125
+ ) })
10126
+ ] })
10127
+ ] })
10128
+ }
10129
+ );
10130
+ };
10131
+
10132
+ // src/components/ErrorPage/ErrorPage.500.tsx
10133
+ import { jsx as jsx64 } from "react/jsx-runtime";
10134
+ var ErrorPage500 = (props) => {
10135
+ return /* @__PURE__ */ jsx64(
10136
+ ErrorPageBase,
10137
+ {
10138
+ statusCode: 500,
10139
+ title: "Internal Server Error",
10140
+ message: "Oops, something went wrong on our end. Please try again later.",
10141
+ action: { label: "Go Home", onClick: () => window.location.href = "/" },
10142
+ ...props
10143
+ }
10144
+ );
10145
+ };
10146
+
10147
+ // src/components/ErrorPage/ErrorPage.404.tsx
10148
+ import { jsx as jsx65 } from "react/jsx-runtime";
10149
+ var ErrorPage404 = (props) => {
10150
+ return /* @__PURE__ */ jsx65(
10151
+ ErrorPageBase,
10152
+ {
10153
+ statusCode: 404,
10154
+ title: "Page Not Found",
10155
+ message: "The page you are looking for doesn't exist or has been moved.",
10156
+ action: { label: "Go Home", onClick: () => window.location.href = "/" },
10157
+ ...props
10158
+ }
10159
+ );
10160
+ };
10161
+
10162
+ // src/components/ErrorPage/ErrorPage.401.tsx
10163
+ import { jsx as jsx66 } from "react/jsx-runtime";
10164
+ var ErrorPage401 = (props) => {
10165
+ return /* @__PURE__ */ jsx66(
10166
+ ErrorPageBase,
10167
+ {
10168
+ statusCode: 401,
10169
+ title: "Unauthorized",
10170
+ message: "You don't have permission to access this page.",
10171
+ action: { label: "Go Home", onClick: () => window.location.href = "/" },
10172
+ ...props
10173
+ }
10174
+ );
10175
+ };
10176
+
10177
+ // src/components/ErrorPage/ErrorPage.400.tsx
10178
+ import { jsx as jsx67 } from "react/jsx-runtime";
10179
+ var ErrorPage400 = (props) => {
10180
+ return /* @__PURE__ */ jsx67(
10181
+ ErrorPageBase,
10182
+ {
10183
+ statusCode: 400,
10184
+ title: "Bad Request",
10185
+ message: "Your request could not be processed. Please try again.",
10186
+ action: { label: "Go Home", onClick: () => window.location.href = "/" },
10187
+ ...props
10188
+ }
10189
+ );
10190
+ };
10191
+
10192
+ // src/components/ErrorPage/index.ts
10193
+ var ErrorPage = Object.assign(ErrorPageBase, {
10194
+ 500: ErrorPage500,
10195
+ 404: ErrorPage404,
10196
+ 401: ErrorPage401,
10197
+ 400: ErrorPage400
10198
+ });
10201
10199
  export {
10202
10200
  Feilds_default as AccountFields,
10203
10201
  AccountForm_default as AccountForm,