warqadui 0.0.290 → 0.0.292
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 +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +23 -10
- package/dist/index.mjs +24 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1795,15 +1795,18 @@ declare const createProductSchema: z$1.ZodObject<{
|
|
|
1795
1795
|
brand: z$1.ZodOptional<z$1.ZodString>;
|
|
1796
1796
|
cost: z$1.ZodNumber;
|
|
1797
1797
|
yard: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1798
|
+
branch: z$1.ZodOptional<z$1.ZodString>;
|
|
1798
1799
|
}, "strip", z$1.ZodTypeAny, {
|
|
1799
1800
|
name: string;
|
|
1800
1801
|
cost: number;
|
|
1802
|
+
branch?: string | undefined;
|
|
1801
1803
|
category?: string | undefined;
|
|
1802
1804
|
brand?: string | undefined;
|
|
1803
1805
|
yard?: number | undefined;
|
|
1804
1806
|
}, {
|
|
1805
1807
|
name: string;
|
|
1806
1808
|
cost: number;
|
|
1809
|
+
branch?: string | undefined;
|
|
1807
1810
|
category?: string | undefined;
|
|
1808
1811
|
brand?: string | undefined;
|
|
1809
1812
|
yard?: number | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1795,15 +1795,18 @@ declare const createProductSchema: z$1.ZodObject<{
|
|
|
1795
1795
|
brand: z$1.ZodOptional<z$1.ZodString>;
|
|
1796
1796
|
cost: z$1.ZodNumber;
|
|
1797
1797
|
yard: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1798
|
+
branch: z$1.ZodOptional<z$1.ZodString>;
|
|
1798
1799
|
}, "strip", z$1.ZodTypeAny, {
|
|
1799
1800
|
name: string;
|
|
1800
1801
|
cost: number;
|
|
1802
|
+
branch?: string | undefined;
|
|
1801
1803
|
category?: string | undefined;
|
|
1802
1804
|
brand?: string | undefined;
|
|
1803
1805
|
yard?: number | undefined;
|
|
1804
1806
|
}, {
|
|
1805
1807
|
name: string;
|
|
1806
1808
|
cost: number;
|
|
1809
|
+
branch?: string | undefined;
|
|
1807
1810
|
category?: string | undefined;
|
|
1808
1811
|
brand?: string | undefined;
|
|
1809
1812
|
yard?: number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -20138,9 +20138,10 @@ var UpdateImage_default = UpdateImage;
|
|
|
20138
20138
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
20139
20139
|
function Products({ v, url }) {
|
|
20140
20140
|
const [deleteProduct, setDeleteProduct] = (0, import_react64.useState)(null);
|
|
20141
|
+
const { branchId } = (0, import_react_router_dom24.useParams)();
|
|
20141
20142
|
const { isLoading, remove } = useApis_default();
|
|
20142
20143
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
20143
|
-
url: url || `/products/get`,
|
|
20144
|
+
url: url || `/products/get${branchId ? "?branch=" + branchId : ""}`,
|
|
20144
20145
|
v,
|
|
20145
20146
|
dateFilter: false
|
|
20146
20147
|
});
|
|
@@ -20280,7 +20281,8 @@ var createProductSchema = import_zod25.z.object({
|
|
|
20280
20281
|
category: import_zod25.z.string().optional(),
|
|
20281
20282
|
brand: import_zod25.z.string().optional(),
|
|
20282
20283
|
cost: import_zod25.z.number({ message: "Cost is required" }).min(0),
|
|
20283
|
-
yard: import_zod25.z.coerce.number().optional()
|
|
20284
|
+
yard: import_zod25.z.coerce.number().optional(),
|
|
20285
|
+
branch: import_zod25.z.string().optional()
|
|
20284
20286
|
});
|
|
20285
20287
|
|
|
20286
20288
|
// src/components/products/ProductForm.tsx
|
|
@@ -20303,7 +20305,8 @@ function ProductForm() {
|
|
|
20303
20305
|
category: void 0,
|
|
20304
20306
|
brand: void 0,
|
|
20305
20307
|
cost: 0,
|
|
20306
|
-
yard: void 0
|
|
20308
|
+
yard: void 0,
|
|
20309
|
+
branch: void 0
|
|
20307
20310
|
},
|
|
20308
20311
|
shouldUnregister: false
|
|
20309
20312
|
});
|
|
@@ -20416,6 +20419,16 @@ function ProductForm() {
|
|
|
20416
20419
|
api: "/brands/get"
|
|
20417
20420
|
}
|
|
20418
20421
|
),
|
|
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
|
+
),
|
|
20419
20432
|
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
20420
20433
|
Fields_default.Input,
|
|
20421
20434
|
{
|
|
@@ -24856,7 +24869,7 @@ function ClothendStockAdjustment({
|
|
|
24856
24869
|
const navigate = (0, import_react_router_dom45.useNavigate)();
|
|
24857
24870
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
24858
24871
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
24859
|
-
url: url || `/transactions/get?type=stock&stock=adjustment&stockType=${type}${branchId ? `&
|
|
24872
|
+
url: url || `/transactions/get?type=stock&stock=adjustment&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
24860
24873
|
dateFilter: true
|
|
24861
24874
|
});
|
|
24862
24875
|
const { Modal: Modal2 } = useModal();
|
|
@@ -25189,7 +25202,7 @@ function StockAdjustmentTable({
|
|
|
25189
25202
|
v: 1,
|
|
25190
25203
|
valueKey: "_id",
|
|
25191
25204
|
obj: "lineObj",
|
|
25192
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
25205
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
25193
25206
|
className: "px-0! py-0! w-full!",
|
|
25194
25207
|
onSelect: () => {
|
|
25195
25208
|
setTimeout(() => {
|
|
@@ -45686,7 +45699,7 @@ function Sale2List2({ url, type = "product" }) {
|
|
|
45686
45699
|
const navigate = (0, import_react_router_dom117.useNavigate)();
|
|
45687
45700
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
45688
45701
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
45689
|
-
url: url || `/transactions/get?type=stock&stock=sale-3&stockType=${type}${branchId ? `&
|
|
45702
|
+
url: url || `/transactions/get?type=stock&stock=sale-3&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
45690
45703
|
dateFilter: true
|
|
45691
45704
|
});
|
|
45692
45705
|
const { Modal: Modal2 } = useModal();
|
|
@@ -46067,7 +46080,7 @@ function SaleStockTable3({
|
|
|
46067
46080
|
v: 1,
|
|
46068
46081
|
valueKey: "_id",
|
|
46069
46082
|
obj: "lineObj",
|
|
46070
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
46083
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
46071
46084
|
className: "px-0! py-0! w-full!",
|
|
46072
46085
|
onSelect: () => {
|
|
46073
46086
|
setTimeout(() => {
|
|
@@ -47269,7 +47282,7 @@ function purchase3List({
|
|
|
47269
47282
|
const navigate = (0, import_react_router_dom122.useNavigate)();
|
|
47270
47283
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
47271
47284
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
47272
|
-
url: url || `/transactions/get?type=stock&stock=purchase-3&stockType=${type}${branchId ? `&
|
|
47285
|
+
url: url || `/transactions/get?type=stock&stock=purchase-3&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
47273
47286
|
dateFilter: true
|
|
47274
47287
|
});
|
|
47275
47288
|
const { Modal: Modal2 } = useModal();
|
|
@@ -47647,7 +47660,7 @@ function PurchaseStockTable({
|
|
|
47647
47660
|
v: 1,
|
|
47648
47661
|
valueKey: "_id",
|
|
47649
47662
|
obj: "lineObj",
|
|
47650
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
47663
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
47651
47664
|
className: "px-0! py-0! w-full!",
|
|
47652
47665
|
onSelect: () => {
|
|
47653
47666
|
setTimeout(() => {
|
|
@@ -51242,7 +51255,7 @@ var ProductList2 = ({ value = false }) => {
|
|
|
51242
51255
|
const { getQuery, setQuery } = useApp_default();
|
|
51243
51256
|
const stockType = getQuery("stockType") || "product";
|
|
51244
51257
|
const { A4DataView, data } = useA4DataView_default({
|
|
51245
|
-
url: `/products/get`,
|
|
51258
|
+
url: `/products/get${branchId ? "?branch=" + branchId : ""}`,
|
|
51246
51259
|
v: 1,
|
|
51247
51260
|
// No prefix
|
|
51248
51261
|
params: {}
|
package/dist/index.mjs
CHANGED
|
@@ -20115,7 +20115,7 @@ var CategoryField = {
|
|
|
20115
20115
|
var Feilds_default4 = CategoryField;
|
|
20116
20116
|
|
|
20117
20117
|
// src/components/products/Products.tsx
|
|
20118
|
-
import { useNavigate as useNavigate14 } from "react-router-dom";
|
|
20118
|
+
import { useNavigate as useNavigate14, useParams as useParams15 } from "react-router-dom";
|
|
20119
20119
|
import { EllipsisVertical as EllipsisVertical8, FilePenLine as FilePenLine7, Image as Image3, Trash2 as Trash210 } from "lucide-react";
|
|
20120
20120
|
import { useState as useState42 } from "react";
|
|
20121
20121
|
import { message as message30 } from "antd";
|
|
@@ -20224,9 +20224,10 @@ var UpdateImage_default = UpdateImage;
|
|
|
20224
20224
|
import { Fragment as Fragment46, jsx as jsx114, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
20225
20225
|
function Products({ v, url }) {
|
|
20226
20226
|
const [deleteProduct, setDeleteProduct] = useState42(null);
|
|
20227
|
+
const { branchId } = useParams15();
|
|
20227
20228
|
const { isLoading, remove } = useApis_default();
|
|
20228
20229
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
20229
|
-
url: url || `/products/get`,
|
|
20230
|
+
url: url || `/products/get${branchId ? "?branch=" + branchId : ""}`,
|
|
20230
20231
|
v,
|
|
20231
20232
|
dateFilter: false
|
|
20232
20233
|
});
|
|
@@ -20366,7 +20367,8 @@ var createProductSchema = z11.object({
|
|
|
20366
20367
|
category: z11.string().optional(),
|
|
20367
20368
|
brand: z11.string().optional(),
|
|
20368
20369
|
cost: z11.number({ message: "Cost is required" }).min(0),
|
|
20369
|
-
yard: z11.coerce.number().optional()
|
|
20370
|
+
yard: z11.coerce.number().optional(),
|
|
20371
|
+
branch: z11.string().optional()
|
|
20370
20372
|
});
|
|
20371
20373
|
|
|
20372
20374
|
// src/components/products/ProductForm.tsx
|
|
@@ -20389,7 +20391,8 @@ function ProductForm() {
|
|
|
20389
20391
|
category: void 0,
|
|
20390
20392
|
brand: void 0,
|
|
20391
20393
|
cost: 0,
|
|
20392
|
-
yard: void 0
|
|
20394
|
+
yard: void 0,
|
|
20395
|
+
branch: void 0
|
|
20393
20396
|
},
|
|
20394
20397
|
shouldUnregister: false
|
|
20395
20398
|
});
|
|
@@ -20502,6 +20505,16 @@ function ProductForm() {
|
|
|
20502
20505
|
api: "/brands/get"
|
|
20503
20506
|
}
|
|
20504
20507
|
),
|
|
20508
|
+
/* @__PURE__ */ jsx115(
|
|
20509
|
+
Feilds_default.Branches,
|
|
20510
|
+
{
|
|
20511
|
+
label: "Branch",
|
|
20512
|
+
form: methods,
|
|
20513
|
+
name: "branch",
|
|
20514
|
+
placeholder: "Select Branch",
|
|
20515
|
+
api: "/branches/get?noStore=true"
|
|
20516
|
+
}
|
|
20517
|
+
),
|
|
20505
20518
|
/* @__PURE__ */ jsx115(
|
|
20506
20519
|
Fields_default.Input,
|
|
20507
20520
|
{
|
|
@@ -24948,7 +24961,7 @@ function ClothendStockAdjustment({
|
|
|
24948
24961
|
const navigate = useNavigate26();
|
|
24949
24962
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
24950
24963
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
24951
|
-
url: url || `/transactions/get?type=stock&stock=adjustment&stockType=${type}${branchId ? `&
|
|
24964
|
+
url: url || `/transactions/get?type=stock&stock=adjustment&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
24952
24965
|
dateFilter: true
|
|
24953
24966
|
});
|
|
24954
24967
|
const { Modal: Modal2 } = useModal();
|
|
@@ -25281,7 +25294,7 @@ function StockAdjustmentTable({
|
|
|
25281
25294
|
v: 1,
|
|
25282
25295
|
valueKey: "_id",
|
|
25283
25296
|
obj: "lineObj",
|
|
25284
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
25297
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
25285
25298
|
className: "px-0! py-0! w-full!",
|
|
25286
25299
|
onSelect: () => {
|
|
25287
25300
|
setTimeout(() => {
|
|
@@ -45893,7 +45906,7 @@ function Sale2List2({ url, type = "product" }) {
|
|
|
45893
45906
|
const navigate = useNavigate61();
|
|
45894
45907
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
45895
45908
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
45896
|
-
url: url || `/transactions/get?type=stock&stock=sale-3&stockType=${type}${branchId ? `&
|
|
45909
|
+
url: url || `/transactions/get?type=stock&stock=sale-3&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
45897
45910
|
dateFilter: true
|
|
45898
45911
|
});
|
|
45899
45912
|
const { Modal: Modal2 } = useModal();
|
|
@@ -46274,7 +46287,7 @@ function SaleStockTable3({
|
|
|
46274
46287
|
v: 1,
|
|
46275
46288
|
valueKey: "_id",
|
|
46276
46289
|
obj: "lineObj",
|
|
46277
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
46290
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
46278
46291
|
className: "px-0! py-0! w-full!",
|
|
46279
46292
|
onSelect: () => {
|
|
46280
46293
|
setTimeout(() => {
|
|
@@ -47489,7 +47502,7 @@ function purchase3List({
|
|
|
47489
47502
|
const navigate = useNavigate63();
|
|
47490
47503
|
const { TransactionView, openTransaction } = useTransactionView_default();
|
|
47491
47504
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
47492
|
-
url: url || `/transactions/get?type=stock&stock=purchase-3&stockType=${type}${branchId ? `&
|
|
47505
|
+
url: url || `/transactions/get?type=stock&stock=purchase-3&stockType=${type}${branchId ? `&branch=${branchId}` : ""}`,
|
|
47493
47506
|
dateFilter: true
|
|
47494
47507
|
});
|
|
47495
47508
|
const { Modal: Modal2 } = useModal();
|
|
@@ -47867,7 +47880,7 @@ function PurchaseStockTable({
|
|
|
47867
47880
|
v: 1,
|
|
47868
47881
|
valueKey: "_id",
|
|
47869
47882
|
obj: "lineObj",
|
|
47870
|
-
api: stockType === "product" ? `/products/get` : `/packs/get`,
|
|
47883
|
+
api: stockType === "product" ? `/products/get${branchId ? "?branch=" + branchId : ""}` : `/packs/get`,
|
|
47871
47884
|
className: "px-0! py-0! w-full!",
|
|
47872
47885
|
onSelect: () => {
|
|
47873
47886
|
setTimeout(() => {
|
|
@@ -51467,7 +51480,7 @@ var ProductList2 = ({ value = false }) => {
|
|
|
51467
51480
|
const { getQuery, setQuery } = useApp_default();
|
|
51468
51481
|
const stockType = getQuery("stockType") || "product";
|
|
51469
51482
|
const { A4DataView, data } = useA4DataView_default({
|
|
51470
|
-
url: `/products/get`,
|
|
51483
|
+
url: `/products/get${branchId ? "?branch=" + branchId : ""}`,
|
|
51471
51484
|
v: 1,
|
|
51472
51485
|
// No prefix
|
|
51473
51486
|
params: {}
|