added base unit to unit editor
This commit is contained in:
@ -281,7 +281,7 @@ export class Models {
|
||||
apiName: "Unit",
|
||||
paginated: true,
|
||||
create: {
|
||||
params: [["name", "plural_name", "description", "open_data_slug",]],
|
||||
params: [["name", "plural_name", "description", "base_unit","open_data_slug",]],
|
||||
form: {
|
||||
show_help: true,
|
||||
name: {
|
||||
@ -307,6 +307,34 @@ export class Models {
|
||||
placeholder: "",
|
||||
optional: true,
|
||||
},
|
||||
base_unit: {
|
||||
form_field: true,
|
||||
type: "choice",
|
||||
options: [
|
||||
{value: "g", text: "g"},
|
||||
{value: "kg", text: "kg"},
|
||||
{value: "ounce", text: "ounce"},
|
||||
{value: "pound", text: "pound"},
|
||||
{value: "ml", text: "ml"},
|
||||
{value: "l", text: "l"},
|
||||
{value: "fluid_ounce", text: "fluid_ounce"},
|
||||
{value: "pint", text: "pint"},
|
||||
{value: "quart", text: "quart"},
|
||||
{value: "gallon", text: "gallon"},
|
||||
{value: "tbsp", text: "tbsp"},
|
||||
{value: "tsp", text: "tsp"},
|
||||
{value: "imperial_fluid_ounce", text: "imperial_fluid_ounce"},
|
||||
{value: "imperial_pint", text: "imperial_pint"},
|
||||
{value: "imperial_quart", text: "imperial_quart"},
|
||||
{value: "imperial_gallon", text: "imperial_gallon"},
|
||||
{value: "imperial_tbsp", text: "imperial_tbsp"},
|
||||
{value: "imperial_tsp", text: "imperial_tsp"},
|
||||
],
|
||||
field: "base_unit",
|
||||
label: "Base Unit",
|
||||
placeholder: "",
|
||||
optional: true,
|
||||
},
|
||||
open_data_slug: {
|
||||
form_field: true,
|
||||
type: "text",
|
||||
|
Reference in New Issue
Block a user