mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Improve validation for publication
This commit is contained in:
@@ -36,7 +36,7 @@ export class EditActionPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async save(){
|
||||
async save() {
|
||||
let body = {
|
||||
ProcessId: this.folderId,
|
||||
Description: this.folder.Description,
|
||||
|
||||
@@ -56,7 +56,13 @@ export class NewActionPage implements OnInit {
|
||||
console.log(ev.detail.value);
|
||||
}
|
||||
|
||||
|
||||
get dateValid() {
|
||||
if (window.innerWidth <= 800) {
|
||||
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
|
||||
} else {
|
||||
return ['ok']
|
||||
}
|
||||
}
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
@@ -68,7 +74,10 @@ export class NewActionPage implements OnInit {
|
||||
Subject: new FormControl(this.folder.Description, [
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
])
|
||||
]),
|
||||
Date: new FormControl(this.dateValid, [
|
||||
Validators.required
|
||||
]),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user