mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
indiquer le jour de la semaine avec les choix de date
This commit is contained in:
parent
2aca7ab282
commit
345b90c2e1
@ -10,6 +10,7 @@ import { environment } from '../../../environments/environment';
|
|||||||
import {
|
import {
|
||||||
basicSlicesOfDay,
|
basicSlicesOfDay,
|
||||||
DateChoice,
|
DateChoice,
|
||||||
|
defaultTimeOfDay,
|
||||||
moreTimeOfDay,
|
moreTimeOfDay,
|
||||||
otherDefaultDates,
|
otherDefaultDates,
|
||||||
TimeSlices,
|
TimeSlices,
|
||||||
@ -35,13 +36,13 @@ export class StorageService {
|
|||||||
public dateChoices: DateChoice[] = [];
|
public dateChoices: DateChoice[] = [];
|
||||||
|
|
||||||
@LocalStorage()
|
@LocalStorage()
|
||||||
public timeSlices: TimeSlices[];
|
public timeSlices: TimeSlices[] = defaultTimeOfDay;
|
||||||
|
|
||||||
@LocalStorage()
|
@LocalStorage()
|
||||||
public vote_stack: Stack = new Stack();
|
public vote_stack: Stack = new Stack();
|
||||||
|
|
||||||
@LocalStorage()
|
@LocalStorage()
|
||||||
public choices: Choice[];
|
public choices: Choice[] = [];
|
||||||
|
|
||||||
constructor(public dateUtilities: DateUtilitiesService) {
|
constructor(public dateUtilities: DateUtilitiesService) {
|
||||||
if (environment.autofill) {
|
if (environment.autofill) {
|
||||||
|
@ -24,8 +24,14 @@
|
|||||||
</button>
|
</button>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div *ngFor="let choice of dateList; index as id" class="date-choice" cdkDrag>
|
<div
|
||||||
<i class="fa fa-arrow-v"></i>
|
*ngFor="let choice of dateList; index as id"
|
||||||
|
class="date-choice padded"
|
||||||
|
cdkDrag
|
||||||
|
[ngClass]="{ 'day-weekend': isWeekendDay(choice.date_object) }"
|
||||||
|
>
|
||||||
|
<i class="fa fa-arrows-v"></i>
|
||||||
|
{{ choice.date_object | date: 'E':'Europe/Paris':'fr_FR' }}
|
||||||
<input
|
<input
|
||||||
[(ngModel)]="choice.date_object"
|
[(ngModel)]="choice.date_object"
|
||||||
(keyup)="keyOnChoice($event, id)"
|
(keyup)="keyOnChoice($event, id)"
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
.day-weekend {
|
||||||
|
background: #dedede;
|
||||||
|
}
|
@ -145,4 +145,9 @@ export class DayListComponent {
|
|||||||
openKeyboardShortcutsModal() {
|
openKeyboardShortcutsModal() {
|
||||||
this.display = true;
|
this.display = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isWeekendDay(date_object: Date) {
|
||||||
|
const day = date_object.getDay();
|
||||||
|
return day === 6 || day === 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,3 +143,11 @@ textarea {
|
|||||||
mat-checkbox {
|
mat-checkbox {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cdk-drag {
|
||||||
|
cursor: pointer;
|
||||||
|
border-left: 3px white;
|
||||||
|
&:hover {
|
||||||
|
border-left: 3px #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user