@appcorp/stellar-solutions-invoice-module 0.1.31 → 0.1.33
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.
|
@@ -198,7 +198,9 @@ var useInvoiceState = function () {
|
|
|
198
198
|
delete item.quoteInvoiceId;
|
|
199
199
|
return (__assign(__assign({}, item), { rowTotal: Number(item.quantity) * Number(item.price) }));
|
|
200
200
|
});
|
|
201
|
-
var
|
|
201
|
+
var updatedProducts = __spreadArray([], data.products, true).map(function (item) { return (__assign({}, item)); });
|
|
202
|
+
var updatedData = __assign(__assign({}, data), { mode: 'Edit', companyId: data.company.id, services: __spreadArray([], updatedServices, true), products: __spreadArray([], updatedProducts, true) });
|
|
203
|
+
console.log('_>>', updatedData);
|
|
202
204
|
if ((_b = updatedData === null || updatedData === void 0 ? void 0 : updatedData.company) === null || _b === void 0 ? void 0 : _b.name) {
|
|
203
205
|
dispatch({
|
|
204
206
|
type: actions_1.INVOICE_ACTION_TYPES.SET_FORM_TO_RENDER,
|
|
@@ -307,7 +309,7 @@ var useInvoiceState = function () {
|
|
|
307
309
|
var newItem = {
|
|
308
310
|
mode: 'Create',
|
|
309
311
|
productId: '',
|
|
310
|
-
quantity: 1,
|
|
312
|
+
quantity: '1',
|
|
311
313
|
price: '',
|
|
312
314
|
rowTotal: '',
|
|
313
315
|
};
|
|
@@ -30,13 +30,13 @@ export declare const formValidation: z.ZodObject<{
|
|
|
30
30
|
}>, "many">;
|
|
31
31
|
products: z.ZodArray<z.ZodObject<{
|
|
32
32
|
productId: z.ZodOptional<z.ZodString>;
|
|
33
|
-
quantity: z.ZodOptional<z.
|
|
33
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
35
|
productId?: string | undefined;
|
|
36
|
-
quantity?:
|
|
36
|
+
quantity?: string | undefined;
|
|
37
37
|
}, {
|
|
38
38
|
productId?: string | undefined;
|
|
39
|
-
quantity?:
|
|
39
|
+
quantity?: string | undefined;
|
|
40
40
|
}>, "many">;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
42
|
currency: string;
|
|
@@ -44,7 +44,7 @@ export declare const formValidation: z.ZodObject<{
|
|
|
44
44
|
expiryDate: string;
|
|
45
45
|
products: {
|
|
46
46
|
productId?: string | undefined;
|
|
47
|
-
quantity?:
|
|
47
|
+
quantity?: string | undefined;
|
|
48
48
|
}[];
|
|
49
49
|
ref: string;
|
|
50
50
|
services: {
|
|
@@ -65,7 +65,7 @@ export declare const formValidation: z.ZodObject<{
|
|
|
65
65
|
expiryDate: string;
|
|
66
66
|
products: {
|
|
67
67
|
productId?: string | undefined;
|
|
68
|
-
quantity?:
|
|
68
|
+
quantity?: string | undefined;
|
|
69
69
|
}[];
|
|
70
70
|
ref: string;
|
|
71
71
|
services: {
|
|
@@ -17,7 +17,7 @@ var services = zod_1.z.object({
|
|
|
17
17
|
var products = zod_1.z.object({
|
|
18
18
|
productId: zod_1.z.string().optional(),
|
|
19
19
|
// .nonempty(validationErrors.products.id),
|
|
20
|
-
quantity: zod_1.z.
|
|
20
|
+
quantity: zod_1.z.string().optional(),
|
|
21
21
|
// .min(
|
|
22
22
|
// 1,
|
|
23
23
|
// formErrors[DASHBOARD_DRAWERS_FORMS.INVOICE].products.productQuantity,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appcorp/stellar-solutions-invoice-module",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
|
|
6
6
|
"build:next": "next build",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@eslint/eslintrc": "^3",
|
|
27
27
|
"@headlessui/react": "^2.2.0",
|
|
28
28
|
"@heroicons/react": "^2.2.0",
|
|
29
|
-
"@react-pakistan/util-functions": "^1.24.
|
|
29
|
+
"@react-pakistan/util-functions": "^1.24.23",
|
|
30
30
|
"@supabase/supabase-js": "^2.50.0",
|
|
31
31
|
"@tailwindcss/forms": "^0.5.10",
|
|
32
32
|
"@tailwindcss/postcss": "^4",
|