@appcorp/stellar-solutions-invoice-module 0.1.11 → 0.1.12

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.
@@ -99,7 +99,6 @@ var actions_1 = require("./actions");
99
99
  var constants_1 = require("./constants");
100
100
  var reducer_1 = require("./reducer");
101
101
  var types_1 = require("./types");
102
- var validate_1 = require("./validate");
103
102
  var generate_toast_1 = require("@appcorp/app-corp-vista/utils/generate-toast");
104
103
  var calculate_subtotal_1 = require("./calculate-subtotal");
105
104
  var context_1 = require("@appcorp/stellar-solutions-product-module/base-modules/product/context");
@@ -349,29 +348,31 @@ var useInvoiceState = function () {
349
348
  // return urls;
350
349
  // }, [state.images]);
351
350
  var handleSubmit = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
352
- var validationResult, validationErrors_1;
353
351
  return __generator(this, function (_a) {
354
352
  dispatch({
355
353
  type: actions_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
356
354
  payload: { disableSaveButton: true },
357
355
  });
358
356
  try {
359
- validationResult = validate_1.formValidation === null || validate_1.formValidation === void 0 ? void 0 : validate_1.formValidation.safeParse(__assign({}));
360
- if (validationResult === null || validationResult === void 0 ? void 0 : validationResult.error) {
361
- validationErrors_1 = {};
362
- validationResult === null || validationResult === void 0 ? void 0 : validationResult.error.errors.forEach(function (err) {
363
- validationErrors_1[err.path[0]] = err.message;
364
- });
365
- dispatch({
366
- type: actions_1.INVOICE_ACTION_TYPES.SET_ERRORS,
367
- payload: validationErrors_1,
368
- });
369
- }
370
- if (validationResult === null || validationResult === void 0 ? void 0 : validationResult.success) {
371
- updateFetchNow(undefined, {
372
- body: JSON.stringify(__assign({})),
373
- });
374
- }
357
+ // const validationResult =
358
+ // formValidation?.safeParse({
359
+ // ...updatedParams,
360
+ // });
361
+ // if (validationResult?.error) {
362
+ // const validationErrors: Record<string, string> = {};
363
+ // validationResult?.error.errors.forEach((err) => {
364
+ // validationErrors[err.path[0]] = err.message;
365
+ // });
366
+ // dispatch({
367
+ // type: INVOICE_ACTION_TYPES.SET_ERRORS,
368
+ // payload: validationErrors,
369
+ // });
370
+ // }
371
+ // if (validationResult?.success) {
372
+ updateFetchNow(undefined, {
373
+ body: JSON.stringify(__assign({}, updatedParams)),
374
+ });
375
+ // }
375
376
  }
376
377
  catch (_b) {
377
378
  (0, generate_toast_1.generateToast)({
@@ -387,7 +388,7 @@ var useInvoiceState = function () {
387
388
  });
388
389
  return [2 /*return*/];
389
390
  });
390
- }); }, [updateFetchNow]);
391
+ }); }, [updateFetchNow, updatedParams]);
391
392
  var handleChange = (0, react_1.useCallback)(function (key, value) {
392
393
  if (key === 'taxValue') {
393
394
  dispatch({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/stellar-solutions-invoice-module",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
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",