review: better naming of screen templates
This commit is contained in:
parent
72774e7fe9
commit
02dcc07f84
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
name: `Create from Scratch`,
|
||||
name: `Create from scratch`,
|
||||
create: () => createScreen(),
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
name: `New Record (Empty)`,
|
||||
name: `New Row (Empty)`,
|
||||
create: () => createScreen(),
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
name: `Record Detail (Empty)`,
|
||||
name: `Row Detail (Empty)`,
|
||||
create: () => createScreen(),
|
||||
}
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ import { uuid } from "builderStore/uuid"
|
|||
const allTemplates = models => [
|
||||
emptyContainerScreen,
|
||||
...newRecordScreen(models),
|
||||
emptyNewRecordScreen,
|
||||
...recordDetailScreen(models),
|
||||
emptyRecordDetailScreen,
|
||||
...recordListScreen(models),
|
||||
emptyNewRecordScreen,
|
||||
emptyRecordDetailScreen,
|
||||
]
|
||||
|
||||
// allows us to apply common behaviour to all create() functions
|
||||
|
|
|
@ -3,7 +3,7 @@ export default function(models) {
|
|||
const fields = Object.keys(model.schema)
|
||||
const heading = fields.length > 0 ? `{{ data.${fields[0]} }}` : "Add Row"
|
||||
return {
|
||||
name: `New Row - ${model.name}`,
|
||||
name: `${model.name} - New`,
|
||||
create: () => createScreen(model, heading),
|
||||
id: NEW_RECORD_TEMPLATE,
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ export default function(models) {
|
|||
const fields = Object.keys(model.schema)
|
||||
const heading = fields.length > 0 ? `{{ data.${fields[0]} }}` : "Detail"
|
||||
return {
|
||||
name: `Row Detail - ${model.name}`,
|
||||
name: `${model.name} - Detail`,
|
||||
create: () => createScreen(model, heading),
|
||||
id: RECORD_DETAIL_TEMPLATE,
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ const createScreen = (model, heading) => ({
|
|||
],
|
||||
},
|
||||
],
|
||||
_instanceName: `${model.name} Detail`,
|
||||
_instanceName: `${model.name} - Detail`,
|
||||
_code: "",
|
||||
},
|
||||
route: `/${model.name.toLowerCase()}/:id`,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export default function(models) {
|
||||
return models.map(model => {
|
||||
return {
|
||||
name: `List - ${model.name}`,
|
||||
name: `${model.name} - List`,
|
||||
create: () => createScreen(model),
|
||||
id: RECORD_LIST_TEMPLATE,
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ const createScreen = model => ({
|
|||
_children: [],
|
||||
},
|
||||
],
|
||||
_instanceName: `${model.name} List`,
|
||||
_instanceName: `${model.name} - List`,
|
||||
_code: "",
|
||||
className: "",
|
||||
onLoad: [],
|
||||
|
|
|
@ -1093,7 +1093,7 @@ export default {
|
|||
// children: [],
|
||||
// },
|
||||
{
|
||||
name: "Record Detail",
|
||||
name: "Row Detail",
|
||||
_component: "@budibase/standard-components/rowdetail",
|
||||
description:
|
||||
"Loads a record, using an id from the URL, which can be used with {{ context }}, in children",
|
||||
|
@ -1105,7 +1105,7 @@ export default {
|
|||
children: [],
|
||||
},
|
||||
{
|
||||
name: "Record Detail",
|
||||
name: "New Row",
|
||||
_component: "@budibase/standard-components/newrow",
|
||||
description:
|
||||
"Sets up a new record for creation, which can be used with {{ context }}, in children",
|
||||
|
|
Loading…
Reference in New Issue