Improve form validation

This commit is contained in:
Peter Maquiran
2021-07-07 16:25:36 +01:00
parent 34eed1dc26
commit 49d09e3593
8 changed files with 72 additions and 7 deletions
@@ -342,9 +342,13 @@ export class NewEventPage implements OnInit {
console.log(this.postEvent);
let loader = this.toastService.loading()
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe(
async (id) => {
loader.remove()
this.showLoader = false
const eventId: any = id;
@@ -382,6 +386,8 @@ export class NewEventPage implements OnInit {
},
error => {
loader.remove()
this.showLoader = false
this.toastService.badRequest('Evento não criado')
});
@@ -70,7 +70,7 @@ export class NewActionPage implements OnInit {
}
get dateValid() {
if (window.innerWidth <= 800) {
if (window.innerWidth >= 800) {
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
} else {
return ['ok']