remove hour spans choice ni manual input

This commit is contained in:
Tykayn 2022-02-14 10:50:19 +01:00 committed by tykayn
parent a0066a5bcf
commit 40b3a16e0f
4 changed files with 17 additions and 20 deletions

View File

@ -49,7 +49,8 @@ export class PollService implements Resolve<Poll> {
public showDateInterval = false; public showDateInterval = false;
public allowSeveralHours = false; public allowSeveralHours = false;
public richTextMode = false; public richTextMode = false;
public mode_calendar = true; // public mode_calendar = true;
public mode_calendar = false;
public calendar: Date[] = [new Date()]; public calendar: Date[] = [new Date()];
public disabled_dates: Date[] = []; public disabled_dates: Date[] = [];
@ -731,6 +732,10 @@ export class PollService implements Resolve<Poll> {
* convertir les dates de la propriété Calendar en objets de saisie de texte * convertir les dates de la propriété Calendar en objets de saisie de texte
*/ */
convertCalendarToText() { convertCalendarToText() {
console.log('this.dateChoiceList', this.dateChoiceList);
// if(!this.dateChoiceList.length){
// return [];
// }
let converted = []; let converted = [];
for (let someDate of this.calendar) { for (let someDate of this.calendar) {
converted.push(this.DateUtilitiesService.convertDateToDateChoiceObject(someDate)); converted.push(this.DateUtilitiesService.convertDateToDateChoiceObject(someDate));

View File

@ -8,20 +8,11 @@
> >
<div class="date-choice-container" *ngFor="let choice of dateChoices; index as id"> <div class="date-choice-container" *ngFor="let choice of dateChoices; index as id">
<div class="date-choice" cdkDrag [ngClass]="{ 'day-weekend': isWeekendDay(choice.date_input) }"> <div class="date-choice" cdkDrag [ngClass]="{ 'day-weekend': isWeekendDay(choice.date_input) }">
<!-- <span class="button is-default">-->
<!-- <i class="icon fa fa-arrows-v"></i>-->
<!-- <span *ngIf="timeSlice.date_object">-->
<!-- {{ timeSlice.date_object | date: 'E':'Europe/Paris':'fr_FR' }}-->
<!-- </span>-->
<!-- </span>-->
<div class="top"> <div class="top">
<label class="pull-left" for="dateChoices_{{ id }}"> <label class="pull-left" for="dateChoices_{{ id }}">
{{ 'dates.element' | translate }} {{ id + 1 }} {{ 'dates.element' | translate }} {{ id + 1 }}
<!-- ( weekend : {{ isWeekendDay(group_choice.date_input) }} )-->
<!-- - {{ group_choice.date_object | date: 'E':'Europe/Paris':'fr_FR' }}-->
</label> </label>
<span class="format-helper pull-right">{{ 'dates.format_helper' | translate }}</span> <span class="format-helper pull-right">{{ 'dates.format_helper' | translate }}</span>
<input <input
[ngModel]="choice.date_object | date: 'yyyy-MM-dd'" [ngModel]="choice.date_object | date: 'yyyy-MM-dd'"
(ngModelChange)="convertDateInput($event, id)" (ngModelChange)="convertDateInput($event, id)"
@ -40,13 +31,13 @@
<div *ngIf="hasSeveralHours" class="several-times"> <div *ngIf="hasSeveralHours" class="several-times">
<br /> <br />
<app-time-list [timeSlices]="choice.timeSlices" [prefix_choice_id]="id"></app-time-list> <app-time-list [timeSlices]="choice.timeSlices" [prefix_choice_id]="id"></app-time-list>
<div class="text-right"> <!-- <div class="text-right">-->
<button (click)="addTimeToDate(choice, id)" class="button is-primary"> <!-- <button (click)="addTimeToDate(choice, id)" class="button is-primary">-->
<i class="fa fa-plus"></i> <!-- <i class="fa fa-plus"></i>-->
{{ 'dates.add_time' | translate }} <!-- {{ 'dates.add_time' | translate }}-->
<i class="fa fa-clock-o"></i> <!-- <i class="fa fa-clock-o"></i>-->
</button> <!-- </button>-->
</div> <!-- </div>-->
</div> </div>
</div> </div>
</div> </div>

View File

@ -89,7 +89,7 @@ p-calendar,
.p-datepicker-calendar { .p-datepicker-calendar {
td { td {
width: $cell-size-datepicker-small; width: $cell-size-datepicker;
padding: 0.15rem 0.25rem; padding: 0.15rem 0.25rem;
} }
@ -97,8 +97,8 @@ p-calendar,
.p-ripple { .p-ripple {
margin: 0; margin: 0;
padding: 0.25em; padding: 0.25em;
width: $cell-size-datepicker-small; width: $cell-size-datepicker;
height: $cell-size-datepicker-small; height: $cell-size-datepicker;
transition: all ease 0.5s; transition: all ease 0.5s;
background: $white; background: $white;
border: solid 1px $primary_color; border: solid 1px $primary_color;

View File

@ -85,6 +85,7 @@ $home-nav-height-small: 3.5rem;
// datepicker // datepicker
$cell-size-datepicker-small: 30px; $cell-size-datepicker-small: 30px;
$cell-size-datepicker-desktop: 40px; $cell-size-datepicker-desktop: 40px;
$cell-size-datepicker: 50px;
// css vars // css vars
:root { :root {