warqadui 0.0.289 → 0.0.291
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +27 -7
- package/dist/index.mjs +28 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -88,6 +88,7 @@ interface DashboardLayoutProps {
|
|
|
88
88
|
userProfile?: React__default.ReactNode;
|
|
89
89
|
fontFamily?: string;
|
|
90
90
|
sidebarFooter?: React__default.ReactNode;
|
|
91
|
+
posIcon?: React__default.ReactNode;
|
|
91
92
|
}
|
|
92
93
|
declare const DashboardLayout: React__default.FC<DashboardLayoutProps>;
|
|
93
94
|
|
|
@@ -1794,15 +1795,18 @@ declare const createProductSchema: z$1.ZodObject<{
|
|
|
1794
1795
|
brand: z$1.ZodOptional<z$1.ZodString>;
|
|
1795
1796
|
cost: z$1.ZodNumber;
|
|
1796
1797
|
yard: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1798
|
+
branch: z$1.ZodOptional<z$1.ZodString>;
|
|
1797
1799
|
}, "strip", z$1.ZodTypeAny, {
|
|
1798
1800
|
name: string;
|
|
1799
1801
|
cost: number;
|
|
1802
|
+
branch?: string | undefined;
|
|
1800
1803
|
category?: string | undefined;
|
|
1801
1804
|
brand?: string | undefined;
|
|
1802
1805
|
yard?: number | undefined;
|
|
1803
1806
|
}, {
|
|
1804
1807
|
name: string;
|
|
1805
1808
|
cost: number;
|
|
1809
|
+
branch?: string | undefined;
|
|
1806
1810
|
category?: string | undefined;
|
|
1807
1811
|
brand?: string | undefined;
|
|
1808
1812
|
yard?: number | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -88,6 +88,7 @@ interface DashboardLayoutProps {
|
|
|
88
88
|
userProfile?: React__default.ReactNode;
|
|
89
89
|
fontFamily?: string;
|
|
90
90
|
sidebarFooter?: React__default.ReactNode;
|
|
91
|
+
posIcon?: React__default.ReactNode;
|
|
91
92
|
}
|
|
92
93
|
declare const DashboardLayout: React__default.FC<DashboardLayoutProps>;
|
|
93
94
|
|
|
@@ -1794,15 +1795,18 @@ declare const createProductSchema: z$1.ZodObject<{
|
|
|
1794
1795
|
brand: z$1.ZodOptional<z$1.ZodString>;
|
|
1795
1796
|
cost: z$1.ZodNumber;
|
|
1796
1797
|
yard: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1798
|
+
branch: z$1.ZodOptional<z$1.ZodString>;
|
|
1797
1799
|
}, "strip", z$1.ZodTypeAny, {
|
|
1798
1800
|
name: string;
|
|
1799
1801
|
cost: number;
|
|
1802
|
+
branch?: string | undefined;
|
|
1800
1803
|
category?: string | undefined;
|
|
1801
1804
|
brand?: string | undefined;
|
|
1802
1805
|
yard?: number | undefined;
|
|
1803
1806
|
}, {
|
|
1804
1807
|
name: string;
|
|
1805
1808
|
cost: number;
|
|
1809
|
+
branch?: string | undefined;
|
|
1806
1810
|
category?: string | undefined;
|
|
1807
1811
|
brand?: string | undefined;
|
|
1808
1812
|
yard?: number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1236,6 +1236,7 @@ var DashboardLayout = ({
|
|
|
1236
1236
|
title = "Dashboard",
|
|
1237
1237
|
logo,
|
|
1238
1238
|
userProfile,
|
|
1239
|
+
posIcon,
|
|
1239
1240
|
fontFamily = 'system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"',
|
|
1240
1241
|
// Humanist System Stack
|
|
1241
1242
|
sidebarFooter
|
|
@@ -1433,10 +1434,16 @@ var DashboardLayout = ({
|
|
|
1433
1434
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.Menu, { size: 20 })
|
|
1434
1435
|
}
|
|
1435
1436
|
) }),
|
|
1436
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
1437
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
1438
|
-
|
|
1439
|
-
|
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1438
|
+
posIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-px h-6 mx-2 bg-gray-200 dark:bg-gray-800" }),
|
|
1440
|
+
posIcon
|
|
1441
|
+
] }),
|
|
1442
|
+
userProfile && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-px h-6 mx-2 bg-gray-200 dark:bg-gray-800" }),
|
|
1444
|
+
userProfile
|
|
1445
|
+
] })
|
|
1446
|
+
] })
|
|
1440
1447
|
] }),
|
|
1441
1448
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("main", { className: "flex-1 overflow-y-auto", children: [
|
|
1442
1449
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "sticky top-0 z-20 py-4 px-4 md:px-4 bg-gray-50/95 dark:bg-gray-900/80 backdrop-blur-sm border-b border-gray-200/50 dark:border-white/5 mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Breadcrumbs, {}) }),
|
|
@@ -20131,9 +20138,10 @@ var UpdateImage_default = UpdateImage;
|
|
|
20131
20138
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
20132
20139
|
function Products({ v, url }) {
|
|
20133
20140
|
const [deleteProduct, setDeleteProduct] = (0, import_react64.useState)(null);
|
|
20141
|
+
const { branchId } = (0, import_react_router_dom24.useParams)();
|
|
20134
20142
|
const { isLoading, remove } = useApis_default();
|
|
20135
20143
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
20136
|
-
url: url || `/products/get`,
|
|
20144
|
+
url: url || `/products/get${branchId ? "?branch=" + branchId : ""}`,
|
|
20137
20145
|
v,
|
|
20138
20146
|
dateFilter: false
|
|
20139
20147
|
});
|
|
@@ -20273,7 +20281,8 @@ var createProductSchema = import_zod25.z.object({
|
|
|
20273
20281
|
category: import_zod25.z.string().optional(),
|
|
20274
20282
|
brand: import_zod25.z.string().optional(),
|
|
20275
20283
|
cost: import_zod25.z.number({ message: "Cost is required" }).min(0),
|
|
20276
|
-
yard: import_zod25.z.coerce.number().optional()
|
|
20284
|
+
yard: import_zod25.z.coerce.number().optional(),
|
|
20285
|
+
branch: import_zod25.z.string().optional()
|
|
20277
20286
|
});
|
|
20278
20287
|
|
|
20279
20288
|
// src/components/products/ProductForm.tsx
|
|
@@ -20296,7 +20305,8 @@ function ProductForm() {
|
|
|
20296
20305
|
category: void 0,
|
|
20297
20306
|
brand: void 0,
|
|
20298
20307
|
cost: 0,
|
|
20299
|
-
yard: void 0
|
|
20308
|
+
yard: void 0,
|
|
20309
|
+
branch: void 0
|
|
20300
20310
|
},
|
|
20301
20311
|
shouldUnregister: false
|
|
20302
20312
|
});
|
|
@@ -20409,6 +20419,16 @@ function ProductForm() {
|
|
|
20409
20419
|
api: "/brands/get"
|
|
20410
20420
|
}
|
|
20411
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
|
+
),
|
|
20412
20432
|
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
20413
20433
|
Fields_default.Input,
|
|
20414
20434
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -1018,6 +1018,7 @@ var DashboardLayout = ({
|
|
|
1018
1018
|
title = "Dashboard",
|
|
1019
1019
|
logo,
|
|
1020
1020
|
userProfile,
|
|
1021
|
+
posIcon,
|
|
1021
1022
|
fontFamily = 'system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"',
|
|
1022
1023
|
// Humanist System Stack
|
|
1023
1024
|
sidebarFooter
|
|
@@ -1215,10 +1216,16 @@ var DashboardLayout = ({
|
|
|
1215
1216
|
children: /* @__PURE__ */ jsx7(Menu, { size: 20 })
|
|
1216
1217
|
}
|
|
1217
1218
|
) }),
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1220
|
-
|
|
1221
|
-
|
|
1219
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
|
|
1220
|
+
posIcon && /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
1221
|
+
/* @__PURE__ */ jsx7("div", { className: "w-px h-6 mx-2 bg-gray-200 dark:bg-gray-800" }),
|
|
1222
|
+
posIcon
|
|
1223
|
+
] }),
|
|
1224
|
+
userProfile && /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
1225
|
+
/* @__PURE__ */ jsx7("div", { className: "w-px h-6 mx-2 bg-gray-200 dark:bg-gray-800" }),
|
|
1226
|
+
userProfile
|
|
1227
|
+
] })
|
|
1228
|
+
] })
|
|
1222
1229
|
] }),
|
|
1223
1230
|
/* @__PURE__ */ jsxs5("main", { className: "flex-1 overflow-y-auto", children: [
|
|
1224
1231
|
/* @__PURE__ */ jsx7("div", { className: "sticky top-0 z-20 py-4 px-4 md:px-4 bg-gray-50/95 dark:bg-gray-900/80 backdrop-blur-sm border-b border-gray-200/50 dark:border-white/5 mb-2", children: /* @__PURE__ */ jsx7(Breadcrumbs, {}) }),
|
|
@@ -20108,7 +20115,7 @@ var CategoryField = {
|
|
|
20108
20115
|
var Feilds_default4 = CategoryField;
|
|
20109
20116
|
|
|
20110
20117
|
// src/components/products/Products.tsx
|
|
20111
|
-
import { useNavigate as useNavigate14 } from "react-router-dom";
|
|
20118
|
+
import { useNavigate as useNavigate14, useParams as useParams15 } from "react-router-dom";
|
|
20112
20119
|
import { EllipsisVertical as EllipsisVertical8, FilePenLine as FilePenLine7, Image as Image3, Trash2 as Trash210 } from "lucide-react";
|
|
20113
20120
|
import { useState as useState42 } from "react";
|
|
20114
20121
|
import { message as message30 } from "antd";
|
|
@@ -20217,9 +20224,10 @@ var UpdateImage_default = UpdateImage;
|
|
|
20217
20224
|
import { Fragment as Fragment46, jsx as jsx114, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
20218
20225
|
function Products({ v, url }) {
|
|
20219
20226
|
const [deleteProduct, setDeleteProduct] = useState42(null);
|
|
20227
|
+
const { branchId } = useParams15();
|
|
20220
20228
|
const { isLoading, remove } = useApis_default();
|
|
20221
20229
|
const { data, TransactionViewComponent, reload } = useTransaction_default({
|
|
20222
|
-
url: url || `/products/get`,
|
|
20230
|
+
url: url || `/products/get${branchId ? "?branch=" + branchId : ""}`,
|
|
20223
20231
|
v,
|
|
20224
20232
|
dateFilter: false
|
|
20225
20233
|
});
|
|
@@ -20359,7 +20367,8 @@ var createProductSchema = z11.object({
|
|
|
20359
20367
|
category: z11.string().optional(),
|
|
20360
20368
|
brand: z11.string().optional(),
|
|
20361
20369
|
cost: z11.number({ message: "Cost is required" }).min(0),
|
|
20362
|
-
yard: z11.coerce.number().optional()
|
|
20370
|
+
yard: z11.coerce.number().optional(),
|
|
20371
|
+
branch: z11.string().optional()
|
|
20363
20372
|
});
|
|
20364
20373
|
|
|
20365
20374
|
// src/components/products/ProductForm.tsx
|
|
@@ -20382,7 +20391,8 @@ function ProductForm() {
|
|
|
20382
20391
|
category: void 0,
|
|
20383
20392
|
brand: void 0,
|
|
20384
20393
|
cost: 0,
|
|
20385
|
-
yard: void 0
|
|
20394
|
+
yard: void 0,
|
|
20395
|
+
branch: void 0
|
|
20386
20396
|
},
|
|
20387
20397
|
shouldUnregister: false
|
|
20388
20398
|
});
|
|
@@ -20495,6 +20505,16 @@ function ProductForm() {
|
|
|
20495
20505
|
api: "/brands/get"
|
|
20496
20506
|
}
|
|
20497
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
|
+
),
|
|
20498
20518
|
/* @__PURE__ */ jsx115(
|
|
20499
20519
|
Fields_default.Input,
|
|
20500
20520
|
{
|