mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
bug solve creating action
This commit is contained in:
@@ -73,7 +73,7 @@ export class NewActionPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get dateValid() {
|
get dateValid() {
|
||||||
var validado: boolean;
|
var validado: boolean;
|
||||||
|
|
||||||
if (window.innerWidth <= 800) {
|
if (window.innerWidth <= 800) {
|
||||||
@@ -86,16 +86,19 @@ export class NewActionPage implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
return ['ok']
|
return ['ok']
|
||||||
}
|
}
|
||||||
} */
|
|
||||||
|
|
||||||
get dateValid() {
|
|
||||||
return new Date(this.folder.DateBegin).getTime() < new Date(this.folder.DateBegin).getTime() ? 'ok': null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* get dateValid() {
|
||||||
|
return new Date(this.folder.DateBegin).getTime() < new Date(this.folder.DateBegin).getTime() ? 'ok': null
|
||||||
|
} */
|
||||||
|
|
||||||
runValidation() {
|
runValidation() {
|
||||||
this.validateFrom = true;
|
this.validateFrom = true;
|
||||||
if((new Date(this.folder.DateBegin).getTime()) > (new Date(this.folder.DateEnd).getTime())) {
|
console.log(this.folder.DateBegin)
|
||||||
|
console.log(this.folder.DateEnd)
|
||||||
|
if(this.folder.DateBegin > this.folder.DateEnd) {
|
||||||
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
|
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,13 +120,13 @@ export class NewActionPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
|
alert('hererr')
|
||||||
this.injectValidation()
|
this.injectValidation()
|
||||||
this.runValidation()
|
this.runValidation()
|
||||||
|
|
||||||
if(this.Form.invalid) return false
|
if(this.Form.invalid) return false
|
||||||
|
|
||||||
|
alert('hererr 222')
|
||||||
|
|
||||||
this.folder = {
|
this.folder = {
|
||||||
ProcessId: null,
|
ProcessId: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user