warqadui 0.0.295 → 0.0.296

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 CHANGED
@@ -20172,7 +20172,7 @@ function Products({ v, url }) {
20172
20172
  const columns = [
20173
20173
  {
20174
20174
  id: "name",
20175
- accessorFn: (row) => row.name || `${row.code || ""} ${row.desc || ""}`,
20175
+ accessorFn: (row) => row.name || "N/A",
20176
20176
  header: "Name",
20177
20177
  cell: ({ row }) => {
20178
20178
  const product = row.original;
@@ -41191,7 +41191,7 @@ function ProductList({
41191
41191
  const columns = [
41192
41192
  {
41193
41193
  id: "name",
41194
- accessorFn: (row) => row.name || `${row.code || ""} ${row.desc || ""}`,
41194
+ accessorFn: (row) => row.name || "N/A",
41195
41195
  header: "Name",
41196
41196
  cell: ({ row }) => {
41197
41197
  const product = row.original;
@@ -41290,7 +41290,7 @@ function ProductList({
41290
41290
  isLoading,
41291
41291
  onClose: () => setDeleteProduct(null),
41292
41292
  title: `Delete Product`,
41293
- description: `Are you sure you want to delete "${deleteProduct?.name || `${deleteProduct?.code} ${deleteProduct?.desc}`}"? This action cannot be undone. and Please type "delete" to confirm.`,
41293
+ description: `Are you sure you want to delete "${deleteProduct?.name || "this product"}"? This action cannot be undone. and Please type "delete" to confirm.`,
41294
41294
  confirmationWord: "delete",
41295
41295
  onSubmit: () => onDelete(deleteProduct?._id),
41296
41296
  children: null
@@ -41326,8 +41326,6 @@ var import_lucide_react113 = require("lucide-react");
41326
41326
  // src/dgl/products/schema.ts
41327
41327
  var import_zod95 = require("zod");
41328
41328
  var createProductSchema2 = import_zod95.z.object({
41329
- code: import_zod95.z.string().min(1, "Code is required").trim().toLowerCase(),
41330
- desc: import_zod95.z.string().min(1, "Description is required").trim(),
41331
41329
  cost: import_zod95.z.coerce.number().min(0.01, "Cost must be greater than 0"),
41332
41330
  wholeSale: import_zod95.z.coerce.number().min(0, "Wholesale price must be positive").optional().nullable(),
41333
41331
  name: import_zod95.z.string().min(1, "Name is required").trim().toLowerCase(),
@@ -41381,8 +41379,6 @@ function ProductForm2({
41381
41379
  const methods = (0, import_react_hook_form58.useForm)({
41382
41380
  resolver: (0, import_zod96.zodResolver)(createProductSchema2),
41383
41381
  defaultValues: {
41384
- code: "",
41385
- desc: "",
41386
41382
  cost: 0,
41387
41383
  wholeSale: null,
41388
41384
  name: "",
@@ -41550,28 +41546,6 @@ function ProductForm2({
41550
41546
  /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)("div", { className: "space-y-4", children: [
41551
41547
  /* @__PURE__ */ (0, import_jsx_runtime233.jsx)("h3", { className: "text-base font-semibold text-gray-800 dark:text-zinc-200 border-b border-gray-150 dark:border-zinc-800 pb-2", children: "Basic Information" }),
41552
41548
  /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
41553
- /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
41554
- Fields_default.Input,
41555
- {
41556
- label: "Code",
41557
- form: methods,
41558
- name: "code",
41559
- type: "text",
41560
- placeholder: "Enter product code",
41561
- required: true
41562
- }
41563
- ),
41564
- /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
41565
- Fields_default.Input,
41566
- {
41567
- label: "Description (Short)",
41568
- form: methods,
41569
- name: "desc",
41570
- type: "text",
41571
- placeholder: "Enter short description",
41572
- required: true
41573
- }
41574
- ),
41575
41549
  /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
41576
41550
  Fields_default.Input,
41577
41551
  {
@@ -41707,10 +41681,10 @@ function ProductForm2({
41707
41681
  /* @__PURE__ */ (0, import_jsx_runtime233.jsx)("div", { className: "py-2", children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
41708
41682
  Fields_default.Textarea,
41709
41683
  {
41710
- label: "Description (Long)",
41684
+ label: "Description",
41711
41685
  form: methods,
41712
41686
  name: "description",
41713
- placeholder: "Enter long description",
41687
+ placeholder: "Enter description",
41714
41688
  rows: 3
41715
41689
  }
41716
41690
  ) })
package/dist/index.mjs CHANGED
@@ -20258,7 +20258,7 @@ function Products({ v, url }) {
20258
20258
  const columns = [
20259
20259
  {
20260
20260
  id: "name",
20261
- accessorFn: (row) => row.name || `${row.code || ""} ${row.desc || ""}`,
20261
+ accessorFn: (row) => row.name || "N/A",
20262
20262
  header: "Name",
20263
20263
  cell: ({ row }) => {
20264
20264
  const product = row.original;
@@ -41387,7 +41387,7 @@ function ProductList({
41387
41387
  const columns = [
41388
41388
  {
41389
41389
  id: "name",
41390
- accessorFn: (row) => row.name || `${row.code || ""} ${row.desc || ""}`,
41390
+ accessorFn: (row) => row.name || "N/A",
41391
41391
  header: "Name",
41392
41392
  cell: ({ row }) => {
41393
41393
  const product = row.original;
@@ -41486,7 +41486,7 @@ function ProductList({
41486
41486
  isLoading,
41487
41487
  onClose: () => setDeleteProduct(null),
41488
41488
  title: `Delete Product`,
41489
- description: `Are you sure you want to delete "${deleteProduct?.name || `${deleteProduct?.code} ${deleteProduct?.desc}`}"? This action cannot be undone. and Please type "delete" to confirm.`,
41489
+ description: `Are you sure you want to delete "${deleteProduct?.name || "this product"}"? This action cannot be undone. and Please type "delete" to confirm.`,
41490
41490
  confirmationWord: "delete",
41491
41491
  onSubmit: () => onDelete(deleteProduct?._id),
41492
41492
  children: null
@@ -41522,8 +41522,6 @@ import { UploadCloud as UploadCloud3, X as X9 } from "lucide-react";
41522
41522
  // src/dgl/products/schema.ts
41523
41523
  import { z as z38 } from "zod";
41524
41524
  var createProductSchema2 = z38.object({
41525
- code: z38.string().min(1, "Code is required").trim().toLowerCase(),
41526
- desc: z38.string().min(1, "Description is required").trim(),
41527
41525
  cost: z38.coerce.number().min(0.01, "Cost must be greater than 0"),
41528
41526
  wholeSale: z38.coerce.number().min(0, "Wholesale price must be positive").optional().nullable(),
41529
41527
  name: z38.string().min(1, "Name is required").trim().toLowerCase(),
@@ -41577,8 +41575,6 @@ function ProductForm2({
41577
41575
  const methods = useForm45({
41578
41576
  resolver: zodResolver44(createProductSchema2),
41579
41577
  defaultValues: {
41580
- code: "",
41581
- desc: "",
41582
41578
  cost: 0,
41583
41579
  wholeSale: null,
41584
41580
  name: "",
@@ -41746,28 +41742,6 @@ function ProductForm2({
41746
41742
  /* @__PURE__ */ jsxs202("div", { className: "space-y-4", children: [
41747
41743
  /* @__PURE__ */ jsx233("h3", { className: "text-base font-semibold text-gray-800 dark:text-zinc-200 border-b border-gray-150 dark:border-zinc-800 pb-2", children: "Basic Information" }),
41748
41744
  /* @__PURE__ */ jsxs202("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
41749
- /* @__PURE__ */ jsx233(
41750
- Fields_default.Input,
41751
- {
41752
- label: "Code",
41753
- form: methods,
41754
- name: "code",
41755
- type: "text",
41756
- placeholder: "Enter product code",
41757
- required: true
41758
- }
41759
- ),
41760
- /* @__PURE__ */ jsx233(
41761
- Fields_default.Input,
41762
- {
41763
- label: "Description (Short)",
41764
- form: methods,
41765
- name: "desc",
41766
- type: "text",
41767
- placeholder: "Enter short description",
41768
- required: true
41769
- }
41770
- ),
41771
41745
  /* @__PURE__ */ jsx233(
41772
41746
  Fields_default.Input,
41773
41747
  {
@@ -41903,10 +41877,10 @@ function ProductForm2({
41903
41877
  /* @__PURE__ */ jsx233("div", { className: "py-2", children: /* @__PURE__ */ jsx233(
41904
41878
  Fields_default.Textarea,
41905
41879
  {
41906
- label: "Description (Long)",
41880
+ label: "Description",
41907
41881
  form: methods,
41908
41882
  name: "description",
41909
- placeholder: "Enter long description",
41883
+ placeholder: "Enter description",
41910
41884
  rows: 3
41911
41885
  }
41912
41886
  ) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warqadui",
3
- "version": "0.0.295",
3
+ "version": "0.0.296",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",