@appcorp/stellar-solutions-invoice-module 0.1.41 → 0.1.42
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.
|
@@ -312,6 +312,7 @@ exports.staticPricingSection = (_c = {},
|
|
|
312
312
|
],
|
|
313
313
|
_c[form_schema_1.VISTA_FORM_ELEMENTS.RADIO_V1] = [
|
|
314
314
|
{
|
|
315
|
+
id: 'discount',
|
|
315
316
|
description: 'Discount can either be applied as a fixed value or percentage value, select below to confirm.',
|
|
316
317
|
enabled: true,
|
|
317
318
|
handleOnChange: function () { return void 0; },
|
|
@@ -143,13 +143,13 @@ var useInvoiceState = function () {
|
|
|
143
143
|
currency: state.currency,
|
|
144
144
|
customerId: state.customerId,
|
|
145
145
|
date: state.date,
|
|
146
|
-
discount: state.discount,
|
|
146
|
+
discount: state.discount.trim(),
|
|
147
147
|
discountUnit: state.discountUnit,
|
|
148
148
|
expiryDate: state.expiryDate,
|
|
149
149
|
id: state.id,
|
|
150
150
|
invoiceStatus: state.invoiceStatus,
|
|
151
151
|
mode: state.mode,
|
|
152
|
-
note: state.note,
|
|
152
|
+
note: state.note.trim(),
|
|
153
153
|
products: state.products,
|
|
154
154
|
quoteStatus: state.quoteStatus,
|
|
155
155
|
ref: state.ref,
|
|
@@ -364,7 +364,7 @@ var useInvoiceState = function () {
|
|
|
364
364
|
validationResult = validate_1.formValidation === null || validate_1.formValidation === void 0 ? void 0 : validate_1.formValidation.safeParse(__assign(__assign({}, updatedParams), { products: updatedParams.products.filter(function (item) { return item.id; }), services: updatedParams.services.filter(function (item) { return item.name; }) }));
|
|
365
365
|
if (validationResult === null || validationResult === void 0 ? void 0 : validationResult.error) {
|
|
366
366
|
validationErrors_1 = {};
|
|
367
|
-
validationResult === null || validationResult === void 0 ? void 0 : validationResult.error.
|
|
367
|
+
validationResult === null || validationResult === void 0 ? void 0 : validationResult.error.issues.forEach(function (err) {
|
|
368
368
|
validationErrors_1[err.path[0]] = err.message;
|
|
369
369
|
});
|
|
370
370
|
dispatch({
|
|
@@ -405,7 +405,7 @@ var useInvoiceState = function () {
|
|
|
405
405
|
}
|
|
406
406
|
dispatch({
|
|
407
407
|
type: actions_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
|
|
408
|
-
payload: { key: key, value: String(value)
|
|
408
|
+
payload: { key: key, value: String(value) },
|
|
409
409
|
});
|
|
410
410
|
dispatch({
|
|
411
411
|
type: actions_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
|
|
@@ -15,70 +15,10 @@ export declare const formValidation: z.ZodObject<{
|
|
|
15
15
|
quantity: z.ZodOptional<z.ZodString>;
|
|
16
16
|
price: z.ZodOptional<z.ZodString>;
|
|
17
17
|
total: z.ZodOptional<z.ZodString>;
|
|
18
|
-
},
|
|
19
|
-
price?: string | undefined;
|
|
20
|
-
quantity?: string | undefined;
|
|
21
|
-
name?: string | undefined;
|
|
22
|
-
description?: string | undefined;
|
|
23
|
-
total?: string | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
price?: string | undefined;
|
|
26
|
-
quantity?: string | undefined;
|
|
27
|
-
name?: string | undefined;
|
|
28
|
-
description?: string | undefined;
|
|
29
|
-
total?: string | undefined;
|
|
30
|
-
}>, "many">;
|
|
18
|
+
}, z.core.$strip>>;
|
|
31
19
|
products: z.ZodArray<z.ZodObject<{
|
|
32
20
|
productId: z.ZodOptional<z.ZodString>;
|
|
33
21
|
quantity: z.ZodOptional<z.ZodString>;
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, {
|
|
38
|
-
quantity?: string | undefined;
|
|
39
|
-
productId?: string | undefined;
|
|
40
|
-
}>, "many">;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
currency: string;
|
|
43
|
-
date: string;
|
|
44
|
-
expiryDate: string;
|
|
45
|
-
products: {
|
|
46
|
-
quantity?: string | undefined;
|
|
47
|
-
productId?: string | undefined;
|
|
48
|
-
}[];
|
|
49
|
-
ref: string;
|
|
50
|
-
services: {
|
|
51
|
-
price?: string | undefined;
|
|
52
|
-
quantity?: string | undefined;
|
|
53
|
-
name?: string | undefined;
|
|
54
|
-
description?: string | undefined;
|
|
55
|
-
total?: string | undefined;
|
|
56
|
-
}[];
|
|
57
|
-
subTotal: string;
|
|
58
|
-
taxRate: string;
|
|
59
|
-
total: string;
|
|
60
|
-
companyId?: string | undefined;
|
|
61
|
-
note?: string | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
currency: string;
|
|
64
|
-
date: string;
|
|
65
|
-
expiryDate: string;
|
|
66
|
-
products: {
|
|
67
|
-
quantity?: string | undefined;
|
|
68
|
-
productId?: string | undefined;
|
|
69
|
-
}[];
|
|
70
|
-
ref: string;
|
|
71
|
-
services: {
|
|
72
|
-
price?: string | undefined;
|
|
73
|
-
quantity?: string | undefined;
|
|
74
|
-
name?: string | undefined;
|
|
75
|
-
description?: string | undefined;
|
|
76
|
-
total?: string | undefined;
|
|
77
|
-
}[];
|
|
78
|
-
subTotal: string;
|
|
79
|
-
taxRate: string;
|
|
80
|
-
total: string;
|
|
81
|
-
companyId?: string | undefined;
|
|
82
|
-
note?: string | undefined;
|
|
83
|
-
}>;
|
|
84
|
-
export type InvoiceFormValidate = z.infer<typeof formValidation>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type FormValidate = z.infer<typeof formValidation>;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appcorp/stellar-solutions-invoice-module",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
|
|
5
|
+
"build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib && cp yarn.lock lib",
|
|
6
6
|
"build:next": "next build",
|
|
7
7
|
"build:ts": "tsc --project tsconfig.build.json",
|
|
8
8
|
"clean": "yarn rimraf ./lib",
|
|
@@ -16,16 +16,15 @@
|
|
|
16
16
|
"start": "next start",
|
|
17
17
|
"upgrade": "ncu -u"
|
|
18
18
|
},
|
|
19
|
-
"dependencies": {},
|
|
20
19
|
"devDependencies": {
|
|
21
|
-
"@appcorp/app-corp-vista": "^0.2.
|
|
22
|
-
"@appcorp/stellar-solutions-company-module": "^0.1.
|
|
23
|
-
"@appcorp/stellar-solutions-modules": "^0.1.
|
|
24
|
-
"@appcorp/stellar-solutions-product-module": "^0.1.
|
|
20
|
+
"@appcorp/app-corp-vista": "^0.2.71",
|
|
21
|
+
"@appcorp/stellar-solutions-company-module": "^0.1.21",
|
|
22
|
+
"@appcorp/stellar-solutions-modules": "^0.1.17",
|
|
23
|
+
"@appcorp/stellar-solutions-product-module": "^0.1.89",
|
|
25
24
|
"@eslint/eslintrc": "^3",
|
|
26
25
|
"@headlessui/react": "^2",
|
|
27
26
|
"@heroicons/react": "^2",
|
|
28
|
-
"@react-pakistan/util-functions": "^1.24.
|
|
27
|
+
"@react-pakistan/util-functions": "^1.24.26",
|
|
29
28
|
"@supabase/supabase-js": "^2",
|
|
30
29
|
"@tailwindcss/forms": "^0.5.10",
|
|
31
30
|
"@tailwindcss/postcss": "^4",
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
"date-fns": "^4.1.0",
|
|
37
36
|
"dayjs": "^1.11.13",
|
|
38
37
|
"eslint": "^9",
|
|
39
|
-
"eslint-config-next": "15",
|
|
38
|
+
"eslint-config-next": "^15",
|
|
40
39
|
"husky": "^9",
|
|
41
40
|
"next": "^15",
|
|
42
41
|
"next-intl": "^4",
|
|
@@ -53,6 +52,7 @@
|
|
|
53
52
|
"typescript": "^5",
|
|
54
53
|
"uuid": "^11",
|
|
55
54
|
"webp-converter-browser": "^1",
|
|
56
|
-
"zod": "^
|
|
57
|
-
}
|
|
55
|
+
"zod": "^4"
|
|
56
|
+
},
|
|
57
|
+
"packageManager": "yarn@4.9.2"
|
|
58
58
|
}
|