From af4dfacec9107678069b2dd909473ac68549a728 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Mon, 3 May 2021 15:34:26 +0200 Subject: [PATCH] display time slices --- mocks/old-stuff/config/defaultConfigs.ts | 7 ++++++- src/app/core/services/storage.service.ts | 3 ++- .../date-select/date-select.component.html | 15 ++++++++------- .../date-select/date-select.component.scss | 18 +++++++++++++++--- 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/mocks/old-stuff/config/defaultConfigs.ts b/mocks/old-stuff/config/defaultConfigs.ts index 60c9486c..7edb36a5 100644 --- a/mocks/old-stuff/config/defaultConfigs.ts +++ b/mocks/old-stuff/config/defaultConfigs.ts @@ -22,7 +22,12 @@ const currentYear = new Date().getFullYear(); const currentMonth = new Date().getMonth(); const currentDay = new Date().getDate(); -export const basicSlicesOfDay: TimeSlices[] = [{ literal: 'matin' }, { literal: 'midi' }, { literal: 'soir' }]; +export const basicSlicesOfDay: TimeSlices[] = [ + { literal: 'matin' }, + { literal: 'midi' }, + { literal: 'après-midi' }, + { literal: 'soir' }, +]; export const otherSlicesOfDay: TimeSlices[] = [ { literal: 'aux aurores' }, { literal: 'au petit dej' }, diff --git a/src/app/core/services/storage.service.ts b/src/app/core/services/storage.service.ts index 58d76643..56067873 100644 --- a/src/app/core/services/storage.service.ts +++ b/src/app/core/services/storage.service.ts @@ -8,6 +8,7 @@ import { Choice } from '../models/choice.model'; import { Vote } from '../models/vote.model'; import { environment } from '../../../environments/environment'; import { + basicSlicesOfDay, DateChoice, moreTimeOfDay, otherDefaultDates, @@ -33,7 +34,7 @@ export class StorageService { public dateList: DateChoice[] = otherDefaultDates; @LocalStorage() - public timeSlices: TimeSlices[] = moreTimeOfDay; + public timeSlices: TimeSlices[] = basicSlicesOfDay; @LocalStorage() public vote_stack: Stack = new Stack(); diff --git a/src/app/features/administration/form/date-select/date-select.component.html b/src/app/features/administration/form/date-select/date-select.component.html index f4a2655c..6127ebc3 100644 --- a/src/app/features/administration/form/date-select/date-select.component.html +++ b/src/app/features/administration/form/date-select/date-select.component.html @@ -111,6 +111,7 @@ +

@@ -130,21 +131,20 @@ [cdkDropListData]="timeList" (cdkDropListDropped)="dropTimeItem($event)" > -
+
-
-
+ diff --git a/src/app/features/administration/form/date-select/date-select.component.scss b/src/app/features/administration/form/date-select/date-select.component.scss index e1f049d0..d56fe360 100644 --- a/src/app/features/administration/form/date-select/date-select.component.scss +++ b/src/app/features/administration/form/date-select/date-select.component.scss @@ -1,7 +1,7 @@ :host { .time-choice { - background: rgba(255, 255, 255, 0.8); - border: solid 1px #dedede; + background: rgba(255, 255, 255, 1); + //border: solid 1px #dedede; padding: 0.5em; //padding: 20px 10px; border-bottom: solid 1px #ccc; @@ -10,6 +10,17 @@ cursor: move; background: white; font-size: 14px; + padding-top: 1em; + padding-bottom: 1em; + input { + display: inline-block; + width: 70% !important; + margin-right: 1ch; + margin-left: 1ch; + } + .button { + margin: 0; + } } .btn i + span { margin-left: 1ch; @@ -24,7 +35,8 @@ box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12); border: 2px solid #ccc; - background: rgba(255, 255, 255, 0.8); + background: blue; + display: block; } .cdk-drag-placeholder {