@appcorp/stellar-solutions-invoice-module 0.1.38 → 0.1.39

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.
@@ -199,7 +199,7 @@ var useInvoiceState = function () {
199
199
  return (__assign(__assign({}, item), { rowTotal: Number(item.quantity) * Number(item.price) }));
200
200
  });
201
201
  var updatedProducts = __spreadArray([], data.products, true).map(function (item) { return (__assign(__assign({}, item), { price: item.product.salePrice, id: item.productId, quantity: item.quantity, rowTotal: parseFloat(item.product.salePrice) * parseInt(item.quantity) })); });
202
- var updatedData = __assign(__assign({}, data), { mode: 'Edit', companyId: data.company.id, services: __spreadArray([], updatedServices, true).filter(function (item) { return item.name; }), products: __spreadArray([], updatedProducts, true).filter(function (item) { return item.productId; }) });
202
+ var updatedData = __assign(__assign({}, data), { mode: 'Edit', companyId: data.company.id, services: __spreadArray([], updatedServices, true).filter(function (item) { return item.name; }), products: __spreadArray([], updatedProducts, true).filter(function (item) { return item.id; }) });
203
203
  if ((_b = updatedData === null || updatedData === void 0 ? void 0 : updatedData.company) === null || _b === void 0 ? void 0 : _b.name) {
204
204
  dispatch({
205
205
  type: actions_1.INVOICE_ACTION_TYPES.SET_FORM_TO_RENDER,
@@ -107,7 +107,7 @@ function invoiceReducer(state, action) {
107
107
  case actions_1.INVOICE_ACTION_TYPES.CLEAR_ERRORS:
108
108
  return __assign(__assign({}, state), { errors: {} });
109
109
  case actions_1.INVOICE_ACTION_TYPES.RESET_FORM:
110
- return __assign(__assign({}, state), { disableSaveButton: false, errors: {} });
110
+ return __assign(__assign({}, state), exports.initialInvoiceState);
111
111
  case actions_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON:
112
112
  return __assign(__assign({}, state), { disableSaveButton: action.payload.disableSaveButton });
113
113
  case actions_1.INVOICE_ACTION_TYPES.SET_CURRENT_PAGE:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/stellar-solutions-invoice-module",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
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",