mobiletto-orm-typedef-gen 2.3.31 → 2.3.33

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.
@@ -338,7 +338,7 @@
338
338
  deepUpdate(addObject.value, update.field, update.value);
339
339
  };
340
340
  const onAddSubmitted = async (obj: MobilettoOrmObject) => {
341
- addObject.value = await {{name}}Store
341
+ await {{name}}Store
342
342
  .create(obj as {{Name}}Type, create{{Name}}ServerErrors);
343
343
  addingObject.value = false;
344
344
  successSnackbar.value = parseMessage(props.msgAddSuccess, messages.value, {
@@ -347,6 +347,7 @@
347
347
  });
348
348
  emit("added", obj);{{#if typeDef.singleton}}
349
349
  return await {{name}}Store.lookup(findSingleton{{Name}}ServerErrors);{{else}}
350
+ addObject.value = {} as {{Name}}Type;
350
351
  return await {{name}}Store.search();{{/if}}
351
352
  }
352
353
  watch(create{{Name}}ServerErrors, () => {
@@ -402,6 +403,7 @@
402
403
  if (obj) {
403
404
  const id = {{Name}}TypeDef.id(obj);
404
405
  if (id && id.length > 0) {
406
+ addingObject.value = false; // ensure add form is closed
405
407
  editingObject.value = JSON.parse(JSON.stringify(obj)) as {{Name}}Type;
406
408
  }
407
409
  }
@@ -338,7 +338,7 @@
338
338
  deepUpdate(addObject.value, update.field, update.value);
339
339
  };
340
340
  const onAddSubmitted = async (obj: MobilettoOrmObject) => {
341
- addObject.value = await {{name}}Store
341
+ await {{name}}Store
342
342
  .create(obj as {{Name}}Type, create{{Name}}ServerErrors);
343
343
  addingObject.value = false;
344
344
  successSnackbar.value = parseMessage(props.msgAddSuccess, messages.value, {
@@ -347,6 +347,7 @@
347
347
  });
348
348
  emit("added", obj);{{#if typeDef.singleton}}
349
349
  return await {{name}}Store.lookup(findSingleton{{Name}}ServerErrors);{{else}}
350
+ addObject.value = {} as {{Name}}Type;
350
351
  return await {{name}}Store.search();{{/if}}
351
352
  }
352
353
  watch(create{{Name}}ServerErrors, () => {
@@ -402,6 +403,7 @@
402
403
  if (obj) {
403
404
  const id = {{Name}}TypeDef.id(obj);
404
405
  if (id && id.length > 0) {
406
+ addingObject.value = false; // ensure add form is closed
405
407
  editingObject.value = JSON.parse(JSON.stringify(obj)) as {{Name}}Type;
406
408
  }
407
409
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto-orm-typedef-gen",
3
- "version": "2.3.31",
3
+ "version": "2.3.33",
4
4
  "type": "module",
5
5
  "description": "generate various files based on mobiletto-orm-typedef definitions",
6
6
  "keywords": [