warqadui 0.0.291 → 0.0.293
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 -312
- package/dist/index.mjs +217 -226
- 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,18 +24849,18 @@ 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
|
-
url: url || `/transactions/get?type=stock&stock=adjustment&stockType=${type}${branchId ? `&
|
|
24863
|
+
url: url || `/transactions/get?type=stock&stock=adjustment&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
24873
24864
|
dateFilter: true
|
|
24874
24865
|
});
|
|
24875
24866
|
const { Modal: Modal2 } = useModal();
|
|
@@ -25202,7 +25193,7 @@ function StockAdjustmentTable({
|
|
|
25202
25193
|
v: 1,
|
|
25203
25194
|
valueKey: "_id",
|
|
25204
25195
|
obj: "lineObj",
|
|
25205
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
25196
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
25206
25197
|
className: "px-0! py-0! w-full!",
|
|
25207
25198
|
onSelect: () => {
|
|
25208
25199
|
setTimeout(() => {
|
|
@@ -25648,15 +25639,15 @@ function getStorageType(type, branch) {
|
|
|
25648
25639
|
var pos_default = PosStockAdjustment;
|
|
25649
25640
|
|
|
25650
25641
|
// src/components/stocks/clothend/sale/SaleStockAdjustment.tsx
|
|
25651
|
-
var
|
|
25642
|
+
var import_react_router_dom47 = require("react-router-dom");
|
|
25652
25643
|
var import_lucide_react74 = require("lucide-react");
|
|
25653
25644
|
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
25654
25645
|
function SaleStockAdjustment({
|
|
25655
25646
|
url,
|
|
25656
25647
|
type = "product"
|
|
25657
25648
|
}) {
|
|
25658
|
-
const { branchId } = (0,
|
|
25659
|
-
const navigate = (0,
|
|
25649
|
+
const { branchId } = (0, import_react_router_dom47.useParams)();
|
|
25650
|
+
const navigate = (0, import_react_router_dom47.useNavigate)();
|
|
25660
25651
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
25661
25652
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
25662
25653
|
url: url || `/transactions/get?type=stock&stock=sale&stockType=${type}${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -25821,13 +25812,13 @@ var import_react84 = require("react");
|
|
|
25821
25812
|
|
|
25822
25813
|
// src/components/stocks/clothend/sale/header.tsx
|
|
25823
25814
|
var import_react_hook_form35 = require("react-hook-form");
|
|
25824
|
-
var
|
|
25815
|
+
var import_react_router_dom48 = require("react-router-dom");
|
|
25825
25816
|
var import_react82 = require("react");
|
|
25826
25817
|
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
25827
25818
|
function SaleHeader({ stockType }) {
|
|
25828
25819
|
const form = (0, import_react_hook_form35.useFormContext)();
|
|
25829
25820
|
const { branches } = useAuth_default();
|
|
25830
|
-
const { branchId } = (0,
|
|
25821
|
+
const { branchId } = (0, import_react_router_dom48.useParams)();
|
|
25831
25822
|
const sale = form.watch("sale");
|
|
25832
25823
|
const { currencies } = useWarqadConfig();
|
|
25833
25824
|
const branchCurrency = (branches || []).find(
|
|
@@ -26319,12 +26310,12 @@ var schema_default3 = AdjustmentStockSchema2;
|
|
|
26319
26310
|
|
|
26320
26311
|
// src/components/stocks/clothend/sale/pos.tsx
|
|
26321
26312
|
var import_lucide_react75 = require("lucide-react");
|
|
26322
|
-
var
|
|
26313
|
+
var import_react_router_dom49 = require("react-router-dom");
|
|
26323
26314
|
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
26324
26315
|
var SaleStockForm = ({ type }) => {
|
|
26325
26316
|
const { getQuery, navigate } = useApp_default();
|
|
26326
26317
|
const stockType = type;
|
|
26327
|
-
const { branchId } = (0,
|
|
26318
|
+
const { branchId } = (0, import_react_router_dom49.useParams)();
|
|
26328
26319
|
const saleId = getQuery("id");
|
|
26329
26320
|
const { branches } = useAuth_default();
|
|
26330
26321
|
const { currencies } = useWarqadConfig();
|
|
@@ -26588,15 +26579,15 @@ function getStorageType2(type, branch) {
|
|
|
26588
26579
|
var pos_default2 = SaleStockForm;
|
|
26589
26580
|
|
|
26590
26581
|
// src/components/stocks/clothend/transfer/ClothendStockTransfer.tsx
|
|
26591
|
-
var
|
|
26582
|
+
var import_react_router_dom50 = require("react-router-dom");
|
|
26592
26583
|
var import_lucide_react76 = require("lucide-react");
|
|
26593
26584
|
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
26594
26585
|
function ClothendStockTransfer({
|
|
26595
26586
|
url,
|
|
26596
26587
|
type = "product"
|
|
26597
26588
|
}) {
|
|
26598
|
-
const { branchId } = (0,
|
|
26599
|
-
const navigate = (0,
|
|
26589
|
+
const { branchId } = (0, import_react_router_dom50.useParams)();
|
|
26590
|
+
const navigate = (0, import_react_router_dom50.useNavigate)();
|
|
26600
26591
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
26601
26592
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
26602
26593
|
url: url || `/transactions/get?type=stock&stock=transfer&transfer=${type}${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -26723,12 +26714,12 @@ var import_react87 = require("react");
|
|
|
26723
26714
|
|
|
26724
26715
|
// src/components/stocks/clothend/transfer/header.tsx
|
|
26725
26716
|
var import_react_hook_form37 = require("react-hook-form");
|
|
26726
|
-
var
|
|
26717
|
+
var import_react_router_dom51 = require("react-router-dom");
|
|
26727
26718
|
var import_react85 = require("react");
|
|
26728
26719
|
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
26729
26720
|
function TransferHeader({ stockType }) {
|
|
26730
26721
|
const form = (0, import_react_hook_form37.useFormContext)();
|
|
26731
|
-
const { branchId } = (0,
|
|
26722
|
+
const { branchId } = (0, import_react_router_dom51.useParams)();
|
|
26732
26723
|
const transfer = form.watch("transfer");
|
|
26733
26724
|
const fromBranch = form.watch("fromBranch");
|
|
26734
26725
|
const filter = (0, import_react85.useMemo)(() => {
|
|
@@ -27140,11 +27131,11 @@ var schema_default4 = AdjustmentStockSchema3;
|
|
|
27140
27131
|
|
|
27141
27132
|
// src/components/stocks/clothend/transfer/pos.tsx
|
|
27142
27133
|
var import_lucide_react77 = require("lucide-react");
|
|
27143
|
-
var
|
|
27134
|
+
var import_react_router_dom52 = require("react-router-dom");
|
|
27144
27135
|
var import_jsx_runtime156 = require("react/jsx-runtime");
|
|
27145
27136
|
var PosStockTransfer = ({ type }) => {
|
|
27146
27137
|
const { getQuery, navigate } = useApp_default();
|
|
27147
|
-
const { branchId } = (0,
|
|
27138
|
+
const { branchId } = (0, import_react_router_dom52.useParams)();
|
|
27148
27139
|
const transferId = getQuery("id");
|
|
27149
27140
|
const { currencies } = useWarqadConfig();
|
|
27150
27141
|
const currency = currencies?.stock;
|
|
@@ -27376,12 +27367,12 @@ function getStorageType3(type, branch) {
|
|
|
27376
27367
|
var pos_default3 = PosStockTransfer;
|
|
27377
27368
|
|
|
27378
27369
|
// src/components/forexDubaiToChina/ForexDubaiToChina.tsx
|
|
27379
|
-
var
|
|
27370
|
+
var import_react_router_dom53 = require("react-router-dom");
|
|
27380
27371
|
var import_lucide_react78 = require("lucide-react");
|
|
27381
27372
|
var import_jsx_runtime157 = require("react/jsx-runtime");
|
|
27382
27373
|
function ForexDubaiToChina() {
|
|
27383
|
-
const { branchId } = (0,
|
|
27384
|
-
const navigate = (0,
|
|
27374
|
+
const { branchId } = (0, import_react_router_dom53.useParams)();
|
|
27375
|
+
const navigate = (0, import_react_router_dom53.useNavigate)();
|
|
27385
27376
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
27386
27377
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
27387
27378
|
url: `/transactions/get?type=forex dubai to china${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -27563,10 +27554,10 @@ var import_react_hook_form39 = require("react-hook-form");
|
|
|
27563
27554
|
var import_zod58 = require("@hookform/resolvers/zod");
|
|
27564
27555
|
var import_antd51 = require("antd");
|
|
27565
27556
|
var import_react88 = require("react");
|
|
27566
|
-
var
|
|
27557
|
+
var import_react_router_dom54 = require("react-router-dom");
|
|
27567
27558
|
var import_jsx_runtime158 = require("react/jsx-runtime");
|
|
27568
27559
|
function ForexDubaiToChinaForm() {
|
|
27569
|
-
const { branchId } = (0,
|
|
27560
|
+
const { branchId } = (0, import_react_router_dom54.useParams)();
|
|
27570
27561
|
const { getQuery, navigate } = useApp_default();
|
|
27571
27562
|
const id = getQuery("id");
|
|
27572
27563
|
const isEdit = !!id;
|
|
@@ -27848,7 +27839,7 @@ function ForexDubaiToChinaForm() {
|
|
|
27848
27839
|
var ForexDubaiToChinaForm_default = ForexDubaiToChinaForm;
|
|
27849
27840
|
|
|
27850
27841
|
// src/components/accounts/ForexAccountReport.tsx
|
|
27851
|
-
var
|
|
27842
|
+
var import_react_router_dom56 = require("react-router-dom");
|
|
27852
27843
|
var import_react90 = require("react");
|
|
27853
27844
|
|
|
27854
27845
|
// src/components/accounts/forex-2/Forex2FormTransaction.tsx
|
|
@@ -27881,7 +27872,7 @@ var forex2TransactionSchema = import_zod59.default.object({
|
|
|
27881
27872
|
var schema_default5 = forex2TransactionSchema;
|
|
27882
27873
|
|
|
27883
27874
|
// src/components/accounts/forex-2/Forex2FormTransaction.tsx
|
|
27884
|
-
var
|
|
27875
|
+
var import_react_router_dom55 = require("react-router-dom");
|
|
27885
27876
|
var import_react89 = require("react");
|
|
27886
27877
|
var import_antd52 = require("antd");
|
|
27887
27878
|
var import_jsx_runtime159 = require("react/jsx-runtime");
|
|
@@ -27893,7 +27884,7 @@ function Forex2FormTransaction({
|
|
|
27893
27884
|
action: defaultAction
|
|
27894
27885
|
}) {
|
|
27895
27886
|
const [accountInfo, setAccountInfo] = (0, import_react89.useState)(accountData);
|
|
27896
|
-
const { branchId } = (0,
|
|
27887
|
+
const { branchId } = (0, import_react_router_dom55.useParams)();
|
|
27897
27888
|
const [ref2, setRef] = (0, import_react89.useState)("");
|
|
27898
27889
|
const [showReverseModal, setShowReverseModal] = (0, import_react89.useState)(false);
|
|
27899
27890
|
const { post, isLoading } = useApis_default();
|
|
@@ -28355,7 +28346,7 @@ var ForexAccountReport = () => {
|
|
|
28355
28346
|
value: currency2
|
|
28356
28347
|
};
|
|
28357
28348
|
});
|
|
28358
|
-
const [searchParams, setSearchParams] = (0,
|
|
28349
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom56.useSearchParams)();
|
|
28359
28350
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
28360
28351
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
28361
28352
|
const [currencyFilter, setCurrencyFilter] = (0, import_react90.useState)(initialCurrency);
|
|
@@ -28576,7 +28567,7 @@ var ForexAccountReport = () => {
|
|
|
28576
28567
|
var ForexAccountReport_default = ForexAccountReport;
|
|
28577
28568
|
|
|
28578
28569
|
// src/components/accounts/ForexAccountStatements.tsx
|
|
28579
|
-
var
|
|
28570
|
+
var import_react_router_dom57 = require("react-router-dom");
|
|
28580
28571
|
var import_react91 = require("react");
|
|
28581
28572
|
var import_jsx_runtime161 = require("react/jsx-runtime");
|
|
28582
28573
|
var options4 = [
|
|
@@ -28585,8 +28576,8 @@ var options4 = [
|
|
|
28585
28576
|
{ label: "Credit", value: "credit" }
|
|
28586
28577
|
];
|
|
28587
28578
|
var ForexAccountStatements = () => {
|
|
28588
|
-
const navigate = (0,
|
|
28589
|
-
const [searchParams, setSearchParams] = (0,
|
|
28579
|
+
const navigate = (0, import_react_router_dom57.useNavigate)();
|
|
28580
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom57.useSearchParams)();
|
|
28590
28581
|
const { apiConfig, enums } = useWarqadConfig();
|
|
28591
28582
|
const type = "account";
|
|
28592
28583
|
const urlFilter = searchParams.get("filter");
|
|
@@ -28773,7 +28764,7 @@ var ForexAccountStatements = () => {
|
|
|
28773
28764
|
var ForexAccountStatements_default = ForexAccountStatements;
|
|
28774
28765
|
|
|
28775
28766
|
// src/components/reports/StockLevel.tsx
|
|
28776
|
-
var
|
|
28767
|
+
var import_react_router_dom58 = require("react-router-dom");
|
|
28777
28768
|
var import_jsx_runtime162 = require("react/jsx-runtime");
|
|
28778
28769
|
var options5 = [
|
|
28779
28770
|
{ label: "Product", value: "product" },
|
|
@@ -28785,7 +28776,7 @@ var StockLevel = ({
|
|
|
28785
28776
|
}) => {
|
|
28786
28777
|
const { apiConfig, currencies } = useWarqadConfig();
|
|
28787
28778
|
const { stock } = currencies;
|
|
28788
|
-
const { branchId } = (0,
|
|
28779
|
+
const { branchId } = (0, import_react_router_dom58.useParams)();
|
|
28789
28780
|
const { branches } = useAuth_default();
|
|
28790
28781
|
const { TransactionView } = useTransactionView_default();
|
|
28791
28782
|
const { getQuery, setQuery } = useApp_default();
|
|
@@ -28904,7 +28895,7 @@ var StockLevel = ({
|
|
|
28904
28895
|
var StockLevel_default = StockLevel;
|
|
28905
28896
|
|
|
28906
28897
|
// src/components/reports/profitAndReport.tsx
|
|
28907
|
-
var
|
|
28898
|
+
var import_react_router_dom59 = require("react-router-dom");
|
|
28908
28899
|
var import_zod62 = require("zod");
|
|
28909
28900
|
var import_react_hook_form41 = require("react-hook-form");
|
|
28910
28901
|
var import_zod63 = require("@hookform/resolvers/zod");
|
|
@@ -28912,7 +28903,7 @@ var import_react92 = require("react");
|
|
|
28912
28903
|
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
28913
28904
|
var ProfitAndLossReport = () => {
|
|
28914
28905
|
const { apiConfig } = useWarqadConfig();
|
|
28915
|
-
const { branchId } = (0,
|
|
28906
|
+
const { branchId } = (0, import_react_router_dom59.useParams)();
|
|
28916
28907
|
const { branches } = useAuth_default();
|
|
28917
28908
|
const { currencies } = useWarqadConfig();
|
|
28918
28909
|
const { stock: currency } = currencies;
|
|
@@ -29127,7 +29118,7 @@ var profitAndReport_default = ProfitAndLossReport;
|
|
|
29127
29118
|
var import_antd53 = require("antd");
|
|
29128
29119
|
var import_react93 = require("react");
|
|
29129
29120
|
var import_recharts = require("recharts");
|
|
29130
|
-
var
|
|
29121
|
+
var import_react_router_dom60 = require("react-router-dom");
|
|
29131
29122
|
var import_jsx_runtime164 = require("react/jsx-runtime");
|
|
29132
29123
|
var { Title, Text } = import_antd53.Typography;
|
|
29133
29124
|
function DateSalesReport({
|
|
@@ -29136,7 +29127,7 @@ function DateSalesReport({
|
|
|
29136
29127
|
}) {
|
|
29137
29128
|
const { data, get, isLoading } = useApis_default();
|
|
29138
29129
|
const { currencies } = useWarqadConfig();
|
|
29139
|
-
const { branchId } = (0,
|
|
29130
|
+
const { branchId } = (0, import_react_router_dom60.useParams)();
|
|
29140
29131
|
const { branches } = useAuth_default();
|
|
29141
29132
|
const branch = (branches || []).find((b) => b._id === branchId);
|
|
29142
29133
|
const branchCurrency = branch?.currency || "KES";
|
|
@@ -29555,11 +29546,11 @@ function MessageView({ data, isLoading }) {
|
|
|
29555
29546
|
var MessageView_default = MessageView;
|
|
29556
29547
|
|
|
29557
29548
|
// src/components/messages/Messages.tsx
|
|
29558
|
-
var
|
|
29549
|
+
var import_react_router_dom61 = require("react-router-dom");
|
|
29559
29550
|
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
29560
29551
|
function Messages() {
|
|
29561
29552
|
const { application, store } = useWarqadConfig();
|
|
29562
|
-
const { branchId } = (0,
|
|
29553
|
+
const { branchId } = (0, import_react_router_dom61.useParams)();
|
|
29563
29554
|
const socket = useWarqadSocket();
|
|
29564
29555
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
29565
29556
|
url: `/messages/get${branchId ? `?branch=${branchId}` : ""}`,
|
|
@@ -29981,7 +29972,7 @@ var FloorSection = ({
|
|
|
29981
29972
|
var FloorSection_default = FloorSection;
|
|
29982
29973
|
|
|
29983
29974
|
// src/components/realestate/floors/Floors.tsx
|
|
29984
|
-
var
|
|
29975
|
+
var import_react_router_dom62 = require("react-router-dom");
|
|
29985
29976
|
|
|
29986
29977
|
// src/components/realestate/floors/FloorFilter.tsx
|
|
29987
29978
|
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
@@ -30253,7 +30244,7 @@ function FloorsContainer({ type = "rent" }) {
|
|
|
30253
30244
|
const [statusFilter, setStatusFilter] = (0, import_react95.useState)("all");
|
|
30254
30245
|
const [selectedFloorId, setSelectedFloorId] = (0, import_react95.useState)("all");
|
|
30255
30246
|
const { get, data, isLoading } = useApis_default();
|
|
30256
|
-
const { branchId } = (0,
|
|
30247
|
+
const { branchId } = (0, import_react_router_dom62.useParams)();
|
|
30257
30248
|
const rawFloors = data?.data || [];
|
|
30258
30249
|
const floorsData = (0, import_react95.useMemo)(() => {
|
|
30259
30250
|
return rawFloors.map((floor) => ({
|
|
@@ -30435,7 +30426,7 @@ var Floors = FloorsContainer;
|
|
|
30435
30426
|
var Floors_default = Floors;
|
|
30436
30427
|
|
|
30437
30428
|
// src/components/realestate/units/UnitField.tsx
|
|
30438
|
-
var
|
|
30429
|
+
var import_react_router_dom63 = require("react-router-dom");
|
|
30439
30430
|
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
30440
30431
|
function UnitField({
|
|
30441
30432
|
name,
|
|
@@ -30449,7 +30440,7 @@ function UnitField({
|
|
|
30449
30440
|
disabled,
|
|
30450
30441
|
obj
|
|
30451
30442
|
}) {
|
|
30452
|
-
const { branchId } = (0,
|
|
30443
|
+
const { branchId } = (0, import_react_router_dom63.useParams)();
|
|
30453
30444
|
const separator = api.includes("?") ? "&" : "?";
|
|
30454
30445
|
let apiUrl = api;
|
|
30455
30446
|
if (branchId) {
|
|
@@ -30483,15 +30474,15 @@ var Units = {
|
|
|
30483
30474
|
var units_default = Units;
|
|
30484
30475
|
|
|
30485
30476
|
// src/components/realestate/lease/journal/LeaseJornal.tsx
|
|
30486
|
-
var
|
|
30477
|
+
var import_react_router_dom64 = require("react-router-dom");
|
|
30487
30478
|
var import_lucide_react86 = require("lucide-react");
|
|
30488
30479
|
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
30489
30480
|
function LeaseJournals({
|
|
30490
30481
|
url,
|
|
30491
30482
|
leaseType
|
|
30492
30483
|
}) {
|
|
30493
|
-
const { branchId } = (0,
|
|
30494
|
-
const navigate = (0,
|
|
30484
|
+
const { branchId } = (0, import_react_router_dom64.useParams)();
|
|
30485
|
+
const navigate = (0, import_react_router_dom64.useNavigate)();
|
|
30495
30486
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
30496
30487
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
30497
30488
|
url: url || `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=journal&leaseType=${leaseType}`,
|
|
@@ -30667,7 +30658,7 @@ var leaseJournalSchema = import_zod64.default.object({
|
|
|
30667
30658
|
var import_react_hook_form42 = require("react-hook-form");
|
|
30668
30659
|
var import_zod66 = require("@hookform/resolvers/zod");
|
|
30669
30660
|
var import_react96 = require("react");
|
|
30670
|
-
var
|
|
30661
|
+
var import_react_router_dom65 = require("react-router-dom");
|
|
30671
30662
|
var import_antd54 = require("antd");
|
|
30672
30663
|
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
30673
30664
|
function LeaseJornalFrom({ leaseType }) {
|
|
@@ -30680,7 +30671,7 @@ function LeaseJornalFrom({ leaseType }) {
|
|
|
30680
30671
|
}
|
|
30681
30672
|
});
|
|
30682
30673
|
const [ref2, setRef] = (0, import_react96.useState)("");
|
|
30683
|
-
const { branchId } = (0,
|
|
30674
|
+
const { branchId } = (0, import_react_router_dom65.useParams)();
|
|
30684
30675
|
const { getQuery, navigate } = useApp_default();
|
|
30685
30676
|
const id = getQuery("id");
|
|
30686
30677
|
const isEdit = !!id;
|
|
@@ -30879,12 +30870,12 @@ var import_zod68 = require("@hookform/resolvers/zod");
|
|
|
30879
30870
|
var import_react_hook_form43 = require("react-hook-form");
|
|
30880
30871
|
var import_moment9 = __toESM(require("moment"));
|
|
30881
30872
|
var import_antd55 = require("antd");
|
|
30882
|
-
var
|
|
30873
|
+
var import_react_router_dom66 = require("react-router-dom");
|
|
30883
30874
|
var import_react97 = require("react");
|
|
30884
30875
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
30885
30876
|
function LeaseForm({ leaseType }) {
|
|
30886
30877
|
const { getQuery, navigate } = useApp_default();
|
|
30887
|
-
const { branchId } = (0,
|
|
30878
|
+
const { branchId } = (0, import_react_router_dom66.useParams)();
|
|
30888
30879
|
const id = getQuery("id");
|
|
30889
30880
|
const isEdit = !!id;
|
|
30890
30881
|
const { isLoading: getLoading, get } = useApis_default();
|
|
@@ -31019,15 +31010,15 @@ function LeaseForm({ leaseType }) {
|
|
|
31019
31010
|
var LeaseForm_default = LeaseForm;
|
|
31020
31011
|
|
|
31021
31012
|
// src/components/realestate/lease/payment/LeasePayment.tsx
|
|
31022
|
-
var
|
|
31013
|
+
var import_react_router_dom67 = require("react-router-dom");
|
|
31023
31014
|
var import_lucide_react87 = require("lucide-react");
|
|
31024
31015
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
31025
31016
|
function LeasePayment({
|
|
31026
31017
|
url,
|
|
31027
31018
|
leaseType
|
|
31028
31019
|
}) {
|
|
31029
|
-
const { branchId } = (0,
|
|
31030
|
-
const navigate = (0,
|
|
31020
|
+
const { branchId } = (0, import_react_router_dom67.useParams)();
|
|
31021
|
+
const navigate = (0, import_react_router_dom67.useNavigate)();
|
|
31031
31022
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
31032
31023
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
31033
31024
|
url: url || `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=payment&leaseType=${leaseType}`,
|
|
@@ -31203,7 +31194,7 @@ var leaseJournalSchema2 = import_zod69.default.object({
|
|
|
31203
31194
|
var import_react_hook_form44 = require("react-hook-form");
|
|
31204
31195
|
var import_zod71 = require("@hookform/resolvers/zod");
|
|
31205
31196
|
var import_react98 = require("react");
|
|
31206
|
-
var
|
|
31197
|
+
var import_react_router_dom68 = require("react-router-dom");
|
|
31207
31198
|
var import_antd56 = require("antd");
|
|
31208
31199
|
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
31209
31200
|
function LeasePaymentForm({ leaseType }) {
|
|
@@ -31216,7 +31207,7 @@ function LeasePaymentForm({ leaseType }) {
|
|
|
31216
31207
|
}
|
|
31217
31208
|
});
|
|
31218
31209
|
const [ref2, setRef] = (0, import_react98.useState)("");
|
|
31219
|
-
const { branchId } = (0,
|
|
31210
|
+
const { branchId } = (0, import_react_router_dom68.useParams)();
|
|
31220
31211
|
const { getQuery, navigate } = useApp_default();
|
|
31221
31212
|
const id = getQuery("id");
|
|
31222
31213
|
const { apiConfig } = useWarqadConfig();
|
|
@@ -31394,15 +31385,15 @@ function LeasePaymentForm({ leaseType }) {
|
|
|
31394
31385
|
var LeasePaymentForm_default = LeasePaymentForm;
|
|
31395
31386
|
|
|
31396
31387
|
// src/components/realestate/lease/invoice/LeaseInvoice.tsx
|
|
31397
|
-
var
|
|
31388
|
+
var import_react_router_dom69 = require("react-router-dom");
|
|
31398
31389
|
var import_lucide_react88 = require("lucide-react");
|
|
31399
31390
|
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
31400
31391
|
function LeaseInvoice({
|
|
31401
31392
|
url,
|
|
31402
31393
|
leaseType
|
|
31403
31394
|
}) {
|
|
31404
|
-
const { branchId } = (0,
|
|
31405
|
-
const navigate = (0,
|
|
31395
|
+
const { branchId } = (0, import_react_router_dom69.useParams)();
|
|
31396
|
+
const navigate = (0, import_react_router_dom69.useNavigate)();
|
|
31406
31397
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
31407
31398
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
31408
31399
|
url: url || `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=invoice&leaseType=${leaseType}`,
|
|
@@ -31563,7 +31554,7 @@ var LeaseInvoice_default = LeaseInvoice;
|
|
|
31563
31554
|
var import_react_hook_form45 = require("react-hook-form");
|
|
31564
31555
|
var import_zod74 = require("@hookform/resolvers/zod");
|
|
31565
31556
|
var import_react99 = require("react");
|
|
31566
|
-
var
|
|
31557
|
+
var import_react_router_dom71 = require("react-router-dom");
|
|
31567
31558
|
var import_antd57 = require("antd");
|
|
31568
31559
|
|
|
31569
31560
|
// src/components/realestate/lease/invoice/schema.ts
|
|
@@ -31582,7 +31573,7 @@ var leaseInvoiceSchema = import_zod72.default.object({
|
|
|
31582
31573
|
});
|
|
31583
31574
|
|
|
31584
31575
|
// src/components/realestate/lease/LeaseField.tsx
|
|
31585
|
-
var
|
|
31576
|
+
var import_react_router_dom70 = require("react-router-dom");
|
|
31586
31577
|
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
31587
31578
|
function LeaseField({
|
|
31588
31579
|
name,
|
|
@@ -31596,7 +31587,7 @@ function LeaseField({
|
|
|
31596
31587
|
disabled,
|
|
31597
31588
|
obj
|
|
31598
31589
|
}) {
|
|
31599
|
-
const { branchId } = (0,
|
|
31590
|
+
const { branchId } = (0, import_react_router_dom70.useParams)();
|
|
31600
31591
|
const separator = api.includes("?") ? "&" : "?";
|
|
31601
31592
|
let apiUrl = api;
|
|
31602
31593
|
if (branchId) {
|
|
@@ -31644,7 +31635,7 @@ function LeaseInvoiceForm({ leaseType }) {
|
|
|
31644
31635
|
}
|
|
31645
31636
|
});
|
|
31646
31637
|
const [ref2, setRef] = (0, import_react99.useState)("");
|
|
31647
|
-
const { branchId } = (0,
|
|
31638
|
+
const { branchId } = (0, import_react_router_dom71.useParams)();
|
|
31648
31639
|
const { getQuery, navigate } = useApp_default();
|
|
31649
31640
|
const id = getQuery("id");
|
|
31650
31641
|
const isEdit = !!id;
|
|
@@ -31835,7 +31826,7 @@ function LeaseInvoiceForm({ leaseType }) {
|
|
|
31835
31826
|
var LeaseInvoiceForm_default = LeaseInvoiceForm;
|
|
31836
31827
|
|
|
31837
31828
|
// src/components/realestate/lease/Leases.tsx
|
|
31838
|
-
var
|
|
31829
|
+
var import_react_router_dom72 = require("react-router-dom");
|
|
31839
31830
|
var import_lucide_react90 = require("lucide-react");
|
|
31840
31831
|
|
|
31841
31832
|
// src/components/realestate/lease/view/useLeaseView.tsx
|
|
@@ -32194,8 +32185,8 @@ function Leases({
|
|
|
32194
32185
|
url,
|
|
32195
32186
|
leaseType
|
|
32196
32187
|
}) {
|
|
32197
|
-
const { branchId } = (0,
|
|
32198
|
-
const navigate = (0,
|
|
32188
|
+
const { branchId } = (0, import_react_router_dom72.useParams)();
|
|
32189
|
+
const navigate = (0, import_react_router_dom72.useNavigate)();
|
|
32199
32190
|
const { LeaseView, openLease } = useLeaseView_default();
|
|
32200
32191
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
32201
32192
|
url: url || `/lease/get?type=${leaseType}${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -32328,15 +32319,15 @@ function Leases({
|
|
|
32328
32319
|
var Leases_default = Leases;
|
|
32329
32320
|
|
|
32330
32321
|
// src/components/realestate/lease/EndLeases.tsx
|
|
32331
|
-
var
|
|
32322
|
+
var import_react_router_dom73 = require("react-router-dom");
|
|
32332
32323
|
var import_lucide_react91 = require("lucide-react");
|
|
32333
32324
|
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
32334
32325
|
function EndLeases({
|
|
32335
32326
|
url,
|
|
32336
32327
|
leaseType
|
|
32337
32328
|
}) {
|
|
32338
|
-
const { branchId } = (0,
|
|
32339
|
-
const navigate = (0,
|
|
32329
|
+
const { branchId } = (0, import_react_router_dom73.useParams)();
|
|
32330
|
+
const navigate = (0, import_react_router_dom73.useNavigate)();
|
|
32340
32331
|
const { LeaseView, openLease } = useLeaseView_default();
|
|
32341
32332
|
const { data, TransactionViewComponent } = useTransaction_default({
|
|
32342
32333
|
url: url || `/lease/get?type=${leaseType}${branchId ? `&fromBranch=${branchId}` : ""}&endLease=true`,
|
|
@@ -32640,12 +32631,12 @@ function ViewLease({ data }) {
|
|
|
32640
32631
|
var EndLeaseForm_default = EndLeaseForm;
|
|
32641
32632
|
|
|
32642
32633
|
// src/components/realestate/lease/paybill/Paybill.tsx
|
|
32643
|
-
var
|
|
32634
|
+
var import_react_router_dom74 = require("react-router-dom");
|
|
32644
32635
|
var import_lucide_react93 = require("lucide-react");
|
|
32645
32636
|
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
32646
32637
|
function Paybill2() {
|
|
32647
|
-
const { branchId } = (0,
|
|
32648
|
-
const navigate = (0,
|
|
32638
|
+
const { branchId } = (0, import_react_router_dom74.useParams)();
|
|
32639
|
+
const navigate = (0, import_react_router_dom74.useNavigate)();
|
|
32649
32640
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
32650
32641
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
32651
32642
|
url: `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=paybill`,
|
|
@@ -32978,15 +32969,15 @@ function PaybillForm() {
|
|
|
32978
32969
|
var PaybillForm_default = PaybillForm;
|
|
32979
32970
|
|
|
32980
32971
|
// src/components/realestate/lease/invoices/LeaseInvoices.tsx
|
|
32981
|
-
var
|
|
32972
|
+
var import_react_router_dom75 = require("react-router-dom");
|
|
32982
32973
|
var import_lucide_react95 = require("lucide-react");
|
|
32983
32974
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
32984
32975
|
function LeaseInvoices({
|
|
32985
32976
|
url,
|
|
32986
32977
|
leaseType
|
|
32987
32978
|
}) {
|
|
32988
|
-
const { branchId } = (0,
|
|
32989
|
-
const navigate = (0,
|
|
32979
|
+
const { branchId } = (0, import_react_router_dom75.useParams)();
|
|
32980
|
+
const navigate = (0, import_react_router_dom75.useNavigate)();
|
|
32990
32981
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
32991
32982
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
32992
32983
|
url: url || `/transactions/get?type=lease${branchId ? `&branch=${branchId}` : ""}&leaseAction=invoices&leaseType=${leaseType}`,
|
|
@@ -33146,7 +33137,7 @@ var LeaseInvoices_default = LeaseInvoices;
|
|
|
33146
33137
|
var import_react_hook_form48 = require("react-hook-form");
|
|
33147
33138
|
var import_zod80 = require("@hookform/resolvers/zod");
|
|
33148
33139
|
var import_react105 = require("react");
|
|
33149
|
-
var
|
|
33140
|
+
var import_react_router_dom77 = require("react-router-dom");
|
|
33150
33141
|
var import_antd61 = require("antd");
|
|
33151
33142
|
|
|
33152
33143
|
// src/components/realestate/lease/invoices/schema.ts
|
|
@@ -33169,7 +33160,7 @@ var leaseInvoiceSchema2 = import_zod78.default.object({
|
|
|
33169
33160
|
|
|
33170
33161
|
// src/components/realestate/lease/invoices/LeaseSaleTable.tsx
|
|
33171
33162
|
var import_react104 = require("react");
|
|
33172
|
-
var
|
|
33163
|
+
var import_react_router_dom76 = require("react-router-dom");
|
|
33173
33164
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
33174
33165
|
function LeaseSaleTable({
|
|
33175
33166
|
data,
|
|
@@ -33180,7 +33171,7 @@ function LeaseSaleTable({
|
|
|
33180
33171
|
leaseType,
|
|
33181
33172
|
account
|
|
33182
33173
|
}) {
|
|
33183
|
-
const { branchId } = (0,
|
|
33174
|
+
const { branchId } = (0, import_react_router_dom76.useParams)();
|
|
33184
33175
|
const { watch, setValue } = methods;
|
|
33185
33176
|
const lineId = watch("lineId");
|
|
33186
33177
|
const lineObj = watch("lineObj");
|
|
@@ -33369,7 +33360,7 @@ function LeaseInvoicesForm({ leaseType }) {
|
|
|
33369
33360
|
}
|
|
33370
33361
|
});
|
|
33371
33362
|
const [ref2, setRef] = (0, import_react105.useState)("");
|
|
33372
|
-
const { branchId } = (0,
|
|
33363
|
+
const { branchId } = (0, import_react_router_dom77.useParams)();
|
|
33373
33364
|
const { getQuery, navigate } = useApp_default();
|
|
33374
33365
|
const id = getQuery("id");
|
|
33375
33366
|
const isEdit = !!id;
|
|
@@ -33576,12 +33567,12 @@ var Lease = {
|
|
|
33576
33567
|
var lease_default = Lease;
|
|
33577
33568
|
|
|
33578
33569
|
// src/components/Transactions/currency/expenseAccount/ExpenseAccount.tsx
|
|
33579
|
-
var
|
|
33570
|
+
var import_react_router_dom78 = require("react-router-dom");
|
|
33580
33571
|
var import_lucide_react96 = require("lucide-react");
|
|
33581
33572
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
33582
33573
|
function ExpenseAccount({ url }) {
|
|
33583
|
-
const { branchId } = (0,
|
|
33584
|
-
const navigate = (0,
|
|
33574
|
+
const { branchId } = (0, import_react_router_dom78.useParams)();
|
|
33575
|
+
const navigate = (0, import_react_router_dom78.useNavigate)();
|
|
33585
33576
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
33586
33577
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
33587
33578
|
url: url || `/transactions/get?type=expense account${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -33707,7 +33698,7 @@ var ExpenseAccount_default = ExpenseAccount;
|
|
|
33707
33698
|
|
|
33708
33699
|
// src/components/Transactions/currency/expenseAccount/ExpenseAccountForm.tsx
|
|
33709
33700
|
var import_react106 = require("react");
|
|
33710
|
-
var
|
|
33701
|
+
var import_react_router_dom79 = require("react-router-dom");
|
|
33711
33702
|
var import_react_hook_form49 = require("react-hook-form");
|
|
33712
33703
|
var import_zod83 = require("@hookform/resolvers/zod");
|
|
33713
33704
|
var import_antd62 = require("antd");
|
|
@@ -33732,7 +33723,7 @@ var expenseSchema3 = import_zod82.z.object({
|
|
|
33732
33723
|
// src/components/Transactions/currency/expenseAccount/ExpenseAccountForm.tsx
|
|
33733
33724
|
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
33734
33725
|
function ExpenseAccountForm() {
|
|
33735
|
-
const { branchId } = (0,
|
|
33726
|
+
const { branchId } = (0, import_react_router_dom79.useParams)();
|
|
33736
33727
|
const { getQuery, navigate } = useApp_default();
|
|
33737
33728
|
const id = getQuery("id");
|
|
33738
33729
|
const isEdit = !!id;
|
|
@@ -33972,10 +33963,10 @@ var import_react_hook_form50 = require("react-hook-form");
|
|
|
33972
33963
|
var import_zod86 = require("@hookform/resolvers/zod");
|
|
33973
33964
|
var import_antd63 = require("antd");
|
|
33974
33965
|
var import_react107 = require("react");
|
|
33975
|
-
var
|
|
33966
|
+
var import_react_router_dom80 = require("react-router-dom");
|
|
33976
33967
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
33977
33968
|
function JournalForm2({ accountType = "all" }) {
|
|
33978
|
-
const { branchId } = (0,
|
|
33969
|
+
const { branchId } = (0, import_react_router_dom80.useParams)();
|
|
33979
33970
|
const { apiConfig } = useWarqadConfig();
|
|
33980
33971
|
const { getQuery, navigate } = useApp_default();
|
|
33981
33972
|
const id = getQuery("id");
|
|
@@ -34193,15 +34184,15 @@ function JournalForm2({ accountType = "all" }) {
|
|
|
34193
34184
|
var JournalForm_default2 = JournalForm2;
|
|
34194
34185
|
|
|
34195
34186
|
// src/components/Transactions/currency/journals/Journals.tsx
|
|
34196
|
-
var
|
|
34187
|
+
var import_react_router_dom81 = require("react-router-dom");
|
|
34197
34188
|
var import_lucide_react97 = require("lucide-react");
|
|
34198
34189
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
34199
34190
|
function Journals2({
|
|
34200
34191
|
url,
|
|
34201
34192
|
journalType
|
|
34202
34193
|
}) {
|
|
34203
|
-
const { branchId } = (0,
|
|
34204
|
-
const navigate = (0,
|
|
34194
|
+
const { branchId } = (0, import_react_router_dom81.useParams)();
|
|
34195
|
+
const navigate = (0, import_react_router_dom81.useNavigate)();
|
|
34205
34196
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
34206
34197
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
34207
34198
|
url: url || `/transactions/get?type=journal${branchId ? `&branch=${branchId}` : ""}${journalType ? `&journal=${journalType}` : ""}`,
|
|
@@ -34344,7 +34335,7 @@ var Journals_default2 = Journals2;
|
|
|
34344
34335
|
|
|
34345
34336
|
// src/components/Transactions/currency/payment/PaymentForm.tsx
|
|
34346
34337
|
var import_react108 = require("react");
|
|
34347
|
-
var
|
|
34338
|
+
var import_react_router_dom82 = require("react-router-dom");
|
|
34348
34339
|
var import_react_hook_form51 = require("react-hook-form");
|
|
34349
34340
|
var import_zod89 = require("@hookform/resolvers/zod");
|
|
34350
34341
|
var import_antd64 = require("antd");
|
|
@@ -34373,7 +34364,7 @@ var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
|
34373
34364
|
function PaymentForm2({
|
|
34374
34365
|
accountType = "all"
|
|
34375
34366
|
}) {
|
|
34376
|
-
const { branchId } = (0,
|
|
34367
|
+
const { branchId } = (0, import_react_router_dom82.useParams)();
|
|
34377
34368
|
const { getQuery, navigate } = useApp_default();
|
|
34378
34369
|
const id = getQuery("id");
|
|
34379
34370
|
const isEdit = !!id;
|
|
@@ -34588,15 +34579,15 @@ function PaymentForm2({
|
|
|
34588
34579
|
var PaymentForm_default2 = PaymentForm2;
|
|
34589
34580
|
|
|
34590
34581
|
// src/components/Transactions/currency/payment/Payments.tsx
|
|
34591
|
-
var
|
|
34582
|
+
var import_react_router_dom83 = require("react-router-dom");
|
|
34592
34583
|
var import_lucide_react98 = require("lucide-react");
|
|
34593
34584
|
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
34594
34585
|
function Payments2({
|
|
34595
34586
|
url,
|
|
34596
34587
|
paymentType
|
|
34597
34588
|
}) {
|
|
34598
|
-
const { branchId } = (0,
|
|
34599
|
-
const navigate = (0,
|
|
34589
|
+
const { branchId } = (0, import_react_router_dom83.useParams)();
|
|
34590
|
+
const navigate = (0, import_react_router_dom83.useNavigate)();
|
|
34600
34591
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
34601
34592
|
const { openPos, PosPrinter } = usePosPrinter_default();
|
|
34602
34593
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
@@ -34748,22 +34739,22 @@ var CurrencyTransactions = {
|
|
|
34748
34739
|
var currency_default = CurrencyTransactions;
|
|
34749
34740
|
|
|
34750
34741
|
// src/components/accounts/RealestateAccountReport.tsx
|
|
34751
|
-
var
|
|
34742
|
+
var import_react_router_dom84 = require("react-router-dom");
|
|
34752
34743
|
var import_react109 = require("react");
|
|
34753
34744
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
34754
34745
|
var RealestateAccountReport = ({ modifUrl }) => {
|
|
34755
34746
|
const { apiConfig } = useWarqadConfig();
|
|
34756
34747
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
34757
34748
|
const { getParams } = useApp_default();
|
|
34758
|
-
const { branchId } = (0,
|
|
34749
|
+
const { branchId } = (0, import_react_router_dom84.useParams)();
|
|
34759
34750
|
const currencies = Enums_default.currencies.map((currency2) => {
|
|
34760
34751
|
return {
|
|
34761
34752
|
label: currency2,
|
|
34762
34753
|
value: currency2
|
|
34763
34754
|
};
|
|
34764
34755
|
});
|
|
34765
|
-
const navigate = (0,
|
|
34766
|
-
const [searchParams, setSearchParams] = (0,
|
|
34756
|
+
const navigate = (0, import_react_router_dom84.useNavigate)();
|
|
34757
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom84.useSearchParams)();
|
|
34767
34758
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
34768
34759
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
34769
34760
|
const [currencyFilter, setCurrencyFilter] = (0, import_react109.useState)(initialCurrency);
|
|
@@ -34928,7 +34919,7 @@ var RealestateAccountReport = ({ modifUrl }) => {
|
|
|
34928
34919
|
var RealestateAccountReport_default = RealestateAccountReport;
|
|
34929
34920
|
|
|
34930
34921
|
// src/components/accounts/RealEastateAccounts.tsx
|
|
34931
|
-
var
|
|
34922
|
+
var import_react_router_dom85 = require("react-router-dom");
|
|
34932
34923
|
var import_lucide_react99 = require("lucide-react");
|
|
34933
34924
|
var import_react110 = require("react");
|
|
34934
34925
|
var import_antd65 = require("antd");
|
|
@@ -34938,8 +34929,8 @@ function RealEastateAccounts({
|
|
|
34938
34929
|
url,
|
|
34939
34930
|
type = "account"
|
|
34940
34931
|
}) {
|
|
34941
|
-
const { branchId } = (0,
|
|
34942
|
-
const navigate = (0,
|
|
34932
|
+
const { branchId } = (0, import_react_router_dom85.useParams)();
|
|
34933
|
+
const navigate = (0, import_react_router_dom85.useNavigate)();
|
|
34943
34934
|
const profile = type === "all" ? "account" : type;
|
|
34944
34935
|
const [deleteAccount, setDeleteAccount] = (0, import_react110.useState)(null);
|
|
34945
34936
|
const { isLoading: isActionLoading, remove } = useApis_default();
|
|
@@ -35058,7 +35049,7 @@ function RealEastateAccounts({
|
|
|
35058
35049
|
var RealEastateAccounts_default = RealEastateAccounts;
|
|
35059
35050
|
|
|
35060
35051
|
// src/components/accounts/RealEastateStatements.tsx
|
|
35061
|
-
var
|
|
35052
|
+
var import_react_router_dom87 = require("react-router-dom");
|
|
35062
35053
|
var import_react112 = require("react");
|
|
35063
35054
|
|
|
35064
35055
|
// src/components/accounts/profileAccount/ProfileAccountForm.tsx
|
|
@@ -35066,7 +35057,7 @@ var import_react_hook_form52 = require("react-hook-form");
|
|
|
35066
35057
|
var import_zod90 = require("@hookform/resolvers/zod");
|
|
35067
35058
|
var import_antd66 = require("antd");
|
|
35068
35059
|
var import_react111 = require("react");
|
|
35069
|
-
var
|
|
35060
|
+
var import_react_router_dom86 = require("react-router-dom");
|
|
35070
35061
|
var import_countries_list2 = require("countries-list");
|
|
35071
35062
|
var import_zod91 = __toESM(require("zod"));
|
|
35072
35063
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
@@ -35088,7 +35079,7 @@ function ProfileAccountForm({
|
|
|
35088
35079
|
showCurrency = true,
|
|
35089
35080
|
showDocument = false
|
|
35090
35081
|
}) {
|
|
35091
|
-
const { branchId } = (0,
|
|
35082
|
+
const { branchId } = (0, import_react_router_dom86.useParams)();
|
|
35092
35083
|
const { getQuery, navigate } = useApp_default();
|
|
35093
35084
|
const { role } = useAuth_default();
|
|
35094
35085
|
let profileOptions = profileAccountTypes.map((item) => ({
|
|
@@ -35376,11 +35367,11 @@ var options6 = [
|
|
|
35376
35367
|
{ label: "Credit", value: "credit" }
|
|
35377
35368
|
];
|
|
35378
35369
|
var RealEastateStatements = () => {
|
|
35379
|
-
const navigate = (0,
|
|
35380
|
-
const [searchParams, setSearchParams] = (0,
|
|
35370
|
+
const navigate = (0, import_react_router_dom87.useNavigate)();
|
|
35371
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom87.useSearchParams)();
|
|
35381
35372
|
const { apiConfig } = useWarqadConfig();
|
|
35382
35373
|
const { role } = useAuth_default();
|
|
35383
|
-
const { branchId } = (0,
|
|
35374
|
+
const { branchId } = (0, import_react_router_dom87.useParams)();
|
|
35384
35375
|
const type = "all";
|
|
35385
35376
|
const urlFilter = searchParams.get("filter");
|
|
35386
35377
|
const initialFilter = ["all", "debit", "credit"].includes(urlFilter) ? urlFilter : "all";
|
|
@@ -35591,7 +35582,7 @@ var RealEastateStatements = () => {
|
|
|
35591
35582
|
var RealEastateStatements_default = RealEastateStatements;
|
|
35592
35583
|
|
|
35593
35584
|
// src/components/accounts/LeaseAccountReport.tsx
|
|
35594
|
-
var
|
|
35585
|
+
var import_react_router_dom88 = require("react-router-dom");
|
|
35595
35586
|
var import_react113 = require("react");
|
|
35596
35587
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
35597
35588
|
var LeaseAccountReport = ({
|
|
@@ -35608,11 +35599,11 @@ var LeaseAccountReport = ({
|
|
|
35608
35599
|
value: currency2
|
|
35609
35600
|
};
|
|
35610
35601
|
});
|
|
35611
|
-
const navigate = (0,
|
|
35612
|
-
const [searchParams, setSearchParams] = (0,
|
|
35602
|
+
const navigate = (0, import_react_router_dom88.useNavigate)();
|
|
35603
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom88.useSearchParams)();
|
|
35613
35604
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
35614
35605
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : defaultCurrency;
|
|
35615
|
-
const { branchId } = (0,
|
|
35606
|
+
const { branchId } = (0, import_react_router_dom88.useParams)();
|
|
35616
35607
|
const [currencyFilter, setCurrencyFilter] = (0, import_react113.useState)(initialCurrency);
|
|
35617
35608
|
const handleCurrencyChange = (value) => {
|
|
35618
35609
|
setCurrencyFilter(value);
|
|
@@ -35772,7 +35763,7 @@ var LeaseAccountReport = ({
|
|
|
35772
35763
|
var LeaseAccountReport_default = LeaseAccountReport;
|
|
35773
35764
|
|
|
35774
35765
|
// src/components/accounts/LeaseAccountStatements.tsx
|
|
35775
|
-
var
|
|
35766
|
+
var import_react_router_dom89 = require("react-router-dom");
|
|
35776
35767
|
var import_react114 = require("react");
|
|
35777
35768
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
35778
35769
|
var options7 = [
|
|
@@ -35784,10 +35775,10 @@ var LeaseAccountStatements = ({
|
|
|
35784
35775
|
leaseType,
|
|
35785
35776
|
defaultCurrency = "USD"
|
|
35786
35777
|
}) => {
|
|
35787
|
-
const navigate = (0,
|
|
35788
|
-
const [searchParams, setSearchParams] = (0,
|
|
35778
|
+
const navigate = (0, import_react_router_dom89.useNavigate)();
|
|
35779
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom89.useSearchParams)();
|
|
35789
35780
|
const { apiConfig } = useWarqadConfig();
|
|
35790
|
-
const { branchId } = (0,
|
|
35781
|
+
const { branchId } = (0, import_react_router_dom89.useParams)();
|
|
35791
35782
|
const type = "all";
|
|
35792
35783
|
const urlFilter = searchParams.get("filter");
|
|
35793
35784
|
const initialFilter = ["all", "debit", "credit"].includes(urlFilter) ? urlFilter : "all";
|
|
@@ -35995,17 +35986,17 @@ var LeaseAccountStatements = ({
|
|
|
35995
35986
|
var LeaseAccountStatements_default = LeaseAccountStatements;
|
|
35996
35987
|
|
|
35997
35988
|
// src/components/accounts/ExpenseAccountStatement.tsx
|
|
35998
|
-
var
|
|
35989
|
+
var import_react_router_dom90 = require("react-router-dom");
|
|
35999
35990
|
var import_react115 = require("react");
|
|
36000
35991
|
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
36001
35992
|
var ExpenseAccountStatement = ({ type }) => {
|
|
36002
|
-
const navigate = (0,
|
|
36003
|
-
const [searchParams, setSearchParams] = (0,
|
|
35993
|
+
const navigate = (0, import_react_router_dom90.useNavigate)();
|
|
35994
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom90.useSearchParams)();
|
|
36004
35995
|
const { apiConfig } = useWarqadConfig();
|
|
36005
35996
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
36006
35997
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
36007
35998
|
const [currencyFilter, setCurrencyFilter] = (0, import_react115.useState)(initialCurrency);
|
|
36008
|
-
const { branchId } = (0,
|
|
35999
|
+
const { branchId } = (0, import_react_router_dom90.useParams)();
|
|
36009
36000
|
const handleCurrencyChange = (value) => {
|
|
36010
36001
|
setCurrencyFilter(value);
|
|
36011
36002
|
setSearchParams((prev) => {
|
|
@@ -36105,7 +36096,7 @@ var ExpenseAccountStatement = ({ type }) => {
|
|
|
36105
36096
|
var ExpenseAccountStatement_default = ExpenseAccountStatement;
|
|
36106
36097
|
|
|
36107
36098
|
// src/components/accounts/ExpenseAccountReport.tsx
|
|
36108
|
-
var
|
|
36099
|
+
var import_react_router_dom91 = require("react-router-dom");
|
|
36109
36100
|
var import_react116 = require("react");
|
|
36110
36101
|
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
36111
36102
|
var ExpenseAccountReport = ({ modifUrl }) => {
|
|
@@ -36118,12 +36109,12 @@ var ExpenseAccountReport = ({ modifUrl }) => {
|
|
|
36118
36109
|
value: currency2
|
|
36119
36110
|
};
|
|
36120
36111
|
});
|
|
36121
|
-
const navigate = (0,
|
|
36122
|
-
const [searchParams, setSearchParams] = (0,
|
|
36112
|
+
const navigate = (0, import_react_router_dom91.useNavigate)();
|
|
36113
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom91.useSearchParams)();
|
|
36123
36114
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
36124
36115
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "KES";
|
|
36125
36116
|
const [currencyFilter, setCurrencyFilter] = (0, import_react116.useState)(initialCurrency);
|
|
36126
|
-
const { branchId } = (0,
|
|
36117
|
+
const { branchId } = (0, import_react_router_dom91.useParams)();
|
|
36127
36118
|
const handleCurrencyChange = (value) => {
|
|
36128
36119
|
setCurrencyFilter(value);
|
|
36129
36120
|
setSearchParams((prev) => {
|
|
@@ -36234,12 +36225,12 @@ var ExpenseAccountReport = ({ modifUrl }) => {
|
|
|
36234
36225
|
var ExpenseAccountReport_default = ExpenseAccountReport;
|
|
36235
36226
|
|
|
36236
36227
|
// src/components/reports/ExpenseAReport.tsx
|
|
36237
|
-
var
|
|
36228
|
+
var import_react_router_dom92 = require("react-router-dom");
|
|
36238
36229
|
var import_react117 = require("react");
|
|
36239
36230
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
36240
36231
|
var ExpenseAReport = () => {
|
|
36241
|
-
const [searchParams, setSearchParams] = (0,
|
|
36242
|
-
const { branchId } = (0,
|
|
36232
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom92.useSearchParams)();
|
|
36233
|
+
const { branchId } = (0, import_react_router_dom92.useParams)();
|
|
36243
36234
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
36244
36235
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "USD";
|
|
36245
36236
|
const [currencyFilter, setCurrencyFilter] = (0, import_react117.useState)(initialCurrency);
|
|
@@ -36392,7 +36383,7 @@ var ExpenseAReport_default = ExpenseAReport;
|
|
|
36392
36383
|
|
|
36393
36384
|
// src/components/posts/PostForm.tsx
|
|
36394
36385
|
var import_react119 = require("react");
|
|
36395
|
-
var
|
|
36386
|
+
var import_react_router_dom93 = require("react-router-dom");
|
|
36396
36387
|
var import_react_hook_form54 = require("react-hook-form");
|
|
36397
36388
|
var import_zod92 = require("@hookform/resolvers/zod");
|
|
36398
36389
|
var import_lucide_react101 = require("lucide-react");
|
|
@@ -36765,7 +36756,7 @@ function HotelSpecifications({ form }) {
|
|
|
36765
36756
|
// src/components/posts/PostForm.tsx
|
|
36766
36757
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
36767
36758
|
function PostForm({ afterPostUrl }) {
|
|
36768
|
-
const { branchId, postType } = (0,
|
|
36759
|
+
const { branchId, postType } = (0, import_react_router_dom93.useParams)();
|
|
36769
36760
|
const { getQuery, navigate } = useApp_default();
|
|
36770
36761
|
const id = getQuery("id");
|
|
36771
36762
|
const isEdit = !!id;
|
|
@@ -36816,7 +36807,7 @@ function PostForm({ afterPostUrl }) {
|
|
|
36816
36807
|
window.addEventListener("beforeunload", handleBeforeUnload);
|
|
36817
36808
|
return () => window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
36818
36809
|
}, [isDirty]);
|
|
36819
|
-
const blocker = (0,
|
|
36810
|
+
const blocker = (0, import_react_router_dom93.useBlocker)(
|
|
36820
36811
|
(0, import_react119.useCallback)(
|
|
36821
36812
|
({ currentLocation, nextLocation }) => isDirty && !isSavingRef.current && currentLocation.pathname !== nextLocation.pathname,
|
|
36822
36813
|
[isDirty]
|
|
@@ -37170,7 +37161,7 @@ function PostForm({ afterPostUrl }) {
|
|
|
37170
37161
|
var PostForm_default = PostForm;
|
|
37171
37162
|
|
|
37172
37163
|
// src/components/posts/PostsList.tsx
|
|
37173
|
-
var
|
|
37164
|
+
var import_react_router_dom94 = require("react-router-dom");
|
|
37174
37165
|
var import_lucide_react103 = require("lucide-react");
|
|
37175
37166
|
|
|
37176
37167
|
// src/hooks/usePostView.tsx
|
|
@@ -37635,8 +37626,8 @@ var usePostView_default = usePostView;
|
|
|
37635
37626
|
// src/components/posts/PostsList.tsx
|
|
37636
37627
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
37637
37628
|
function PostsList({ url }) {
|
|
37638
|
-
const { branchId, postType } = (0,
|
|
37639
|
-
const navigate = (0,
|
|
37629
|
+
const { branchId, postType } = (0, import_react_router_dom94.useParams)();
|
|
37630
|
+
const navigate = (0, import_react_router_dom94.useNavigate)();
|
|
37640
37631
|
const { PostView: PostView2, openPost } = usePostView_default();
|
|
37641
37632
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
37642
37633
|
url: url || `/posts/get?type=${postType}&fromBranch=${branchId}`,
|
|
@@ -37768,14 +37759,14 @@ var PostsList_default = PostsList;
|
|
|
37768
37759
|
|
|
37769
37760
|
// src/components/posts/PostMediaForm.tsx
|
|
37770
37761
|
var import_react122 = require("react");
|
|
37771
|
-
var
|
|
37762
|
+
var import_react_router_dom95 = require("react-router-dom");
|
|
37772
37763
|
var import_lucide_react104 = require("lucide-react");
|
|
37773
37764
|
var import_antd69 = require("antd");
|
|
37774
37765
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
37775
37766
|
function PostMediaForm() {
|
|
37776
|
-
const { branchId, postType } = (0,
|
|
37767
|
+
const { branchId, postType } = (0, import_react_router_dom95.useParams)();
|
|
37777
37768
|
const { getQuery } = useApp_default();
|
|
37778
|
-
const navigate = (0,
|
|
37769
|
+
const navigate = (0, import_react_router_dom95.useNavigate)();
|
|
37779
37770
|
const id = getQuery("id");
|
|
37780
37771
|
const { get, isLoading: isLoadingGet } = useApis_default();
|
|
37781
37772
|
const { put, isLoading: isSaving } = useApis_default();
|
|
@@ -38287,14 +38278,14 @@ var Posts = {
|
|
|
38287
38278
|
var posts_default = Posts;
|
|
38288
38279
|
|
|
38289
38280
|
// src/components/accounts/profileAccount/ProfileAccount.tsx
|
|
38290
|
-
var
|
|
38281
|
+
var import_react_router_dom96 = require("react-router-dom");
|
|
38291
38282
|
var import_lucide_react105 = require("lucide-react");
|
|
38292
38283
|
var import_react123 = require("react");
|
|
38293
38284
|
var import_antd70 = require("antd");
|
|
38294
38285
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
38295
38286
|
function ProfileAccountList({ v, url }) {
|
|
38296
|
-
const { branchId } = (0,
|
|
38297
|
-
const navigate = (0,
|
|
38287
|
+
const { branchId } = (0, import_react_router_dom96.useParams)();
|
|
38288
|
+
const navigate = (0, import_react_router_dom96.useNavigate)();
|
|
38298
38289
|
const { role } = useAuth_default();
|
|
38299
38290
|
const isStaff = role === "staff";
|
|
38300
38291
|
let profileOptions = [
|
|
@@ -38473,7 +38464,7 @@ var ProfileAccount = {
|
|
|
38473
38464
|
var profileAccount_default = ProfileAccount;
|
|
38474
38465
|
|
|
38475
38466
|
// src/components/accounts/LeaseRentOverviews.tsx
|
|
38476
|
-
var
|
|
38467
|
+
var import_react_router_dom97 = require("react-router-dom");
|
|
38477
38468
|
var import_react124 = require("react");
|
|
38478
38469
|
var import_antd71 = require("antd");
|
|
38479
38470
|
var import_dayjs5 = __toESM(require("dayjs"));
|
|
@@ -38486,10 +38477,10 @@ var options8 = [
|
|
|
38486
38477
|
var LeaseRentOverviews = () => {
|
|
38487
38478
|
const leaseType = "rent";
|
|
38488
38479
|
const defaultCurrency = "KES";
|
|
38489
|
-
const navigate = (0,
|
|
38490
|
-
const [searchParams, setSearchParams] = (0,
|
|
38480
|
+
const navigate = (0, import_react_router_dom97.useNavigate)();
|
|
38481
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom97.useSearchParams)();
|
|
38491
38482
|
const { apiConfig } = useWarqadConfig();
|
|
38492
|
-
const { branchId } = (0,
|
|
38483
|
+
const { branchId } = (0, import_react_router_dom97.useParams)();
|
|
38493
38484
|
const type = "all";
|
|
38494
38485
|
const urlFilter = searchParams.get("filter");
|
|
38495
38486
|
const initialFilter = ["all", "debit", "credit"].includes(urlFilter) ? urlFilter : "all";
|
|
@@ -38703,7 +38694,7 @@ var LeaseRentOverviews_default = LeaseRentOverviews;
|
|
|
38703
38694
|
var import_react125 = require("react");
|
|
38704
38695
|
var import_dayjs6 = __toESM(require("dayjs"));
|
|
38705
38696
|
var import_lucide_react106 = require("lucide-react");
|
|
38706
|
-
var
|
|
38697
|
+
var import_react_router_dom98 = require("react-router-dom");
|
|
38707
38698
|
var import_antd72 = require("antd");
|
|
38708
38699
|
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
38709
38700
|
var LeaseRentOverViewCard = ({
|
|
@@ -38713,8 +38704,8 @@ var LeaseRentOverViewCard = ({
|
|
|
38713
38704
|
viewStatementRoute,
|
|
38714
38705
|
className = ""
|
|
38715
38706
|
}) => {
|
|
38716
|
-
const navigate = (0,
|
|
38717
|
-
const { branchId } = (0,
|
|
38707
|
+
const navigate = (0, import_react_router_dom98.useNavigate)();
|
|
38708
|
+
const { branchId } = (0, import_react_router_dom98.useParams)();
|
|
38718
38709
|
const { apiConfig } = useWarqadConfig();
|
|
38719
38710
|
const { data: fetchedData, isLoading: fetchLoading, get } = useApis_default();
|
|
38720
38711
|
const [showAmount, setShowAmount] = (0, import_react125.useState)(false);
|
|
@@ -39714,12 +39705,12 @@ var Tickets = {
|
|
|
39714
39705
|
var tickets_default = Tickets;
|
|
39715
39706
|
|
|
39716
39707
|
// src/components/stocks/clothend/sale2/List.tsx
|
|
39717
|
-
var
|
|
39708
|
+
var import_react_router_dom99 = require("react-router-dom");
|
|
39718
39709
|
var import_lucide_react109 = require("lucide-react");
|
|
39719
39710
|
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
39720
39711
|
function Sale2List({ url, type = "product" }) {
|
|
39721
|
-
const { branchId } = (0,
|
|
39722
|
-
const navigate = (0,
|
|
39712
|
+
const { branchId } = (0, import_react_router_dom99.useParams)();
|
|
39713
|
+
const navigate = (0, import_react_router_dom99.useNavigate)();
|
|
39723
39714
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
39724
39715
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
39725
39716
|
url: url || `/transactions/get?type=stock&stock=sale2&stockType=${type}${branchId ? `&fromBranch=${branchId}` : ""}`,
|
|
@@ -39903,12 +39894,12 @@ var import_react131 = require("react");
|
|
|
39903
39894
|
|
|
39904
39895
|
// src/components/stocks/clothend/sale2/header.tsx
|
|
39905
39896
|
var import_react_hook_form55 = require("react-hook-form");
|
|
39906
|
-
var
|
|
39897
|
+
var import_react_router_dom100 = require("react-router-dom");
|
|
39907
39898
|
var import_react129 = require("react");
|
|
39908
39899
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
39909
39900
|
function SaleHeader2({ stockType }) {
|
|
39910
39901
|
const form = (0, import_react_hook_form55.useFormContext)();
|
|
39911
|
-
const { branchId } = (0,
|
|
39902
|
+
const { branchId } = (0, import_react_router_dom100.useParams)();
|
|
39912
39903
|
(0, import_react129.useEffect)(() => {
|
|
39913
39904
|
if (branchId) {
|
|
39914
39905
|
form.setValue("branch", branchId);
|
|
@@ -40361,7 +40352,7 @@ var schema_default6 = AdjustmentStockSchema4;
|
|
|
40361
40352
|
|
|
40362
40353
|
// src/components/stocks/clothend/sale2/pos.tsx
|
|
40363
40354
|
var import_lucide_react110 = require("lucide-react");
|
|
40364
|
-
var
|
|
40355
|
+
var import_react_router_dom101 = require("react-router-dom");
|
|
40365
40356
|
|
|
40366
40357
|
// src/components/stocks/clothend/sale2/Submit.tsx
|
|
40367
40358
|
var import_react_hook_form56 = require("react-hook-form");
|
|
@@ -40581,7 +40572,7 @@ var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
|
40581
40572
|
var Sale2Form = ({ type }) => {
|
|
40582
40573
|
const { getQuery, navigate } = useApp_default();
|
|
40583
40574
|
const stockType = type;
|
|
40584
|
-
const { branchId } = (0,
|
|
40575
|
+
const { branchId } = (0, import_react_router_dom101.useParams)();
|
|
40585
40576
|
const saleId = getQuery("id");
|
|
40586
40577
|
const { branches } = useAuth_default();
|
|
40587
40578
|
const { currencies } = useWarqadConfig();
|
|
@@ -40905,7 +40896,7 @@ var Sale2 = {
|
|
|
40905
40896
|
var sale2_default = Sale2;
|
|
40906
40897
|
|
|
40907
40898
|
// src/dgl/products/List.tsx
|
|
40908
|
-
var
|
|
40899
|
+
var import_react_router_dom102 = require("react-router-dom");
|
|
40909
40900
|
var import_lucide_react112 = require("lucide-react");
|
|
40910
40901
|
var import_react133 = require("react");
|
|
40911
40902
|
var import_antd76 = require("antd");
|
|
@@ -41140,7 +41131,7 @@ function ProductList({
|
|
|
41140
41131
|
dateFilter: false
|
|
41141
41132
|
});
|
|
41142
41133
|
const { Modal: Modal2, openState, close } = useModal();
|
|
41143
|
-
const navigate = (0,
|
|
41134
|
+
const navigate = (0, import_react_router_dom102.useNavigate)();
|
|
41144
41135
|
const items = (data2) => [
|
|
41145
41136
|
{
|
|
41146
41137
|
label: `Edit Product`,
|
|
@@ -41881,7 +41872,7 @@ function ProductForm2({
|
|
|
41881
41872
|
var Form_default = ProductForm2;
|
|
41882
41873
|
|
|
41883
41874
|
// src/dgl/categories/List.tsx
|
|
41884
|
-
var
|
|
41875
|
+
var import_react_router_dom103 = require("react-router-dom");
|
|
41885
41876
|
var import_lucide_react114 = require("lucide-react");
|
|
41886
41877
|
var import_react135 = require("react");
|
|
41887
41878
|
var import_antd78 = require("antd");
|
|
@@ -41895,7 +41886,7 @@ function CategoryList({ v = 3, url }) {
|
|
|
41895
41886
|
dateFilter: false
|
|
41896
41887
|
});
|
|
41897
41888
|
const { Modal: Modal2, openState, close } = useModal();
|
|
41898
|
-
const navigate = (0,
|
|
41889
|
+
const navigate = (0, import_react_router_dom103.useNavigate)();
|
|
41899
41890
|
const items = (data2) => [
|
|
41900
41891
|
{
|
|
41901
41892
|
label: `Edit Category`,
|
|
@@ -42183,7 +42174,7 @@ function CategoryForm2() {
|
|
|
42183
42174
|
var Form_default2 = CategoryForm2;
|
|
42184
42175
|
|
|
42185
42176
|
// src/dgl/brands/List.tsx
|
|
42186
|
-
var
|
|
42177
|
+
var import_react_router_dom104 = require("react-router-dom");
|
|
42187
42178
|
var import_lucide_react115 = require("lucide-react");
|
|
42188
42179
|
var import_react137 = require("react");
|
|
42189
42180
|
var import_antd80 = require("antd");
|
|
@@ -42197,7 +42188,7 @@ function BrandList({ v = 3, url }) {
|
|
|
42197
42188
|
dateFilter: false
|
|
42198
42189
|
});
|
|
42199
42190
|
const { Modal: Modal2, openState, close } = useModal();
|
|
42200
|
-
const navigate = (0,
|
|
42191
|
+
const navigate = (0, import_react_router_dom104.useNavigate)();
|
|
42201
42192
|
const items = (data2) => [
|
|
42202
42193
|
{
|
|
42203
42194
|
label: `Edit Brand`,
|
|
@@ -42474,7 +42465,7 @@ function BrandForm2() {
|
|
|
42474
42465
|
var Form_default3 = BrandForm2;
|
|
42475
42466
|
|
|
42476
42467
|
// src/dgl/subCategories/List.tsx
|
|
42477
|
-
var
|
|
42468
|
+
var import_react_router_dom105 = require("react-router-dom");
|
|
42478
42469
|
var import_lucide_react116 = require("lucide-react");
|
|
42479
42470
|
var import_react139 = require("react");
|
|
42480
42471
|
var import_antd82 = require("antd");
|
|
@@ -42488,7 +42479,7 @@ function SubCategoryList({ v = 3, url }) {
|
|
|
42488
42479
|
dateFilter: false
|
|
42489
42480
|
});
|
|
42490
42481
|
const { Modal: Modal2, openState, close } = useModal();
|
|
42491
|
-
const navigate = (0,
|
|
42482
|
+
const navigate = (0, import_react_router_dom105.useNavigate)();
|
|
42492
42483
|
const items = (data2) => [
|
|
42493
42484
|
{
|
|
42494
42485
|
label: `Edit SubCategory`,
|
|
@@ -42823,7 +42814,7 @@ var dgl_default = Dgl;
|
|
|
42823
42814
|
|
|
42824
42815
|
// src/components/InAndOut/Form.tsx
|
|
42825
42816
|
var import_react141 = require("react");
|
|
42826
|
-
var
|
|
42817
|
+
var import_react_router_dom106 = require("react-router-dom");
|
|
42827
42818
|
var import_react_hook_form62 = require("react-hook-form");
|
|
42828
42819
|
var import_zod105 = require("@hookform/resolvers/zod");
|
|
42829
42820
|
var import_antd84 = require("antd");
|
|
@@ -42849,7 +42840,7 @@ function InAndOutForm({
|
|
|
42849
42840
|
const isEdit = id;
|
|
42850
42841
|
const [ref2, setRef] = (0, import_react141.useState)("");
|
|
42851
42842
|
const [showReverseModal, setShowReverseModal] = (0, import_react141.useState)(false);
|
|
42852
|
-
const { branchId } = (0,
|
|
42843
|
+
const { branchId } = (0, import_react_router_dom106.useParams)();
|
|
42853
42844
|
const { post, isLoading } = useApis_default();
|
|
42854
42845
|
const { put, isLoading: isLoadingReverse } = useApis_default();
|
|
42855
42846
|
const { get, isLoading: isLoadingGet } = useApis_default();
|
|
@@ -43052,13 +43043,13 @@ var Form_default5 = InAndOutForm;
|
|
|
43052
43043
|
var import_react142 = require("react");
|
|
43053
43044
|
var import_antd85 = require("antd");
|
|
43054
43045
|
var import_dayjs7 = __toESM(require("dayjs"));
|
|
43055
|
-
var
|
|
43046
|
+
var import_react_router_dom107 = require("react-router-dom");
|
|
43056
43047
|
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
43057
43048
|
var InAndOutReport = () => {
|
|
43058
43049
|
const [startDate, setStartDate] = (0, import_react142.useState)((0, import_dayjs7.default)());
|
|
43059
43050
|
const [endDate, setEndDate] = (0, import_react142.useState)((0, import_dayjs7.default)());
|
|
43060
43051
|
const [action, setAction] = (0, import_react142.useState)("all");
|
|
43061
|
-
const { branchId } = (0,
|
|
43052
|
+
const { branchId } = (0, import_react_router_dom107.useParams)();
|
|
43062
43053
|
const [currency, setCurrency] = (0, import_react142.useState)("all");
|
|
43063
43054
|
const { openState, Modal: Modal2, close } = useModal_default();
|
|
43064
43055
|
const { A4DataView, data, reload } = useA4DataView_default({
|
|
@@ -43464,7 +43455,7 @@ var ProfileTransactionReport = ({
|
|
|
43464
43455
|
var ProfileTransaction_default = ProfileTransactionReport;
|
|
43465
43456
|
|
|
43466
43457
|
// src/components/Transactions/invoiceManager/InvoiceManager.tsx
|
|
43467
|
-
var
|
|
43458
|
+
var import_react_router_dom111 = require("react-router-dom");
|
|
43468
43459
|
var import_lucide_react118 = require("lucide-react");
|
|
43469
43460
|
var import_react147 = require("react");
|
|
43470
43461
|
var import_antd89 = require("antd");
|
|
@@ -43525,14 +43516,14 @@ var import_react_hook_form63 = require("react-hook-form");
|
|
|
43525
43516
|
var import_zod108 = require("@hookform/resolvers/zod");
|
|
43526
43517
|
var import_antd86 = require("antd");
|
|
43527
43518
|
var import_react144 = require("react");
|
|
43528
|
-
var
|
|
43519
|
+
var import_react_router_dom108 = require("react-router-dom");
|
|
43529
43520
|
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
43530
43521
|
function AccountForm2({
|
|
43531
43522
|
onReload,
|
|
43532
43523
|
close,
|
|
43533
43524
|
id
|
|
43534
43525
|
}) {
|
|
43535
|
-
const { branchId } = (0,
|
|
43526
|
+
const { branchId } = (0, import_react_router_dom108.useParams)();
|
|
43536
43527
|
const { currencies } = useWarqadConfig();
|
|
43537
43528
|
const { stock } = currencies;
|
|
43538
43529
|
const isEdit = !!id;
|
|
@@ -43670,7 +43661,7 @@ var AccountForm_default2 = AccountForm2;
|
|
|
43670
43661
|
var import_react145 = require("react");
|
|
43671
43662
|
var import_react_hook_form64 = require("react-hook-form");
|
|
43672
43663
|
var import_zod109 = require("@hookform/resolvers/zod");
|
|
43673
|
-
var
|
|
43664
|
+
var import_react_router_dom109 = require("react-router-dom");
|
|
43674
43665
|
var import_antd87 = require("antd");
|
|
43675
43666
|
var import_lucide_react117 = require("lucide-react");
|
|
43676
43667
|
var import_dayjs8 = __toESM(require("dayjs"));
|
|
@@ -43681,7 +43672,7 @@ function InvoiceForm({
|
|
|
43681
43672
|
accountData,
|
|
43682
43673
|
id
|
|
43683
43674
|
}) {
|
|
43684
|
-
const { branchId } = (0,
|
|
43675
|
+
const { branchId } = (0, import_react_router_dom109.useParams)();
|
|
43685
43676
|
const [ref2, setRef] = (0, import_react145.useState)(void 0);
|
|
43686
43677
|
const { post, isLoading } = useApis_default();
|
|
43687
43678
|
const { get, isLoading: getLoading } = useApis_default();
|
|
@@ -44007,7 +43998,7 @@ var InvoiceForm_default = InvoiceForm;
|
|
|
44007
43998
|
var import_react146 = __toESM(require("react"));
|
|
44008
43999
|
var import_react_hook_form65 = require("react-hook-form");
|
|
44009
44000
|
var import_zod110 = require("@hookform/resolvers/zod");
|
|
44010
|
-
var
|
|
44001
|
+
var import_react_router_dom110 = require("react-router-dom");
|
|
44011
44002
|
var import_antd88 = require("antd");
|
|
44012
44003
|
var import_dayjs9 = __toESM(require("dayjs"));
|
|
44013
44004
|
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
@@ -44018,7 +44009,7 @@ function JournalForm3({
|
|
|
44018
44009
|
action = "debit",
|
|
44019
44010
|
id
|
|
44020
44011
|
}) {
|
|
44021
|
-
const { branchId } = (0,
|
|
44012
|
+
const { branchId } = (0, import_react_router_dom110.useParams)();
|
|
44022
44013
|
const { currencies } = useWarqadConfig();
|
|
44023
44014
|
const { stock: defaultCurrency } = currencies;
|
|
44024
44015
|
const [ref2, setRef] = import_react146.default.useState(void 0);
|
|
@@ -44239,11 +44230,11 @@ var journalForm_default = JournalForm3;
|
|
|
44239
44230
|
// src/components/Transactions/invoiceManager/InvoiceManager.tsx
|
|
44240
44231
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
44241
44232
|
function InvoiceManager({ v, url }) {
|
|
44242
|
-
const { branchId } = (0,
|
|
44233
|
+
const { branchId } = (0, import_react_router_dom111.useParams)();
|
|
44243
44234
|
const { apiConfig } = useWarqadConfig();
|
|
44244
44235
|
const { width } = useMediaSize();
|
|
44245
44236
|
const isLargeScreen = width > 768;
|
|
44246
|
-
const navigate = (0,
|
|
44237
|
+
const navigate = (0, import_react_router_dom111.useNavigate)();
|
|
44247
44238
|
const type = "account";
|
|
44248
44239
|
const [deleteAccount, setDeleteAccount] = (0, import_react147.useState)(null);
|
|
44249
44240
|
const { isLoading: isActionLoading, remove } = useApis_default();
|
|
@@ -44423,7 +44414,7 @@ function InvoiceManager({ v, url }) {
|
|
|
44423
44414
|
var InvoiceManager_default = InvoiceManager;
|
|
44424
44415
|
|
|
44425
44416
|
// src/components/Transactions/invoiceManager/InvoiceManagerReport.tsx
|
|
44426
|
-
var
|
|
44417
|
+
var import_react_router_dom112 = require("react-router-dom");
|
|
44427
44418
|
var import_react148 = require("react");
|
|
44428
44419
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
44429
44420
|
var InvoiceManagerReport = () => {
|
|
@@ -44438,7 +44429,7 @@ var InvoiceManagerReport = () => {
|
|
|
44438
44429
|
value: currency2
|
|
44439
44430
|
};
|
|
44440
44431
|
});
|
|
44441
|
-
const [searchParams, setSearchParams] = (0,
|
|
44432
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom112.useSearchParams)();
|
|
44442
44433
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
44443
44434
|
const initialCurrency = urlCurrency && currencyAllowed.includes(urlCurrency) ? urlCurrency : stock;
|
|
44444
44435
|
const [currencyFilter, setCurrencyFilter] = (0, import_react148.useState)(initialCurrency);
|
|
@@ -44669,7 +44660,7 @@ var InvoiceManagerReport_default = InvoiceManagerReport;
|
|
|
44669
44660
|
var import_react149 = require("react");
|
|
44670
44661
|
var import_antd90 = require("antd");
|
|
44671
44662
|
var import_dayjs10 = __toESM(require("dayjs"));
|
|
44672
|
-
var
|
|
44663
|
+
var import_react_router_dom113 = require("react-router-dom");
|
|
44673
44664
|
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
44674
44665
|
var ForexCurrencyAccountReport = () => {
|
|
44675
44666
|
const { apiConfig } = useWarqadConfig();
|
|
@@ -44679,7 +44670,7 @@ var ForexCurrencyAccountReport = () => {
|
|
|
44679
44670
|
value: currency2
|
|
44680
44671
|
};
|
|
44681
44672
|
});
|
|
44682
|
-
const [searchParams, setSearchParams] = (0,
|
|
44673
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom113.useSearchParams)();
|
|
44683
44674
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
44684
44675
|
const initialCurrency = urlCurrency && Enums_default.currencies.includes(urlCurrency) ? urlCurrency : "KES";
|
|
44685
44676
|
const [currencyFilter, setCurrencyFilter] = (0, import_react149.useState)(initialCurrency);
|
|
@@ -44864,12 +44855,12 @@ var ForexCurrencyAccountReport = () => {
|
|
|
44864
44855
|
var ForexCurrencyAccountReport_default = ForexCurrencyAccountReport;
|
|
44865
44856
|
|
|
44866
44857
|
// src/components/Transactions/3/payments/Payments.tsx
|
|
44867
|
-
var
|
|
44858
|
+
var import_react_router_dom114 = require("react-router-dom");
|
|
44868
44859
|
var import_lucide_react119 = require("lucide-react");
|
|
44869
44860
|
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
44870
44861
|
function Payments3({ url }) {
|
|
44871
|
-
const { branchId } = (0,
|
|
44872
|
-
const navigate = (0,
|
|
44862
|
+
const { branchId } = (0, import_react_router_dom114.useParams)();
|
|
44863
|
+
const navigate = (0, import_react_router_dom114.useNavigate)();
|
|
44873
44864
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
44874
44865
|
const { openPos, PosPrinter } = usePosPrinter_default();
|
|
44875
44866
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
@@ -45024,7 +45015,7 @@ var Payments_default3 = Payments3;
|
|
|
45024
45015
|
|
|
45025
45016
|
// src/components/Transactions/3/payments/PaymentForm.tsx
|
|
45026
45017
|
var import_react150 = require("react");
|
|
45027
|
-
var
|
|
45018
|
+
var import_react_router_dom115 = require("react-router-dom");
|
|
45028
45019
|
var import_react_hook_form66 = require("react-hook-form");
|
|
45029
45020
|
var import_zod113 = require("@hookform/resolvers/zod");
|
|
45030
45021
|
var import_antd91 = require("antd");
|
|
@@ -45054,7 +45045,7 @@ var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
|
45054
45045
|
function PaymentForm3({
|
|
45055
45046
|
accountType = "all"
|
|
45056
45047
|
}) {
|
|
45057
|
-
const { branchId } = (0,
|
|
45048
|
+
const { branchId } = (0, import_react_router_dom115.useParams)();
|
|
45058
45049
|
const { currencies } = useWarqadConfig();
|
|
45059
45050
|
const { defaultCurrency } = currencies;
|
|
45060
45051
|
const { getQuery, navigate } = useApp_default();
|
|
@@ -45315,12 +45306,12 @@ function PaymentForm3({
|
|
|
45315
45306
|
var PaymentForm_default3 = PaymentForm3;
|
|
45316
45307
|
|
|
45317
45308
|
// src/components/Transactions/3/journals/Journals.tsx
|
|
45318
|
-
var
|
|
45309
|
+
var import_react_router_dom116 = require("react-router-dom");
|
|
45319
45310
|
var import_lucide_react120 = require("lucide-react");
|
|
45320
45311
|
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
45321
45312
|
function Journals3({ url }) {
|
|
45322
|
-
const { branchId } = (0,
|
|
45323
|
-
const navigate = (0,
|
|
45313
|
+
const { branchId } = (0, import_react_router_dom116.useParams)();
|
|
45314
|
+
const navigate = (0, import_react_router_dom116.useNavigate)();
|
|
45324
45315
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
45325
45316
|
const { PosPrinter } = usePosPrinter_default();
|
|
45326
45317
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
@@ -45455,7 +45446,7 @@ var Journals_default3 = Journals3;
|
|
|
45455
45446
|
|
|
45456
45447
|
// src/components/Transactions/3/journals/JournalsForm.tsx
|
|
45457
45448
|
var import_react151 = require("react");
|
|
45458
|
-
var
|
|
45449
|
+
var import_react_router_dom117 = require("react-router-dom");
|
|
45459
45450
|
var import_react_hook_form67 = require("react-hook-form");
|
|
45460
45451
|
var import_zod116 = require("@hookform/resolvers/zod");
|
|
45461
45452
|
var import_antd92 = require("antd");
|
|
@@ -45481,7 +45472,7 @@ var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
|
45481
45472
|
function JournalForm4({
|
|
45482
45473
|
accountType = "all"
|
|
45483
45474
|
}) {
|
|
45484
|
-
const { branchId } = (0,
|
|
45475
|
+
const { branchId } = (0, import_react_router_dom117.useParams)();
|
|
45485
45476
|
const { currencies } = useWarqadConfig();
|
|
45486
45477
|
const { defaultCurrency } = currencies;
|
|
45487
45478
|
const { getQuery, navigate } = useApp_default();
|
|
@@ -45691,15 +45682,15 @@ function JournalForm4({
|
|
|
45691
45682
|
var JournalsForm_default = JournalForm4;
|
|
45692
45683
|
|
|
45693
45684
|
// src/components/Transactions/3/sale2/List.tsx
|
|
45694
|
-
var
|
|
45685
|
+
var import_react_router_dom118 = require("react-router-dom");
|
|
45695
45686
|
var import_lucide_react121 = require("lucide-react");
|
|
45696
45687
|
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
45697
45688
|
function Sale2List2({ url, type = "product" }) {
|
|
45698
|
-
const { branchId } = (0,
|
|
45699
|
-
const navigate = (0,
|
|
45689
|
+
const { branchId } = (0, import_react_router_dom118.useParams)();
|
|
45690
|
+
const navigate = (0, import_react_router_dom118.useNavigate)();
|
|
45700
45691
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
45701
45692
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
45702
|
-
url: url || `/transactions/get?type=stock&stock=sale-3&stockType=${type}${branchId ? `&
|
|
45693
|
+
url: url || `/transactions/get?type=stock&stock=sale-3&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
45703
45694
|
dateFilter: true
|
|
45704
45695
|
});
|
|
45705
45696
|
const { Modal: Modal2 } = useModal();
|
|
@@ -45859,12 +45850,12 @@ var import_react155 = require("react");
|
|
|
45859
45850
|
|
|
45860
45851
|
// src/components/Transactions/3/sale2/header.tsx
|
|
45861
45852
|
var import_react_hook_form68 = require("react-hook-form");
|
|
45862
|
-
var
|
|
45853
|
+
var import_react_router_dom119 = require("react-router-dom");
|
|
45863
45854
|
var import_react152 = require("react");
|
|
45864
45855
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
45865
45856
|
function SaleHeader3({ stockType }) {
|
|
45866
45857
|
const form = (0, import_react_hook_form68.useFormContext)();
|
|
45867
|
-
const { branchId } = (0,
|
|
45858
|
+
const { branchId } = (0, import_react_router_dom119.useParams)();
|
|
45868
45859
|
(0, import_react152.useEffect)(() => {
|
|
45869
45860
|
if (branchId) {
|
|
45870
45861
|
form.setValue("branch", branchId);
|
|
@@ -46080,7 +46071,7 @@ function SaleStockTable3({
|
|
|
46080
46071
|
v: 1,
|
|
46081
46072
|
valueKey: "_id",
|
|
46082
46073
|
obj: "lineObj",
|
|
46083
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
46074
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
46084
46075
|
className: "px-0! py-0! w-full!",
|
|
46085
46076
|
onSelect: () => {
|
|
46086
46077
|
setTimeout(() => {
|
|
@@ -46329,7 +46320,7 @@ var schema_default7 = AdjustmentStockSchema5;
|
|
|
46329
46320
|
|
|
46330
46321
|
// src/components/Transactions/3/sale2/pos.tsx
|
|
46331
46322
|
var import_lucide_react122 = require("lucide-react");
|
|
46332
|
-
var
|
|
46323
|
+
var import_react_router_dom120 = require("react-router-dom");
|
|
46333
46324
|
|
|
46334
46325
|
// src/components/Transactions/3/sale2/Submit.tsx
|
|
46335
46326
|
var import_react_hook_form69 = require("react-hook-form");
|
|
@@ -46580,7 +46571,7 @@ var Sale2Form2 = ({
|
|
|
46580
46571
|
}) => {
|
|
46581
46572
|
const { getQuery, navigate } = useApp_default();
|
|
46582
46573
|
const stockType = type;
|
|
46583
|
-
const { branchId } = (0,
|
|
46574
|
+
const { branchId } = (0, import_react_router_dom120.useParams)();
|
|
46584
46575
|
const saleId = getQuery("id");
|
|
46585
46576
|
const { currencies } = useWarqadConfig();
|
|
46586
46577
|
const { defaultCurrency } = currencies;
|
|
@@ -46898,15 +46889,15 @@ var pos_default5 = Sale2Form2;
|
|
|
46898
46889
|
|
|
46899
46890
|
// src/components/Transactions/3/sale2/Collection.tsx
|
|
46900
46891
|
var import_react156 = require("react");
|
|
46901
|
-
var
|
|
46892
|
+
var import_react_router_dom121 = require("react-router-dom");
|
|
46902
46893
|
var import_lucide_react123 = require("lucide-react");
|
|
46903
46894
|
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
46904
46895
|
function Collection3({
|
|
46905
46896
|
url,
|
|
46906
46897
|
type = "product"
|
|
46907
46898
|
}) {
|
|
46908
|
-
const { branchId } = (0,
|
|
46909
|
-
const navigate = (0,
|
|
46899
|
+
const { branchId } = (0, import_react_router_dom121.useParams)();
|
|
46900
|
+
const navigate = (0, import_react_router_dom121.useNavigate)();
|
|
46910
46901
|
const { currencies } = useWarqadConfig();
|
|
46911
46902
|
const { defaultCurrency } = currencies;
|
|
46912
46903
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
@@ -47149,7 +47140,7 @@ function Collection3({
|
|
|
47149
47140
|
var Collection_default = Collection3;
|
|
47150
47141
|
|
|
47151
47142
|
// src/components/Transactions/3/sale2/CollectionLevel.tsx
|
|
47152
|
-
var
|
|
47143
|
+
var import_react_router_dom122 = require("react-router-dom");
|
|
47153
47144
|
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
47154
47145
|
var options9 = [
|
|
47155
47146
|
{ label: "Product", value: "product" },
|
|
@@ -47161,7 +47152,7 @@ var CollectionLevel = ({
|
|
|
47161
47152
|
}) => {
|
|
47162
47153
|
const { apiConfig, currencies } = useWarqadConfig();
|
|
47163
47154
|
const { stock } = currencies;
|
|
47164
|
-
const { branchId } = (0,
|
|
47155
|
+
const { branchId } = (0, import_react_router_dom122.useParams)();
|
|
47165
47156
|
const { branches } = useAuth_default();
|
|
47166
47157
|
const { TransactionView } = useTransactionView_default();
|
|
47167
47158
|
const { getQuery, setQuery } = useApp_default();
|
|
@@ -47271,18 +47262,18 @@ var Sale22 = {
|
|
|
47271
47262
|
var sale2_default2 = Sale22;
|
|
47272
47263
|
|
|
47273
47264
|
// src/components/Transactions/3/purchase3/List.tsx
|
|
47274
|
-
var
|
|
47265
|
+
var import_react_router_dom123 = require("react-router-dom");
|
|
47275
47266
|
var import_lucide_react124 = require("lucide-react");
|
|
47276
47267
|
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
47277
47268
|
function purchase3List({
|
|
47278
47269
|
url,
|
|
47279
47270
|
type = "product"
|
|
47280
47271
|
}) {
|
|
47281
|
-
const { branchId } = (0,
|
|
47282
|
-
const navigate = (0,
|
|
47272
|
+
const { branchId } = (0, import_react_router_dom123.useParams)();
|
|
47273
|
+
const navigate = (0, import_react_router_dom123.useNavigate)();
|
|
47283
47274
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
47284
47275
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
47285
|
-
url: url || `/transactions/get?type=stock&stock=purchase-3&stockType=${type}${branchId ? `&
|
|
47276
|
+
url: url || `/transactions/get?type=stock&stock=purchase-3&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
47286
47277
|
dateFilter: true
|
|
47287
47278
|
});
|
|
47288
47279
|
const { Modal: Modal2 } = useModal();
|
|
@@ -47442,12 +47433,12 @@ var import_react160 = require("react");
|
|
|
47442
47433
|
|
|
47443
47434
|
// src/components/Transactions/3/purchase3/header.tsx
|
|
47444
47435
|
var import_react_hook_form71 = require("react-hook-form");
|
|
47445
|
-
var
|
|
47436
|
+
var import_react_router_dom124 = require("react-router-dom");
|
|
47446
47437
|
var import_react157 = require("react");
|
|
47447
47438
|
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
47448
47439
|
function SaleHeader4({ stockType }) {
|
|
47449
47440
|
const form = (0, import_react_hook_form71.useFormContext)();
|
|
47450
|
-
const { branchId } = (0,
|
|
47441
|
+
const { branchId } = (0, import_react_router_dom124.useParams)();
|
|
47451
47442
|
(0, import_react157.useEffect)(() => {
|
|
47452
47443
|
if (branchId) {
|
|
47453
47444
|
form.setValue("branch", branchId);
|
|
@@ -47660,7 +47651,7 @@ function PurchaseStockTable({
|
|
|
47660
47651
|
v: 1,
|
|
47661
47652
|
valueKey: "_id",
|
|
47662
47653
|
obj: "lineObj",
|
|
47663
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
47654
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
47664
47655
|
className: "px-0! py-0! w-full!",
|
|
47665
47656
|
onSelect: () => {
|
|
47666
47657
|
setTimeout(() => {
|
|
@@ -47907,7 +47898,7 @@ var schema_default8 = AdjustmentStockSchema6;
|
|
|
47907
47898
|
|
|
47908
47899
|
// src/components/Transactions/3/purchase3/pos.tsx
|
|
47909
47900
|
var import_lucide_react125 = require("lucide-react");
|
|
47910
|
-
var
|
|
47901
|
+
var import_react_router_dom125 = require("react-router-dom");
|
|
47911
47902
|
|
|
47912
47903
|
// src/components/Transactions/3/purchase3/Submit.tsx
|
|
47913
47904
|
var import_react_hook_form72 = require("react-hook-form");
|
|
@@ -48144,7 +48135,7 @@ var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
|
48144
48135
|
var Purchase3Form = ({ type }) => {
|
|
48145
48136
|
const { getQuery, navigate } = useApp_default();
|
|
48146
48137
|
const stockType = type;
|
|
48147
|
-
const { branchId } = (0,
|
|
48138
|
+
const { branchId } = (0, import_react_router_dom125.useParams)();
|
|
48148
48139
|
const purchaseId = getQuery("id");
|
|
48149
48140
|
const { currencies } = useWarqadConfig();
|
|
48150
48141
|
const { defaultCurrency } = currencies;
|
|
@@ -48464,12 +48455,12 @@ var purchase3 = {
|
|
|
48464
48455
|
var purchase3_default = purchase3;
|
|
48465
48456
|
|
|
48466
48457
|
// src/components/Transactions/3/expense/Expenses.tsx
|
|
48467
|
-
var
|
|
48458
|
+
var import_react_router_dom126 = require("react-router-dom");
|
|
48468
48459
|
var import_lucide_react126 = require("lucide-react");
|
|
48469
48460
|
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
48470
48461
|
function Expenses3({ url }) {
|
|
48471
|
-
const { branchId } = (0,
|
|
48472
|
-
const navigate = (0,
|
|
48462
|
+
const { branchId } = (0, import_react_router_dom126.useParams)();
|
|
48463
|
+
const navigate = (0, import_react_router_dom126.useNavigate)();
|
|
48473
48464
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
48474
48465
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
48475
48466
|
url: url || `/transactions/get?type=expense-3${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -48587,7 +48578,7 @@ var Expenses_default2 = Expenses3;
|
|
|
48587
48578
|
|
|
48588
48579
|
// src/components/Transactions/3/expense/ExpenseForm.tsx
|
|
48589
48580
|
var import_react161 = require("react");
|
|
48590
|
-
var
|
|
48581
|
+
var import_react_router_dom127 = require("react-router-dom");
|
|
48591
48582
|
var import_react_hook_form74 = require("react-hook-form");
|
|
48592
48583
|
var import_zod123 = require("@hookform/resolvers/zod");
|
|
48593
48584
|
var import_antd95 = require("antd");
|
|
@@ -48609,7 +48600,7 @@ var expenseSchema4 = import_zod122.z.object({
|
|
|
48609
48600
|
// src/components/Transactions/3/expense/ExpenseForm.tsx
|
|
48610
48601
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
48611
48602
|
function ExpenseForm2() {
|
|
48612
|
-
const { branchId } = (0,
|
|
48603
|
+
const { branchId } = (0, import_react_router_dom127.useParams)();
|
|
48613
48604
|
const { getQuery, navigate } = useApp_default();
|
|
48614
48605
|
const id = getQuery("id");
|
|
48615
48606
|
const isEdit = !!id;
|
|
@@ -48810,13 +48801,13 @@ var Expenses32 = {
|
|
|
48810
48801
|
var expense_default = Expenses32;
|
|
48811
48802
|
|
|
48812
48803
|
// src/components/Transactions/3/reports/Expenses3Reports.tsx
|
|
48813
|
-
var
|
|
48804
|
+
var import_react_router_dom128 = require("react-router-dom");
|
|
48814
48805
|
var import_react162 = require("react");
|
|
48815
48806
|
var import_antd96 = require("antd");
|
|
48816
48807
|
var import_dayjs11 = __toESM(require("dayjs"));
|
|
48817
48808
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
48818
48809
|
var Expenses3Reports = () => {
|
|
48819
|
-
const { branchId } = (0,
|
|
48810
|
+
const { branchId } = (0, import_react_router_dom128.useParams)();
|
|
48820
48811
|
const [startDate, setStartDate] = (0, import_react162.useState)(null);
|
|
48821
48812
|
const [endDate, setEndDate] = (0, import_react162.useState)(null);
|
|
48822
48813
|
const { A4DataView, data } = useA4DataView_default({
|
|
@@ -48946,13 +48937,13 @@ var Expenses3Reports = () => {
|
|
|
48946
48937
|
var Expenses3Reports_default = Expenses3Reports;
|
|
48947
48938
|
|
|
48948
48939
|
// src/components/Transactions/3/reports/ExpensesJournal3.tsx
|
|
48949
|
-
var
|
|
48940
|
+
var import_react_router_dom129 = require("react-router-dom");
|
|
48950
48941
|
var import_react163 = require("react");
|
|
48951
48942
|
var import_antd97 = require("antd");
|
|
48952
48943
|
var import_dayjs12 = __toESM(require("dayjs"));
|
|
48953
48944
|
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
48954
48945
|
var Expenses3Reports2 = () => {
|
|
48955
|
-
const { branchId } = (0,
|
|
48946
|
+
const { branchId } = (0, import_react_router_dom129.useParams)();
|
|
48956
48947
|
const [startDate, setStartDate] = (0, import_react163.useState)(null);
|
|
48957
48948
|
const [endDate, setEndDate] = (0, import_react163.useState)(null);
|
|
48958
48949
|
const { A4DataView, data } = useA4DataView_default({
|
|
@@ -49089,12 +49080,12 @@ var Reports3 = {
|
|
|
49089
49080
|
var reports_default = Reports3;
|
|
49090
49081
|
|
|
49091
49082
|
// src/components/Transactions/3/expenseJournal/ExpensesJournal.tsx
|
|
49092
|
-
var
|
|
49083
|
+
var import_react_router_dom130 = require("react-router-dom");
|
|
49093
49084
|
var import_lucide_react127 = require("lucide-react");
|
|
49094
49085
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
49095
49086
|
function ExpensesJournal3({ url }) {
|
|
49096
|
-
const { branchId } = (0,
|
|
49097
|
-
const navigate = (0,
|
|
49087
|
+
const { branchId } = (0, import_react_router_dom130.useParams)();
|
|
49088
|
+
const navigate = (0, import_react_router_dom130.useNavigate)();
|
|
49098
49089
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
49099
49090
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
49100
49091
|
url: url || `/transactions/get?type=expense-journal-3${branchId ? `&branch=${branchId}` : ""}`,
|
|
@@ -49215,7 +49206,7 @@ var ExpensesJournal_default = ExpensesJournal3;
|
|
|
49215
49206
|
|
|
49216
49207
|
// src/components/Transactions/3/expenseJournal/ExpensesJournal3Form.tsx
|
|
49217
49208
|
var import_react164 = require("react");
|
|
49218
|
-
var
|
|
49209
|
+
var import_react_router_dom131 = require("react-router-dom");
|
|
49219
49210
|
var import_react_hook_form75 = require("react-hook-form");
|
|
49220
49211
|
var import_zod126 = require("@hookform/resolvers/zod");
|
|
49221
49212
|
var import_antd98 = require("antd");
|
|
@@ -49235,7 +49226,7 @@ var expenseSchema5 = import_zod125.z.object({
|
|
|
49235
49226
|
// src/components/Transactions/3/expenseJournal/ExpensesJournal3Form.tsx
|
|
49236
49227
|
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
49237
49228
|
function ExpensesJournal3Form() {
|
|
49238
|
-
const { branchId } = (0,
|
|
49229
|
+
const { branchId } = (0, import_react_router_dom131.useParams)();
|
|
49239
49230
|
const { getQuery, navigate } = useApp_default();
|
|
49240
49231
|
const id = getQuery("id");
|
|
49241
49232
|
const isEdit = !!id;
|
|
@@ -49449,7 +49440,7 @@ var Transaction3 = {
|
|
|
49449
49440
|
var __default = Transaction3;
|
|
49450
49441
|
|
|
49451
49442
|
// src/components/reports/ItemReport.tsx
|
|
49452
|
-
var
|
|
49443
|
+
var import_react_router_dom132 = require("react-router-dom");
|
|
49453
49444
|
var import_zod127 = require("zod");
|
|
49454
49445
|
var import_react_hook_form76 = require("react-hook-form");
|
|
49455
49446
|
var import_zod128 = require("@hookform/resolvers/zod");
|
|
@@ -49461,7 +49452,7 @@ var ItemReport = ({
|
|
|
49461
49452
|
type
|
|
49462
49453
|
}) => {
|
|
49463
49454
|
const { apiConfig } = useWarqadConfig();
|
|
49464
|
-
const { branchId } = (0,
|
|
49455
|
+
const { branchId } = (0, import_react_router_dom132.useParams)();
|
|
49465
49456
|
const { branches } = useAuth_default();
|
|
49466
49457
|
const [params, setParams] = (0, import_react165.useState)({
|
|
49467
49458
|
id: "",
|
|
@@ -49664,17 +49655,17 @@ function ItemReportHeader2({
|
|
|
49664
49655
|
var ItemReport_default = ItemReport;
|
|
49665
49656
|
|
|
49666
49657
|
// src/components/accounts/LeaseCollection.tsx
|
|
49667
|
-
var
|
|
49658
|
+
var import_react_router_dom133 = require("react-router-dom");
|
|
49668
49659
|
var import_react166 = require("react");
|
|
49669
49660
|
var import_jsx_runtime272 = require("react/jsx-runtime");
|
|
49670
49661
|
var LeaseCollection = ({
|
|
49671
49662
|
leaseType,
|
|
49672
49663
|
defaultCurrency = "KES"
|
|
49673
49664
|
}) => {
|
|
49674
|
-
const navigate = (0,
|
|
49675
|
-
const [searchParams] = (0,
|
|
49665
|
+
const navigate = (0, import_react_router_dom133.useNavigate)();
|
|
49666
|
+
const [searchParams] = (0, import_react_router_dom133.useSearchParams)();
|
|
49676
49667
|
const { apiConfig } = useWarqadConfig();
|
|
49677
|
-
const { branchId } = (0,
|
|
49668
|
+
const { branchId } = (0, import_react_router_dom133.useParams)();
|
|
49678
49669
|
const { branches } = useAuth_default();
|
|
49679
49670
|
const currentBranch = (0, import_react166.useMemo)(
|
|
49680
49671
|
() => branches?.find((b) => b?._id === branchId),
|
|
@@ -49781,7 +49772,7 @@ var LeaseCollection = ({
|
|
|
49781
49772
|
var LeaseCollection_default = LeaseCollection;
|
|
49782
49773
|
|
|
49783
49774
|
// src/components/Transactions/cargoIM/CargoIM.tsx
|
|
49784
|
-
var
|
|
49775
|
+
var import_react_router_dom137 = require("react-router-dom");
|
|
49785
49776
|
var import_lucide_react129 = require("lucide-react");
|
|
49786
49777
|
var import_react170 = require("react");
|
|
49787
49778
|
var import_antd103 = require("antd");
|
|
@@ -49820,14 +49811,14 @@ var import_react_hook_form77 = require("react-hook-form");
|
|
|
49820
49811
|
var import_zod131 = require("@hookform/resolvers/zod");
|
|
49821
49812
|
var import_antd100 = require("antd");
|
|
49822
49813
|
var import_react167 = require("react");
|
|
49823
|
-
var
|
|
49814
|
+
var import_react_router_dom134 = require("react-router-dom");
|
|
49824
49815
|
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
49825
49816
|
function AccountForm3({
|
|
49826
49817
|
onReload,
|
|
49827
49818
|
close,
|
|
49828
49819
|
id
|
|
49829
49820
|
}) {
|
|
49830
|
-
const { branchId } = (0,
|
|
49821
|
+
const { branchId } = (0, import_react_router_dom134.useParams)();
|
|
49831
49822
|
const { currencies } = useWarqadConfig();
|
|
49832
49823
|
const { stock } = currencies;
|
|
49833
49824
|
const isEdit = !!id;
|
|
@@ -49965,7 +49956,7 @@ var AccountForm_default3 = AccountForm3;
|
|
|
49965
49956
|
var import_react168 = require("react");
|
|
49966
49957
|
var import_react_hook_form78 = require("react-hook-form");
|
|
49967
49958
|
var import_zod132 = require("@hookform/resolvers/zod");
|
|
49968
|
-
var
|
|
49959
|
+
var import_react_router_dom135 = require("react-router-dom");
|
|
49969
49960
|
var import_antd101 = require("antd");
|
|
49970
49961
|
var import_lucide_react128 = require("lucide-react");
|
|
49971
49962
|
var import_dayjs13 = __toESM(require("dayjs"));
|
|
@@ -49976,7 +49967,7 @@ function InvoiceForm2({
|
|
|
49976
49967
|
accountData,
|
|
49977
49968
|
id
|
|
49978
49969
|
}) {
|
|
49979
|
-
const { branchId } = (0,
|
|
49970
|
+
const { branchId } = (0, import_react_router_dom135.useParams)();
|
|
49980
49971
|
const [ref2, setRef] = (0, import_react168.useState)(void 0);
|
|
49981
49972
|
const { post, isLoading } = useApis_default();
|
|
49982
49973
|
const { get, isLoading: getLoading } = useApis_default();
|
|
@@ -50302,7 +50293,7 @@ var InvoiceForm_default2 = InvoiceForm2;
|
|
|
50302
50293
|
var import_react169 = __toESM(require("react"));
|
|
50303
50294
|
var import_react_hook_form79 = require("react-hook-form");
|
|
50304
50295
|
var import_zod133 = require("@hookform/resolvers/zod");
|
|
50305
|
-
var
|
|
50296
|
+
var import_react_router_dom136 = require("react-router-dom");
|
|
50306
50297
|
var import_antd102 = require("antd");
|
|
50307
50298
|
var import_dayjs14 = __toESM(require("dayjs"));
|
|
50308
50299
|
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
@@ -50313,7 +50304,7 @@ function JournalForm5({
|
|
|
50313
50304
|
action = "debit",
|
|
50314
50305
|
id
|
|
50315
50306
|
}) {
|
|
50316
|
-
const { branchId } = (0,
|
|
50307
|
+
const { branchId } = (0, import_react_router_dom136.useParams)();
|
|
50317
50308
|
const { currencies } = useWarqadConfig();
|
|
50318
50309
|
const { stock: defaultCurrency } = currencies;
|
|
50319
50310
|
const [ref2, setRef] = import_react169.default.useState(void 0);
|
|
@@ -50534,11 +50525,11 @@ var journalForm_default2 = JournalForm5;
|
|
|
50534
50525
|
// src/components/Transactions/cargoIM/CargoIM.tsx
|
|
50535
50526
|
var import_jsx_runtime276 = require("react/jsx-runtime");
|
|
50536
50527
|
function CargoIM({ v, url }) {
|
|
50537
|
-
const { branchId } = (0,
|
|
50528
|
+
const { branchId } = (0, import_react_router_dom137.useParams)();
|
|
50538
50529
|
const { apiConfig } = useWarqadConfig();
|
|
50539
50530
|
const { width } = useMediaSize();
|
|
50540
50531
|
const isLargeScreen = width > 768;
|
|
50541
|
-
const navigate = (0,
|
|
50532
|
+
const navigate = (0, import_react_router_dom137.useNavigate)();
|
|
50542
50533
|
const type = "supplier";
|
|
50543
50534
|
const [deleteAccount, setDeleteAccount] = (0, import_react170.useState)(null);
|
|
50544
50535
|
const { isLoading: isActionLoading, remove } = useApis_default();
|
|
@@ -50718,7 +50709,7 @@ function CargoIM({ v, url }) {
|
|
|
50718
50709
|
var CargoIM_default = CargoIM;
|
|
50719
50710
|
|
|
50720
50711
|
// src/components/Transactions/cargoIM/cargoIMReport.tsx
|
|
50721
|
-
var
|
|
50712
|
+
var import_react_router_dom138 = require("react-router-dom");
|
|
50722
50713
|
var import_react171 = require("react");
|
|
50723
50714
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
50724
50715
|
var CargoIMReport = () => {
|
|
@@ -50733,7 +50724,7 @@ var CargoIMReport = () => {
|
|
|
50733
50724
|
value: currency2
|
|
50734
50725
|
};
|
|
50735
50726
|
});
|
|
50736
|
-
const [searchParams, setSearchParams] = (0,
|
|
50727
|
+
const [searchParams, setSearchParams] = (0, import_react_router_dom138.useSearchParams)();
|
|
50737
50728
|
const urlCurrency = searchParams.get("currency")?.toUpperCase();
|
|
50738
50729
|
const initialCurrency = urlCurrency && currencyAllowed.includes(urlCurrency) ? urlCurrency : stock;
|
|
50739
50730
|
const [currencyFilter, setCurrencyFilter] = (0, import_react171.useState)(initialCurrency);
|
|
@@ -51012,14 +51003,14 @@ var CargoIMReport = () => {
|
|
|
51012
51003
|
var cargoIMReport_default = CargoIMReport;
|
|
51013
51004
|
|
|
51014
51005
|
// src/components/accounts/forex-2/Forex2Accounts.tsx
|
|
51015
|
-
var
|
|
51006
|
+
var import_react_router_dom139 = require("react-router-dom");
|
|
51016
51007
|
var import_lucide_react130 = require("lucide-react");
|
|
51017
51008
|
var import_react172 = require("react");
|
|
51018
51009
|
var import_antd104 = require("antd");
|
|
51019
51010
|
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
51020
51011
|
function Forex2Accounts({ v, url }) {
|
|
51021
|
-
const { branchId } = (0,
|
|
51022
|
-
const navigate = (0,
|
|
51012
|
+
const { branchId } = (0, import_react_router_dom139.useParams)();
|
|
51013
|
+
const navigate = (0, import_react_router_dom139.useNavigate)();
|
|
51023
51014
|
const type = "account";
|
|
51024
51015
|
const [deleteAccount, setDeleteAccount] = (0, import_react172.useState)(null);
|
|
51025
51016
|
const { isLoading: isActionLoading, remove } = useApis_default();
|
|
@@ -51242,20 +51233,20 @@ function Forex2Accounts({ v, url }) {
|
|
|
51242
51233
|
var Forex2Accounts_default = Forex2Accounts;
|
|
51243
51234
|
|
|
51244
51235
|
// src/components/reports/ProductList.tsx
|
|
51245
|
-
var
|
|
51236
|
+
var import_react_router_dom140 = require("react-router-dom");
|
|
51246
51237
|
var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
51247
51238
|
var options10 = [
|
|
51248
51239
|
{ label: "Product", value: "product" },
|
|
51249
51240
|
{ label: "Pack", value: "pack" }
|
|
51250
51241
|
];
|
|
51251
51242
|
var ProductList2 = ({ value = false }) => {
|
|
51252
|
-
const { branchId } = (0,
|
|
51243
|
+
const { branchId } = (0, import_react_router_dom140.useParams)();
|
|
51253
51244
|
const { branches } = useAuth_default();
|
|
51254
51245
|
const { TransactionView } = useTransactionView_default();
|
|
51255
51246
|
const { getQuery, setQuery } = useApp_default();
|
|
51256
51247
|
const stockType = getQuery("stockType") || "product";
|
|
51257
51248
|
const { A4DataView, data } = useA4DataView_default({
|
|
51258
|
-
url: `/products/get`,
|
|
51249
|
+
url: `/products/get${branchId ? "?branch=" + branchId : ""}`,
|
|
51259
51250
|
v: 1,
|
|
51260
51251
|
// No prefix
|
|
51261
51252
|
params: {}
|