From da951c6fb65e6b9691387f35239d9c39af1b5af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 6 May 2021 16:37:31 +0200 Subject: [PATCH] Clean up --- backend/src/models/Donations.js | 13 ++-- backend/src/schema/types/type/Donations.gql | 10 +-- .../components/DonationInfo/DonationInfo.vue | 46 +----------- .../ProgressBar/ProgressBar.spec.js | 11 --- webapp/components/ProgressBar/ProgressBar.vue | 72 ------------------- webapp/locales/de.json | 3 +- webapp/locales/en.json | 3 +- webapp/locales/es.json | 3 +- webapp/locales/fr.json | 3 +- webapp/locales/it.json | 4 +- webapp/locales/pt.json | 3 +- webapp/locales/ru.json | 3 +- webapp/pages/admin/donations.vue | 1 - webapp/pages/index.vue | 1 + 14 files changed, 25 insertions(+), 151 deletions(-) diff --git a/backend/src/models/Donations.js b/backend/src/models/Donations.js index 1273a6f77..742bfb569 100644 --- a/backend/src/models/Donations.js +++ b/backend/src/models/Donations.js @@ -2,10 +2,15 @@ import { v4 as uuid } from 'uuid' export default { id: { type: 'string', primary: true, default: uuid }, - showDonations: { type: 'boolean' }, - goal: { type: 'number' }, - progress: { type: 'number' }, - createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() }, + showDonations: { type: 'boolean', required: true }, + goal: { type: 'number', required: true }, + progress: { type: 'number', required: true }, + createdAt: { + type: 'string', + isoDate: true, + required: true, + default: () => new Date().toISOString(), + }, updatedAt: { type: 'string', isoDate: true, diff --git a/backend/src/schema/types/type/Donations.gql b/backend/src/schema/types/type/Donations.gql index 47dae9340..2186ee63a 100644 --- a/backend/src/schema/types/type/Donations.gql +++ b/backend/src/schema/types/type/Donations.gql @@ -1,10 +1,10 @@ type Donations { id: ID! - createdAt: String - updatedAt: String - showDonations: Boolean! # Wolle make it required in the schema - goal: Int! # Wolle make it required in the schema - progress: Int! # Wolle make it required in the schema + createdAt: String! + updatedAt: String! + showDonations: Boolean! + goal: Int! + progress: Int! } type Query { diff --git a/webapp/components/DonationInfo/DonationInfo.vue b/webapp/components/DonationInfo/DonationInfo.vue index 3a6e74648..dc4184e19 100644 --- a/webapp/components/DonationInfo/DonationInfo.vue +++ b/webapp/components/DonationInfo/DonationInfo.vue @@ -1,6 +1,6 @@