edit SupermarketCategoryRelations

This commit is contained in:
smilerz
2021-09-14 13:01:51 -05:00
parent b7fe3e38e6
commit 508284c046
17 changed files with 159608 additions and 211 deletions

View File

@ -229,8 +229,8 @@ export class Models {
},
}
static SHOPPING_CATEGORY_RELATION = {
'name': i18n.t('Shopping_Category'),
'apiName': 'SupermarketCategory',
'name': i18n.t('Shopping_Category_Relation'),
'apiName': 'SupermarketCategoryRelation',
'create': {
'params': [['category', 'supermarket', 'order']],
'form': {
@ -272,6 +272,19 @@ export class Models {
'label': i18n.t('Description'),
'placeholder': ''
},
'categories': {
'form_field': true,
'type': 'lookup',
'list': 'SHOPPING_CATEGORY',
'list_label': 'category::name',
'ordered': true, // ordered lookups assume working with relation field
'field': 'category_to_supermarket',
'label': i18n.t('Categories'),
'placeholder': ''
},
},
'config': {
'category_to_supermarket': {'function': 'handleSuperMarketCategory'}
}
},
}