create event from gabinete

This commit is contained in:
Peter Maquiran
2024-07-04 16:33:45 +01:00
parent 0e12b5de5e
commit 06417ead0f
22 changed files with 881 additions and 311 deletions
@@ -211,6 +211,7 @@
placeholder="Data Inicio*"
[(ngModel)]="postEvent.StartDate"
[disabled]="disabled"
(ngModelChange)="onDateChange($event)"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" ></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
@@ -241,6 +242,7 @@
placeholder="Data Inicio*"
[(ngModel)]="postEvent.StartDate"
[disabled]="disabled"
(ngModelChange)="onDateChange($event)"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" ></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
@@ -457,8 +459,9 @@
<ion-label>
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.subject}}</span>
<span class="app-name" *ngIf="!document.appName">{{ TaskService.attachmentAppName(document)}}</span>
<span class="app-name" *ngIf="document.appName">{{document.appName}}</span>
<span class="app-name" *ngIf="document.applicationId == 8 || document.ApplicationId == 8"> Correspondência </span>
<span class="app-name" *ngIf="document.applicationId == 386 || document.ApplicationId == 386"> Acções Presidenciais </span>
<span class="app-name" *ngIf="document.applicationId == 361 || document.ApplicationId == 361 "> Arquivo Despacho Electrónico </span>
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
@@ -746,5 +746,16 @@ export class NewEventPage implements OnInit {
return date
}
onDateChange(e) {
const cloneDateStartDate = new Date(this.postEvent.StartDate);
const cloneDateEndDate = new Date(this.postEvent.EndDate);
if(cloneDateStartDate.getTime() >= cloneDateEndDate.getTime()) {
cloneDateStartDate.setHours(cloneDateStartDate.getHours() + 1);
this.postEvent.EndDate = cloneDateStartDate
}
}
}