warqadui 0.0.270 → 0.0.271
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.js +27 -0
- package/dist/index.mjs +27 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41237,6 +41237,18 @@ function ProductList({
|
|
|
41237
41237
|
] });
|
|
41238
41238
|
}
|
|
41239
41239
|
},
|
|
41240
|
+
{
|
|
41241
|
+
accessorKey: "wholeSale",
|
|
41242
|
+
header: "Wholesale",
|
|
41243
|
+
cell: ({ row }) => {
|
|
41244
|
+
const product = row.original;
|
|
41245
|
+
const val = product?.wholeSale ?? product?.wholesalePrice;
|
|
41246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)("span", { children: [
|
|
41247
|
+
" ",
|
|
41248
|
+
val !== void 0 && val !== null ? val.toLocaleString() : "-"
|
|
41249
|
+
] });
|
|
41250
|
+
}
|
|
41251
|
+
},
|
|
41240
41252
|
{
|
|
41241
41253
|
accessorKey: "actions",
|
|
41242
41254
|
header: "Actions",
|
|
@@ -41317,6 +41329,7 @@ var createProductSchema2 = import_zod95.z.object({
|
|
|
41317
41329
|
code: import_zod95.z.string().min(1, "Code is required").trim().toLowerCase(),
|
|
41318
41330
|
desc: import_zod95.z.string().min(1, "Description is required").trim(),
|
|
41319
41331
|
cost: import_zod95.z.coerce.number().min(0.01, "Cost must be greater than 0"),
|
|
41332
|
+
wholeSale: import_zod95.z.coerce.number().min(0, "Wholesale price must be positive").optional().nullable(),
|
|
41320
41333
|
name: import_zod95.z.string().min(1, "Name is required").trim().toLowerCase(),
|
|
41321
41334
|
description: import_zod95.z.string().trim().toLowerCase().optional(),
|
|
41322
41335
|
price: import_zod95.z.coerce.number().min(0, "Price must be positive"),
|
|
@@ -41371,6 +41384,7 @@ function ProductForm2({
|
|
|
41371
41384
|
code: "",
|
|
41372
41385
|
desc: "",
|
|
41373
41386
|
cost: 0,
|
|
41387
|
+
wholeSale: null,
|
|
41374
41388
|
name: "",
|
|
41375
41389
|
description: "",
|
|
41376
41390
|
price: 0,
|
|
@@ -41449,6 +41463,7 @@ function ProductForm2({
|
|
|
41449
41463
|
});
|
|
41450
41464
|
const body = {
|
|
41451
41465
|
...data,
|
|
41466
|
+
wholesalePrice: data.wholeSale,
|
|
41452
41467
|
sizes: mappedSizes,
|
|
41453
41468
|
gallery,
|
|
41454
41469
|
files,
|
|
@@ -41461,6 +41476,7 @@ function ProductForm2({
|
|
|
41461
41476
|
v: v || 3,
|
|
41462
41477
|
body: {
|
|
41463
41478
|
...data,
|
|
41479
|
+
wholesalePrice: data.wholeSale,
|
|
41464
41480
|
sizes: mappedSizes
|
|
41465
41481
|
}
|
|
41466
41482
|
});
|
|
@@ -41487,6 +41503,7 @@ function ProductForm2({
|
|
|
41487
41503
|
const mappedSizes = res.sizes?.map((size) => ({ value: size })) || [];
|
|
41488
41504
|
methods.reset({
|
|
41489
41505
|
...res,
|
|
41506
|
+
wholeSale: res.wholeSale ?? res.wholesalePrice ?? null,
|
|
41490
41507
|
sizes: mappedSizes
|
|
41491
41508
|
});
|
|
41492
41509
|
if (res.image) {
|
|
@@ -41565,6 +41582,16 @@ function ProductForm2({
|
|
|
41565
41582
|
placeholder: "0.00",
|
|
41566
41583
|
required: true
|
|
41567
41584
|
}
|
|
41585
|
+
),
|
|
41586
|
+
/* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
41587
|
+
Fields_default.Input,
|
|
41588
|
+
{
|
|
41589
|
+
label: "Wholesale Price",
|
|
41590
|
+
form: methods,
|
|
41591
|
+
name: "wholeSale",
|
|
41592
|
+
type: "number",
|
|
41593
|
+
placeholder: "0.00"
|
|
41594
|
+
}
|
|
41568
41595
|
)
|
|
41569
41596
|
] })
|
|
41570
41597
|
] }),
|
package/dist/index.mjs
CHANGED
|
@@ -41434,6 +41434,18 @@ function ProductList({
|
|
|
41434
41434
|
] });
|
|
41435
41435
|
}
|
|
41436
41436
|
},
|
|
41437
|
+
{
|
|
41438
|
+
accessorKey: "wholeSale",
|
|
41439
|
+
header: "Wholesale",
|
|
41440
|
+
cell: ({ row }) => {
|
|
41441
|
+
const product = row.original;
|
|
41442
|
+
const val = product?.wholeSale ?? product?.wholesalePrice;
|
|
41443
|
+
return /* @__PURE__ */ jsxs201("span", { children: [
|
|
41444
|
+
" ",
|
|
41445
|
+
val !== void 0 && val !== null ? val.toLocaleString() : "-"
|
|
41446
|
+
] });
|
|
41447
|
+
}
|
|
41448
|
+
},
|
|
41437
41449
|
{
|
|
41438
41450
|
accessorKey: "actions",
|
|
41439
41451
|
header: "Actions",
|
|
@@ -41514,6 +41526,7 @@ var createProductSchema2 = z38.object({
|
|
|
41514
41526
|
code: z38.string().min(1, "Code is required").trim().toLowerCase(),
|
|
41515
41527
|
desc: z38.string().min(1, "Description is required").trim(),
|
|
41516
41528
|
cost: z38.coerce.number().min(0.01, "Cost must be greater than 0"),
|
|
41529
|
+
wholeSale: z38.coerce.number().min(0, "Wholesale price must be positive").optional().nullable(),
|
|
41517
41530
|
name: z38.string().min(1, "Name is required").trim().toLowerCase(),
|
|
41518
41531
|
description: z38.string().trim().toLowerCase().optional(),
|
|
41519
41532
|
price: z38.coerce.number().min(0, "Price must be positive"),
|
|
@@ -41568,6 +41581,7 @@ function ProductForm2({
|
|
|
41568
41581
|
code: "",
|
|
41569
41582
|
desc: "",
|
|
41570
41583
|
cost: 0,
|
|
41584
|
+
wholeSale: null,
|
|
41571
41585
|
name: "",
|
|
41572
41586
|
description: "",
|
|
41573
41587
|
price: 0,
|
|
@@ -41646,6 +41660,7 @@ function ProductForm2({
|
|
|
41646
41660
|
});
|
|
41647
41661
|
const body = {
|
|
41648
41662
|
...data,
|
|
41663
|
+
wholesalePrice: data.wholeSale,
|
|
41649
41664
|
sizes: mappedSizes,
|
|
41650
41665
|
gallery,
|
|
41651
41666
|
files,
|
|
@@ -41658,6 +41673,7 @@ function ProductForm2({
|
|
|
41658
41673
|
v: v || 3,
|
|
41659
41674
|
body: {
|
|
41660
41675
|
...data,
|
|
41676
|
+
wholesalePrice: data.wholeSale,
|
|
41661
41677
|
sizes: mappedSizes
|
|
41662
41678
|
}
|
|
41663
41679
|
});
|
|
@@ -41684,6 +41700,7 @@ function ProductForm2({
|
|
|
41684
41700
|
const mappedSizes = res.sizes?.map((size) => ({ value: size })) || [];
|
|
41685
41701
|
methods.reset({
|
|
41686
41702
|
...res,
|
|
41703
|
+
wholeSale: res.wholeSale ?? res.wholesalePrice ?? null,
|
|
41687
41704
|
sizes: mappedSizes
|
|
41688
41705
|
});
|
|
41689
41706
|
if (res.image) {
|
|
@@ -41762,6 +41779,16 @@ function ProductForm2({
|
|
|
41762
41779
|
placeholder: "0.00",
|
|
41763
41780
|
required: true
|
|
41764
41781
|
}
|
|
41782
|
+
),
|
|
41783
|
+
/* @__PURE__ */ jsx233(
|
|
41784
|
+
Fields_default.Input,
|
|
41785
|
+
{
|
|
41786
|
+
label: "Wholesale Price",
|
|
41787
|
+
form: methods,
|
|
41788
|
+
name: "wholeSale",
|
|
41789
|
+
type: "number",
|
|
41790
|
+
placeholder: "0.00"
|
|
41791
|
+
}
|
|
41765
41792
|
)
|
|
41766
41793
|
] })
|
|
41767
41794
|
] }),
|