mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Fix duplicated inputs
This commit is contained in:
@@ -219,7 +219,7 @@ export class ProfilePage implements OnInit {
|
|||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
SessionStore.setInativity(false)
|
SessionStore.setInativity(false)
|
||||||
|
SessionStore.setUrlBeforeInactivity(this.router.url)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.router.navigateByUrl('/', { replaceUrl: true });
|
this.router.navigateByUrl('/', { replaceUrl: true });
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[formControl]="dateControlStart"
|
[formControl]="dateControlStart"
|
||||||
[min]="minDate" [max]="maxDate"
|
[max]="maxDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
>
|
>
|
||||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
<input matInput [ngxMatDatetimePicker]="fim"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[formControl]="dateControlEnd"
|
[formControl]="dateControlEnd"
|
||||||
[min]="minDate" [max]="maxDate"
|
[max]="maxDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
>
|
>
|
||||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
<mat-form-field class="date-hour-picker">
|
<mat-form-field class="date-hour-picker">
|
||||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[formControl]="dateControlOccurrence"
|
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
>
|
>
|
||||||
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
||||||
@@ -213,41 +213,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div width-100">
|
|
||||||
<div class="ion-item-class-2">
|
|
||||||
<div class="ion-icon-class">
|
|
||||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
|
||||||
</div>
|
|
||||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
|
||||||
<ion-select placeholder="Selecione a repetição*"
|
|
||||||
[(ngModel)]="postEvent.IsRecurring"
|
|
||||||
(ngModelChange)="onSelectedRecurringChanged($event)"
|
|
||||||
interface="action-sheet"
|
|
||||||
Cancel-text="Cancelar" required>
|
|
||||||
<ion-select-option *ngFor="let recurring of recurringTypes" value="{{recurring.Code}}">{{recurring.Description}}</ion-select-option>
|
|
||||||
</ion-select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="selectedRecurringType != '-1'" class="container-div width-100">
|
|
||||||
<div class="ion-item-class-2">
|
|
||||||
<div class="ion-icon-class">
|
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
|
||||||
</div>
|
|
||||||
<div class="ion-input-class">
|
|
||||||
<ion-datetime
|
|
||||||
placeholder="Última ocorrência"
|
|
||||||
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
|
||||||
displayFormat="DD MMM YYYY"
|
|
||||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
|
||||||
max="2045"
|
|
||||||
>
|
|
||||||
</ion-datetime>
|
|
||||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class=" d-flex width-100">
|
<div class=" d-flex width-100">
|
||||||
<div class="ion-item-class-2 width-100">
|
<div class="ion-item-class-2 width-100">
|
||||||
|
|||||||
@@ -89,9 +89,6 @@ export class EditEventPage implements OnInit {
|
|||||||
{ value: false, label: 'False' }
|
{ value: false, label: 'False' }
|
||||||
];
|
];
|
||||||
|
|
||||||
get dateOccurrence () {
|
|
||||||
return this.dateControlOccurrence.value
|
|
||||||
}
|
|
||||||
public listColors = ['primary', 'accent', 'warn'];
|
public listColors = ['primary', 'accent', 'warn'];
|
||||||
public stepHours = [1, 2, 3, 4, 5];
|
public stepHours = [1, 2, 3, 4, 5];
|
||||||
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
||||||
@@ -109,6 +106,7 @@ export class EditEventPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.dateControlOccurrence = new FormControl(moment(this.postEvent.EventRecurrence.LastOccurrence));
|
this.dateControlOccurrence = new FormControl(moment(this.postEvent.EventRecurrence.LastOccurrence));
|
||||||
|
|
||||||
|
this.postEvent.EventRecurrence.Type = '-1'
|
||||||
|
|
||||||
if(!this.restoreTemporaryData()) {
|
if(!this.restoreTemporaryData()) {
|
||||||
// clear
|
// clear
|
||||||
@@ -208,13 +206,13 @@ export class EditEventPage implements OnInit {
|
|||||||
dateEnd: new FormControl(this.dateEnd, [
|
dateEnd: new FormControl(this.dateEnd, [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
dateOccurrence: new FormControl(this.dateOccurrence, [
|
dateOccurrence: new FormControl(this.postEvent.EventRecurrence.Type, [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
participantes: new FormControl(this.taskParticipants, [
|
participantes: new FormControl(this.taskParticipants, [
|
||||||
// Validators.required
|
// Validators.required
|
||||||
]),
|
]),
|
||||||
Date: new FormControl( new Date(this.dateControlStart.value).toLocaleString() < new Date(this.dateControlEnd.value).toLocaleString()? 'ok': null,[
|
Date: new FormControl( new Date(this.dateControlStart.value).toLocaleString('pt') < new Date(this.dateControlEnd.value).toLocaleString('pt')? 'ok': null,[
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
|
|
||||||
@@ -364,7 +362,6 @@ export class EditEventPage implements OnInit {
|
|||||||
if (this.postEvent) {
|
if (this.postEvent) {
|
||||||
this.postEvent.StartDate = this.dateStart
|
this.postEvent.StartDate = this.dateStart
|
||||||
this.postEvent.EndDate = this.dateEnd
|
this.postEvent.EndDate = this.dateEnd
|
||||||
this.postEvent.EventRecurrence.LastOccurrence = this.dateOccurrence
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user