This commit is contained in:
Peter Maquiran
2021-07-20 12:30:52 +01:00
parent a46474e0aa
commit f73070ff4a
13 changed files with 109 additions and 12 deletions
@@ -204,9 +204,9 @@ export class EditEventPage implements OnInit {
Validators.required
]),
participantes: new FormControl(this.taskParticipants, [
Validators.required
// Validators.required
]),
Date: new FormControl(this.dateControlStart.value.toLocaleString() < this.dateControlEnd.value.toLocaleString()? 'ok': null,[
Date: new FormControl( new Date(this.dateControlStart.value).toLocaleString() < new Date(this.dateControlEnd.value).toLocaleString()? 'ok': null,[
Validators.required
]),
@@ -259,6 +259,15 @@ export class EditEventPage implements OnInit {
this.getDatepickerData()
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
if(!this.postEvent.EventRecurrence.hasOwnProperty('Type')) {
this.postEvent.EventRecurrence.Type = '-1'
}
//
if(this.postEvent.EventRecurrence.Type == undefined) {
this.postEvent.EventRecurrence.Type = '-1'
}
this.showLoader = true;
await this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
@@ -249,9 +249,9 @@ export class NewEventPage implements OnInit {
Validators.required
]),
participantes: new FormControl(this.taskParticipants, [
Validators.required
// Validators.required
]),
Date: new FormControl(this.postEvent.StartDate.getTime() < this.postEvent.EndDate.getTime() ? 'ok': null,[
Date: new FormControl( new Date(this.postEvent.StartDate).getTime() < new Date(this.postEvent.EndDate).getTime() ? 'ok': null,[
Validators.required
]),
@@ -357,10 +357,16 @@ export class NewEventPage implements OnInit {
if(this.documents.length >= 0) {
this.postEvent.HasAttachments = true;
}
if(this.selectedRecurringType != '-1'){
if(this.selectedRecurringType != '-1') {
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
}
//
if(this.postEvent.EventRecurrence.Type == undefined) {
this.postEvent.EventRecurrence.Type = '-1'
}
if(this.loggeduser.Profile == 'MDGPR') {
// console.log('MD - Aqui');
// console.log(this.postEvent);
@@ -369,7 +375,6 @@ export class NewEventPage implements OnInit {
console.log(this.postEvent);
let loader = this.toastService.loading();
console.log(this.postEvent);
@@ -422,7 +427,7 @@ export class NewEventPage implements OnInit {
this.showLoader = false
this.toastService.badRequest('Evento não criado')
});
});
}
else if(this.loggeduser.Profile == 'PR') {
@@ -45,6 +45,14 @@
</div>
</ion-list>
<div
*ngIf="!skeletonLoader && taskslist.length == 0 && taskslist.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && taskslist.length == 0">
<ion-list>
@@ -55,6 +55,12 @@
</ion-list>
</div>
<div
*ngIf="!skeletonLoader && taskslist.length == 0 && taskslist.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && taskslist.length == 0">
@@ -106,6 +106,24 @@
</ion-list>
</div>
<div *ngSwitchCase="'parecer'" class="d-flex height-100 align-center justify-content-center" >
<div
*ngIf="!skeletonLoader && parecerList.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
</div>
<div *ngSwitchCase="'deferimento'" class="d-flex height-100 align-center justify-content-center">
<div
*ngIf="!skeletonLoader && deferimentoList.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
</div>
<div *ngIf="skeletonLoader && parecerList.length == 0 && skeletonLoader && deferimentoList.length == 0 ">
<ion-list>