mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
fix
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import * as moment from 'moment';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
@@ -56,11 +55,11 @@ export class NewActionPage implements OnInit {
|
||||
showLoader = false
|
||||
|
||||
get dateStart () {
|
||||
return this.dateControlStart.value
|
||||
return this.dateControlStart
|
||||
}
|
||||
|
||||
get dateEnd () {
|
||||
return this.dateControlEnd.value
|
||||
return this.dateControlEnd
|
||||
}
|
||||
|
||||
constructor(
|
||||
@@ -74,8 +73,8 @@ export class NewActionPage implements OnInit {
|
||||
|
||||
this.folder = new PublicationFolder();
|
||||
|
||||
this.dateControlStart = new FormControl(this.roundTimeQuarterHour());
|
||||
this.dateControlEnd = new FormControl(this.roundTimeQuarterHourPlus15(this.dateControlStart.value));
|
||||
this.dateControlStart = this.roundTimeQuarterHour()
|
||||
this.dateControlEnd = this.roundTimeQuarterHourPlus15(this.dateControlStart)
|
||||
|
||||
|
||||
}
|
||||
@@ -96,7 +95,7 @@ export class NewActionPage implements OnInit {
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true;
|
||||
if(new Date(this.dateControlStart.value).getTime() > new Date(this.dateControlEnd.value).getTime()){
|
||||
if(new Date(this.dateControlStart).getTime() > new Date(this.dateControlEnd).getTime()){
|
||||
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
|
||||
}
|
||||
}
|
||||
@@ -108,7 +107,7 @@ export class NewActionPage implements OnInit {
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
Date: new FormControl(this.dateValid, [
|
||||
Date: new FormControl( this.dateValid,[
|
||||
Validators.required
|
||||
]),
|
||||
Detail: new FormControl(this.folder.Detail, [
|
||||
@@ -129,8 +128,8 @@ export class NewActionPage implements OnInit {
|
||||
ProcessId: null,
|
||||
Description: this.folder.Description,
|
||||
Detail: this.folder.Detail,
|
||||
DateBegin: this.dateControlStart.value,
|
||||
DateEnd: this.dateControlEnd.value,
|
||||
DateBegin: this.dateControlStart,
|
||||
DateEnd: this.dateControlEnd,
|
||||
ActionType: this.segment,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user