warqadui 0.0.270 → 0.0.272
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +31 -2
- package/dist/index.mjs +31 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -18537,6 +18537,8 @@ var UserProfile = ({
|
|
|
18537
18537
|
role,
|
|
18538
18538
|
image,
|
|
18539
18539
|
onLogout,
|
|
18540
|
+
logoutUrl,
|
|
18541
|
+
v,
|
|
18540
18542
|
showThemeToggle = true
|
|
18541
18543
|
}) => {
|
|
18542
18544
|
const { post } = useApis_default();
|
|
@@ -18549,8 +18551,8 @@ var UserProfile = ({
|
|
|
18549
18551
|
}
|
|
18550
18552
|
try {
|
|
18551
18553
|
await post({
|
|
18552
|
-
url:
|
|
18553
|
-
v: 1
|
|
18554
|
+
url: `${logoutUrl || "/users/logout"}/${user?._id}`,
|
|
18555
|
+
v: v || 1
|
|
18554
18556
|
});
|
|
18555
18557
|
import_antd25.message.success("Logout successfully");
|
|
18556
18558
|
authLogout();
|
|
@@ -41237,6 +41239,18 @@ function ProductList({
|
|
|
41237
41239
|
] });
|
|
41238
41240
|
}
|
|
41239
41241
|
},
|
|
41242
|
+
{
|
|
41243
|
+
accessorKey: "wholeSale",
|
|
41244
|
+
header: "Wholesale",
|
|
41245
|
+
cell: ({ row }) => {
|
|
41246
|
+
const product = row.original;
|
|
41247
|
+
const val = product?.wholeSale ?? product?.wholesalePrice;
|
|
41248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)("span", { children: [
|
|
41249
|
+
" ",
|
|
41250
|
+
val !== void 0 && val !== null ? val.toLocaleString() : "-"
|
|
41251
|
+
] });
|
|
41252
|
+
}
|
|
41253
|
+
},
|
|
41240
41254
|
{
|
|
41241
41255
|
accessorKey: "actions",
|
|
41242
41256
|
header: "Actions",
|
|
@@ -41317,6 +41331,7 @@ var createProductSchema2 = import_zod95.z.object({
|
|
|
41317
41331
|
code: import_zod95.z.string().min(1, "Code is required").trim().toLowerCase(),
|
|
41318
41332
|
desc: import_zod95.z.string().min(1, "Description is required").trim(),
|
|
41319
41333
|
cost: import_zod95.z.coerce.number().min(0.01, "Cost must be greater than 0"),
|
|
41334
|
+
wholeSale: import_zod95.z.coerce.number().min(0, "Wholesale price must be positive").optional().nullable(),
|
|
41320
41335
|
name: import_zod95.z.string().min(1, "Name is required").trim().toLowerCase(),
|
|
41321
41336
|
description: import_zod95.z.string().trim().toLowerCase().optional(),
|
|
41322
41337
|
price: import_zod95.z.coerce.number().min(0, "Price must be positive"),
|
|
@@ -41371,6 +41386,7 @@ function ProductForm2({
|
|
|
41371
41386
|
code: "",
|
|
41372
41387
|
desc: "",
|
|
41373
41388
|
cost: 0,
|
|
41389
|
+
wholeSale: null,
|
|
41374
41390
|
name: "",
|
|
41375
41391
|
description: "",
|
|
41376
41392
|
price: 0,
|
|
@@ -41449,6 +41465,7 @@ function ProductForm2({
|
|
|
41449
41465
|
});
|
|
41450
41466
|
const body = {
|
|
41451
41467
|
...data,
|
|
41468
|
+
wholesalePrice: data.wholeSale,
|
|
41452
41469
|
sizes: mappedSizes,
|
|
41453
41470
|
gallery,
|
|
41454
41471
|
files,
|
|
@@ -41461,6 +41478,7 @@ function ProductForm2({
|
|
|
41461
41478
|
v: v || 3,
|
|
41462
41479
|
body: {
|
|
41463
41480
|
...data,
|
|
41481
|
+
wholesalePrice: data.wholeSale,
|
|
41464
41482
|
sizes: mappedSizes
|
|
41465
41483
|
}
|
|
41466
41484
|
});
|
|
@@ -41487,6 +41505,7 @@ function ProductForm2({
|
|
|
41487
41505
|
const mappedSizes = res.sizes?.map((size) => ({ value: size })) || [];
|
|
41488
41506
|
methods.reset({
|
|
41489
41507
|
...res,
|
|
41508
|
+
wholeSale: res.wholeSale ?? res.wholesalePrice ?? null,
|
|
41490
41509
|
sizes: mappedSizes
|
|
41491
41510
|
});
|
|
41492
41511
|
if (res.image) {
|
|
@@ -41565,6 +41584,16 @@ function ProductForm2({
|
|
|
41565
41584
|
placeholder: "0.00",
|
|
41566
41585
|
required: true
|
|
41567
41586
|
}
|
|
41587
|
+
),
|
|
41588
|
+
/* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
41589
|
+
Fields_default.Input,
|
|
41590
|
+
{
|
|
41591
|
+
label: "Wholesale Price",
|
|
41592
|
+
form: methods,
|
|
41593
|
+
name: "wholeSale",
|
|
41594
|
+
type: "number",
|
|
41595
|
+
placeholder: "0.00"
|
|
41596
|
+
}
|
|
41568
41597
|
)
|
|
41569
41598
|
] })
|
|
41570
41599
|
] }),
|
package/dist/index.mjs
CHANGED
|
@@ -18613,6 +18613,8 @@ var UserProfile = ({
|
|
|
18613
18613
|
role,
|
|
18614
18614
|
image,
|
|
18615
18615
|
onLogout,
|
|
18616
|
+
logoutUrl,
|
|
18617
|
+
v,
|
|
18616
18618
|
showThemeToggle = true
|
|
18617
18619
|
}) => {
|
|
18618
18620
|
const { post } = useApis_default();
|
|
@@ -18625,8 +18627,8 @@ var UserProfile = ({
|
|
|
18625
18627
|
}
|
|
18626
18628
|
try {
|
|
18627
18629
|
await post({
|
|
18628
|
-
url:
|
|
18629
|
-
v: 1
|
|
18630
|
+
url: `${logoutUrl || "/users/logout"}/${user?._id}`,
|
|
18631
|
+
v: v || 1
|
|
18630
18632
|
});
|
|
18631
18633
|
message20.success("Logout successfully");
|
|
18632
18634
|
authLogout();
|
|
@@ -41434,6 +41436,18 @@ function ProductList({
|
|
|
41434
41436
|
] });
|
|
41435
41437
|
}
|
|
41436
41438
|
},
|
|
41439
|
+
{
|
|
41440
|
+
accessorKey: "wholeSale",
|
|
41441
|
+
header: "Wholesale",
|
|
41442
|
+
cell: ({ row }) => {
|
|
41443
|
+
const product = row.original;
|
|
41444
|
+
const val = product?.wholeSale ?? product?.wholesalePrice;
|
|
41445
|
+
return /* @__PURE__ */ jsxs201("span", { children: [
|
|
41446
|
+
" ",
|
|
41447
|
+
val !== void 0 && val !== null ? val.toLocaleString() : "-"
|
|
41448
|
+
] });
|
|
41449
|
+
}
|
|
41450
|
+
},
|
|
41437
41451
|
{
|
|
41438
41452
|
accessorKey: "actions",
|
|
41439
41453
|
header: "Actions",
|
|
@@ -41514,6 +41528,7 @@ var createProductSchema2 = z38.object({
|
|
|
41514
41528
|
code: z38.string().min(1, "Code is required").trim().toLowerCase(),
|
|
41515
41529
|
desc: z38.string().min(1, "Description is required").trim(),
|
|
41516
41530
|
cost: z38.coerce.number().min(0.01, "Cost must be greater than 0"),
|
|
41531
|
+
wholeSale: z38.coerce.number().min(0, "Wholesale price must be positive").optional().nullable(),
|
|
41517
41532
|
name: z38.string().min(1, "Name is required").trim().toLowerCase(),
|
|
41518
41533
|
description: z38.string().trim().toLowerCase().optional(),
|
|
41519
41534
|
price: z38.coerce.number().min(0, "Price must be positive"),
|
|
@@ -41568,6 +41583,7 @@ function ProductForm2({
|
|
|
41568
41583
|
code: "",
|
|
41569
41584
|
desc: "",
|
|
41570
41585
|
cost: 0,
|
|
41586
|
+
wholeSale: null,
|
|
41571
41587
|
name: "",
|
|
41572
41588
|
description: "",
|
|
41573
41589
|
price: 0,
|
|
@@ -41646,6 +41662,7 @@ function ProductForm2({
|
|
|
41646
41662
|
});
|
|
41647
41663
|
const body = {
|
|
41648
41664
|
...data,
|
|
41665
|
+
wholesalePrice: data.wholeSale,
|
|
41649
41666
|
sizes: mappedSizes,
|
|
41650
41667
|
gallery,
|
|
41651
41668
|
files,
|
|
@@ -41658,6 +41675,7 @@ function ProductForm2({
|
|
|
41658
41675
|
v: v || 3,
|
|
41659
41676
|
body: {
|
|
41660
41677
|
...data,
|
|
41678
|
+
wholesalePrice: data.wholeSale,
|
|
41661
41679
|
sizes: mappedSizes
|
|
41662
41680
|
}
|
|
41663
41681
|
});
|
|
@@ -41684,6 +41702,7 @@ function ProductForm2({
|
|
|
41684
41702
|
const mappedSizes = res.sizes?.map((size) => ({ value: size })) || [];
|
|
41685
41703
|
methods.reset({
|
|
41686
41704
|
...res,
|
|
41705
|
+
wholeSale: res.wholeSale ?? res.wholesalePrice ?? null,
|
|
41687
41706
|
sizes: mappedSizes
|
|
41688
41707
|
});
|
|
41689
41708
|
if (res.image) {
|
|
@@ -41762,6 +41781,16 @@ function ProductForm2({
|
|
|
41762
41781
|
placeholder: "0.00",
|
|
41763
41782
|
required: true
|
|
41764
41783
|
}
|
|
41784
|
+
),
|
|
41785
|
+
/* @__PURE__ */ jsx233(
|
|
41786
|
+
Fields_default.Input,
|
|
41787
|
+
{
|
|
41788
|
+
label: "Wholesale Price",
|
|
41789
|
+
form: methods,
|
|
41790
|
+
name: "wholeSale",
|
|
41791
|
+
type: "number",
|
|
41792
|
+
placeholder: "0.00"
|
|
41793
|
+
}
|
|
41765
41794
|
)
|
|
41766
41795
|
] })
|
|
41767
41796
|
] }),
|