warqadui 0.0.292 → 0.0.294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.js +303 -307
- package/dist/index.mjs +217 -221
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20281,8 +20281,7 @@ var createProductSchema = import_zod25.z.object({
|
|
|
20281
20281
|
category: import_zod25.z.string().optional(),
|
|
20282
20282
|
brand: import_zod25.z.string().optional(),
|
|
20283
20283
|
cost: import_zod25.z.number({ message: "Cost is required" }).min(0),
|
|
20284
|
-
yard: import_zod25.z.coerce.number().optional()
|
|
20285
|
-
branch: import_zod25.z.string().optional()
|
|
20284
|
+
yard: import_zod25.z.coerce.number().optional()
|
|
20286
20285
|
});
|
|
20287
20286
|
|
|
20288
20287
|
// src/components/products/ProductForm.tsx
|
|
@@ -20290,9 +20289,11 @@ var import_react_hook_form24 = require("react-hook-form");
|
|
|
20290
20289
|
var import_zod26 = require("@hookform/resolvers/zod");
|
|
20291
20290
|
var import_antd36 = require("antd");
|
|
20292
20291
|
var import_react65 = require("react");
|
|
20292
|
+
var import_react_router_dom25 = require("react-router-dom");
|
|
20293
20293
|
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
20294
20294
|
function ProductForm() {
|
|
20295
20295
|
const { getQuery, navigate } = useApp_default();
|
|
20296
|
+
const { branchId } = (0, import_react_router_dom25.useParams)();
|
|
20296
20297
|
const id = getQuery("id");
|
|
20297
20298
|
const isEdit = !!id;
|
|
20298
20299
|
const { ImageBox, fileList, setFileList } = useAntdImageUpload_default({ length: 1 });
|
|
@@ -20305,8 +20306,7 @@ function ProductForm() {
|
|
|
20305
20306
|
category: void 0,
|
|
20306
20307
|
brand: void 0,
|
|
20307
20308
|
cost: 0,
|
|
20308
|
-
yard: void 0
|
|
20309
|
-
branch: void 0
|
|
20309
|
+
yard: void 0
|
|
20310
20310
|
},
|
|
20311
20311
|
shouldUnregister: false
|
|
20312
20312
|
});
|
|
@@ -20326,7 +20326,8 @@ function ProductForm() {
|
|
|
20326
20326
|
url: "/products/create",
|
|
20327
20327
|
body: {
|
|
20328
20328
|
...data,
|
|
20329
|
-
files
|
|
20329
|
+
files,
|
|
20330
|
+
branch: branchId
|
|
20330
20331
|
},
|
|
20331
20332
|
multipart: true
|
|
20332
20333
|
});
|
|
@@ -20419,16 +20420,6 @@ function ProductForm() {
|
|
|
20419
20420
|
api: "/brands/get"
|
|
20420
20421
|
}
|
|
20421
20422
|
),
|
|
20422
|
-
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
20423
|
-
Feilds_default.Branches,
|
|
20424
|
-
{
|
|
20425
|
-
label: "Branch",
|
|
20426
|
-
form: methods,
|
|
20427
|
-
name: "branch",
|
|
20428
|
-
placeholder: "Select Branch",
|
|
20429
|
-
api: "/branches/get?noStore=true"
|
|
20430
|
-
}
|
|
20431
|
-
),
|
|
20432
20423
|
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
20433
20424
|
Fields_default.Input,
|
|
20434
20425
|
{
|
|
@@ -20462,7 +20453,7 @@ function ProductForm() {
|
|
|
20462
20453
|
var ProductForm_default = ProductForm;
|
|
20463
20454
|
|
|
20464
20455
|
// src/components/products/Feilds/Product.tsx
|
|
20465
|
-
var
|
|
20456
|
+
var import_react_router_dom26 = require("react-router-dom");
|
|
20466
20457
|
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
20467
20458
|
function Product({
|
|
20468
20459
|
name,
|
|
@@ -20478,7 +20469,7 @@ function Product({
|
|
|
20478
20469
|
obj,
|
|
20479
20470
|
className
|
|
20480
20471
|
}) {
|
|
20481
|
-
const { branchId } = (0,
|
|
20472
|
+
const { branchId } = (0, import_react_router_dom26.useParams)();
|
|
20482
20473
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
20483
20474
|
Fields_default.SearchApi,
|
|
20484
20475
|
{
|
|
@@ -20509,7 +20500,7 @@ var ProductField = {
|
|
|
20509
20500
|
var Feilds_default5 = ProductField;
|
|
20510
20501
|
|
|
20511
20502
|
// src/components/packs/Packs.tsx
|
|
20512
|
-
var
|
|
20503
|
+
var import_react_router_dom27 = require("react-router-dom");
|
|
20513
20504
|
var import_lucide_react63 = require("lucide-react");
|
|
20514
20505
|
var import_react66 = require("react");
|
|
20515
20506
|
var import_antd37 = require("antd");
|
|
@@ -20523,7 +20514,7 @@ function Packs({ v, url }) {
|
|
|
20523
20514
|
dateFilter: false
|
|
20524
20515
|
});
|
|
20525
20516
|
const { Modal: Modal2 } = useModal();
|
|
20526
|
-
const navigate = (0,
|
|
20517
|
+
const navigate = (0, import_react_router_dom27.useNavigate)();
|
|
20527
20518
|
const items = (data2) => [
|
|
20528
20519
|
{
|
|
20529
20520
|
label: `Edit Pack`,
|
|
@@ -20974,15 +20965,15 @@ function Pack({
|
|
|
20974
20965
|
var Pack_default = { Pack };
|
|
20975
20966
|
|
|
20976
20967
|
// src/components/journals/Journals.tsx
|
|
20977
|
-
var
|
|
20968
|
+
var import_react_router_dom28 = require("react-router-dom");
|
|
20978
20969
|
var import_lucide_react65 = require("lucide-react");
|
|
20979
20970
|
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
20980
20971
|
function Journals({
|
|
20981
20972
|
url,
|
|
20982
20973
|
journalType
|
|
20983
20974
|
}) {
|
|
20984
|
-
const { branchId } = (0,
|
|
20985
|
-
const navigate = (0,
|
|
20975
|
+
const { branchId } = (0, import_react_router_dom28.useParams)();
|
|
20976
|
+
const navigate = (0, import_react_router_dom28.useNavigate)();
|
|
20986
20977
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
20987
20978
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
20988
20979
|
url: url || `/transactions/get?type=journal${branchId ? `&fromBranch=${branchId}` : ""}${journalType ? `&journal=${journalType}` : ""}`,
|
|
@@ -21172,13 +21163,13 @@ var import_react_hook_form26 = require("react-hook-form");
|
|
|
21172
21163
|
var import_zod31 = require("@hookform/resolvers/zod");
|
|
21173
21164
|
var import_antd39 = require("antd");
|
|
21174
21165
|
var import_react68 = require("react");
|
|
21175
|
-
var
|
|
21166
|
+
var import_react_router_dom29 = require("react-router-dom");
|
|
21176
21167
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
21177
21168
|
function JournalForm({
|
|
21178
21169
|
isFee = true,
|
|
21179
21170
|
accountType = "all"
|
|
21180
21171
|
}) {
|
|
21181
|
-
const { branchId } = (0,
|
|
21172
|
+
const { branchId } = (0, import_react_router_dom29.useParams)();
|
|
21182
21173
|
const { getQuery, navigate } = useApp_default();
|
|
21183
21174
|
const id = getQuery("id");
|
|
21184
21175
|
const isEdit = !!id;
|
|
@@ -21451,15 +21442,15 @@ function JournalForm({
|
|
|
21451
21442
|
var JournalForm_default = JournalForm;
|
|
21452
21443
|
|
|
21453
21444
|
// src/components/payment/Payments.tsx
|
|
21454
|
-
var
|
|
21445
|
+
var import_react_router_dom30 = require("react-router-dom");
|
|
21455
21446
|
var import_lucide_react66 = require("lucide-react");
|
|
21456
21447
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
21457
21448
|
function Payments({
|
|
21458
21449
|
url,
|
|
21459
21450
|
paymentType
|
|
21460
21451
|
}) {
|
|
21461
|
-
const { branchId } = (0,
|
|
21462
|
-
const navigate = (0,
|
|
21452
|
+
const { branchId } = (0, import_react_router_dom30.useParams)();
|
|
21453
|
+
const navigate = (0, import_react_router_dom30.useNavigate)();
|
|
21463
21454
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
21464
21455
|
const { openPos, PosPrinter } = usePosPrinter_default();
|
|
21465
21456
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
@@ -21617,7 +21608,7 @@ var Payments_default = Payments;
|
|
|
21617
21608
|
|
|
21618
21609
|
// src/components/payment/PaymentForm.tsx
|
|
21619
21610
|
var import_react69 = require("react");
|
|
21620
|
-
var
|
|
21611
|
+
var import_react_router_dom31 = require("react-router-dom");
|
|
21621
21612
|
var import_react_hook_form27 = require("react-hook-form");
|
|
21622
21613
|
var import_zod34 = require("@hookform/resolvers/zod");
|
|
21623
21614
|
var import_antd40 = require("antd");
|
|
@@ -21647,7 +21638,7 @@ var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
|
21647
21638
|
function PaymentForm({
|
|
21648
21639
|
accountType = "all"
|
|
21649
21640
|
}) {
|
|
21650
|
-
const { branchId } = (0,
|
|
21641
|
+
const { branchId } = (0, import_react_router_dom31.useParams)();
|
|
21651
21642
|
const { getQuery, navigate } = useApp_default();
|
|
21652
21643
|
const id = getQuery("id");
|
|
21653
21644
|
const isEdit = !!id;
|
|
@@ -21884,12 +21875,12 @@ function PaymentForm({
|
|
|
21884
21875
|
var PaymentForm_default = PaymentForm;
|
|
21885
21876
|
|
|
21886
21877
|
// src/components/moneyTransfer/MoneyTransfers.tsx
|
|
21887
|
-
var
|
|
21878
|
+
var import_react_router_dom32 = require("react-router-dom");
|
|
21888
21879
|
var import_lucide_react67 = require("lucide-react");
|
|
21889
21880
|
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
21890
21881
|
function MoneyTransfers({ url }) {
|
|
21891
|
-
const { branchId } = (0,
|
|
21892
|
-
const navigate = (0,
|
|
21882
|
+
const { branchId } = (0, import_react_router_dom32.useParams)();
|
|
21883
|
+
const navigate = (0, import_react_router_dom32.useNavigate)();
|
|
21893
21884
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
21894
21885
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
21895
21886
|
url: url || `/transactions/get?type=money transfer${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -22019,7 +22010,7 @@ var MoneyTransfers_default = MoneyTransfers;
|
|
|
22019
22010
|
|
|
22020
22011
|
// src/components/moneyTransfer/MoneyTransferForm.tsx
|
|
22021
22012
|
var import_react70 = require("react");
|
|
22022
|
-
var
|
|
22013
|
+
var import_react_router_dom33 = require("react-router-dom");
|
|
22023
22014
|
var import_react_hook_form28 = require("react-hook-form");
|
|
22024
22015
|
var import_zod37 = require("@hookform/resolvers/zod");
|
|
22025
22016
|
var import_antd41 = require("antd");
|
|
@@ -22044,7 +22035,7 @@ var moneyTransferSchema = import_zod36.z.object({
|
|
|
22044
22035
|
// src/components/moneyTransfer/MoneyTransferForm.tsx
|
|
22045
22036
|
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
22046
22037
|
function MoneyTransferForm() {
|
|
22047
|
-
const { branchId } = (0,
|
|
22038
|
+
const { branchId } = (0, import_react_router_dom33.useParams)();
|
|
22048
22039
|
const { getQuery, navigate } = useApp_default();
|
|
22049
22040
|
const id = getQuery("id");
|
|
22050
22041
|
const isEdit = !!id;
|
|
@@ -22252,12 +22243,12 @@ function MoneyTransferForm() {
|
|
|
22252
22243
|
var MoneyTransferForm_default = MoneyTransferForm;
|
|
22253
22244
|
|
|
22254
22245
|
// src/components/expense/Expenses.tsx
|
|
22255
|
-
var
|
|
22246
|
+
var import_react_router_dom34 = require("react-router-dom");
|
|
22256
22247
|
var import_lucide_react68 = require("lucide-react");
|
|
22257
22248
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
22258
22249
|
function Expenses({ url }) {
|
|
22259
|
-
const { branchId } = (0,
|
|
22260
|
-
const navigate = (0,
|
|
22250
|
+
const { branchId } = (0, import_react_router_dom34.useParams)();
|
|
22251
|
+
const navigate = (0, import_react_router_dom34.useNavigate)();
|
|
22261
22252
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
22262
22253
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
22263
22254
|
url: url || `/transactions/get?type=expense${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -22375,7 +22366,7 @@ var Expenses_default = Expenses;
|
|
|
22375
22366
|
|
|
22376
22367
|
// src/components/expense/ExpenseForm.tsx
|
|
22377
22368
|
var import_react71 = require("react");
|
|
22378
|
-
var
|
|
22369
|
+
var import_react_router_dom35 = require("react-router-dom");
|
|
22379
22370
|
var import_react_hook_form29 = require("react-hook-form");
|
|
22380
22371
|
var import_zod40 = require("@hookform/resolvers/zod");
|
|
22381
22372
|
var import_antd42 = require("antd");
|
|
@@ -22396,7 +22387,7 @@ var expenseSchema = import_zod39.z.object({
|
|
|
22396
22387
|
// src/components/expense/ExpenseForm.tsx
|
|
22397
22388
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
22398
22389
|
function ExpenseForm() {
|
|
22399
|
-
const { branchId } = (0,
|
|
22390
|
+
const { branchId } = (0, import_react_router_dom35.useParams)();
|
|
22400
22391
|
const { getQuery, navigate } = useApp_default();
|
|
22401
22392
|
const id = getQuery("id");
|
|
22402
22393
|
const isEdit = !!id;
|
|
@@ -22545,12 +22536,12 @@ function ExpenseForm() {
|
|
|
22545
22536
|
var ExpenseForm_default = ExpenseForm;
|
|
22546
22537
|
|
|
22547
22538
|
// src/components/expense/forex/ForexExpenses.tsx
|
|
22548
|
-
var
|
|
22539
|
+
var import_react_router_dom37 = require("react-router-dom");
|
|
22549
22540
|
var import_lucide_react69 = require("lucide-react");
|
|
22550
22541
|
|
|
22551
22542
|
// src/components/expense/forex/ForexExpenseForm.tsx
|
|
22552
22543
|
var import_react72 = require("react");
|
|
22553
|
-
var
|
|
22544
|
+
var import_react_router_dom36 = require("react-router-dom");
|
|
22554
22545
|
var import_react_hook_form30 = require("react-hook-form");
|
|
22555
22546
|
var import_zod43 = require("@hookform/resolvers/zod");
|
|
22556
22547
|
var import_antd43 = require("antd");
|
|
@@ -22573,7 +22564,7 @@ function ForexExpenseForm({
|
|
|
22573
22564
|
close,
|
|
22574
22565
|
reload
|
|
22575
22566
|
}) {
|
|
22576
|
-
const { branchId } = (0,
|
|
22567
|
+
const { branchId } = (0, import_react_router_dom36.useParams)();
|
|
22577
22568
|
const isEdit = !!id;
|
|
22578
22569
|
const [ref2, setRef] = (0, import_react72.useState)("");
|
|
22579
22570
|
const { post, isLoading } = useApis_default();
|
|
@@ -22722,8 +22713,8 @@ var ForexExpenseForm_default = ForexExpenseForm;
|
|
|
22722
22713
|
// src/components/expense/forex/ForexExpenses.tsx
|
|
22723
22714
|
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
22724
22715
|
function ForexExpenses({ url }) {
|
|
22725
|
-
const { branchId } = (0,
|
|
22726
|
-
const navigate = (0,
|
|
22716
|
+
const { branchId } = (0, import_react_router_dom37.useParams)();
|
|
22717
|
+
const navigate = (0, import_react_router_dom37.useNavigate)();
|
|
22727
22718
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
22728
22719
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
22729
22720
|
url: url || `/transactions/get?type=forex expense${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -22850,7 +22841,7 @@ function ForexExpenses({ url }) {
|
|
|
22850
22841
|
var ForexExpenses_default = ForexExpenses;
|
|
22851
22842
|
|
|
22852
22843
|
// src/components/expense/forex/ForexExpensesReport.tsx
|
|
22853
|
-
var
|
|
22844
|
+
var import_react_router_dom38 = require("react-router-dom");
|
|
22854
22845
|
var import_react73 = require("react");
|
|
22855
22846
|
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
22856
22847
|
var ForexExpensesReport = () => {
|
|
@@ -22865,7 +22856,7 @@ var ForexExpensesReport = () => {
|
|
|
22865
22856
|
value: currency2
|
|
22866
22857
|
};
|
|
22867
22858
|
});
|
|
22868
|
-
const [searchParams, setSearchParams] = (0,
|
|
22859
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom38.useSearchParams)();
|
|
22869
22860
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
22870
22861
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
22871
22862
|
const [currencyFilter, setCurrencyFilter] = (0, import_react73.useState)(initialCurrency);
|
|
@@ -23432,7 +23423,7 @@ var WalletReport = () => {
|
|
|
23432
23423
|
var Report_default2 = WalletReport;
|
|
23433
23424
|
|
|
23434
23425
|
// src/components/accounts/Statements.tsx
|
|
23435
|
-
var
|
|
23426
|
+
var import_react_router_dom39 = require("react-router-dom");
|
|
23436
23427
|
var import_react75 = require("react");
|
|
23437
23428
|
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
23438
23429
|
var options = [
|
|
@@ -23441,8 +23432,8 @@ var options = [
|
|
|
23441
23432
|
{ label: "Credit", value: "credit" }
|
|
23442
23433
|
];
|
|
23443
23434
|
var AccountStatements = () => {
|
|
23444
|
-
const navigate = (0,
|
|
23445
|
-
const [searchParams, setSearchParams] = (0,
|
|
23435
|
+
const navigate = (0, import_react_router_dom39.useNavigate)();
|
|
23436
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom39.useSearchParams)();
|
|
23446
23437
|
const { apiConfig, enums } = useWarqadConfig();
|
|
23447
23438
|
const { getParams } = useApp_default();
|
|
23448
23439
|
const type = getParams("type");
|
|
@@ -23644,7 +23635,7 @@ var AccountStatements = () => {
|
|
|
23644
23635
|
var Statements_default = AccountStatements;
|
|
23645
23636
|
|
|
23646
23637
|
// src/components/accounts/balances.tsx
|
|
23647
|
-
var
|
|
23638
|
+
var import_react_router_dom40 = require("react-router-dom");
|
|
23648
23639
|
var import_react76 = require("react");
|
|
23649
23640
|
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
23650
23641
|
var options2 = [
|
|
@@ -23653,9 +23644,9 @@ var options2 = [
|
|
|
23653
23644
|
{ label: "Credit", value: "credit" }
|
|
23654
23645
|
];
|
|
23655
23646
|
var AccountBalances = () => {
|
|
23656
|
-
const navigate = (0,
|
|
23657
|
-
const { branchId } = (0,
|
|
23658
|
-
const [searchParams, setSearchParams] = (0,
|
|
23647
|
+
const navigate = (0, import_react_router_dom40.useNavigate)();
|
|
23648
|
+
const { branchId } = (0, import_react_router_dom40.useParams)();
|
|
23649
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom40.useSearchParams)();
|
|
23659
23650
|
const { apiConfig, enums, currencies } = useWarqadConfig();
|
|
23660
23651
|
const defaultCurrency = currencies.stock || "all";
|
|
23661
23652
|
const { getParams } = useApp_default();
|
|
@@ -23856,7 +23847,7 @@ var AccountBalances = () => {
|
|
|
23856
23847
|
var balances_default = AccountBalances;
|
|
23857
23848
|
|
|
23858
23849
|
// src/components/wallets/Statements.tsx
|
|
23859
|
-
var
|
|
23850
|
+
var import_react_router_dom41 = require("react-router-dom");
|
|
23860
23851
|
var import_react77 = require("react");
|
|
23861
23852
|
var import_antd45 = require("antd");
|
|
23862
23853
|
var import_dayjs4 = __toESM(require("dayjs"));
|
|
@@ -23867,8 +23858,8 @@ var options3 = [
|
|
|
23867
23858
|
{ label: "Credit", value: "credit" }
|
|
23868
23859
|
];
|
|
23869
23860
|
var WalletStatements = () => {
|
|
23870
|
-
const navigate = (0,
|
|
23871
|
-
const [searchParams, setSearchParams] = (0,
|
|
23861
|
+
const navigate = (0, import_react_router_dom41.useNavigate)();
|
|
23862
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom41.useSearchParams)();
|
|
23872
23863
|
const { apiConfig, enums } = useWarqadConfig();
|
|
23873
23864
|
const urlFilter = searchParams.get("filter");
|
|
23874
23865
|
const initialFilter = ["all", "debit", "credit"].includes(urlFilter) ? urlFilter : "all";
|
|
@@ -24124,12 +24115,12 @@ var WalletStatements = () => {
|
|
|
24124
24115
|
var Statements_default2 = WalletStatements;
|
|
24125
24116
|
|
|
24126
24117
|
// src/components/walletAdjustment/WalletAdjustments.tsx
|
|
24127
|
-
var
|
|
24118
|
+
var import_react_router_dom42 = require("react-router-dom");
|
|
24128
24119
|
var import_lucide_react70 = require("lucide-react");
|
|
24129
24120
|
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
24130
24121
|
function WalletAdjustments({ url }) {
|
|
24131
|
-
const { branchId } = (0,
|
|
24132
|
-
const navigate = (0,
|
|
24122
|
+
const { branchId } = (0, import_react_router_dom42.useParams)();
|
|
24123
|
+
const navigate = (0, import_react_router_dom42.useNavigate)();
|
|
24133
24124
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
24134
24125
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
24135
24126
|
url: url || `/transactions/get?type=adjustment&adjustment=wallet${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -24258,7 +24249,7 @@ var WalletAdjustments_default = WalletAdjustments;
|
|
|
24258
24249
|
|
|
24259
24250
|
// src/components/walletAdjustment/WalletAdjustmentForm.tsx
|
|
24260
24251
|
var import_react78 = require("react");
|
|
24261
|
-
var
|
|
24252
|
+
var import_react_router_dom43 = require("react-router-dom");
|
|
24262
24253
|
var import_react_hook_form31 = require("react-hook-form");
|
|
24263
24254
|
var import_zod46 = require("@hookform/resolvers/zod");
|
|
24264
24255
|
var import_antd46 = require("antd");
|
|
@@ -24280,7 +24271,7 @@ var walletAdjustmentSchema = import_zod45.z.object({
|
|
|
24280
24271
|
// src/components/walletAdjustment/WalletAdjustmentForm.tsx
|
|
24281
24272
|
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
24282
24273
|
function WalletAdjustmentForm() {
|
|
24283
|
-
const { branchId } = (0,
|
|
24274
|
+
const { branchId } = (0, import_react_router_dom43.useParams)();
|
|
24284
24275
|
const { getQuery, navigate } = useApp_default();
|
|
24285
24276
|
const id = getQuery("id");
|
|
24286
24277
|
const isEdit = !!id;
|
|
@@ -24444,12 +24435,12 @@ function WalletAdjustmentForm() {
|
|
|
24444
24435
|
var WalletAdjustmentForm_default = WalletAdjustmentForm;
|
|
24445
24436
|
|
|
24446
24437
|
// src/components/forexTransfer/ForexTransfers.tsx
|
|
24447
|
-
var
|
|
24438
|
+
var import_react_router_dom44 = require("react-router-dom");
|
|
24448
24439
|
var import_lucide_react71 = require("lucide-react");
|
|
24449
24440
|
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
24450
24441
|
function ForexTransfers({ url }) {
|
|
24451
|
-
const { branchId } = (0,
|
|
24452
|
-
const navigate = (0,
|
|
24442
|
+
const { branchId } = (0, import_react_router_dom44.useParams)();
|
|
24443
|
+
const navigate = (0, import_react_router_dom44.useNavigate)();
|
|
24453
24444
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
24454
24445
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
24455
24446
|
url: url || `/transactions/get?type=forex transfer${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -24593,7 +24584,7 @@ var ForexTransfers_default = ForexTransfers;
|
|
|
24593
24584
|
|
|
24594
24585
|
// src/components/forexTransfer/ForexTransferForm.tsx
|
|
24595
24586
|
var import_react79 = require("react");
|
|
24596
|
-
var
|
|
24587
|
+
var import_react_router_dom45 = require("react-router-dom");
|
|
24597
24588
|
var import_react_hook_form32 = require("react-hook-form");
|
|
24598
24589
|
var import_zod49 = require("@hookform/resolvers/zod");
|
|
24599
24590
|
var import_antd47 = require("antd");
|
|
@@ -24619,7 +24610,7 @@ var forexTransferSchema = import_zod48.z.object({
|
|
|
24619
24610
|
// src/components/forexTransfer/ForexTransferForm.tsx
|
|
24620
24611
|
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
24621
24612
|
function ForexTransferForm() {
|
|
24622
|
-
const { branchId } = (0,
|
|
24613
|
+
const { branchId } = (0, import_react_router_dom45.useParams)();
|
|
24623
24614
|
const { getQuery, navigate } = useApp_default();
|
|
24624
24615
|
const id = getQuery("id");
|
|
24625
24616
|
const isEdit = !!id;
|
|
@@ -24858,15 +24849,15 @@ function ForexTransferForm() {
|
|
|
24858
24849
|
var ForexTransferForm_default = ForexTransferForm;
|
|
24859
24850
|
|
|
24860
24851
|
// src/components/stocks/clothend/adjustment/ClothendStockAdjustment.tsx
|
|
24861
|
-
var
|
|
24852
|
+
var import_react_router_dom46 = require("react-router-dom");
|
|
24862
24853
|
var import_lucide_react72 = require("lucide-react");
|
|
24863
24854
|
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
24864
24855
|
function ClothendStockAdjustment({
|
|
24865
24856
|
url,
|
|
24866
24857
|
type = "product"
|
|
24867
24858
|
}) {
|
|
24868
|
-
const { branchId } = (0,
|
|
24869
|
-
const navigate = (0,
|
|
24859
|
+
const { branchId } = (0, import_react_router_dom46.useParams)();
|
|
24860
|
+
const navigate = (0, import_react_router_dom46.useNavigate)();
|
|
24870
24861
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
24871
24862
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
24872
24863
|
url: url || `/transactions/get?type=stock&stock=adjustment&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -25000,9 +24991,11 @@ var import_react81 = require("react");
|
|
|
25000
24991
|
|
|
25001
24992
|
// src/components/stocks/clothend/adjustment/header.tsx
|
|
25002
24993
|
var import_react_hook_form33 = require("react-hook-form");
|
|
24994
|
+
var import_react_router_dom47 = require("react-router-dom");
|
|
25003
24995
|
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
25004
24996
|
function AdjustmentHeader({ stockType }) {
|
|
25005
24997
|
const form = (0, import_react_hook_form33.useFormContext)();
|
|
24998
|
+
const { branchId } = (0, import_react_router_dom47.useParams)();
|
|
25006
24999
|
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("section", { className: "grid grid-cols-1 md:grid-cols-4 lg:grid-cols-5 border-b-2 pb-4 pt-2 gap-4", children: [
|
|
25007
25000
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
25008
25001
|
Fields_default.DateInput,
|
|
@@ -25020,6 +25013,7 @@ function AdjustmentHeader({ stockType }) {
|
|
|
25020
25013
|
name: "branch",
|
|
25021
25014
|
form,
|
|
25022
25015
|
obj: "branchObj",
|
|
25016
|
+
disabled: !!branchId,
|
|
25023
25017
|
required: true
|
|
25024
25018
|
}
|
|
25025
25019
|
),
|
|
@@ -25414,10 +25408,12 @@ var schema_default2 = AdjustmentStockSchema;
|
|
|
25414
25408
|
|
|
25415
25409
|
// src/components/stocks/clothend/adjustment/pos.tsx
|
|
25416
25410
|
var import_lucide_react73 = require("lucide-react");
|
|
25411
|
+
var import_react_router_dom48 = require("react-router-dom");
|
|
25417
25412
|
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
25418
25413
|
var PosStockAdjustment = ({ type }) => {
|
|
25419
25414
|
const { getQuery, navigate } = useApp_default();
|
|
25420
25415
|
const stockType = type;
|
|
25416
|
+
const { branchId } = (0, import_react_router_dom48.useParams)();
|
|
25421
25417
|
const adjustmentId = getQuery("id");
|
|
25422
25418
|
const { currencies } = useWarqadConfig();
|
|
25423
25419
|
const currency = currencies?.stock;
|
|
@@ -25428,7 +25424,6 @@ var PosStockAdjustment = ({ type }) => {
|
|
|
25428
25424
|
// header
|
|
25429
25425
|
date: (0, import_moment4.default)().format("DD/MM/YYYY"),
|
|
25430
25426
|
stockType: type,
|
|
25431
|
-
branch: "",
|
|
25432
25427
|
action: "credit",
|
|
25433
25428
|
branchObj: void 0,
|
|
25434
25429
|
//line
|
|
@@ -25436,7 +25431,8 @@ var PosStockAdjustment = ({ type }) => {
|
|
|
25436
25431
|
lineId: void 0,
|
|
25437
25432
|
lineQuantity: void 0,
|
|
25438
25433
|
lineCost: void 0,
|
|
25439
|
-
lineBalance: 0
|
|
25434
|
+
lineBalance: 0,
|
|
25435
|
+
branch: branchId
|
|
25440
25436
|
}
|
|
25441
25437
|
});
|
|
25442
25438
|
const { handleSubmit, watch, setValue } = methods;
|
|
@@ -25648,15 +25644,15 @@ function getStorageType(type, branch) {
|
|
|
25648
25644
|
var pos_default = PosStockAdjustment;
|
|
25649
25645
|
|
|
25650
25646
|
// src/components/stocks/clothend/sale/SaleStockAdjustment.tsx
|
|
25651
|
-
var
|
|
25647
|
+
var import_react_router_dom49 = require("react-router-dom");
|
|
25652
25648
|
var import_lucide_react74 = require("lucide-react");
|
|
25653
25649
|
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
25654
25650
|
function SaleStockAdjustment({
|
|
25655
25651
|
url,
|
|
25656
25652
|
type = "product"
|
|
25657
25653
|
}) {
|
|
25658
|
-
const { branchId } = (0,
|
|
25659
|
-
const navigate = (0,
|
|
25654
|
+
const { branchId } = (0, import_react_router_dom49.useParams)();
|
|
25655
|
+
const navigate = (0, import_react_router_dom49.useNavigate)();
|
|
25660
25656
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
25661
25657
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
25662
25658
|
url: url || `/transactions/get?type=stock&stock=sale&stockType=${type}${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -25821,13 +25817,13 @@ var import_react84 = require("react");
|
|
|
25821
25817
|
|
|
25822
25818
|
// src/components/stocks/clothend/sale/header.tsx
|
|
25823
25819
|
var import_react_hook_form35 = require("react-hook-form");
|
|
25824
|
-
var
|
|
25820
|
+
var import_react_router_dom50 = require("react-router-dom");
|
|
25825
25821
|
var import_react82 = require("react");
|
|
25826
25822
|
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
25827
25823
|
function SaleHeader({ stockType }) {
|
|
25828
25824
|
const form = (0, import_react_hook_form35.useFormContext)();
|
|
25829
25825
|
const { branches } = useAuth_default();
|
|
25830
|
-
const { branchId } = (0,
|
|
25826
|
+
const { branchId } = (0, import_react_router_dom50.useParams)();
|
|
25831
25827
|
const sale = form.watch("sale");
|
|
25832
25828
|
const { currencies } = useWarqadConfig();
|
|
25833
25829
|
const branchCurrency = (branches || []).find(
|
|
@@ -26319,12 +26315,12 @@ var schema_default3 = AdjustmentStockSchema2;
|
|
|
26319
26315
|
|
|
26320
26316
|
// src/components/stocks/clothend/sale/pos.tsx
|
|
26321
26317
|
var import_lucide_react75 = require("lucide-react");
|
|
26322
|
-
var
|
|
26318
|
+
var import_react_router_dom51 = require("react-router-dom");
|
|
26323
26319
|
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
26324
26320
|
var SaleStockForm = ({ type }) => {
|
|
26325
26321
|
const { getQuery, navigate } = useApp_default();
|
|
26326
26322
|
const stockType = type;
|
|
26327
|
-
const { branchId } = (0,
|
|
26323
|
+
const { branchId } = (0, import_react_router_dom51.useParams)();
|
|
26328
26324
|
const saleId = getQuery("id");
|
|
26329
26325
|
const { branches } = useAuth_default();
|
|
26330
26326
|
const { currencies } = useWarqadConfig();
|
|
@@ -26588,15 +26584,15 @@ function getStorageType2(type, branch) {
|
|
|
26588
26584
|
var pos_default2 = SaleStockForm;
|
|
26589
26585
|
|
|
26590
26586
|
// src/components/stocks/clothend/transfer/ClothendStockTransfer.tsx
|
|
26591
|
-
var
|
|
26587
|
+
var import_react_router_dom52 = require("react-router-dom");
|
|
26592
26588
|
var import_lucide_react76 = require("lucide-react");
|
|
26593
26589
|
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
26594
26590
|
function ClothendStockTransfer({
|
|
26595
26591
|
url,
|
|
26596
26592
|
type = "product"
|
|
26597
26593
|
}) {
|
|
26598
|
-
const { branchId } = (0,
|
|
26599
|
-
const navigate = (0,
|
|
26594
|
+
const { branchId } = (0, import_react_router_dom52.useParams)();
|
|
26595
|
+
const navigate = (0, import_react_router_dom52.useNavigate)();
|
|
26600
26596
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
26601
26597
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
26602
26598
|
url: url || `/transactions/get?type=stock&stock=transfer&transfer=${type}${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -26723,12 +26719,12 @@ var import_react87 = require("react");
|
|
|
26723
26719
|
|
|
26724
26720
|
// src/components/stocks/clothend/transfer/header.tsx
|
|
26725
26721
|
var import_react_hook_form37 = require("react-hook-form");
|
|
26726
|
-
var
|
|
26722
|
+
var import_react_router_dom53 = require("react-router-dom");
|
|
26727
26723
|
var import_react85 = require("react");
|
|
26728
26724
|
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
26729
26725
|
function TransferHeader({ stockType }) {
|
|
26730
26726
|
const form = (0, import_react_hook_form37.useFormContext)();
|
|
26731
|
-
const { branchId } = (0,
|
|
26727
|
+
const { branchId } = (0, import_react_router_dom53.useParams)();
|
|
26732
26728
|
const transfer = form.watch("transfer");
|
|
26733
26729
|
const fromBranch = form.watch("fromBranch");
|
|
26734
26730
|
const filter = (0, import_react85.useMemo)(() => {
|
|
@@ -27140,11 +27136,11 @@ var schema_default4 = AdjustmentStockSchema3;
|
|
|
27140
27136
|
|
|
27141
27137
|
// src/components/stocks/clothend/transfer/pos.tsx
|
|
27142
27138
|
var import_lucide_react77 = require("lucide-react");
|
|
27143
|
-
var
|
|
27139
|
+
var import_react_router_dom54 = require("react-router-dom");
|
|
27144
27140
|
var import_jsx_runtime156 = require("react/jsx-runtime");
|
|
27145
27141
|
var PosStockTransfer = ({ type }) => {
|
|
27146
27142
|
const { getQuery, navigate } = useApp_default();
|
|
27147
|
-
const { branchId } = (0,
|
|
27143
|
+
const { branchId } = (0, import_react_router_dom54.useParams)();
|
|
27148
27144
|
const transferId = getQuery("id");
|
|
27149
27145
|
const { currencies } = useWarqadConfig();
|
|
27150
27146
|
const currency = currencies?.stock;
|
|
@@ -27376,12 +27372,12 @@ function getStorageType3(type, branch) {
|
|
|
27376
27372
|
var pos_default3 = PosStockTransfer;
|
|
27377
27373
|
|
|
27378
27374
|
// src/components/forexDubaiToChina/ForexDubaiToChina.tsx
|
|
27379
|
-
var
|
|
27375
|
+
var import_react_router_dom55 = require("react-router-dom");
|
|
27380
27376
|
var import_lucide_react78 = require("lucide-react");
|
|
27381
27377
|
var import_jsx_runtime157 = require("react/jsx-runtime");
|
|
27382
27378
|
function ForexDubaiToChina() {
|
|
27383
|
-
const { branchId } = (0,
|
|
27384
|
-
const navigate = (0,
|
|
27379
|
+
const { branchId } = (0, import_react_router_dom55.useParams)();
|
|
27380
|
+
const navigate = (0, import_react_router_dom55.useNavigate)();
|
|
27385
27381
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
27386
27382
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
27387
27383
|
url: `/transactions/get?type=forex dubai to china${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -27563,10 +27559,10 @@ var import_react_hook_form39 = require("react-hook-form");
|
|
|
27563
27559
|
var import_zod58 = require("@hookform/resolvers/zod");
|
|
27564
27560
|
var import_antd51 = require("antd");
|
|
27565
27561
|
var import_react88 = require("react");
|
|
27566
|
-
var
|
|
27562
|
+
var import_react_router_dom56 = require("react-router-dom");
|
|
27567
27563
|
var import_jsx_runtime158 = require("react/jsx-runtime");
|
|
27568
27564
|
function ForexDubaiToChinaForm() {
|
|
27569
|
-
const { branchId } = (0,
|
|
27565
|
+
const { branchId } = (0, import_react_router_dom56.useParams)();
|
|
27570
27566
|
const { getQuery, navigate } = useApp_default();
|
|
27571
27567
|
const id = getQuery("id");
|
|
27572
27568
|
const isEdit = !!id;
|
|
@@ -27848,7 +27844,7 @@ function ForexDubaiToChinaForm() {
|
|
|
27848
27844
|
var ForexDubaiToChinaForm_default = ForexDubaiToChinaForm;
|
|
27849
27845
|
|
|
27850
27846
|
// src/components/accounts/ForexAccountReport.tsx
|
|
27851
|
-
var
|
|
27847
|
+
var import_react_router_dom58 = require("react-router-dom");
|
|
27852
27848
|
var import_react90 = require("react");
|
|
27853
27849
|
|
|
27854
27850
|
// src/components/accounts/forex-2/Forex2FormTransaction.tsx
|
|
@@ -27881,7 +27877,7 @@ var forex2TransactionSchema = import_zod59.default.object({
|
|
|
27881
27877
|
var schema_default5 = forex2TransactionSchema;
|
|
27882
27878
|
|
|
27883
27879
|
// src/components/accounts/forex-2/Forex2FormTransaction.tsx
|
|
27884
|
-
var
|
|
27880
|
+
var import_react_router_dom57 = require("react-router-dom");
|
|
27885
27881
|
var import_react89 = require("react");
|
|
27886
27882
|
var import_antd52 = require("antd");
|
|
27887
27883
|
var import_jsx_runtime159 = require("react/jsx-runtime");
|
|
@@ -27893,7 +27889,7 @@ function Forex2FormTransaction({
|
|
|
27893
27889
|
action: defaultAction
|
|
27894
27890
|
}) {
|
|
27895
27891
|
const [accountInfo, setAccountInfo] = (0, import_react89.useState)(accountData);
|
|
27896
|
-
const { branchId } = (0,
|
|
27892
|
+
const { branchId } = (0, import_react_router_dom57.useParams)();
|
|
27897
27893
|
const [ref2, setRef] = (0, import_react89.useState)("");
|
|
27898
27894
|
const [showReverseModal, setShowReverseModal] = (0, import_react89.useState)(false);
|
|
27899
27895
|
const { post, isLoading } = useApis_default();
|
|
@@ -28355,7 +28351,7 @@ var ForexAccountReport = () => {
|
|
|
28355
28351
|
value: currency2
|
|
28356
28352
|
};
|
|
28357
28353
|
});
|
|
28358
|
-
const [searchParams, setSearchParams] = (0,
|
|
28354
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom58.useSearchParams)();
|
|
28359
28355
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
28360
28356
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
28361
28357
|
const [currencyFilter, setCurrencyFilter] = (0, import_react90.useState)(initialCurrency);
|
|
@@ -28576,7 +28572,7 @@ var ForexAccountReport = () => {
|
|
|
28576
28572
|
var ForexAccountReport_default = ForexAccountReport;
|
|
28577
28573
|
|
|
28578
28574
|
// src/components/accounts/ForexAccountStatements.tsx
|
|
28579
|
-
var
|
|
28575
|
+
var import_react_router_dom59 = require("react-router-dom");
|
|
28580
28576
|
var import_react91 = require("react");
|
|
28581
28577
|
var import_jsx_runtime161 = require("react/jsx-runtime");
|
|
28582
28578
|
var options4 = [
|
|
@@ -28585,8 +28581,8 @@ var options4 = [
|
|
|
28585
28581
|
{ label: "Credit", value: "credit" }
|
|
28586
28582
|
];
|
|
28587
28583
|
var ForexAccountStatements = () => {
|
|
28588
|
-
const navigate = (0,
|
|
28589
|
-
const [searchParams, setSearchParams] = (0,
|
|
28584
|
+
const navigate = (0, import_react_router_dom59.useNavigate)();
|
|
28585
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom59.useSearchParams)();
|
|
28590
28586
|
const { apiConfig, enums } = useWarqadConfig();
|
|
28591
28587
|
const type = "account";
|
|
28592
28588
|
const urlFilter = searchParams.get("filter");
|
|
@@ -28773,7 +28769,7 @@ var ForexAccountStatements = () => {
|
|
|
28773
28769
|
var ForexAccountStatements_default = ForexAccountStatements;
|
|
28774
28770
|
|
|
28775
28771
|
// src/components/reports/StockLevel.tsx
|
|
28776
|
-
var
|
|
28772
|
+
var import_react_router_dom60 = require("react-router-dom");
|
|
28777
28773
|
var import_jsx_runtime162 = require("react/jsx-runtime");
|
|
28778
28774
|
var options5 = [
|
|
28779
28775
|
{ label: "Product", value: "product" },
|
|
@@ -28785,7 +28781,7 @@ var StockLevel = ({
|
|
|
28785
28781
|
}) => {
|
|
28786
28782
|
const { apiConfig, currencies } = useWarqadConfig();
|
|
28787
28783
|
const { stock } = currencies;
|
|
28788
|
-
const { branchId } = (0,
|
|
28784
|
+
const { branchId } = (0, import_react_router_dom60.useParams)();
|
|
28789
28785
|
const { branches } = useAuth_default();
|
|
28790
28786
|
const { TransactionView } = useTransactionView_default();
|
|
28791
28787
|
const { getQuery, setQuery } = useApp_default();
|
|
@@ -28904,7 +28900,7 @@ var StockLevel = ({
|
|
|
28904
28900
|
var StockLevel_default = StockLevel;
|
|
28905
28901
|
|
|
28906
28902
|
// src/components/reports/profitAndReport.tsx
|
|
28907
|
-
var
|
|
28903
|
+
var import_react_router_dom61 = require("react-router-dom");
|
|
28908
28904
|
var import_zod62 = require("zod");
|
|
28909
28905
|
var import_react_hook_form41 = require("react-hook-form");
|
|
28910
28906
|
var import_zod63 = require("@hookform/resolvers/zod");
|
|
@@ -28912,7 +28908,7 @@ var import_react92 = require("react");
|
|
|
28912
28908
|
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
28913
28909
|
var ProfitAndLossReport = () => {
|
|
28914
28910
|
const { apiConfig } = useWarqadConfig();
|
|
28915
|
-
const { branchId } = (0,
|
|
28911
|
+
const { branchId } = (0, import_react_router_dom61.useParams)();
|
|
28916
28912
|
const { branches } = useAuth_default();
|
|
28917
28913
|
const { currencies } = useWarqadConfig();
|
|
28918
28914
|
const { stock: currency } = currencies;
|
|
@@ -29127,7 +29123,7 @@ var profitAndReport_default = ProfitAndLossReport;
|
|
|
29127
29123
|
var import_antd53 = require("antd");
|
|
29128
29124
|
var import_react93 = require("react");
|
|
29129
29125
|
var import_recharts = require("recharts");
|
|
29130
|
-
var
|
|
29126
|
+
var import_react_router_dom62 = require("react-router-dom");
|
|
29131
29127
|
var import_jsx_runtime164 = require("react/jsx-runtime");
|
|
29132
29128
|
var { Title, Text } = import_antd53.Typography;
|
|
29133
29129
|
function DateSalesReport({
|
|
@@ -29136,7 +29132,7 @@ function DateSalesReport({
|
|
|
29136
29132
|
}) {
|
|
29137
29133
|
const { data, get, isLoading } = useApis_default();
|
|
29138
29134
|
const { currencies } = useWarqadConfig();
|
|
29139
|
-
const { branchId } = (0,
|
|
29135
|
+
const { branchId } = (0, import_react_router_dom62.useParams)();
|
|
29140
29136
|
const { branches } = useAuth_default();
|
|
29141
29137
|
const branch = (branches || []).find((b) => b._id === branchId);
|
|
29142
29138
|
const branchCurrency = branch?.currency || "KES";
|
|
@@ -29555,11 +29551,11 @@ function MessageView({ data, isLoading }) {
|
|
|
29555
29551
|
var MessageView_default = MessageView;
|
|
29556
29552
|
|
|
29557
29553
|
// src/components/messages/Messages.tsx
|
|
29558
|
-
var
|
|
29554
|
+
var import_react_router_dom63 = require("react-router-dom");
|
|
29559
29555
|
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
29560
29556
|
function Messages() {
|
|
29561
29557
|
const { application, store } = useWarqadConfig();
|
|
29562
|
-
const { branchId } = (0,
|
|
29558
|
+
const { branchId } = (0, import_react_router_dom63.useParams)();
|
|
29563
29559
|
const socket = useWarqadSocket();
|
|
29564
29560
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
29565
29561
|
url: `/messages/get${branchId ? `?branch=${branchId}` : ""}`,
|
|
@@ -29981,7 +29977,7 @@ var FloorSection = ({
|
|
|
29981
29977
|
var FloorSection_default = FloorSection;
|
|
29982
29978
|
|
|
29983
29979
|
// src/components/realestate/floors/Floors.tsx
|
|
29984
|
-
var
|
|
29980
|
+
var import_react_router_dom64 = require("react-router-dom");
|
|
29985
29981
|
|
|
29986
29982
|
// src/components/realestate/floors/FloorFilter.tsx
|
|
29987
29983
|
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
@@ -30253,7 +30249,7 @@ function FloorsContainer({ type = "rent" }) {
|
|
|
30253
30249
|
const [statusFilter, setStatusFilter] = (0, import_react95.useState)("all");
|
|
30254
30250
|
const [selectedFloorId, setSelectedFloorId] = (0, import_react95.useState)("all");
|
|
30255
30251
|
const { get, data, isLoading } = useApis_default();
|
|
30256
|
-
const { branchId } = (0,
|
|
30252
|
+
const { branchId } = (0, import_react_router_dom64.useParams)();
|
|
30257
30253
|
const rawFloors = data?.data || [];
|
|
30258
30254
|
const floorsData = (0, import_react95.useMemo)(() => {
|
|
30259
30255
|
return rawFloors.map((floor) => ({
|
|
@@ -30435,7 +30431,7 @@ var Floors = FloorsContainer;
|
|
|
30435
30431
|
var Floors_default = Floors;
|
|
30436
30432
|
|
|
30437
30433
|
// src/components/realestate/units/UnitField.tsx
|
|
30438
|
-
var
|
|
30434
|
+
var import_react_router_dom65 = require("react-router-dom");
|
|
30439
30435
|
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
30440
30436
|
function UnitField({
|
|
30441
30437
|
name,
|
|
@@ -30449,7 +30445,7 @@ function UnitField({
|
|
|
30449
30445
|
disabled,
|
|
30450
30446
|
obj
|
|
30451
30447
|
}) {
|
|
30452
|
-
const { branchId } = (0,
|
|
30448
|
+
const { branchId } = (0, import_react_router_dom65.useParams)();
|
|
30453
30449
|
const separator = api.includes("?") ? "&" : "?";
|
|
30454
30450
|
let apiUrl = api;
|
|
30455
30451
|
if (branchId) {
|
|
@@ -30483,15 +30479,15 @@ var Units = {
|
|
|
30483
30479
|
var units_default = Units;
|
|
30484
30480
|
|
|
30485
30481
|
// src/components/realestate/lease/journal/LeaseJornal.tsx
|
|
30486
|
-
var
|
|
30482
|
+
var import_react_router_dom66 = require("react-router-dom");
|
|
30487
30483
|
var import_lucide_react86 = require("lucide-react");
|
|
30488
30484
|
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
30489
30485
|
function LeaseJournals({
|
|
30490
30486
|
url,
|
|
30491
30487
|
leaseType
|
|
30492
30488
|
}) {
|
|
30493
|
-
const { branchId } = (0,
|
|
30494
|
-
const navigate = (0,
|
|
30489
|
+
const { branchId } = (0, import_react_router_dom66.useParams)();
|
|
30490
|
+
const navigate = (0, import_react_router_dom66.useNavigate)();
|
|
30495
30491
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
30496
30492
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
30497
30493
|
url: url || `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=journal&leaseType=${leaseType}`,
|
|
@@ -30667,7 +30663,7 @@ var leaseJournalSchema = import_zod64.default.object({
|
|
|
30667
30663
|
var import_react_hook_form42 = require("react-hook-form");
|
|
30668
30664
|
var import_zod66 = require("@hookform/resolvers/zod");
|
|
30669
30665
|
var import_react96 = require("react");
|
|
30670
|
-
var
|
|
30666
|
+
var import_react_router_dom67 = require("react-router-dom");
|
|
30671
30667
|
var import_antd54 = require("antd");
|
|
30672
30668
|
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
30673
30669
|
function LeaseJornalFrom({ leaseType }) {
|
|
@@ -30680,7 +30676,7 @@ function LeaseJornalFrom({ leaseType }) {
|
|
|
30680
30676
|
}
|
|
30681
30677
|
});
|
|
30682
30678
|
const [ref2, setRef] = (0, import_react96.useState)("");
|
|
30683
|
-
const { branchId } = (0,
|
|
30679
|
+
const { branchId } = (0, import_react_router_dom67.useParams)();
|
|
30684
30680
|
const { getQuery, navigate } = useApp_default();
|
|
30685
30681
|
const id = getQuery("id");
|
|
30686
30682
|
const isEdit = !!id;
|
|
@@ -30879,12 +30875,12 @@ var import_zod68 = require("@hookform/resolvers/zod");
|
|
|
30879
30875
|
var import_react_hook_form43 = require("react-hook-form");
|
|
30880
30876
|
var import_moment9 = __toESM(require("moment"));
|
|
30881
30877
|
var import_antd55 = require("antd");
|
|
30882
|
-
var
|
|
30878
|
+
var import_react_router_dom68 = require("react-router-dom");
|
|
30883
30879
|
var import_react97 = require("react");
|
|
30884
30880
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
30885
30881
|
function LeaseForm({ leaseType }) {
|
|
30886
30882
|
const { getQuery, navigate } = useApp_default();
|
|
30887
|
-
const { branchId } = (0,
|
|
30883
|
+
const { branchId } = (0, import_react_router_dom68.useParams)();
|
|
30888
30884
|
const id = getQuery("id");
|
|
30889
30885
|
const isEdit = !!id;
|
|
30890
30886
|
const { isLoading: getLoading, get } = useApis_default();
|
|
@@ -31019,15 +31015,15 @@ function LeaseForm({ leaseType }) {
|
|
|
31019
31015
|
var LeaseForm_default = LeaseForm;
|
|
31020
31016
|
|
|
31021
31017
|
// src/components/realestate/lease/payment/LeasePayment.tsx
|
|
31022
|
-
var
|
|
31018
|
+
var import_react_router_dom69 = require("react-router-dom");
|
|
31023
31019
|
var import_lucide_react87 = require("lucide-react");
|
|
31024
31020
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
31025
31021
|
function LeasePayment({
|
|
31026
31022
|
url,
|
|
31027
31023
|
leaseType
|
|
31028
31024
|
}) {
|
|
31029
|
-
const { branchId } = (0,
|
|
31030
|
-
const navigate = (0,
|
|
31025
|
+
const { branchId } = (0, import_react_router_dom69.useParams)();
|
|
31026
|
+
const navigate = (0, import_react_router_dom69.useNavigate)();
|
|
31031
31027
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
31032
31028
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
31033
31029
|
url: url || `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=payment&leaseType=${leaseType}`,
|
|
@@ -31203,7 +31199,7 @@ var leaseJournalSchema2 = import_zod69.default.object({
|
|
|
31203
31199
|
var import_react_hook_form44 = require("react-hook-form");
|
|
31204
31200
|
var import_zod71 = require("@hookform/resolvers/zod");
|
|
31205
31201
|
var import_react98 = require("react");
|
|
31206
|
-
var
|
|
31202
|
+
var import_react_router_dom70 = require("react-router-dom");
|
|
31207
31203
|
var import_antd56 = require("antd");
|
|
31208
31204
|
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
31209
31205
|
function LeasePaymentForm({ leaseType }) {
|
|
@@ -31216,7 +31212,7 @@ function LeasePaymentForm({ leaseType }) {
|
|
|
31216
31212
|
}
|
|
31217
31213
|
});
|
|
31218
31214
|
const [ref2, setRef] = (0, import_react98.useState)("");
|
|
31219
|
-
const { branchId } = (0,
|
|
31215
|
+
const { branchId } = (0, import_react_router_dom70.useParams)();
|
|
31220
31216
|
const { getQuery, navigate } = useApp_default();
|
|
31221
31217
|
const id = getQuery("id");
|
|
31222
31218
|
const { apiConfig } = useWarqadConfig();
|
|
@@ -31394,15 +31390,15 @@ function LeasePaymentForm({ leaseType }) {
|
|
|
31394
31390
|
var LeasePaymentForm_default = LeasePaymentForm;
|
|
31395
31391
|
|
|
31396
31392
|
// src/components/realestate/lease/invoice/LeaseInvoice.tsx
|
|
31397
|
-
var
|
|
31393
|
+
var import_react_router_dom71 = require("react-router-dom");
|
|
31398
31394
|
var import_lucide_react88 = require("lucide-react");
|
|
31399
31395
|
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
31400
31396
|
function LeaseInvoice({
|
|
31401
31397
|
url,
|
|
31402
31398
|
leaseType
|
|
31403
31399
|
}) {
|
|
31404
|
-
const { branchId } = (0,
|
|
31405
|
-
const navigate = (0,
|
|
31400
|
+
const { branchId } = (0, import_react_router_dom71.useParams)();
|
|
31401
|
+
const navigate = (0, import_react_router_dom71.useNavigate)();
|
|
31406
31402
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
31407
31403
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
31408
31404
|
url: url || `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=invoice&leaseType=${leaseType}`,
|
|
@@ -31563,7 +31559,7 @@ var LeaseInvoice_default = LeaseInvoice;
|
|
|
31563
31559
|
var import_react_hook_form45 = require("react-hook-form");
|
|
31564
31560
|
var import_zod74 = require("@hookform/resolvers/zod");
|
|
31565
31561
|
var import_react99 = require("react");
|
|
31566
|
-
var
|
|
31562
|
+
var import_react_router_dom73 = require("react-router-dom");
|
|
31567
31563
|
var import_antd57 = require("antd");
|
|
31568
31564
|
|
|
31569
31565
|
// src/components/realestate/lease/invoice/schema.ts
|
|
@@ -31582,7 +31578,7 @@ var leaseInvoiceSchema = import_zod72.default.object({
|
|
|
31582
31578
|
});
|
|
31583
31579
|
|
|
31584
31580
|
// src/components/realestate/lease/LeaseField.tsx
|
|
31585
|
-
var
|
|
31581
|
+
var import_react_router_dom72 = require("react-router-dom");
|
|
31586
31582
|
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
31587
31583
|
function LeaseField({
|
|
31588
31584
|
name,
|
|
@@ -31596,7 +31592,7 @@ function LeaseField({
|
|
|
31596
31592
|
disabled,
|
|
31597
31593
|
obj
|
|
31598
31594
|
}) {
|
|
31599
|
-
const { branchId } = (0,
|
|
31595
|
+
const { branchId } = (0, import_react_router_dom72.useParams)();
|
|
31600
31596
|
const separator = api.includes("?") ? "&" : "?";
|
|
31601
31597
|
let apiUrl = api;
|
|
31602
31598
|
if (branchId) {
|
|
@@ -31644,7 +31640,7 @@ function LeaseInvoiceForm({ leaseType }) {
|
|
|
31644
31640
|
}
|
|
31645
31641
|
});
|
|
31646
31642
|
const [ref2, setRef] = (0, import_react99.useState)("");
|
|
31647
|
-
const { branchId } = (0,
|
|
31643
|
+
const { branchId } = (0, import_react_router_dom73.useParams)();
|
|
31648
31644
|
const { getQuery, navigate } = useApp_default();
|
|
31649
31645
|
const id = getQuery("id");
|
|
31650
31646
|
const isEdit = !!id;
|
|
@@ -31835,7 +31831,7 @@ function LeaseInvoiceForm({ leaseType }) {
|
|
|
31835
31831
|
var LeaseInvoiceForm_default = LeaseInvoiceForm;
|
|
31836
31832
|
|
|
31837
31833
|
// src/components/realestate/lease/Leases.tsx
|
|
31838
|
-
var
|
|
31834
|
+
var import_react_router_dom74 = require("react-router-dom");
|
|
31839
31835
|
var import_lucide_react90 = require("lucide-react");
|
|
31840
31836
|
|
|
31841
31837
|
// src/components/realestate/lease/view/useLeaseView.tsx
|
|
@@ -32194,8 +32190,8 @@ function Leases({
|
|
|
32194
32190
|
url,
|
|
32195
32191
|
leaseType
|
|
32196
32192
|
}) {
|
|
32197
|
-
const { branchId } = (0,
|
|
32198
|
-
const navigate = (0,
|
|
32193
|
+
const { branchId } = (0, import_react_router_dom74.useParams)();
|
|
32194
|
+
const navigate = (0, import_react_router_dom74.useNavigate)();
|
|
32199
32195
|
const { LeaseView, openLease } = useLeaseView_default();
|
|
32200
32196
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
32201
32197
|
url: url || `/lease/get?type=${leaseType}${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -32328,15 +32324,15 @@ function Leases({
|
|
|
32328
32324
|
var Leases_default = Leases;
|
|
32329
32325
|
|
|
32330
32326
|
// src/components/realestate/lease/EndLeases.tsx
|
|
32331
|
-
var
|
|
32327
|
+
var import_react_router_dom75 = require("react-router-dom");
|
|
32332
32328
|
var import_lucide_react91 = require("lucide-react");
|
|
32333
32329
|
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
32334
32330
|
function EndLeases({
|
|
32335
32331
|
url,
|
|
32336
32332
|
leaseType
|
|
32337
32333
|
}) {
|
|
32338
|
-
const { branchId } = (0,
|
|
32339
|
-
const navigate = (0,
|
|
32334
|
+
const { branchId } = (0, import_react_router_dom75.useParams)();
|
|
32335
|
+
const navigate = (0, import_react_router_dom75.useNavigate)();
|
|
32340
32336
|
const { LeaseView, openLease } = useLeaseView_default();
|
|
32341
32337
|
const { data, TransactionViewComponent } = useTransaction_default({
|
|
32342
32338
|
url: url || `/lease/get?type=${leaseType}${branchId ? `&fromBranch=${branchId}` : ""}&endLease=true`,
|
|
@@ -32640,12 +32636,12 @@ function ViewLease({ data }) {
|
|
|
32640
32636
|
var EndLeaseForm_default = EndLeaseForm;
|
|
32641
32637
|
|
|
32642
32638
|
// src/components/realestate/lease/paybill/Paybill.tsx
|
|
32643
|
-
var
|
|
32639
|
+
var import_react_router_dom76 = require("react-router-dom");
|
|
32644
32640
|
var import_lucide_react93 = require("lucide-react");
|
|
32645
32641
|
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
32646
32642
|
function Paybill2() {
|
|
32647
|
-
const { branchId } = (0,
|
|
32648
|
-
const navigate = (0,
|
|
32643
|
+
const { branchId } = (0, import_react_router_dom76.useParams)();
|
|
32644
|
+
const navigate = (0, import_react_router_dom76.useNavigate)();
|
|
32649
32645
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
32650
32646
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
32651
32647
|
url: `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=paybill`,
|
|
@@ -32978,15 +32974,15 @@ function PaybillForm() {
|
|
|
32978
32974
|
var PaybillForm_default = PaybillForm;
|
|
32979
32975
|
|
|
32980
32976
|
// src/components/realestate/lease/invoices/LeaseInvoices.tsx
|
|
32981
|
-
var
|
|
32977
|
+
var import_react_router_dom77 = require("react-router-dom");
|
|
32982
32978
|
var import_lucide_react95 = require("lucide-react");
|
|
32983
32979
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
32984
32980
|
function LeaseInvoices({
|
|
32985
32981
|
url,
|
|
32986
32982
|
leaseType
|
|
32987
32983
|
}) {
|
|
32988
|
-
const { branchId } = (0,
|
|
32989
|
-
const navigate = (0,
|
|
32984
|
+
const { branchId } = (0, import_react_router_dom77.useParams)();
|
|
32985
|
+
const navigate = (0, import_react_router_dom77.useNavigate)();
|
|
32990
32986
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
32991
32987
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
32992
32988
|
url: url || `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=invoices&leaseType=${leaseType}`,
|
|
@@ -33146,7 +33142,7 @@ var LeaseInvoices_default = LeaseInvoices;
|
|
|
33146
33142
|
var import_react_hook_form48 = require("react-hook-form");
|
|
33147
33143
|
var import_zod80 = require("@hookform/resolvers/zod");
|
|
33148
33144
|
var import_react105 = require("react");
|
|
33149
|
-
var
|
|
33145
|
+
var import_react_router_dom79 = require("react-router-dom");
|
|
33150
33146
|
var import_antd61 = require("antd");
|
|
33151
33147
|
|
|
33152
33148
|
// src/components/realestate/lease/invoices/schema.ts
|
|
@@ -33169,7 +33165,7 @@ var leaseInvoiceSchema2 = import_zod78.default.object({
|
|
|
33169
33165
|
|
|
33170
33166
|
// src/components/realestate/lease/invoices/LeaseSaleTable.tsx
|
|
33171
33167
|
var import_react104 = require("react");
|
|
33172
|
-
var
|
|
33168
|
+
var import_react_router_dom78 = require("react-router-dom");
|
|
33173
33169
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
33174
33170
|
function LeaseSaleTable({
|
|
33175
33171
|
data,
|
|
@@ -33180,7 +33176,7 @@ function LeaseSaleTable({
|
|
|
33180
33176
|
leaseType,
|
|
33181
33177
|
account
|
|
33182
33178
|
}) {
|
|
33183
|
-
const { branchId } = (0,
|
|
33179
|
+
const { branchId } = (0, import_react_router_dom78.useParams)();
|
|
33184
33180
|
const { watch, setValue } = methods;
|
|
33185
33181
|
const lineId = watch("lineId");
|
|
33186
33182
|
const lineObj = watch("lineObj");
|
|
@@ -33369,7 +33365,7 @@ function LeaseInvoicesForm({ leaseType }) {
|
|
|
33369
33365
|
}
|
|
33370
33366
|
});
|
|
33371
33367
|
const [ref2, setRef] = (0, import_react105.useState)("");
|
|
33372
|
-
const { branchId } = (0,
|
|
33368
|
+
const { branchId } = (0, import_react_router_dom79.useParams)();
|
|
33373
33369
|
const { getQuery, navigate } = useApp_default();
|
|
33374
33370
|
const id = getQuery("id");
|
|
33375
33371
|
const isEdit = !!id;
|
|
@@ -33576,12 +33572,12 @@ var Lease = {
|
|
|
33576
33572
|
var lease_default = Lease;
|
|
33577
33573
|
|
|
33578
33574
|
// src/components/Transactions/currency/expenseAccount/ExpenseAccount.tsx
|
|
33579
|
-
var
|
|
33575
|
+
var import_react_router_dom80 = require("react-router-dom");
|
|
33580
33576
|
var import_lucide_react96 = require("lucide-react");
|
|
33581
33577
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
33582
33578
|
function ExpenseAccount({ url }) {
|
|
33583
|
-
const { branchId } = (0,
|
|
33584
|
-
const navigate = (0,
|
|
33579
|
+
const { branchId } = (0, import_react_router_dom80.useParams)();
|
|
33580
|
+
const navigate = (0, import_react_router_dom80.useNavigate)();
|
|
33585
33581
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
33586
33582
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
33587
33583
|
url: url || `/transactions/get?type=expense account${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -33707,7 +33703,7 @@ var ExpenseAccount_default = ExpenseAccount;
|
|
|
33707
33703
|
|
|
33708
33704
|
// src/components/Transactions/currency/expenseAccount/ExpenseAccountForm.tsx
|
|
33709
33705
|
var import_react106 = require("react");
|
|
33710
|
-
var
|
|
33706
|
+
var import_react_router_dom81 = require("react-router-dom");
|
|
33711
33707
|
var import_react_hook_form49 = require("react-hook-form");
|
|
33712
33708
|
var import_zod83 = require("@hookform/resolvers/zod");
|
|
33713
33709
|
var import_antd62 = require("antd");
|
|
@@ -33732,7 +33728,7 @@ var expenseSchema3 = import_zod82.z.object({
|
|
|
33732
33728
|
// src/components/Transactions/currency/expenseAccount/ExpenseAccountForm.tsx
|
|
33733
33729
|
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
33734
33730
|
function ExpenseAccountForm() {
|
|
33735
|
-
const { branchId } = (0,
|
|
33731
|
+
const { branchId } = (0, import_react_router_dom81.useParams)();
|
|
33736
33732
|
const { getQuery, navigate } = useApp_default();
|
|
33737
33733
|
const id = getQuery("id");
|
|
33738
33734
|
const isEdit = !!id;
|
|
@@ -33972,10 +33968,10 @@ var import_react_hook_form50 = require("react-hook-form");
|
|
|
33972
33968
|
var import_zod86 = require("@hookform/resolvers/zod");
|
|
33973
33969
|
var import_antd63 = require("antd");
|
|
33974
33970
|
var import_react107 = require("react");
|
|
33975
|
-
var
|
|
33971
|
+
var import_react_router_dom82 = require("react-router-dom");
|
|
33976
33972
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
33977
33973
|
function JournalForm2({ accountType = "all" }) {
|
|
33978
|
-
const { branchId } = (0,
|
|
33974
|
+
const { branchId } = (0, import_react_router_dom82.useParams)();
|
|
33979
33975
|
const { apiConfig } = useWarqadConfig();
|
|
33980
33976
|
const { getQuery, navigate } = useApp_default();
|
|
33981
33977
|
const id = getQuery("id");
|
|
@@ -34193,15 +34189,15 @@ function JournalForm2({ accountType = "all" }) {
|
|
|
34193
34189
|
var JournalForm_default2 = JournalForm2;
|
|
34194
34190
|
|
|
34195
34191
|
// src/components/Transactions/currency/journals/Journals.tsx
|
|
34196
|
-
var
|
|
34192
|
+
var import_react_router_dom83 = require("react-router-dom");
|
|
34197
34193
|
var import_lucide_react97 = require("lucide-react");
|
|
34198
34194
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
34199
34195
|
function Journals2({
|
|
34200
34196
|
url,
|
|
34201
34197
|
journalType
|
|
34202
34198
|
}) {
|
|
34203
|
-
const { branchId } = (0,
|
|
34204
|
-
const navigate = (0,
|
|
34199
|
+
const { branchId } = (0, import_react_router_dom83.useParams)();
|
|
34200
|
+
const navigate = (0, import_react_router_dom83.useNavigate)();
|
|
34205
34201
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
34206
34202
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
34207
34203
|
url: url || `/transactions/get?type=journal${branchId ? `&branch=${branchId}` : ""}${journalType ? `&journal=${journalType}` : ""}`,
|
|
@@ -34344,7 +34340,7 @@ var Journals_default2 = Journals2;
|
|
|
34344
34340
|
|
|
34345
34341
|
// src/components/Transactions/currency/payment/PaymentForm.tsx
|
|
34346
34342
|
var import_react108 = require("react");
|
|
34347
|
-
var
|
|
34343
|
+
var import_react_router_dom84 = require("react-router-dom");
|
|
34348
34344
|
var import_react_hook_form51 = require("react-hook-form");
|
|
34349
34345
|
var import_zod89 = require("@hookform/resolvers/zod");
|
|
34350
34346
|
var import_antd64 = require("antd");
|
|
@@ -34373,7 +34369,7 @@ var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
|
34373
34369
|
function PaymentForm2({
|
|
34374
34370
|
accountType = "all"
|
|
34375
34371
|
}) {
|
|
34376
|
-
const { branchId } = (0,
|
|
34372
|
+
const { branchId } = (0, import_react_router_dom84.useParams)();
|
|
34377
34373
|
const { getQuery, navigate } = useApp_default();
|
|
34378
34374
|
const id = getQuery("id");
|
|
34379
34375
|
const isEdit = !!id;
|
|
@@ -34588,15 +34584,15 @@ function PaymentForm2({
|
|
|
34588
34584
|
var PaymentForm_default2 = PaymentForm2;
|
|
34589
34585
|
|
|
34590
34586
|
// src/components/Transactions/currency/payment/Payments.tsx
|
|
34591
|
-
var
|
|
34587
|
+
var import_react_router_dom85 = require("react-router-dom");
|
|
34592
34588
|
var import_lucide_react98 = require("lucide-react");
|
|
34593
34589
|
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
34594
34590
|
function Payments2({
|
|
34595
34591
|
url,
|
|
34596
34592
|
paymentType
|
|
34597
34593
|
}) {
|
|
34598
|
-
const { branchId } = (0,
|
|
34599
|
-
const navigate = (0,
|
|
34594
|
+
const { branchId } = (0, import_react_router_dom85.useParams)();
|
|
34595
|
+
const navigate = (0, import_react_router_dom85.useNavigate)();
|
|
34600
34596
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
34601
34597
|
const { openPos, PosPrinter } = usePosPrinter_default();
|
|
34602
34598
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
@@ -34748,22 +34744,22 @@ var CurrencyTransactions = {
|
|
|
34748
34744
|
var currency_default = CurrencyTransactions;
|
|
34749
34745
|
|
|
34750
34746
|
// src/components/accounts/RealestateAccountReport.tsx
|
|
34751
|
-
var
|
|
34747
|
+
var import_react_router_dom86 = require("react-router-dom");
|
|
34752
34748
|
var import_react109 = require("react");
|
|
34753
34749
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
34754
34750
|
var RealestateAccountReport = ({ modifUrl }) => {
|
|
34755
34751
|
const { apiConfig } = useWarqadConfig();
|
|
34756
34752
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
34757
34753
|
const { getParams } = useApp_default();
|
|
34758
|
-
const { branchId } = (0,
|
|
34754
|
+
const { branchId } = (0, import_react_router_dom86.useParams)();
|
|
34759
34755
|
const currencies = Enums_default.currencies.map((currency2) => {
|
|
34760
34756
|
return {
|
|
34761
34757
|
label: currency2,
|
|
34762
34758
|
value: currency2
|
|
34763
34759
|
};
|
|
34764
34760
|
});
|
|
34765
|
-
const navigate = (0,
|
|
34766
|
-
const [searchParams, setSearchParams] = (0,
|
|
34761
|
+
const navigate = (0, import_react_router_dom86.useNavigate)();
|
|
34762
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom86.useSearchParams)();
|
|
34767
34763
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
34768
34764
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
34769
34765
|
const [currencyFilter, setCurrencyFilter] = (0, import_react109.useState)(initialCurrency);
|
|
@@ -34928,7 +34924,7 @@ var RealestateAccountReport = ({ modifUrl }) => {
|
|
|
34928
34924
|
var RealestateAccountReport_default = RealestateAccountReport;
|
|
34929
34925
|
|
|
34930
34926
|
// src/components/accounts/RealEastateAccounts.tsx
|
|
34931
|
-
var
|
|
34927
|
+
var import_react_router_dom87 = require("react-router-dom");
|
|
34932
34928
|
var import_lucide_react99 = require("lucide-react");
|
|
34933
34929
|
var import_react110 = require("react");
|
|
34934
34930
|
var import_antd65 = require("antd");
|
|
@@ -34938,8 +34934,8 @@ function RealEastateAccounts({
|
|
|
34938
34934
|
url,
|
|
34939
34935
|
type = "account"
|
|
34940
34936
|
}) {
|
|
34941
|
-
const { branchId } = (0,
|
|
34942
|
-
const navigate = (0,
|
|
34937
|
+
const { branchId } = (0, import_react_router_dom87.useParams)();
|
|
34938
|
+
const navigate = (0, import_react_router_dom87.useNavigate)();
|
|
34943
34939
|
const profile = type === "all" ? "account" : type;
|
|
34944
34940
|
const [deleteAccount, setDeleteAccount] = (0, import_react110.useState)(null);
|
|
34945
34941
|
const { isLoading: isActionLoading, remove } = useApis_default();
|
|
@@ -35058,7 +35054,7 @@ function RealEastateAccounts({
|
|
|
35058
35054
|
var RealEastateAccounts_default = RealEastateAccounts;
|
|
35059
35055
|
|
|
35060
35056
|
// src/components/accounts/RealEastateStatements.tsx
|
|
35061
|
-
var
|
|
35057
|
+
var import_react_router_dom89 = require("react-router-dom");
|
|
35062
35058
|
var import_react112 = require("react");
|
|
35063
35059
|
|
|
35064
35060
|
// src/components/accounts/profileAccount/ProfileAccountForm.tsx
|
|
@@ -35066,7 +35062,7 @@ var import_react_hook_form52 = require("react-hook-form");
|
|
|
35066
35062
|
var import_zod90 = require("@hookform/resolvers/zod");
|
|
35067
35063
|
var import_antd66 = require("antd");
|
|
35068
35064
|
var import_react111 = require("react");
|
|
35069
|
-
var
|
|
35065
|
+
var import_react_router_dom88 = require("react-router-dom");
|
|
35070
35066
|
var import_countries_list2 = require("countries-list");
|
|
35071
35067
|
var import_zod91 = __toESM(require("zod"));
|
|
35072
35068
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
@@ -35088,7 +35084,7 @@ function ProfileAccountForm({
|
|
|
35088
35084
|
showCurrency = true,
|
|
35089
35085
|
showDocument = false
|
|
35090
35086
|
}) {
|
|
35091
|
-
const { branchId } = (0,
|
|
35087
|
+
const { branchId } = (0, import_react_router_dom88.useParams)();
|
|
35092
35088
|
const { getQuery, navigate } = useApp_default();
|
|
35093
35089
|
const { role } = useAuth_default();
|
|
35094
35090
|
let profileOptions = profileAccountTypes.map((item) => ({
|
|
@@ -35376,11 +35372,11 @@ var options6 = [
|
|
|
35376
35372
|
{ label: "Credit", value: "credit" }
|
|
35377
35373
|
];
|
|
35378
35374
|
var RealEastateStatements = () => {
|
|
35379
|
-
const navigate = (0,
|
|
35380
|
-
const [searchParams, setSearchParams] = (0,
|
|
35375
|
+
const navigate = (0, import_react_router_dom89.useNavigate)();
|
|
35376
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom89.useSearchParams)();
|
|
35381
35377
|
const { apiConfig } = useWarqadConfig();
|
|
35382
35378
|
const { role } = useAuth_default();
|
|
35383
|
-
const { branchId } = (0,
|
|
35379
|
+
const { branchId } = (0, import_react_router_dom89.useParams)();
|
|
35384
35380
|
const type = "all";
|
|
35385
35381
|
const urlFilter = searchParams.get("filter");
|
|
35386
35382
|
const initialFilter = ["all", "debit", "credit"].includes(urlFilter) ? urlFilter : "all";
|
|
@@ -35591,7 +35587,7 @@ var RealEastateStatements = () => {
|
|
|
35591
35587
|
var RealEastateStatements_default = RealEastateStatements;
|
|
35592
35588
|
|
|
35593
35589
|
// src/components/accounts/LeaseAccountReport.tsx
|
|
35594
|
-
var
|
|
35590
|
+
var import_react_router_dom90 = require("react-router-dom");
|
|
35595
35591
|
var import_react113 = require("react");
|
|
35596
35592
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
35597
35593
|
var LeaseAccountReport = ({
|
|
@@ -35608,11 +35604,11 @@ var LeaseAccountReport = ({
|
|
|
35608
35604
|
value: currency2
|
|
35609
35605
|
};
|
|
35610
35606
|
});
|
|
35611
|
-
const navigate = (0,
|
|
35612
|
-
const [searchParams, setSearchParams] = (0,
|
|
35607
|
+
const navigate = (0, import_react_router_dom90.useNavigate)();
|
|
35608
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom90.useSearchParams)();
|
|
35613
35609
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
35614
35610
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : defaultCurrency;
|
|
35615
|
-
const { branchId } = (0,
|
|
35611
|
+
const { branchId } = (0, import_react_router_dom90.useParams)();
|
|
35616
35612
|
const [currencyFilter, setCurrencyFilter] = (0, import_react113.useState)(initialCurrency);
|
|
35617
35613
|
const handleCurrencyChange = (value) => {
|
|
35618
35614
|
setCurrencyFilter(value);
|
|
@@ -35772,7 +35768,7 @@ var LeaseAccountReport = ({
|
|
|
35772
35768
|
var LeaseAccountReport_default = LeaseAccountReport;
|
|
35773
35769
|
|
|
35774
35770
|
// src/components/accounts/LeaseAccountStatements.tsx
|
|
35775
|
-
var
|
|
35771
|
+
var import_react_router_dom91 = require("react-router-dom");
|
|
35776
35772
|
var import_react114 = require("react");
|
|
35777
35773
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
35778
35774
|
var options7 = [
|
|
@@ -35784,10 +35780,10 @@ var LeaseAccountStatements = ({
|
|
|
35784
35780
|
leaseType,
|
|
35785
35781
|
defaultCurrency = "USD"
|
|
35786
35782
|
}) => {
|
|
35787
|
-
const navigate = (0,
|
|
35788
|
-
const [searchParams, setSearchParams] = (0,
|
|
35783
|
+
const navigate = (0, import_react_router_dom91.useNavigate)();
|
|
35784
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom91.useSearchParams)();
|
|
35789
35785
|
const { apiConfig } = useWarqadConfig();
|
|
35790
|
-
const { branchId } = (0,
|
|
35786
|
+
const { branchId } = (0, import_react_router_dom91.useParams)();
|
|
35791
35787
|
const type = "all";
|
|
35792
35788
|
const urlFilter = searchParams.get("filter");
|
|
35793
35789
|
const initialFilter = ["all", "debit", "credit"].includes(urlFilter) ? urlFilter : "all";
|
|
@@ -35995,17 +35991,17 @@ var LeaseAccountStatements = ({
|
|
|
35995
35991
|
var LeaseAccountStatements_default = LeaseAccountStatements;
|
|
35996
35992
|
|
|
35997
35993
|
// src/components/accounts/ExpenseAccountStatement.tsx
|
|
35998
|
-
var
|
|
35994
|
+
var import_react_router_dom92 = require("react-router-dom");
|
|
35999
35995
|
var import_react115 = require("react");
|
|
36000
35996
|
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
36001
35997
|
var ExpenseAccountStatement = ({ type }) => {
|
|
36002
|
-
const navigate = (0,
|
|
36003
|
-
const [searchParams, setSearchParams] = (0,
|
|
35998
|
+
const navigate = (0, import_react_router_dom92.useNavigate)();
|
|
35999
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom92.useSearchParams)();
|
|
36004
36000
|
const { apiConfig } = useWarqadConfig();
|
|
36005
36001
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
36006
36002
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
36007
36003
|
const [currencyFilter, setCurrencyFilter] = (0, import_react115.useState)(initialCurrency);
|
|
36008
|
-
const { branchId } = (0,
|
|
36004
|
+
const { branchId } = (0, import_react_router_dom92.useParams)();
|
|
36009
36005
|
const handleCurrencyChange = (value) => {
|
|
36010
36006
|
setCurrencyFilter(value);
|
|
36011
36007
|
setSearchParams((prev) => {
|
|
@@ -36105,7 +36101,7 @@ var ExpenseAccountStatement = ({ type }) => {
|
|
|
36105
36101
|
var ExpenseAccountStatement_default = ExpenseAccountStatement;
|
|
36106
36102
|
|
|
36107
36103
|
// src/components/accounts/ExpenseAccountReport.tsx
|
|
36108
|
-
var
|
|
36104
|
+
var import_react_router_dom93 = require("react-router-dom");
|
|
36109
36105
|
var import_react116 = require("react");
|
|
36110
36106
|
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
36111
36107
|
var ExpenseAccountReport = ({ modifUrl }) => {
|
|
@@ -36118,12 +36114,12 @@ var ExpenseAccountReport = ({ modifUrl }) => {
|
|
|
36118
36114
|
value: currency2
|
|
36119
36115
|
};
|
|
36120
36116
|
});
|
|
36121
|
-
const navigate = (0,
|
|
36122
|
-
const [searchParams, setSearchParams] = (0,
|
|
36117
|
+
const navigate = (0, import_react_router_dom93.useNavigate)();
|
|
36118
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom93.useSearchParams)();
|
|
36123
36119
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
36124
36120
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "KES";
|
|
36125
36121
|
const [currencyFilter, setCurrencyFilter] = (0, import_react116.useState)(initialCurrency);
|
|
36126
|
-
const { branchId } = (0,
|
|
36122
|
+
const { branchId } = (0, import_react_router_dom93.useParams)();
|
|
36127
36123
|
const handleCurrencyChange = (value) => {
|
|
36128
36124
|
setCurrencyFilter(value);
|
|
36129
36125
|
setSearchParams((prev) => {
|
|
@@ -36234,12 +36230,12 @@ var ExpenseAccountReport = ({ modifUrl }) => {
|
|
|
36234
36230
|
var ExpenseAccountReport_default = ExpenseAccountReport;
|
|
36235
36231
|
|
|
36236
36232
|
// src/components/reports/ExpenseAReport.tsx
|
|
36237
|
-
var
|
|
36233
|
+
var import_react_router_dom94 = require("react-router-dom");
|
|
36238
36234
|
var import_react117 = require("react");
|
|
36239
36235
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
36240
36236
|
var ExpenseAReport = () => {
|
|
36241
|
-
const [searchParams, setSearchParams] = (0,
|
|
36242
|
-
const { branchId } = (0,
|
|
36237
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom94.useSearchParams)();
|
|
36238
|
+
const { branchId } = (0, import_react_router_dom94.useParams)();
|
|
36243
36239
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
36244
36240
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
36245
36241
|
const [currencyFilter, setCurrencyFilter] = (0, import_react117.useState)(initialCurrency);
|
|
@@ -36392,7 +36388,7 @@ var ExpenseAReport_default = ExpenseAReport;
|
|
|
36392
36388
|
|
|
36393
36389
|
// src/components/posts/PostForm.tsx
|
|
36394
36390
|
var import_react119 = require("react");
|
|
36395
|
-
var
|
|
36391
|
+
var import_react_router_dom95 = require("react-router-dom");
|
|
36396
36392
|
var import_react_hook_form54 = require("react-hook-form");
|
|
36397
36393
|
var import_zod92 = require("@hookform/resolvers/zod");
|
|
36398
36394
|
var import_lucide_react101 = require("lucide-react");
|
|
@@ -36765,7 +36761,7 @@ function HotelSpecifications({ form }) {
|
|
|
36765
36761
|
// src/components/posts/PostForm.tsx
|
|
36766
36762
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
36767
36763
|
function PostForm({ afterPostUrl }) {
|
|
36768
|
-
const { branchId, postType } = (0,
|
|
36764
|
+
const { branchId, postType } = (0, import_react_router_dom95.useParams)();
|
|
36769
36765
|
const { getQuery, navigate } = useApp_default();
|
|
36770
36766
|
const id = getQuery("id");
|
|
36771
36767
|
const isEdit = !!id;
|
|
@@ -36816,7 +36812,7 @@ function PostForm({ afterPostUrl }) {
|
|
|
36816
36812
|
window.addEventListener("beforeunload", handleBeforeUnload);
|
|
36817
36813
|
return () => window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
36818
36814
|
}, [isDirty]);
|
|
36819
|
-
const blocker = (0,
|
|
36815
|
+
const blocker = (0, import_react_router_dom95.useBlocker)(
|
|
36820
36816
|
(0, import_react119.useCallback)(
|
|
36821
36817
|
({ currentLocation, nextLocation }) => isDirty && !isSavingRef.current && currentLocation.pathname !== nextLocation.pathname,
|
|
36822
36818
|
[isDirty]
|
|
@@ -37170,7 +37166,7 @@ function PostForm({ afterPostUrl }) {
|
|
|
37170
37166
|
var PostForm_default = PostForm;
|
|
37171
37167
|
|
|
37172
37168
|
// src/components/posts/PostsList.tsx
|
|
37173
|
-
var
|
|
37169
|
+
var import_react_router_dom96 = require("react-router-dom");
|
|
37174
37170
|
var import_lucide_react103 = require("lucide-react");
|
|
37175
37171
|
|
|
37176
37172
|
// src/hooks/usePostView.tsx
|
|
@@ -37635,8 +37631,8 @@ var usePostView_default = usePostView;
|
|
|
37635
37631
|
// src/components/posts/PostsList.tsx
|
|
37636
37632
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
37637
37633
|
function PostsList({ url }) {
|
|
37638
|
-
const { branchId, postType } = (0,
|
|
37639
|
-
const navigate = (0,
|
|
37634
|
+
const { branchId, postType } = (0, import_react_router_dom96.useParams)();
|
|
37635
|
+
const navigate = (0, import_react_router_dom96.useNavigate)();
|
|
37640
37636
|
const { PostView: PostView2, openPost } = usePostView_default();
|
|
37641
37637
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
37642
37638
|
url: url || `/posts/get?type=${postType}&fromBranch=${branchId}`,
|
|
@@ -37768,14 +37764,14 @@ var PostsList_default = PostsList;
|
|
|
37768
37764
|
|
|
37769
37765
|
// src/components/posts/PostMediaForm.tsx
|
|
37770
37766
|
var import_react122 = require("react");
|
|
37771
|
-
var
|
|
37767
|
+
var import_react_router_dom97 = require("react-router-dom");
|
|
37772
37768
|
var import_lucide_react104 = require("lucide-react");
|
|
37773
37769
|
var import_antd69 = require("antd");
|
|
37774
37770
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
37775
37771
|
function PostMediaForm() {
|
|
37776
|
-
const { branchId, postType } = (0,
|
|
37772
|
+
const { branchId, postType } = (0, import_react_router_dom97.useParams)();
|
|
37777
37773
|
const { getQuery } = useApp_default();
|
|
37778
|
-
const navigate = (0,
|
|
37774
|
+
const navigate = (0, import_react_router_dom97.useNavigate)();
|
|
37779
37775
|
const id = getQuery("id");
|
|
37780
37776
|
const { get, isLoading: isLoadingGet } = useApis_default();
|
|
37781
37777
|
const { put, isLoading: isSaving } = useApis_default();
|
|
@@ -38287,14 +38283,14 @@ var Posts = {
|
|
|
38287
38283
|
var posts_default = Posts;
|
|
38288
38284
|
|
|
38289
38285
|
// src/components/accounts/profileAccount/ProfileAccount.tsx
|
|
38290
|
-
var
|
|
38286
|
+
var import_react_router_dom98 = require("react-router-dom");
|
|
38291
38287
|
var import_lucide_react105 = require("lucide-react");
|
|
38292
38288
|
var import_react123 = require("react");
|
|
38293
38289
|
var import_antd70 = require("antd");
|
|
38294
38290
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
38295
38291
|
function ProfileAccountList({ v, url }) {
|
|
38296
|
-
const { branchId } = (0,
|
|
38297
|
-
const navigate = (0,
|
|
38292
|
+
const { branchId } = (0, import_react_router_dom98.useParams)();
|
|
38293
|
+
const navigate = (0, import_react_router_dom98.useNavigate)();
|
|
38298
38294
|
const { role } = useAuth_default();
|
|
38299
38295
|
const isStaff = role === "staff";
|
|
38300
38296
|
let profileOptions = [
|
|
@@ -38473,7 +38469,7 @@ var ProfileAccount = {
|
|
|
38473
38469
|
var profileAccount_default = ProfileAccount;
|
|
38474
38470
|
|
|
38475
38471
|
// src/components/accounts/LeaseRentOverviews.tsx
|
|
38476
|
-
var
|
|
38472
|
+
var import_react_router_dom99 = require("react-router-dom");
|
|
38477
38473
|
var import_react124 = require("react");
|
|
38478
38474
|
var import_antd71 = require("antd");
|
|
38479
38475
|
var import_dayjs5 = __toESM(require("dayjs"));
|
|
@@ -38486,10 +38482,10 @@ var options8 = [
|
|
|
38486
38482
|
var LeaseRentOverviews = () => {
|
|
38487
38483
|
const leaseType = "rent";
|
|
38488
38484
|
const defaultCurrency = "KES";
|
|
38489
|
-
const navigate = (0,
|
|
38490
|
-
const [searchParams, setSearchParams] = (0,
|
|
38485
|
+
const navigate = (0, import_react_router_dom99.useNavigate)();
|
|
38486
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom99.useSearchParams)();
|
|
38491
38487
|
const { apiConfig } = useWarqadConfig();
|
|
38492
|
-
const { branchId } = (0,
|
|
38488
|
+
const { branchId } = (0, import_react_router_dom99.useParams)();
|
|
38493
38489
|
const type = "all";
|
|
38494
38490
|
const urlFilter = searchParams.get("filter");
|
|
38495
38491
|
const initialFilter = ["all", "debit", "credit"].includes(urlFilter) ? urlFilter : "all";
|
|
@@ -38703,7 +38699,7 @@ var LeaseRentOverviews_default = LeaseRentOverviews;
|
|
|
38703
38699
|
var import_react125 = require("react");
|
|
38704
38700
|
var import_dayjs6 = __toESM(require("dayjs"));
|
|
38705
38701
|
var import_lucide_react106 = require("lucide-react");
|
|
38706
|
-
var
|
|
38702
|
+
var import_react_router_dom100 = require("react-router-dom");
|
|
38707
38703
|
var import_antd72 = require("antd");
|
|
38708
38704
|
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
38709
38705
|
var LeaseRentOverViewCard = ({
|
|
@@ -38713,8 +38709,8 @@ var LeaseRentOverViewCard = ({
|
|
|
38713
38709
|
viewStatementRoute,
|
|
38714
38710
|
className = ""
|
|
38715
38711
|
}) => {
|
|
38716
|
-
const navigate = (0,
|
|
38717
|
-
const { branchId } = (0,
|
|
38712
|
+
const navigate = (0, import_react_router_dom100.useNavigate)();
|
|
38713
|
+
const { branchId } = (0, import_react_router_dom100.useParams)();
|
|
38718
38714
|
const { apiConfig } = useWarqadConfig();
|
|
38719
38715
|
const { data: fetchedData, isLoading: fetchLoading, get } = useApis_default();
|
|
38720
38716
|
const [showAmount, setShowAmount] = (0, import_react125.useState)(false);
|
|
@@ -39714,12 +39710,12 @@ var Tickets = {
|
|
|
39714
39710
|
var tickets_default = Tickets;
|
|
39715
39711
|
|
|
39716
39712
|
// src/components/stocks/clothend/sale2/List.tsx
|
|
39717
|
-
var
|
|
39713
|
+
var import_react_router_dom101 = require("react-router-dom");
|
|
39718
39714
|
var import_lucide_react109 = require("lucide-react");
|
|
39719
39715
|
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
39720
39716
|
function Sale2List({ url, type = "product" }) {
|
|
39721
|
-
const { branchId } = (0,
|
|
39722
|
-
const navigate = (0,
|
|
39717
|
+
const { branchId } = (0, import_react_router_dom101.useParams)();
|
|
39718
|
+
const navigate = (0, import_react_router_dom101.useNavigate)();
|
|
39723
39719
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
39724
39720
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
39725
39721
|
url: url || `/transactions/get?type=stock&stock=sale2&stockType=${type}${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -39903,12 +39899,12 @@ var import_react131 = require("react");
|
|
|
39903
39899
|
|
|
39904
39900
|
// src/components/stocks/clothend/sale2/header.tsx
|
|
39905
39901
|
var import_react_hook_form55 = require("react-hook-form");
|
|
39906
|
-
var
|
|
39902
|
+
var import_react_router_dom102 = require("react-router-dom");
|
|
39907
39903
|
var import_react129 = require("react");
|
|
39908
39904
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
39909
39905
|
function SaleHeader2({ stockType }) {
|
|
39910
39906
|
const form = (0, import_react_hook_form55.useFormContext)();
|
|
39911
|
-
const { branchId } = (0,
|
|
39907
|
+
const { branchId } = (0, import_react_router_dom102.useParams)();
|
|
39912
39908
|
(0, import_react129.useEffect)(() => {
|
|
39913
39909
|
if (branchId) {
|
|
39914
39910
|
form.setValue("branch", branchId);
|
|
@@ -40361,7 +40357,7 @@ var schema_default6 = AdjustmentStockSchema4;
|
|
|
40361
40357
|
|
|
40362
40358
|
// src/components/stocks/clothend/sale2/pos.tsx
|
|
40363
40359
|
var import_lucide_react110 = require("lucide-react");
|
|
40364
|
-
var
|
|
40360
|
+
var import_react_router_dom103 = require("react-router-dom");
|
|
40365
40361
|
|
|
40366
40362
|
// src/components/stocks/clothend/sale2/Submit.tsx
|
|
40367
40363
|
var import_react_hook_form56 = require("react-hook-form");
|
|
@@ -40581,7 +40577,7 @@ var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
|
40581
40577
|
var Sale2Form = ({ type }) => {
|
|
40582
40578
|
const { getQuery, navigate } = useApp_default();
|
|
40583
40579
|
const stockType = type;
|
|
40584
|
-
const { branchId } = (0,
|
|
40580
|
+
const { branchId } = (0, import_react_router_dom103.useParams)();
|
|
40585
40581
|
const saleId = getQuery("id");
|
|
40586
40582
|
const { branches } = useAuth_default();
|
|
40587
40583
|
const { currencies } = useWarqadConfig();
|
|
@@ -40905,7 +40901,7 @@ var Sale2 = {
|
|
|
40905
40901
|
var sale2_default = Sale2;
|
|
40906
40902
|
|
|
40907
40903
|
// src/dgl/products/List.tsx
|
|
40908
|
-
var
|
|
40904
|
+
var import_react_router_dom104 = require("react-router-dom");
|
|
40909
40905
|
var import_lucide_react112 = require("lucide-react");
|
|
40910
40906
|
var import_react133 = require("react");
|
|
40911
40907
|
var import_antd76 = require("antd");
|
|
@@ -41140,7 +41136,7 @@ function ProductList({
|
|
|
41140
41136
|
dateFilter: false
|
|
41141
41137
|
});
|
|
41142
41138
|
const { Modal: Modal2, openState, close } = useModal();
|
|
41143
|
-
const navigate = (0,
|
|
41139
|
+
const navigate = (0, import_react_router_dom104.useNavigate)();
|
|
41144
41140
|
const items = (data2) => [
|
|
41145
41141
|
{
|
|
41146
41142
|
label: `Edit Product`,
|
|
@@ -41881,7 +41877,7 @@ function ProductForm2({
|
|
|
41881
41877
|
var Form_default = ProductForm2;
|
|
41882
41878
|
|
|
41883
41879
|
// src/dgl/categories/List.tsx
|
|
41884
|
-
var
|
|
41880
|
+
var import_react_router_dom105 = require("react-router-dom");
|
|
41885
41881
|
var import_lucide_react114 = require("lucide-react");
|
|
41886
41882
|
var import_react135 = require("react");
|
|
41887
41883
|
var import_antd78 = require("antd");
|
|
@@ -41895,7 +41891,7 @@ function CategoryList({ v = 3, url }) {
|
|
|
41895
41891
|
dateFilter: false
|
|
41896
41892
|
});
|
|
41897
41893
|
const { Modal: Modal2, openState, close } = useModal();
|
|
41898
|
-
const navigate = (0,
|
|
41894
|
+
const navigate = (0, import_react_router_dom105.useNavigate)();
|
|
41899
41895
|
const items = (data2) => [
|
|
41900
41896
|
{
|
|
41901
41897
|
label: `Edit Category`,
|
|
@@ -42183,7 +42179,7 @@ function CategoryForm2() {
|
|
|
42183
42179
|
var Form_default2 = CategoryForm2;
|
|
42184
42180
|
|
|
42185
42181
|
// src/dgl/brands/List.tsx
|
|
42186
|
-
var
|
|
42182
|
+
var import_react_router_dom106 = require("react-router-dom");
|
|
42187
42183
|
var import_lucide_react115 = require("lucide-react");
|
|
42188
42184
|
var import_react137 = require("react");
|
|
42189
42185
|
var import_antd80 = require("antd");
|
|
@@ -42197,7 +42193,7 @@ function BrandList({ v = 3, url }) {
|
|
|
42197
42193
|
dateFilter: false
|
|
42198
42194
|
});
|
|
42199
42195
|
const { Modal: Modal2, openState, close } = useModal();
|
|
42200
|
-
const navigate = (0,
|
|
42196
|
+
const navigate = (0, import_react_router_dom106.useNavigate)();
|
|
42201
42197
|
const items = (data2) => [
|
|
42202
42198
|
{
|
|
42203
42199
|
label: `Edit Brand`,
|
|
@@ -42474,7 +42470,7 @@ function BrandForm2() {
|
|
|
42474
42470
|
var Form_default3 = BrandForm2;
|
|
42475
42471
|
|
|
42476
42472
|
// src/dgl/subCategories/List.tsx
|
|
42477
|
-
var
|
|
42473
|
+
var import_react_router_dom107 = require("react-router-dom");
|
|
42478
42474
|
var import_lucide_react116 = require("lucide-react");
|
|
42479
42475
|
var import_react139 = require("react");
|
|
42480
42476
|
var import_antd82 = require("antd");
|
|
@@ -42488,7 +42484,7 @@ function SubCategoryList({ v = 3, url }) {
|
|
|
42488
42484
|
dateFilter: false
|
|
42489
42485
|
});
|
|
42490
42486
|
const { Modal: Modal2, openState, close } = useModal();
|
|
42491
|
-
const navigate = (0,
|
|
42487
|
+
const navigate = (0, import_react_router_dom107.useNavigate)();
|
|
42492
42488
|
const items = (data2) => [
|
|
42493
42489
|
{
|
|
42494
42490
|
label: `Edit SubCategory`,
|
|
@@ -42823,7 +42819,7 @@ var dgl_default = Dgl;
|
|
|
42823
42819
|
|
|
42824
42820
|
// src/components/InAndOut/Form.tsx
|
|
42825
42821
|
var import_react141 = require("react");
|
|
42826
|
-
var
|
|
42822
|
+
var import_react_router_dom108 = require("react-router-dom");
|
|
42827
42823
|
var import_react_hook_form62 = require("react-hook-form");
|
|
42828
42824
|
var import_zod105 = require("@hookform/resolvers/zod");
|
|
42829
42825
|
var import_antd84 = require("antd");
|
|
@@ -42849,7 +42845,7 @@ function InAndOutForm({
|
|
|
42849
42845
|
const isEdit = id;
|
|
42850
42846
|
const [ref2, setRef] = (0, import_react141.useState)("");
|
|
42851
42847
|
const [showReverseModal, setShowReverseModal] = (0, import_react141.useState)(false);
|
|
42852
|
-
const { branchId } = (0,
|
|
42848
|
+
const { branchId } = (0, import_react_router_dom108.useParams)();
|
|
42853
42849
|
const { post, isLoading } = useApis_default();
|
|
42854
42850
|
const { put, isLoading: isLoadingReverse } = useApis_default();
|
|
42855
42851
|
const { get, isLoading: isLoadingGet } = useApis_default();
|
|
@@ -43052,13 +43048,13 @@ var Form_default5 = InAndOutForm;
|
|
|
43052
43048
|
var import_react142 = require("react");
|
|
43053
43049
|
var import_antd85 = require("antd");
|
|
43054
43050
|
var import_dayjs7 = __toESM(require("dayjs"));
|
|
43055
|
-
var
|
|
43051
|
+
var import_react_router_dom109 = require("react-router-dom");
|
|
43056
43052
|
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
43057
43053
|
var InAndOutReport = () => {
|
|
43058
43054
|
const [startDate, setStartDate] = (0, import_react142.useState)((0, import_dayjs7.default)());
|
|
43059
43055
|
const [endDate, setEndDate] = (0, import_react142.useState)((0, import_dayjs7.default)());
|
|
43060
43056
|
const [action, setAction] = (0, import_react142.useState)("all");
|
|
43061
|
-
const { branchId } = (0,
|
|
43057
|
+
const { branchId } = (0, import_react_router_dom109.useParams)();
|
|
43062
43058
|
const [currency, setCurrency] = (0, import_react142.useState)("all");
|
|
43063
43059
|
const { openState, Modal: Modal2, close } = useModal_default();
|
|
43064
43060
|
const { A4DataView, data, reload } = useA4DataView_default({
|
|
@@ -43464,7 +43460,7 @@ var ProfileTransactionReport = ({
|
|
|
43464
43460
|
var ProfileTransaction_default = ProfileTransactionReport;
|
|
43465
43461
|
|
|
43466
43462
|
// src/components/Transactions/invoiceManager/InvoiceManager.tsx
|
|
43467
|
-
var
|
|
43463
|
+
var import_react_router_dom113 = require("react-router-dom");
|
|
43468
43464
|
var import_lucide_react118 = require("lucide-react");
|
|
43469
43465
|
var import_react147 = require("react");
|
|
43470
43466
|
var import_antd89 = require("antd");
|
|
@@ -43525,14 +43521,14 @@ var import_react_hook_form63 = require("react-hook-form");
|
|
|
43525
43521
|
var import_zod108 = require("@hookform/resolvers/zod");
|
|
43526
43522
|
var import_antd86 = require("antd");
|
|
43527
43523
|
var import_react144 = require("react");
|
|
43528
|
-
var
|
|
43524
|
+
var import_react_router_dom110 = require("react-router-dom");
|
|
43529
43525
|
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
43530
43526
|
function AccountForm2({
|
|
43531
43527
|
onReload,
|
|
43532
43528
|
close,
|
|
43533
43529
|
id
|
|
43534
43530
|
}) {
|
|
43535
|
-
const { branchId } = (0,
|
|
43531
|
+
const { branchId } = (0, import_react_router_dom110.useParams)();
|
|
43536
43532
|
const { currencies } = useWarqadConfig();
|
|
43537
43533
|
const { stock } = currencies;
|
|
43538
43534
|
const isEdit = !!id;
|
|
@@ -43670,7 +43666,7 @@ var AccountForm_default2 = AccountForm2;
|
|
|
43670
43666
|
var import_react145 = require("react");
|
|
43671
43667
|
var import_react_hook_form64 = require("react-hook-form");
|
|
43672
43668
|
var import_zod109 = require("@hookform/resolvers/zod");
|
|
43673
|
-
var
|
|
43669
|
+
var import_react_router_dom111 = require("react-router-dom");
|
|
43674
43670
|
var import_antd87 = require("antd");
|
|
43675
43671
|
var import_lucide_react117 = require("lucide-react");
|
|
43676
43672
|
var import_dayjs8 = __toESM(require("dayjs"));
|
|
@@ -43681,7 +43677,7 @@ function InvoiceForm({
|
|
|
43681
43677
|
accountData,
|
|
43682
43678
|
id
|
|
43683
43679
|
}) {
|
|
43684
|
-
const { branchId } = (0,
|
|
43680
|
+
const { branchId } = (0, import_react_router_dom111.useParams)();
|
|
43685
43681
|
const [ref2, setRef] = (0, import_react145.useState)(void 0);
|
|
43686
43682
|
const { post, isLoading } = useApis_default();
|
|
43687
43683
|
const { get, isLoading: getLoading } = useApis_default();
|
|
@@ -44007,7 +44003,7 @@ var InvoiceForm_default = InvoiceForm;
|
|
|
44007
44003
|
var import_react146 = __toESM(require("react"));
|
|
44008
44004
|
var import_react_hook_form65 = require("react-hook-form");
|
|
44009
44005
|
var import_zod110 = require("@hookform/resolvers/zod");
|
|
44010
|
-
var
|
|
44006
|
+
var import_react_router_dom112 = require("react-router-dom");
|
|
44011
44007
|
var import_antd88 = require("antd");
|
|
44012
44008
|
var import_dayjs9 = __toESM(require("dayjs"));
|
|
44013
44009
|
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
@@ -44018,7 +44014,7 @@ function JournalForm3({
|
|
|
44018
44014
|
action = "debit",
|
|
44019
44015
|
id
|
|
44020
44016
|
}) {
|
|
44021
|
-
const { branchId } = (0,
|
|
44017
|
+
const { branchId } = (0, import_react_router_dom112.useParams)();
|
|
44022
44018
|
const { currencies } = useWarqadConfig();
|
|
44023
44019
|
const { stock: defaultCurrency } = currencies;
|
|
44024
44020
|
const [ref2, setRef] = import_react146.default.useState(void 0);
|
|
@@ -44239,11 +44235,11 @@ var journalForm_default = JournalForm3;
|
|
|
44239
44235
|
// src/components/Transactions/invoiceManager/InvoiceManager.tsx
|
|
44240
44236
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
44241
44237
|
function InvoiceManager({ v, url }) {
|
|
44242
|
-
const { branchId } = (0,
|
|
44238
|
+
const { branchId } = (0, import_react_router_dom113.useParams)();
|
|
44243
44239
|
const { apiConfig } = useWarqadConfig();
|
|
44244
44240
|
const { width } = useMediaSize();
|
|
44245
44241
|
const isLargeScreen = width > 768;
|
|
44246
|
-
const navigate = (0,
|
|
44242
|
+
const navigate = (0, import_react_router_dom113.useNavigate)();
|
|
44247
44243
|
const type = "account";
|
|
44248
44244
|
const [deleteAccount, setDeleteAccount] = (0, import_react147.useState)(null);
|
|
44249
44245
|
const { isLoading: isActionLoading, remove } = useApis_default();
|
|
@@ -44423,7 +44419,7 @@ function InvoiceManager({ v, url }) {
|
|
|
44423
44419
|
var InvoiceManager_default = InvoiceManager;
|
|
44424
44420
|
|
|
44425
44421
|
// src/components/Transactions/invoiceManager/InvoiceManagerReport.tsx
|
|
44426
|
-
var
|
|
44422
|
+
var import_react_router_dom114 = require("react-router-dom");
|
|
44427
44423
|
var import_react148 = require("react");
|
|
44428
44424
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
44429
44425
|
var InvoiceManagerReport = () => {
|
|
@@ -44438,7 +44434,7 @@ var InvoiceManagerReport = () => {
|
|
|
44438
44434
|
value: currency2
|
|
44439
44435
|
};
|
|
44440
44436
|
});
|
|
44441
|
-
const [searchParams, setSearchParams] = (0,
|
|
44437
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom114.useSearchParams)();
|
|
44442
44438
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
44443
44439
|
const initialCurrency = urlCurrency && currencyAllowed.includes(urlCurrency) ? urlCurrency : stock;
|
|
44444
44440
|
const [currencyFilter, setCurrencyFilter] = (0, import_react148.useState)(initialCurrency);
|
|
@@ -44669,7 +44665,7 @@ var InvoiceManagerReport_default = InvoiceManagerReport;
|
|
|
44669
44665
|
var import_react149 = require("react");
|
|
44670
44666
|
var import_antd90 = require("antd");
|
|
44671
44667
|
var import_dayjs10 = __toESM(require("dayjs"));
|
|
44672
|
-
var
|
|
44668
|
+
var import_react_router_dom115 = require("react-router-dom");
|
|
44673
44669
|
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
44674
44670
|
var ForexCurrencyAccountReport = () => {
|
|
44675
44671
|
const { apiConfig } = useWarqadConfig();
|
|
@@ -44679,7 +44675,7 @@ var ForexCurrencyAccountReport = () => {
|
|
|
44679
44675
|
value: currency2
|
|
44680
44676
|
};
|
|
44681
44677
|
});
|
|
44682
|
-
const [searchParams, setSearchParams] = (0,
|
|
44678
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom115.useSearchParams)();
|
|
44683
44679
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
44684
44680
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "KES";
|
|
44685
44681
|
const [currencyFilter, setCurrencyFilter] = (0, import_react149.useState)(initialCurrency);
|
|
@@ -44864,12 +44860,12 @@ var ForexCurrencyAccountReport = () => {
|
|
|
44864
44860
|
var ForexCurrencyAccountReport_default = ForexCurrencyAccountReport;
|
|
44865
44861
|
|
|
44866
44862
|
// src/components/Transactions/3/payments/Payments.tsx
|
|
44867
|
-
var
|
|
44863
|
+
var import_react_router_dom116 = require("react-router-dom");
|
|
44868
44864
|
var import_lucide_react119 = require("lucide-react");
|
|
44869
44865
|
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
44870
44866
|
function Payments3({ url }) {
|
|
44871
|
-
const { branchId } = (0,
|
|
44872
|
-
const navigate = (0,
|
|
44867
|
+
const { branchId } = (0, import_react_router_dom116.useParams)();
|
|
44868
|
+
const navigate = (0, import_react_router_dom116.useNavigate)();
|
|
44873
44869
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
44874
44870
|
const { openPos, PosPrinter } = usePosPrinter_default();
|
|
44875
44871
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
@@ -45024,7 +45020,7 @@ var Payments_default3 = Payments3;
|
|
|
45024
45020
|
|
|
45025
45021
|
// src/components/Transactions/3/payments/PaymentForm.tsx
|
|
45026
45022
|
var import_react150 = require("react");
|
|
45027
|
-
var
|
|
45023
|
+
var import_react_router_dom117 = require("react-router-dom");
|
|
45028
45024
|
var import_react_hook_form66 = require("react-hook-form");
|
|
45029
45025
|
var import_zod113 = require("@hookform/resolvers/zod");
|
|
45030
45026
|
var import_antd91 = require("antd");
|
|
@@ -45054,7 +45050,7 @@ var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
|
45054
45050
|
function PaymentForm3({
|
|
45055
45051
|
accountType = "all"
|
|
45056
45052
|
}) {
|
|
45057
|
-
const { branchId } = (0,
|
|
45053
|
+
const { branchId } = (0, import_react_router_dom117.useParams)();
|
|
45058
45054
|
const { currencies } = useWarqadConfig();
|
|
45059
45055
|
const { defaultCurrency } = currencies;
|
|
45060
45056
|
const { getQuery, navigate } = useApp_default();
|
|
@@ -45315,12 +45311,12 @@ function PaymentForm3({
|
|
|
45315
45311
|
var PaymentForm_default3 = PaymentForm3;
|
|
45316
45312
|
|
|
45317
45313
|
// src/components/Transactions/3/journals/Journals.tsx
|
|
45318
|
-
var
|
|
45314
|
+
var import_react_router_dom118 = require("react-router-dom");
|
|
45319
45315
|
var import_lucide_react120 = require("lucide-react");
|
|
45320
45316
|
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
45321
45317
|
function Journals3({ url }) {
|
|
45322
|
-
const { branchId } = (0,
|
|
45323
|
-
const navigate = (0,
|
|
45318
|
+
const { branchId } = (0, import_react_router_dom118.useParams)();
|
|
45319
|
+
const navigate = (0, import_react_router_dom118.useNavigate)();
|
|
45324
45320
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
45325
45321
|
const { PosPrinter } = usePosPrinter_default();
|
|
45326
45322
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
@@ -45455,7 +45451,7 @@ var Journals_default3 = Journals3;
|
|
|
45455
45451
|
|
|
45456
45452
|
// src/components/Transactions/3/journals/JournalsForm.tsx
|
|
45457
45453
|
var import_react151 = require("react");
|
|
45458
|
-
var
|
|
45454
|
+
var import_react_router_dom119 = require("react-router-dom");
|
|
45459
45455
|
var import_react_hook_form67 = require("react-hook-form");
|
|
45460
45456
|
var import_zod116 = require("@hookform/resolvers/zod");
|
|
45461
45457
|
var import_antd92 = require("antd");
|
|
@@ -45481,7 +45477,7 @@ var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
|
45481
45477
|
function JournalForm4({
|
|
45482
45478
|
accountType = "all"
|
|
45483
45479
|
}) {
|
|
45484
|
-
const { branchId } = (0,
|
|
45480
|
+
const { branchId } = (0, import_react_router_dom119.useParams)();
|
|
45485
45481
|
const { currencies } = useWarqadConfig();
|
|
45486
45482
|
const { defaultCurrency } = currencies;
|
|
45487
45483
|
const { getQuery, navigate } = useApp_default();
|
|
@@ -45691,12 +45687,12 @@ function JournalForm4({
|
|
|
45691
45687
|
var JournalsForm_default = JournalForm4;
|
|
45692
45688
|
|
|
45693
45689
|
// src/components/Transactions/3/sale2/List.tsx
|
|
45694
|
-
var
|
|
45690
|
+
var import_react_router_dom120 = require("react-router-dom");
|
|
45695
45691
|
var import_lucide_react121 = require("lucide-react");
|
|
45696
45692
|
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
45697
45693
|
function Sale2List2({ url, type = "product" }) {
|
|
45698
|
-
const { branchId } = (0,
|
|
45699
|
-
const navigate = (0,
|
|
45694
|
+
const { branchId } = (0, import_react_router_dom120.useParams)();
|
|
45695
|
+
const navigate = (0, import_react_router_dom120.useNavigate)();
|
|
45700
45696
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
45701
45697
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
45702
45698
|
url: url || `/transactions/get?type=stock&stock=sale-3&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -45859,12 +45855,12 @@ var import_react155 = require("react");
|
|
|
45859
45855
|
|
|
45860
45856
|
// src/components/Transactions/3/sale2/header.tsx
|
|
45861
45857
|
var import_react_hook_form68 = require("react-hook-form");
|
|
45862
|
-
var
|
|
45858
|
+
var import_react_router_dom121 = require("react-router-dom");
|
|
45863
45859
|
var import_react152 = require("react");
|
|
45864
45860
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
45865
45861
|
function SaleHeader3({ stockType }) {
|
|
45866
45862
|
const form = (0, import_react_hook_form68.useFormContext)();
|
|
45867
|
-
const { branchId } = (0,
|
|
45863
|
+
const { branchId } = (0, import_react_router_dom121.useParams)();
|
|
45868
45864
|
(0, import_react152.useEffect)(() => {
|
|
45869
45865
|
if (branchId) {
|
|
45870
45866
|
form.setValue("branch", branchId);
|
|
@@ -46329,7 +46325,7 @@ var schema_default7 = AdjustmentStockSchema5;
|
|
|
46329
46325
|
|
|
46330
46326
|
// src/components/Transactions/3/sale2/pos.tsx
|
|
46331
46327
|
var import_lucide_react122 = require("lucide-react");
|
|
46332
|
-
var
|
|
46328
|
+
var import_react_router_dom122 = require("react-router-dom");
|
|
46333
46329
|
|
|
46334
46330
|
// src/components/Transactions/3/sale2/Submit.tsx
|
|
46335
46331
|
var import_react_hook_form69 = require("react-hook-form");
|
|
@@ -46580,7 +46576,7 @@ var Sale2Form2 = ({
|
|
|
46580
46576
|
}) => {
|
|
46581
46577
|
const { getQuery, navigate } = useApp_default();
|
|
46582
46578
|
const stockType = type;
|
|
46583
|
-
const { branchId } = (0,
|
|
46579
|
+
const { branchId } = (0, import_react_router_dom122.useParams)();
|
|
46584
46580
|
const saleId = getQuery("id");
|
|
46585
46581
|
const { currencies } = useWarqadConfig();
|
|
46586
46582
|
const { defaultCurrency } = currencies;
|
|
@@ -46898,15 +46894,15 @@ var pos_default5 = Sale2Form2;
|
|
|
46898
46894
|
|
|
46899
46895
|
// src/components/Transactions/3/sale2/Collection.tsx
|
|
46900
46896
|
var import_react156 = require("react");
|
|
46901
|
-
var
|
|
46897
|
+
var import_react_router_dom123 = require("react-router-dom");
|
|
46902
46898
|
var import_lucide_react123 = require("lucide-react");
|
|
46903
46899
|
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
46904
46900
|
function Collection3({
|
|
46905
46901
|
url,
|
|
46906
46902
|
type = "product"
|
|
46907
46903
|
}) {
|
|
46908
|
-
const { branchId } = (0,
|
|
46909
|
-
const navigate = (0,
|
|
46904
|
+
const { branchId } = (0, import_react_router_dom123.useParams)();
|
|
46905
|
+
const navigate = (0, import_react_router_dom123.useNavigate)();
|
|
46910
46906
|
const { currencies } = useWarqadConfig();
|
|
46911
46907
|
const { defaultCurrency } = currencies;
|
|
46912
46908
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
@@ -47149,7 +47145,7 @@ function Collection3({
|
|
|
47149
47145
|
var Collection_default = Collection3;
|
|
47150
47146
|
|
|
47151
47147
|
// src/components/Transactions/3/sale2/CollectionLevel.tsx
|
|
47152
|
-
var
|
|
47148
|
+
var import_react_router_dom124 = require("react-router-dom");
|
|
47153
47149
|
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
47154
47150
|
var options9 = [
|
|
47155
47151
|
{ label: "Product", value: "product" },
|
|
@@ -47161,7 +47157,7 @@ var CollectionLevel = ({
|
|
|
47161
47157
|
}) => {
|
|
47162
47158
|
const { apiConfig, currencies } = useWarqadConfig();
|
|
47163
47159
|
const { stock } = currencies;
|
|
47164
|
-
const { branchId } = (0,
|
|
47160
|
+
const { branchId } = (0, import_react_router_dom124.useParams)();
|
|
47165
47161
|
const { branches } = useAuth_default();
|
|
47166
47162
|
const { TransactionView } = useTransactionView_default();
|
|
47167
47163
|
const { getQuery, setQuery } = useApp_default();
|
|
@@ -47271,15 +47267,15 @@ var Sale22 = {
|
|
|
47271
47267
|
var sale2_default2 = Sale22;
|
|
47272
47268
|
|
|
47273
47269
|
// src/components/Transactions/3/purchase3/List.tsx
|
|
47274
|
-
var
|
|
47270
|
+
var import_react_router_dom125 = require("react-router-dom");
|
|
47275
47271
|
var import_lucide_react124 = require("lucide-react");
|
|
47276
47272
|
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
47277
47273
|
function purchase3List({
|
|
47278
47274
|
url,
|
|
47279
47275
|
type = "product"
|
|
47280
47276
|
}) {
|
|
47281
|
-
const { branchId } = (0,
|
|
47282
|
-
const navigate = (0,
|
|
47277
|
+
const { branchId } = (0, import_react_router_dom125.useParams)();
|
|
47278
|
+
const navigate = (0, import_react_router_dom125.useNavigate)();
|
|
47283
47279
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
47284
47280
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
47285
47281
|
url: url || `/transactions/get?type=stock&stock=purchase-3&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -47442,12 +47438,12 @@ var import_react160 = require("react");
|
|
|
47442
47438
|
|
|
47443
47439
|
// src/components/Transactions/3/purchase3/header.tsx
|
|
47444
47440
|
var import_react_hook_form71 = require("react-hook-form");
|
|
47445
|
-
var
|
|
47441
|
+
var import_react_router_dom126 = require("react-router-dom");
|
|
47446
47442
|
var import_react157 = require("react");
|
|
47447
47443
|
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
47448
47444
|
function SaleHeader4({ stockType }) {
|
|
47449
47445
|
const form = (0, import_react_hook_form71.useFormContext)();
|
|
47450
|
-
const { branchId } = (0,
|
|
47446
|
+
const { branchId } = (0, import_react_router_dom126.useParams)();
|
|
47451
47447
|
(0, import_react157.useEffect)(() => {
|
|
47452
47448
|
if (branchId) {
|
|
47453
47449
|
form.setValue("branch", branchId);
|
|
@@ -47907,7 +47903,7 @@ var schema_default8 = AdjustmentStockSchema6;
|
|
|
47907
47903
|
|
|
47908
47904
|
// src/components/Transactions/3/purchase3/pos.tsx
|
|
47909
47905
|
var import_lucide_react125 = require("lucide-react");
|
|
47910
|
-
var
|
|
47906
|
+
var import_react_router_dom127 = require("react-router-dom");
|
|
47911
47907
|
|
|
47912
47908
|
// src/components/Transactions/3/purchase3/Submit.tsx
|
|
47913
47909
|
var import_react_hook_form72 = require("react-hook-form");
|
|
@@ -48144,7 +48140,7 @@ var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
|
48144
48140
|
var Purchase3Form = ({ type }) => {
|
|
48145
48141
|
const { getQuery, navigate } = useApp_default();
|
|
48146
48142
|
const stockType = type;
|
|
48147
|
-
const { branchId } = (0,
|
|
48143
|
+
const { branchId } = (0, import_react_router_dom127.useParams)();
|
|
48148
48144
|
const purchaseId = getQuery("id");
|
|
48149
48145
|
const { currencies } = useWarqadConfig();
|
|
48150
48146
|
const { defaultCurrency } = currencies;
|
|
@@ -48464,12 +48460,12 @@ var purchase3 = {
|
|
|
48464
48460
|
var purchase3_default = purchase3;
|
|
48465
48461
|
|
|
48466
48462
|
// src/components/Transactions/3/expense/Expenses.tsx
|
|
48467
|
-
var
|
|
48463
|
+
var import_react_router_dom128 = require("react-router-dom");
|
|
48468
48464
|
var import_lucide_react126 = require("lucide-react");
|
|
48469
48465
|
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
48470
48466
|
function Expenses3({ url }) {
|
|
48471
|
-
const { branchId } = (0,
|
|
48472
|
-
const navigate = (0,
|
|
48467
|
+
const { branchId } = (0, import_react_router_dom128.useParams)();
|
|
48468
|
+
const navigate = (0, import_react_router_dom128.useNavigate)();
|
|
48473
48469
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
48474
48470
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
48475
48471
|
url: url || `/transactions/get?type=expense-3${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -48587,7 +48583,7 @@ var Expenses_default2 = Expenses3;
|
|
|
48587
48583
|
|
|
48588
48584
|
// src/components/Transactions/3/expense/ExpenseForm.tsx
|
|
48589
48585
|
var import_react161 = require("react");
|
|
48590
|
-
var
|
|
48586
|
+
var import_react_router_dom129 = require("react-router-dom");
|
|
48591
48587
|
var import_react_hook_form74 = require("react-hook-form");
|
|
48592
48588
|
var import_zod123 = require("@hookform/resolvers/zod");
|
|
48593
48589
|
var import_antd95 = require("antd");
|
|
@@ -48609,7 +48605,7 @@ var expenseSchema4 = import_zod122.z.object({
|
|
|
48609
48605
|
// src/components/Transactions/3/expense/ExpenseForm.tsx
|
|
48610
48606
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
48611
48607
|
function ExpenseForm2() {
|
|
48612
|
-
const { branchId } = (0,
|
|
48608
|
+
const { branchId } = (0, import_react_router_dom129.useParams)();
|
|
48613
48609
|
const { getQuery, navigate } = useApp_default();
|
|
48614
48610
|
const id = getQuery("id");
|
|
48615
48611
|
const isEdit = !!id;
|
|
@@ -48810,13 +48806,13 @@ var Expenses32 = {
|
|
|
48810
48806
|
var expense_default = Expenses32;
|
|
48811
48807
|
|
|
48812
48808
|
// src/components/Transactions/3/reports/Expenses3Reports.tsx
|
|
48813
|
-
var
|
|
48809
|
+
var import_react_router_dom130 = require("react-router-dom");
|
|
48814
48810
|
var import_react162 = require("react");
|
|
48815
48811
|
var import_antd96 = require("antd");
|
|
48816
48812
|
var import_dayjs11 = __toESM(require("dayjs"));
|
|
48817
48813
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
48818
48814
|
var Expenses3Reports = () => {
|
|
48819
|
-
const { branchId } = (0,
|
|
48815
|
+
const { branchId } = (0, import_react_router_dom130.useParams)();
|
|
48820
48816
|
const [startDate, setStartDate] = (0, import_react162.useState)(null);
|
|
48821
48817
|
const [endDate, setEndDate] = (0, import_react162.useState)(null);
|
|
48822
48818
|
const { A4DataView, data } = useA4DataView_default({
|
|
@@ -48946,13 +48942,13 @@ var Expenses3Reports = () => {
|
|
|
48946
48942
|
var Expenses3Reports_default = Expenses3Reports;
|
|
48947
48943
|
|
|
48948
48944
|
// src/components/Transactions/3/reports/ExpensesJournal3.tsx
|
|
48949
|
-
var
|
|
48945
|
+
var import_react_router_dom131 = require("react-router-dom");
|
|
48950
48946
|
var import_react163 = require("react");
|
|
48951
48947
|
var import_antd97 = require("antd");
|
|
48952
48948
|
var import_dayjs12 = __toESM(require("dayjs"));
|
|
48953
48949
|
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
48954
48950
|
var Expenses3Reports2 = () => {
|
|
48955
|
-
const { branchId } = (0,
|
|
48951
|
+
const { branchId } = (0, import_react_router_dom131.useParams)();
|
|
48956
48952
|
const [startDate, setStartDate] = (0, import_react163.useState)(null);
|
|
48957
48953
|
const [endDate, setEndDate] = (0, import_react163.useState)(null);
|
|
48958
48954
|
const { A4DataView, data } = useA4DataView_default({
|
|
@@ -49089,12 +49085,12 @@ var Reports3 = {
|
|
|
49089
49085
|
var reports_default = Reports3;
|
|
49090
49086
|
|
|
49091
49087
|
// src/components/Transactions/3/expenseJournal/ExpensesJournal.tsx
|
|
49092
|
-
var
|
|
49088
|
+
var import_react_router_dom132 = require("react-router-dom");
|
|
49093
49089
|
var import_lucide_react127 = require("lucide-react");
|
|
49094
49090
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
49095
49091
|
function ExpensesJournal3({ url }) {
|
|
49096
|
-
const { branchId } = (0,
|
|
49097
|
-
const navigate = (0,
|
|
49092
|
+
const { branchId } = (0, import_react_router_dom132.useParams)();
|
|
49093
|
+
const navigate = (0, import_react_router_dom132.useNavigate)();
|
|
49098
49094
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
49099
49095
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
49100
49096
|
url: url || `/transactions/get?type=expense-journal-3${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -49215,7 +49211,7 @@ var ExpensesJournal_default = ExpensesJournal3;
|
|
|
49215
49211
|
|
|
49216
49212
|
// src/components/Transactions/3/expenseJournal/ExpensesJournal3Form.tsx
|
|
49217
49213
|
var import_react164 = require("react");
|
|
49218
|
-
var
|
|
49214
|
+
var import_react_router_dom133 = require("react-router-dom");
|
|
49219
49215
|
var import_react_hook_form75 = require("react-hook-form");
|
|
49220
49216
|
var import_zod126 = require("@hookform/resolvers/zod");
|
|
49221
49217
|
var import_antd98 = require("antd");
|
|
@@ -49235,7 +49231,7 @@ var expenseSchema5 = import_zod125.z.object({
|
|
|
49235
49231
|
// src/components/Transactions/3/expenseJournal/ExpensesJournal3Form.tsx
|
|
49236
49232
|
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
49237
49233
|
function ExpensesJournal3Form() {
|
|
49238
|
-
const { branchId } = (0,
|
|
49234
|
+
const { branchId } = (0, import_react_router_dom133.useParams)();
|
|
49239
49235
|
const { getQuery, navigate } = useApp_default();
|
|
49240
49236
|
const id = getQuery("id");
|
|
49241
49237
|
const isEdit = !!id;
|
|
@@ -49449,7 +49445,7 @@ var Transaction3 = {
|
|
|
49449
49445
|
var __default = Transaction3;
|
|
49450
49446
|
|
|
49451
49447
|
// src/components/reports/ItemReport.tsx
|
|
49452
|
-
var
|
|
49448
|
+
var import_react_router_dom134 = require("react-router-dom");
|
|
49453
49449
|
var import_zod127 = require("zod");
|
|
49454
49450
|
var import_react_hook_form76 = require("react-hook-form");
|
|
49455
49451
|
var import_zod128 = require("@hookform/resolvers/zod");
|
|
@@ -49461,7 +49457,7 @@ var ItemReport = ({
|
|
|
49461
49457
|
type
|
|
49462
49458
|
}) => {
|
|
49463
49459
|
const { apiConfig } = useWarqadConfig();
|
|
49464
|
-
const { branchId } = (0,
|
|
49460
|
+
const { branchId } = (0, import_react_router_dom134.useParams)();
|
|
49465
49461
|
const { branches } = useAuth_default();
|
|
49466
49462
|
const [params, setParams] = (0, import_react165.useState)({
|
|
49467
49463
|
id: "",
|
|
@@ -49664,17 +49660,17 @@ function ItemReportHeader2({
|
|
|
49664
49660
|
var ItemReport_default = ItemReport;
|
|
49665
49661
|
|
|
49666
49662
|
// src/components/accounts/LeaseCollection.tsx
|
|
49667
|
-
var
|
|
49663
|
+
var import_react_router_dom135 = require("react-router-dom");
|
|
49668
49664
|
var import_react166 = require("react");
|
|
49669
49665
|
var import_jsx_runtime272 = require("react/jsx-runtime");
|
|
49670
49666
|
var LeaseCollection = ({
|
|
49671
49667
|
leaseType,
|
|
49672
49668
|
defaultCurrency = "KES"
|
|
49673
49669
|
}) => {
|
|
49674
|
-
const navigate = (0,
|
|
49675
|
-
const [searchParams] = (0,
|
|
49670
|
+
const navigate = (0, import_react_router_dom135.useNavigate)();
|
|
49671
|
+
const [searchParams] = (0, import_react_router_dom135.useSearchParams)();
|
|
49676
49672
|
const { apiConfig } = useWarqadConfig();
|
|
49677
|
-
const { branchId } = (0,
|
|
49673
|
+
const { branchId } = (0, import_react_router_dom135.useParams)();
|
|
49678
49674
|
const { branches } = useAuth_default();
|
|
49679
49675
|
const currentBranch = (0, import_react166.useMemo)(
|
|
49680
49676
|
() => branches?.find((b) => b?._id === branchId),
|
|
@@ -49781,7 +49777,7 @@ var LeaseCollection = ({
|
|
|
49781
49777
|
var LeaseCollection_default = LeaseCollection;
|
|
49782
49778
|
|
|
49783
49779
|
// src/components/Transactions/cargoIM/CargoIM.tsx
|
|
49784
|
-
var
|
|
49780
|
+
var import_react_router_dom139 = require("react-router-dom");
|
|
49785
49781
|
var import_lucide_react129 = require("lucide-react");
|
|
49786
49782
|
var import_react170 = require("react");
|
|
49787
49783
|
var import_antd103 = require("antd");
|
|
@@ -49820,14 +49816,14 @@ var import_react_hook_form77 = require("react-hook-form");
|
|
|
49820
49816
|
var import_zod131 = require("@hookform/resolvers/zod");
|
|
49821
49817
|
var import_antd100 = require("antd");
|
|
49822
49818
|
var import_react167 = require("react");
|
|
49823
|
-
var
|
|
49819
|
+
var import_react_router_dom136 = require("react-router-dom");
|
|
49824
49820
|
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
49825
49821
|
function AccountForm3({
|
|
49826
49822
|
onReload,
|
|
49827
49823
|
close,
|
|
49828
49824
|
id
|
|
49829
49825
|
}) {
|
|
49830
|
-
const { branchId } = (0,
|
|
49826
|
+
const { branchId } = (0, import_react_router_dom136.useParams)();
|
|
49831
49827
|
const { currencies } = useWarqadConfig();
|
|
49832
49828
|
const { stock } = currencies;
|
|
49833
49829
|
const isEdit = !!id;
|
|
@@ -49965,7 +49961,7 @@ var AccountForm_default3 = AccountForm3;
|
|
|
49965
49961
|
var import_react168 = require("react");
|
|
49966
49962
|
var import_react_hook_form78 = require("react-hook-form");
|
|
49967
49963
|
var import_zod132 = require("@hookform/resolvers/zod");
|
|
49968
|
-
var
|
|
49964
|
+
var import_react_router_dom137 = require("react-router-dom");
|
|
49969
49965
|
var import_antd101 = require("antd");
|
|
49970
49966
|
var import_lucide_react128 = require("lucide-react");
|
|
49971
49967
|
var import_dayjs13 = __toESM(require("dayjs"));
|
|
@@ -49976,7 +49972,7 @@ function InvoiceForm2({
|
|
|
49976
49972
|
accountData,
|
|
49977
49973
|
id
|
|
49978
49974
|
}) {
|
|
49979
|
-
const { branchId } = (0,
|
|
49975
|
+
const { branchId } = (0, import_react_router_dom137.useParams)();
|
|
49980
49976
|
const [ref2, setRef] = (0, import_react168.useState)(void 0);
|
|
49981
49977
|
const { post, isLoading } = useApis_default();
|
|
49982
49978
|
const { get, isLoading: getLoading } = useApis_default();
|
|
@@ -50302,7 +50298,7 @@ var InvoiceForm_default2 = InvoiceForm2;
|
|
|
50302
50298
|
var import_react169 = __toESM(require("react"));
|
|
50303
50299
|
var import_react_hook_form79 = require("react-hook-form");
|
|
50304
50300
|
var import_zod133 = require("@hookform/resolvers/zod");
|
|
50305
|
-
var
|
|
50301
|
+
var import_react_router_dom138 = require("react-router-dom");
|
|
50306
50302
|
var import_antd102 = require("antd");
|
|
50307
50303
|
var import_dayjs14 = __toESM(require("dayjs"));
|
|
50308
50304
|
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
@@ -50313,7 +50309,7 @@ function JournalForm5({
|
|
|
50313
50309
|
action = "debit",
|
|
50314
50310
|
id
|
|
50315
50311
|
}) {
|
|
50316
|
-
const { branchId } = (0,
|
|
50312
|
+
const { branchId } = (0, import_react_router_dom138.useParams)();
|
|
50317
50313
|
const { currencies } = useWarqadConfig();
|
|
50318
50314
|
const { stock: defaultCurrency } = currencies;
|
|
50319
50315
|
const [ref2, setRef] = import_react169.default.useState(void 0);
|
|
@@ -50534,11 +50530,11 @@ var journalForm_default2 = JournalForm5;
|
|
|
50534
50530
|
// src/components/Transactions/cargoIM/CargoIM.tsx
|
|
50535
50531
|
var import_jsx_runtime276 = require("react/jsx-runtime");
|
|
50536
50532
|
function CargoIM({ v, url }) {
|
|
50537
|
-
const { branchId } = (0,
|
|
50533
|
+
const { branchId } = (0, import_react_router_dom139.useParams)();
|
|
50538
50534
|
const { apiConfig } = useWarqadConfig();
|
|
50539
50535
|
const { width } = useMediaSize();
|
|
50540
50536
|
const isLargeScreen = width > 768;
|
|
50541
|
-
const navigate = (0,
|
|
50537
|
+
const navigate = (0, import_react_router_dom139.useNavigate)();
|
|
50542
50538
|
const type = "supplier";
|
|
50543
50539
|
const [deleteAccount, setDeleteAccount] = (0, import_react170.useState)(null);
|
|
50544
50540
|
const { isLoading: isActionLoading, remove } = useApis_default();
|
|
@@ -50718,7 +50714,7 @@ function CargoIM({ v, url }) {
|
|
|
50718
50714
|
var CargoIM_default = CargoIM;
|
|
50719
50715
|
|
|
50720
50716
|
// src/components/Transactions/cargoIM/cargoIMReport.tsx
|
|
50721
|
-
var
|
|
50717
|
+
var import_react_router_dom140 = require("react-router-dom");
|
|
50722
50718
|
var import_react171 = require("react");
|
|
50723
50719
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
50724
50720
|
var CargoIMReport = () => {
|
|
@@ -50733,7 +50729,7 @@ var CargoIMReport = () => {
|
|
|
50733
50729
|
value: currency2
|
|
50734
50730
|
};
|
|
50735
50731
|
});
|
|
50736
|
-
const [searchParams, setSearchParams] = (0,
|
|
50732
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom140.useSearchParams)();
|
|
50737
50733
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
50738
50734
|
const initialCurrency = urlCurrency && currencyAllowed.includes(urlCurrency) ? urlCurrency : stock;
|
|
50739
50735
|
const [currencyFilter, setCurrencyFilter] = (0, import_react171.useState)(initialCurrency);
|
|
@@ -51012,14 +51008,14 @@ var CargoIMReport = () => {
|
|
|
51012
51008
|
var cargoIMReport_default = CargoIMReport;
|
|
51013
51009
|
|
|
51014
51010
|
// src/components/accounts/forex-2/Forex2Accounts.tsx
|
|
51015
|
-
var
|
|
51011
|
+
var import_react_router_dom141 = require("react-router-dom");
|
|
51016
51012
|
var import_lucide_react130 = require("lucide-react");
|
|
51017
51013
|
var import_react172 = require("react");
|
|
51018
51014
|
var import_antd104 = require("antd");
|
|
51019
51015
|
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
51020
51016
|
function Forex2Accounts({ v, url }) {
|
|
51021
|
-
const { branchId } = (0,
|
|
51022
|
-
const navigate = (0,
|
|
51017
|
+
const { branchId } = (0, import_react_router_dom141.useParams)();
|
|
51018
|
+
const navigate = (0, import_react_router_dom141.useNavigate)();
|
|
51023
51019
|
const type = "account";
|
|
51024
51020
|
const [deleteAccount, setDeleteAccount] = (0, import_react172.useState)(null);
|
|
51025
51021
|
const { isLoading: isActionLoading, remove } = useApis_default();
|
|
@@ -51242,14 +51238,14 @@ function Forex2Accounts({ v, url }) {
|
|
|
51242
51238
|
var Forex2Accounts_default = Forex2Accounts;
|
|
51243
51239
|
|
|
51244
51240
|
// src/components/reports/ProductList.tsx
|
|
51245
|
-
var
|
|
51241
|
+
var import_react_router_dom142 = require("react-router-dom");
|
|
51246
51242
|
var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
51247
51243
|
var options10 = [
|
|
51248
51244
|
{ label: "Product", value: "product" },
|
|
51249
51245
|
{ label: "Pack", value: "pack" }
|
|
51250
51246
|
];
|
|
51251
51247
|
var ProductList2 = ({ value = false }) => {
|
|
51252
|
-
const { branchId } = (0,
|
|
51248
|
+
const { branchId } = (0, import_react_router_dom142.useParams)();
|
|
51253
51249
|
const { branches } = useAuth_default();
|
|
51254
51250
|
const { TransactionView } = useTransactionView_default();
|
|
51255
51251
|
const { getQuery, setQuery } = useApp_default();
|