From eab54e1183cade8cf464960b485b87a993ab592d Mon Sep 17 00:00:00 2001 From: Nicola Krumschmidt Date: Thu, 22 Oct 2020 16:55:52 +0200 Subject: [PATCH 1/3] Make the status system field required --- app/src/modules/settings/routes/data-model/new-collection.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/modules/settings/routes/data-model/new-collection.vue b/app/src/modules/settings/routes/data-model/new-collection.vue index ea82121add..5949465936 100644 --- a/app/src/modules/settings/routes/data-model/new-collection.vue +++ b/app/src/modules/settings/routes/data-model/new-collection.vue @@ -342,6 +342,7 @@ export default defineComponent({ }, schema: { default_value: 'draft', + is_nullable: false, }, }); From 151df2b63c300e7f3daaeff44a9bc7f1779d365e Mon Sep 17 00:00:00 2001 From: Nicola Krumschmidt Date: Thu, 22 Oct 2020 18:50:06 +0200 Subject: [PATCH 2/3] Make Storage Asset Presets options required --- api/src/database/seeds/03-fields/09-settings.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/src/database/seeds/03-fields/09-settings.yaml b/api/src/database/seeds/03-fields/09-settings.yaml index 3cdc8df1fa..f613f27f9f 100644 --- a/api/src/database/seeds/03-fields/09-settings.yaml +++ b/api/src/database/seeds/03-fields/09-settings.yaml @@ -135,6 +135,8 @@ fields: - field: key name: Key type: string + schema: + is_nullable: false meta: interface: slug options: @@ -144,6 +146,8 @@ fields: - field: fit name: Fit type: string + schema: + is_nullable: false meta: interface: dropdown options: @@ -157,6 +161,8 @@ fields: - field: width name: Width type: integer + schema: + is_nullable: false meta: interface: numeric required: true @@ -164,6 +170,8 @@ fields: - field: height name: Height type: integer + schema: + is_nullable: false meta: interface: numeric required: true @@ -173,6 +181,7 @@ fields: name: Quality schema: default_value: 80 + is_nullable: false meta: interface: slider options: From 3052b850ef0f62d695d73825a6076497b7f0dc5f Mon Sep 17 00:00:00 2001 From: Nicola Krumschmidt Date: Thu, 22 Oct 2020 18:52:45 +0200 Subject: [PATCH 3/3] Remove field.meta.required property --- api/src/database/seeds/03-fields/09-settings.yaml | 5 ----- api/src/types/field.ts | 1 - .../modules/settings/routes/data-model/new-collection.vue | 1 - app/src/stores/fields.ts | 1 - app/src/types/fields.ts | 1 - 5 files changed, 9 deletions(-) diff --git a/api/src/database/seeds/03-fields/09-settings.yaml b/api/src/database/seeds/03-fields/09-settings.yaml index f613f27f9f..f7604aa374 100644 --- a/api/src/database/seeds/03-fields/09-settings.yaml +++ b/api/src/database/seeds/03-fields/09-settings.yaml @@ -141,7 +141,6 @@ fields: interface: slug options: onlyOnCreate: false - required: true width: half - field: fit name: Fit @@ -156,7 +155,6 @@ fields: text: Contain (preserve aspect ratio) - value: cover text: Cover (forces exact size) - required: true width: half - field: width name: Width @@ -165,7 +163,6 @@ fields: is_nullable: false meta: interface: numeric - required: true width: half - field: height name: Height @@ -174,7 +171,6 @@ fields: is_nullable: false meta: interface: numeric - required: true width: half - field: quality type: integer @@ -188,7 +184,6 @@ fields: max: 100 min: 0 step: 1 - required: true width: full template: '{{key}}' special: json diff --git a/api/src/types/field.ts b/api/src/types/field.ts index f46d105f68..636afee7e5 100644 --- a/api/src/types/field.ts +++ b/api/src/types/field.ts @@ -26,7 +26,6 @@ export type FieldMeta = { interface: string | null; options: Record | null; locked: boolean; - required: boolean; readonly: boolean; hidden: boolean; sort: number | null; diff --git a/app/src/modules/settings/routes/data-model/new-collection.vue b/app/src/modules/settings/routes/data-model/new-collection.vue index 5949465936..c864445722 100644 --- a/app/src/modules/settings/routes/data-model/new-collection.vue +++ b/app/src/modules/settings/routes/data-model/new-collection.vue @@ -304,7 +304,6 @@ export default defineComponent({ type: 'string', meta: { width: 'full', - required: true, options: { choices: [ { diff --git a/app/src/stores/fields.ts b/app/src/stores/fields.ts index 413f08cc42..452dc125ce 100644 --- a/app/src/stores/fields.ts +++ b/app/src/stores/fields.ts @@ -27,7 +27,6 @@ const fakeFilesField: Field = { display_options: null, hidden: false, locked: true, - required: false, translations: null, readonly: true, width: 'full', diff --git a/app/src/types/fields.ts b/app/src/types/fields.ts index 95488c7bc6..79e83e8ef0 100644 --- a/app/src/types/fields.ts +++ b/app/src/types/fields.ts @@ -60,7 +60,6 @@ export type FieldMeta = { options: null | Record; display_options: null | Record; readonly: boolean; - required: boolean; sort: number | null; special: string[] | null; translations: null | Translations[];