improved importer merging behavior

This commit is contained in:
vabene1111
2023-05-04 15:29:06 +02:00
parent 33d048e623
commit 071926aada
9 changed files with 74 additions and 32 deletions

View File

@ -418,6 +418,7 @@ export class Models {
create: {
params: [["name", "description", "category_to_supermarket"]],
form: {
show_help: true,
name: {
form_field: true,
type: "text",
@ -442,6 +443,14 @@ export class Models {
label: "Categories", // form.label always translated in utils.getForm()
placeholder: "",
},
open_data_slug: {
form_field: true,
type: "text",
field: "open_data_slug",
disabled: true,
label: "Open_Data_Slug",
help_text: "open_data_help_text",
},
},
config: {
function: "SupermarketWithCategories",
@ -572,8 +581,9 @@ export class Models {
},
},
create: {
params: [['base_amount', 'base_unit', 'converted_amount', 'converted_unit', 'food']],
params: [['base_amount', 'base_unit', 'converted_amount', 'converted_unit', 'food', 'open_data_slug']],
form: {
show_help: true,
// TODO add proper help texts for everything
base_amount: {
form_field: true,
@ -616,6 +626,14 @@ export class Models {
label: "Food",
multiple: false,
},
open_data_slug: {
form_field: true,
type: "text",
field: "open_data_slug",
disabled: true,
label: "Open_Data_Slug",
help_text: "open_data_help_text",
},
},