impaktapps-ui-builder 0.0.315 → 0.0.316

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.
@@ -7243,12 +7243,21 @@ var Component = (store2, dynamicData2) => {
7243
7243
  saveHandler: async function() {
7244
7244
  var _a;
7245
7245
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
7246
- saveFormdataInLocalStorage(store2.formData, path);
7247
- store2.navigate(-1);
7248
- store2.setNotify({
7249
- SuccessMessage: "Save Successfully",
7250
- Success: true
7251
- });
7246
+ console.log(store2.ctx.core.errors);
7247
+ if (_.isEmpty(store2.ctx.core.errors)) {
7248
+ saveFormdataInLocalStorage(store2.formData, path);
7249
+ store2.navigate(-1);
7250
+ store2.setNotify({
7251
+ SuccessMessage: "Save Successfully",
7252
+ Success: true
7253
+ });
7254
+ } else {
7255
+ store2.setValidation("ValidateAndShow");
7256
+ store2.setNotify({
7257
+ Fail: true,
7258
+ FailMessage: "Errors on Page"
7259
+ });
7260
+ }
7252
7261
  },
7253
7262
  onChange: function() {
7254
7263
  var _a, _b, _c, _d;