@appcorp/stellar-solutions-invoice-module 0.1.31 → 0.1.32

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 updatedData = __assign(__assign({}, data), { mode: 'Edit', companyId: data.company.id, services: __spreadArray([], updatedServices, true) });
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
  };
@@ -94,7 +94,7 @@ exports.initialInvoiceState = {
94
94
  mode: 'Create',
95
95
  price: '',
96
96
  productId: '',
97
- quantity: 1,
97
+ quantity: '1',
98
98
  rowTotal: '',
99
99
  },
100
100
  ],
@@ -45,7 +45,7 @@ export interface InvoiceContextType {
45
45
  }
46
46
  export interface Product {
47
47
  productId: string;
48
- quantity: number;
48
+ quantity: string;
49
49
  price: string;
50
50
  mode: 'Create' | 'Edit' | '';
51
51
  rowTotal: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/stellar-solutions-invoice-module",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
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.21",
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",