mirror of
https://github.com/strapi/strapi.git
synced 2025-09-16 12:02:41 +00:00
Store config in core_store
This commit is contained in:
parent
039d9e5856
commit
4aa46c5d0f
@ -35,6 +35,11 @@ module.exports = async cb => {
|
||||
label: _.upperFirst(name),
|
||||
labelPlural: _.upperFirst(pluralize(name)),
|
||||
orm: model.orm || 'mongoose',
|
||||
search: true,
|
||||
filters: true,
|
||||
bulkActions: true,
|
||||
pageEntries: 20,
|
||||
defaultSort: 'id'
|
||||
};
|
||||
|
||||
// Fields (non relation)
|
||||
@ -50,7 +55,8 @@ module.exports = async cb => {
|
||||
// schemaModel.list = _.slice(_.keys(schemaModel.fields), 0, 4);
|
||||
schemaModel.listDisplay = Object.keys(schemaModel.fields)
|
||||
// Construct Array of attr ex { type: 'string', label: 'Foo', name: 'Foo', description: '' }
|
||||
.map(attr => Object.assign(schemaModel.fields[attr], { name: attr }))
|
||||
// NOTE: Do we allow sort on boolean?
|
||||
.map(attr => Object.assign(schemaModel.fields[attr], { name: attr, sortable: true, searchable: true }))
|
||||
// Retrieve only the fourth first items
|
||||
.slice(0, 4);
|
||||
|
||||
@ -101,7 +107,6 @@ module.exports = async cb => {
|
||||
});
|
||||
|
||||
const buildSchemaKeys = (data) => Object.keys(data).reduce((acc, curr) => {
|
||||
|
||||
if (curr !== 'plugins') {
|
||||
|
||||
if (!data[curr].fields && _.isObject(data[curr])) {
|
||||
|
@ -6,6 +6,9 @@
|
||||
},
|
||||
"json": {
|
||||
"appearance": ""
|
||||
},
|
||||
"bool": {
|
||||
"appearance": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user