mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Fix duplicated inputs
This commit is contained in:
@@ -89,9 +89,6 @@ export class EditEventPage implements OnInit {
|
||||
{ value: false, label: 'False' }
|
||||
];
|
||||
|
||||
get dateOccurrence () {
|
||||
return this.dateControlOccurrence.value
|
||||
}
|
||||
public listColors = ['primary', 'accent', 'warn'];
|
||||
public stepHours = [1, 2, 3, 4, 5];
|
||||
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
||||
@@ -109,6 +106,7 @@ export class EditEventPage implements OnInit {
|
||||
ngOnInit() {
|
||||
this.dateControlOccurrence = new FormControl(moment(this.postEvent.EventRecurrence.LastOccurrence));
|
||||
|
||||
this.postEvent.EventRecurrence.Type = '-1'
|
||||
|
||||
if(!this.restoreTemporaryData()) {
|
||||
// clear
|
||||
@@ -208,13 +206,13 @@ export class EditEventPage implements OnInit {
|
||||
dateEnd: new FormControl(this.dateEnd, [
|
||||
Validators.required
|
||||
]),
|
||||
dateOccurrence: new FormControl(this.dateOccurrence, [
|
||||
dateOccurrence: new FormControl(this.postEvent.EventRecurrence.Type, [
|
||||
Validators.required
|
||||
]),
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
// 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
|
||||
]),
|
||||
|
||||
@@ -364,7 +362,6 @@ export class EditEventPage implements OnInit {
|
||||
if (this.postEvent) {
|
||||
this.postEvent.StartDate = this.dateStart
|
||||
this.postEvent.EndDate = this.dateEnd
|
||||
this.postEvent.EventRecurrence.LastOccurrence = this.dateOccurrence
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user