@ibiz-template/runtime 0.7.41-alpha.121 → 0.7.41-alpha.123

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.
package/dist/index.esm.js CHANGED
@@ -26117,7 +26117,8 @@ async function importData(file, appDataEntity, dataImport, context, params) {
26117
26117
  url = resPath + url;
26118
26118
  }
26119
26119
  const result = {
26120
- isAsync: false
26120
+ isAsync: false,
26121
+ showTitle: true
26121
26122
  };
26122
26123
  try {
26123
26124
  const app = ibiz.hub.getApp(context == null ? void 0 : context.srfappid);
@@ -26132,10 +26133,22 @@ async function importData(file, appDataEntity, dataImport, context, params) {
26132
26133
  "OBJECTCREATED",
26133
26134
  "DATAIMPORT"
26134
26135
  );
26135
- Object.assign(result, res.data);
26136
+ if (res.ok && res.data) {
26137
+ Object.assign(result, res.data);
26138
+ if (res.data.errormessage || res.data.message) {
26139
+ result.showTitle = false;
26140
+ }
26141
+ if (res.data && res.data.errorinfo && !res.data.message && !res.data.errormessage) {
26142
+ const errorInfos = Object.values(res.data.errorinfo);
26143
+ if (errorInfos.length > 0) {
26144
+ result.errormessage = errorInfos.map((item) => item.errorInfo).join("\r\n");
26145
+ }
26146
+ }
26147
+ }
26136
26148
  } catch (error) {
26137
26149
  if (error instanceof Error) {
26138
- result.errorMessage = error.message;
26150
+ result.errormessage = error.message;
26151
+ result.showTitle = false;
26139
26152
  }
26140
26153
  }
26141
26154
  return result;