reworked MergeMixin to handle non-trees

This commit is contained in:
smilerz
2021-09-06 10:20:43 -05:00
parent f12558951a
commit 7053a857c2
13 changed files with 230 additions and 43 deletions

View File

@ -136,7 +136,31 @@ export class Models {
}
},
}
static UNIT = {}
static UNIT = {
'name': i18n.t('Unit'), // *OPTIONAL: parameters will be built model -> model_type -> default
'apiName': 'Unit',
'create': {
// if not defined partialUpdate will use the same parameters, prepending 'id'
'params': [['name', 'description']],
'form': {
'name': {
'form_field': true,
'type': 'text',
'field': 'name',
'label': i18n.t('Name'),
'placeholder': ''
},
'description': {
'form_field': true,
'type': 'text',
'field': 'description',
'label': i18n.t('Description'),
'placeholder': ''
}
}
},
'move': false
}
static RECIPE = {}
static SHOPPING_LIST = {}
static RECIPE_BOOK = {