fix issues

This commit is contained in:
Peter Maquiran
2024-03-02 12:21:00 +01:00
parent e0c75e6d87
commit b1bf06b19e
23 changed files with 131 additions and 34 deletions
@@ -269,13 +269,13 @@
<div class="container-div width-100">
<div (click)="addParticipantsCC()" class="ion-item-class-2 cursor-pointer">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height d-flex">
<div class="list-people flex-grow-1">
<ion-item lines="none">
<ion-list>
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com Conhecimento*</ion-label>
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com Conhecimento</ion-label>
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
@@ -367,7 +367,7 @@
</button>
</ion-buttons>
<ion-buttons slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="cancel()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
@@ -201,6 +201,10 @@ export class EditEventPage implements OnInit {
this.modalController.dismiss();
}
cancel() {
this.modalController.dismiss({action:'cancel'});
}
goBack() {
this.router.navigate(['/home', this.caller]);
@@ -643,7 +647,7 @@ export class EditEventPage implements OnInit {
if (horaMinuto[1] === '59') {
horaMinuto[1] = '00';
var novaString = partes[0] + ' ' + horaMinuto.join(':');
return novaString;
}
return string;
@@ -18,6 +18,7 @@
</div>
<div class="middle d-flex align-center">
<p class="title" style="font-size: 21.1px"><span>{{loadedEvent.Subject}}</span></p>
<!-- Event details page -->
</div>
<div class="menu-options d-flex">
<button class="btn-no-color" (click)="editEvent()">
@@ -247,6 +247,37 @@ export class ViewEventPage implements OnInit {
}
loadEvent1() {
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
this.eventsService.getEvent(this.eventId).subscribe(res => {
res = this.dateService.fixDate(res as any)
this.loadedEvent = res;
this.setTimeZone()
// this.addEventToDb(res);
}, (error) => {
});
} else {
if(this.CalendarId) {
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
res = this.dateService.fixDate(res as any)
this.loadedEvent = res;
this.setTimeZone()
}, (error) => {
});
}
}
}
deleteYesOrNo() {
this.alertController.create({
header: 'Eliminar evento?',
@@ -364,14 +395,13 @@ export class ViewEventPage implements OnInit {
await modal.present();
modal.onDidDismiss().then((res) => {
if (res) {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
this.loadEvent1()
}, 250);
this.isEventEdited = true;
console.log('res', res)
console.log('res', res, res.data?.action, 'cancel')
}
});
@@ -399,7 +429,20 @@ export class ViewEventPage implements OnInit {
modal.onDidDismiss().then((res) => {
if (res) {
if (res.data?.action == 'cancel') {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent1()
}, 250);
this.isEventEdited = true;
if(res.data.Attendees?.length >= 1) {
this.loadedEvent.HasAttachments = true
this.getAttachments()
}
console.log('res', res)
} else {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
@@ -7,6 +7,7 @@
<div style="color: black;">
Evento Pendente de Aprovação
</div>
<!-- Events to approve details mobile -->
</div>
</div>
@@ -64,7 +65,7 @@
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 1">Semanal</span>
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 2">Mensal</span>
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 3">Anual</span>
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == -1">(Não se repete)</span>
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == -1">(Não se repete)</span>
</p>
</ion-label>
</div>
@@ -6,6 +6,7 @@ import { DeviceService } from "src/app/services/device.service"
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { PermissionService } from 'src/app/services/permission.service';
import { HeaderSettingsService } from "src/app/services/header-settings.service"
@Component({
selector: 'app-viewer-attachment',
@@ -33,6 +34,7 @@ export class ViewerAttachmentPage implements OnInit {
private erroHandler: HttpErrorHandle,
public p: PermissionService,
private processService: ProcessesService,
private HeaderSettingsService: HeaderSettingsService
) { }
ngOnInit() {