updated Automation Modal and translations
This commit is contained in:
parent
4120adc546
commit
8bae21025b
@ -529,5 +529,8 @@
|
|||||||
"Create Recipe": "Create Recipe",
|
"Create Recipe": "Create Recipe",
|
||||||
"Import Recipe": "Import Recipe",
|
"Import Recipe": "Import Recipe",
|
||||||
"Never_Unit": "Never Unit",
|
"Never_Unit": "Never Unit",
|
||||||
"Transpose_Words": "Transpose Words"
|
"Transpose_Words": "Transpose Words",
|
||||||
|
"Title_Replace":"Title Replace",
|
||||||
|
"Food_Replace":"Food Replace",
|
||||||
|
"Unit_Replace":"Unit Replace"
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ export class Models {
|
|||||||
false: undefined,
|
false: undefined,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tree: {default: undefined},
|
tree: { default: undefined },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
@ -50,7 +50,7 @@ export class Models {
|
|||||||
type: "lookup",
|
type: "lookup",
|
||||||
field: "target",
|
field: "target",
|
||||||
list: "self",
|
list: "self",
|
||||||
sticky_options: [{id: 0, name: "tree_root"}],
|
sticky_options: [{ id: 0, name: "tree_root" }],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -71,7 +71,7 @@ export class Models {
|
|||||||
food_onhand: true,
|
food_onhand: true,
|
||||||
shopping: true,
|
shopping: true,
|
||||||
},
|
},
|
||||||
tags: [{field: "supermarket_category", label: "name", color: "info"}],
|
tags: [{ field: "supermarket_category", label: "name", color: "info" }],
|
||||||
// REQUIRED: unordered array of fields that can be set during create
|
// REQUIRED: unordered array of fields that can be set during create
|
||||||
create: {
|
create: {
|
||||||
// if not defined partialUpdate will use the same parameters, prepending 'id'
|
// if not defined partialUpdate will use the same parameters, prepending 'id'
|
||||||
@ -177,7 +177,7 @@ export class Models {
|
|||||||
field: "substitute_siblings",
|
field: "substitute_siblings",
|
||||||
label: "substitute_siblings", // form.label always translated in utils.getForm()
|
label: "substitute_siblings", // form.label always translated in utils.getForm()
|
||||||
help_text: "substitute_siblings_help", // form.help_text always translated
|
help_text: "substitute_siblings_help", // form.help_text always translated
|
||||||
condition: {field: "parent", value: true, condition: "field_exists"},
|
condition: { field: "parent", value: true, condition: "field_exists" },
|
||||||
},
|
},
|
||||||
substitute_children: {
|
substitute_children: {
|
||||||
form_field: true,
|
form_field: true,
|
||||||
@ -186,7 +186,7 @@ export class Models {
|
|||||||
field: "substitute_children",
|
field: "substitute_children",
|
||||||
label: "substitute_children",
|
label: "substitute_children",
|
||||||
help_text: "substitute_children_help",
|
help_text: "substitute_children_help",
|
||||||
condition: {field: "numchild", value: 0, condition: "gt"},
|
condition: { field: "numchild", value: 0, condition: "gt" },
|
||||||
},
|
},
|
||||||
inherit_fields: {
|
inherit_fields: {
|
||||||
form_field: true,
|
form_field: true,
|
||||||
@ -196,7 +196,7 @@ export class Models {
|
|||||||
field: "inherit_fields",
|
field: "inherit_fields",
|
||||||
list: "FOOD_INHERIT_FIELDS",
|
list: "FOOD_INHERIT_FIELDS",
|
||||||
label: "InheritFields",
|
label: "InheritFields",
|
||||||
condition: {field: "food_children_exist", value: true, condition: "preference_equals"},
|
condition: { field: "food_children_exist", value: true, condition: "preference_equals" },
|
||||||
help_text: "InheritFields_help",
|
help_text: "InheritFields_help",
|
||||||
},
|
},
|
||||||
child_inherit_fields: {
|
child_inherit_fields: {
|
||||||
@ -207,7 +207,7 @@ export class Models {
|
|||||||
field: "child_inherit_fields",
|
field: "child_inherit_fields",
|
||||||
list: "FOOD_INHERIT_FIELDS",
|
list: "FOOD_INHERIT_FIELDS",
|
||||||
label: "ChildInheritFields", // form.label always translated in utils.getForm()
|
label: "ChildInheritFields", // form.label always translated in utils.getForm()
|
||||||
condition: {field: "numchild", value: 0, condition: "gt"},
|
condition: { field: "numchild", value: 0, condition: "gt" },
|
||||||
help_text: "ChildInheritFields_help", // form.help_text always translated
|
help_text: "ChildInheritFields_help", // form.help_text always translated
|
||||||
},
|
},
|
||||||
reset_inherit: {
|
reset_inherit: {
|
||||||
@ -217,7 +217,7 @@ export class Models {
|
|||||||
field: "reset_inherit",
|
field: "reset_inherit",
|
||||||
label: "reset_children",
|
label: "reset_children",
|
||||||
help_text: "reset_children_help",
|
help_text: "reset_children_help",
|
||||||
condition: {field: "numchild", value: 0, condition: "gt"},
|
condition: { field: "numchild", value: 0, condition: "gt" },
|
||||||
},
|
},
|
||||||
form_function: "FoodCreateDefault",
|
form_function: "FoodCreateDefault",
|
||||||
},
|
},
|
||||||
@ -304,24 +304,24 @@ export class Models {
|
|||||||
form_field: true,
|
form_field: true,
|
||||||
type: "choice",
|
type: "choice",
|
||||||
options: [
|
options: [
|
||||||
{value: "g", text: "g"},
|
{ value: "g", text: "g" },
|
||||||
{value: "kg", text: "kg"},
|
{ value: "kg", text: "kg" },
|
||||||
{value: "ounce", text: "ounce"},
|
{ value: "ounce", text: "ounce" },
|
||||||
{value: "pound", text: "pound"},
|
{ value: "pound", text: "pound" },
|
||||||
{value: "ml", text: "ml"},
|
{ value: "ml", text: "ml" },
|
||||||
{value: "l", text: "l"},
|
{ value: "l", text: "l" },
|
||||||
{value: "fluid_ounce", text: "fluid_ounce"},
|
{ value: "fluid_ounce", text: "fluid_ounce" },
|
||||||
{value: "pint", text: "pint"},
|
{ value: "pint", text: "pint" },
|
||||||
{value: "quart", text: "quart"},
|
{ value: "quart", text: "quart" },
|
||||||
{value: "gallon", text: "gallon"},
|
{ value: "gallon", text: "gallon" },
|
||||||
{value: "tbsp", text: "tbsp"},
|
{ value: "tbsp", text: "tbsp" },
|
||||||
{value: "tsp", text: "tsp"},
|
{ value: "tsp", text: "tsp" },
|
||||||
{value: "imperial_fluid_ounce", text: "imperial_fluid_ounce"},
|
{ value: "imperial_fluid_ounce", text: "imperial_fluid_ounce" },
|
||||||
{value: "imperial_pint", text: "imperial_pint"},
|
{ value: "imperial_pint", text: "imperial_pint" },
|
||||||
{value: "imperial_quart", text: "imperial_quart"},
|
{ value: "imperial_quart", text: "imperial_quart" },
|
||||||
{value: "imperial_gallon", text: "imperial_gallon"},
|
{ value: "imperial_gallon", text: "imperial_gallon" },
|
||||||
{value: "imperial_tbsp", text: "imperial_tbsp"},
|
{ value: "imperial_tbsp", text: "imperial_tbsp" },
|
||||||
{value: "imperial_tsp", text: "imperial_tsp"},
|
{ value: "imperial_tsp", text: "imperial_tsp" },
|
||||||
],
|
],
|
||||||
field: "base_unit",
|
field: "base_unit",
|
||||||
label: "Base Unit",
|
label: "Base Unit",
|
||||||
@ -457,7 +457,7 @@ export class Models {
|
|||||||
static SUPERMARKET = {
|
static SUPERMARKET = {
|
||||||
name: "Supermarket",
|
name: "Supermarket",
|
||||||
apiName: "Supermarket",
|
apiName: "Supermarket",
|
||||||
ordered_tags: [{field: "category_to_supermarket", label: "category::name", color: "info"}],
|
ordered_tags: [{ field: "category_to_supermarket", label: "category::name", color: "info" }],
|
||||||
create: {
|
create: {
|
||||||
params: [["name", "description", "category_to_supermarket"]],
|
params: [["name", "description", "category_to_supermarket"]],
|
||||||
form: {
|
form: {
|
||||||
@ -540,13 +540,16 @@ export class Models {
|
|||||||
form_field: true,
|
form_field: true,
|
||||||
type: "choice",
|
type: "choice",
|
||||||
options: [
|
options: [
|
||||||
{value: "FOOD_ALIAS", text: "Food_Alias"},
|
{ value: "FOOD_ALIAS", text: "Food_Alias" },
|
||||||
{value: "UNIT_ALIAS", text: "Unit_Alias"},
|
{ value: "UNIT_ALIAS", text: "Unit_Alias" },
|
||||||
{value: "KEYWORD_ALIAS", text: "Keyword_Alias"},
|
{ value: "KEYWORD_ALIAS", text: "Keyword_Alias" },
|
||||||
{value: "DESCRIPTION_REPLACE", text: "Description_Replace"},
|
{ value: "DESCRIPTION_REPLACE", text: "Description_Replace" },
|
||||||
{value: "INSTRUCTION_REPLACE", text: "Instruction_Replace"},
|
{ value: "INSTRUCTION_REPLACE", text: "Instruction_Replace" },
|
||||||
{value: "NEVER_UNIT", text: "Never_Unit"},
|
{ value: "TITLE_REPLACE", text: "Title_Replace" },
|
||||||
{value: "TRANSPOSE_WORDS", text: "Transpose_Words"},
|
{ value: "FOOD_REPLACE", text: "Food_Replace" },
|
||||||
|
{ value: "UNIT_REPLACE", text: "Unit_Replace" },
|
||||||
|
{ value: "NEVER_UNIT", text: "Never_Unit" },
|
||||||
|
{ value: "TRANSPOSE_WORDS", text: "Transpose_Words" },
|
||||||
],
|
],
|
||||||
field: "type",
|
field: "type",
|
||||||
label: "Type",
|
label: "Type",
|
||||||
@ -1009,7 +1012,7 @@ export class Actions {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ok_label: {function: "translate", phrase: "Save"},
|
ok_label: { function: "translate", phrase: "Save" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
static UPDATE = {
|
static UPDATE = {
|
||||||
@ -1044,7 +1047,7 @@ export class Actions {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ok_label: {function: "translate", phrase: "Delete"},
|
ok_label: { function: "translate", phrase: "Delete" },
|
||||||
instruction: {
|
instruction: {
|
||||||
form_field: true,
|
form_field: true,
|
||||||
type: "instruction",
|
type: "instruction",
|
||||||
@ -1071,17 +1074,17 @@ export class Actions {
|
|||||||
suffix: "s",
|
suffix: "s",
|
||||||
params: ["query", "page", "pageSize", "options"],
|
params: ["query", "page", "pageSize", "options"],
|
||||||
config: {
|
config: {
|
||||||
query: {default: undefined},
|
query: { default: undefined },
|
||||||
page: {default: 1},
|
page: { default: 1 },
|
||||||
pageSize: {default: 25},
|
pageSize: { default: 25 },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
static MERGE = {
|
static MERGE = {
|
||||||
function: "merge",
|
function: "merge",
|
||||||
params: ["source", "target"],
|
params: ["source", "target"],
|
||||||
config: {
|
config: {
|
||||||
source: {type: "string"},
|
source: { type: "string" },
|
||||||
target: {type: "string"},
|
target: { type: "string" },
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
title: {
|
title: {
|
||||||
@ -1096,7 +1099,7 @@ export class Actions {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ok_label: {function: "translate", phrase: "Merge"},
|
ok_label: { function: "translate", phrase: "Merge" },
|
||||||
instruction: {
|
instruction: {
|
||||||
form_field: true,
|
form_field: true,
|
||||||
type: "instruction",
|
type: "instruction",
|
||||||
@ -1130,8 +1133,8 @@ export class Actions {
|
|||||||
function: "move",
|
function: "move",
|
||||||
params: ["source", "target"],
|
params: ["source", "target"],
|
||||||
config: {
|
config: {
|
||||||
source: {type: "string"},
|
source: { type: "string" },
|
||||||
target: {type: "string"},
|
target: { type: "string" },
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
title: {
|
title: {
|
||||||
@ -1146,7 +1149,7 @@ export class Actions {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ok_label: {function: "translate", phrase: "Move"},
|
ok_label: { function: "translate", phrase: "Move" },
|
||||||
instruction: {
|
instruction: {
|
||||||
form_field: true,
|
form_field: true,
|
||||||
type: "instruction",
|
type: "instruction",
|
||||||
|
Loading…
Reference in New Issue
Block a user