mobiletto-orm-typedef-gen 2.3.27 → 2.3.29

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.
@@ -350,21 +350,14 @@
350
350
  return await {{name}}Store.search();{{/if}}
351
351
  }
352
352
  watch(create{{Name}}ServerErrors, () => {
353
- if (Object.keys(create{{Name}}ServerErrors).length > 0) {
353
+ if (create{{Name}}ServerErrors.value && Object.keys(create{{Name}}ServerErrors.value).length > 0) {
354
354
  errorSnackbar.value = parseMessage(props.msgAddError, messages.value, {
355
355
  type: messages.value.typename_{{typeDef.typeName}},
356
356
  error: JSON.stringify(create{{Name}}ServerErrors),
357
357
  });
358
358
  }
359
- });{{#if typeDef.singleton}}
360
- watch(findSingleton{{Name}}ServerErrors, () => {
361
- if (Object.keys(findSingleton{{Name}}ServerErrors).length > 0) {
362
- errorSnackbar.value = parseMessage(props.msgFindSingletonError, messages.value, {
363
- type: messages.value.typename_{{typeDef.typeName}},
364
- error: JSON.stringify(findSingleton{{Name}}ServerErrors),
365
- });
366
- }
367
- });{{/if}}
359
+ });
360
+
368
361
  const showAddOrm = () => {
369
362
  addingObject.value = true;
370
363
  };
@@ -392,10 +385,10 @@
392
385
  return await {{name}}Store.search();{{/if}}
393
386
  };
394
387
  watch(edit{{Name}}ServerErrors, () => {
395
- if (Object.keys(edit{{Name}}ServerErrors).length > 0) {
388
+ if (edit{{Name}}ServerErrors.value && Object.keys(edit{{Name}}ServerErrors.value).length > 0) {
396
389
  errorSnackbar.value = parseMessage(props.msgEditError, messages.value, {
397
390
  type: messages.value.typename_{{typeDef.typeName}},
398
- id: {{Name}}TypeDef.id(obj),
391
+ id: {{Name}}TypeDef.id(editingObject.value),
399
392
  error: JSON.stringify(edit{{Name}}ServerErrors),
400
393
  });
401
394
  }
@@ -429,8 +422,13 @@
429
422
  showAddOrm();
430
423
  }
431
424
  });
432
- watch(findSingleton{{Name}}ServerErrors, (newErrors) => {
433
- console.log(`findSingleton errors: ${JSON.stringify(newErrors)}`);
425
+ watch(findSingleton{{Name}}ServerErrors, () => {
426
+ if (findSingleton{{Name}}ServerErrors.value && Object.keys(findSingleton{{Name}}ServerErrors.value).length > 0) {
427
+ errorSnackbar.value = parseMessage(props.msgFindSingletonError, messages.value, {
428
+ type: messages.value.typename_{{typeDef.typeName}},
429
+ error: JSON.stringify(findSingleton{{Name}}ServerErrors),
430
+ });
431
+ }
434
432
  });{{else}}
435
433
  const actionConfig = (action: string) => {
436
434
  return props.actionConfigs[action];
@@ -459,7 +457,7 @@
459
457
  });
460
458
  };
461
459
  watch(delete{{Name}}ServerErrors, () => {
462
- if (Object.keys(delete{{Name}}ServerErrors).length > 0) {
460
+ if (delete{{Name}}ServerErrors.value && Object.keys(delete{{Name}}ServerErrors.value).length > 0) {
463
461
  errorSnackbar.value = parseMessage(props.msgDeleteError, messages.value, {
464
462
  type: messages.value.typename_{{typeDef.typeName}},
465
463
  id: {{Name}}TypeDef.id(obj),
@@ -350,21 +350,14 @@
350
350
  return await {{name}}Store.search();{{/if}}
351
351
  }
352
352
  watch(create{{Name}}ServerErrors, () => {
353
- if (Object.keys(create{{Name}}ServerErrors).length > 0) {
353
+ if (create{{Name}}ServerErrors.value && Object.keys(create{{Name}}ServerErrors.value).length > 0) {
354
354
  errorSnackbar.value = parseMessage(props.msgAddError, messages.value, {
355
355
  type: messages.value.typename_{{typeDef.typeName}},
356
356
  error: JSON.stringify(create{{Name}}ServerErrors),
357
357
  });
358
358
  }
359
- });{{#if typeDef.singleton}}
360
- watch(findSingleton{{Name}}ServerErrors, () => {
361
- if (Object.keys(findSingleton{{Name}}ServerErrors).length > 0) {
362
- errorSnackbar.value = parseMessage(props.msgFindSingletonError, messages.value, {
363
- type: messages.value.typename_{{typeDef.typeName}},
364
- error: JSON.stringify(findSingleton{{Name}}ServerErrors),
365
- });
366
- }
367
- });{{/if}}
359
+ });
360
+
368
361
  const showAddOrm = () => {
369
362
  addingObject.value = true;
370
363
  };
@@ -392,10 +385,10 @@
392
385
  return await {{name}}Store.search();{{/if}}
393
386
  };
394
387
  watch(edit{{Name}}ServerErrors, () => {
395
- if (Object.keys(edit{{Name}}ServerErrors).length > 0) {
388
+ if (edit{{Name}}ServerErrors.value && Object.keys(edit{{Name}}ServerErrors.value).length > 0) {
396
389
  errorSnackbar.value = parseMessage(props.msgEditError, messages.value, {
397
390
  type: messages.value.typename_{{typeDef.typeName}},
398
- id: {{Name}}TypeDef.id(obj),
391
+ id: {{Name}}TypeDef.id(editingObject.value),
399
392
  error: JSON.stringify(edit{{Name}}ServerErrors),
400
393
  });
401
394
  }
@@ -429,8 +422,13 @@
429
422
  showAddOrm();
430
423
  }
431
424
  });
432
- watch(findSingleton{{Name}}ServerErrors, (newErrors) => {
433
- console.log(`findSingleton errors: ${JSON.stringify(newErrors)}`);
425
+ watch(findSingleton{{Name}}ServerErrors, () => {
426
+ if (findSingleton{{Name}}ServerErrors.value && Object.keys(findSingleton{{Name}}ServerErrors.value).length > 0) {
427
+ errorSnackbar.value = parseMessage(props.msgFindSingletonError, messages.value, {
428
+ type: messages.value.typename_{{typeDef.typeName}},
429
+ error: JSON.stringify(findSingleton{{Name}}ServerErrors),
430
+ });
431
+ }
434
432
  });{{else}}
435
433
  const actionConfig = (action: string) => {
436
434
  return props.actionConfigs[action];
@@ -459,7 +457,7 @@
459
457
  });
460
458
  };
461
459
  watch(delete{{Name}}ServerErrors, () => {
462
- if (Object.keys(delete{{Name}}ServerErrors).length > 0) {
460
+ if (delete{{Name}}ServerErrors.value && Object.keys(delete{{Name}}ServerErrors.value).length > 0) {
463
461
  errorSnackbar.value = parseMessage(props.msgDeleteError, messages.value, {
464
462
  type: messages.value.typename_{{typeDef.typeName}},
465
463
  id: {{Name}}TypeDef.id(obj),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto-orm-typedef-gen",
3
- "version": "2.3.27",
3
+ "version": "2.3.29",
4
4
  "type": "module",
5
5
  "description": "generate various files based on mobiletto-orm-typedef definitions",
6
6
  "keywords": [