mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
ITOTEAM-527 permission and attachment count
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-received-event.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button *ngIf="eventService.hasAnyCalendar" title="Novo Evento" class="cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
|
||||
<button *ngIf="eventService.hasAnyCalendar && p.userPermission([p.permissionList.Agenda.creatEvent])" title="Novo Evento" class="cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add-selected.svg" ></ion-icon>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- Event details page -->
|
||||
</div>
|
||||
<div class="menu-options d-flex">
|
||||
<button class="btn-no-color" (click)="editEvent()">
|
||||
<button class="btn-no-color" (click)="editEvent()" *ngIf="p.userPermission([p.permissionList.Agenda.creatEvent])">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
||||
</button>
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="line"></div>
|
||||
<div class="middle-content">
|
||||
<div *ngIf="loadedEvent.Attendees">
|
||||
<h5 class="font-17-rem">Intervenientes</h5>
|
||||
<h5 class="font-17-rem">Intervenientes({{ loadedEvent.Attendees.length }})</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<div *ngFor="let attendee of loadedEvent.Attendees">
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="loadedEvent.Attachments" class="bottom-content width-100">
|
||||
<h5 class="font-17-rem">Documentos Anexados</h5>
|
||||
<h5 class="font-17-rem">Documentos Anexados({{ loadedEvent.Attachments.length }})</h5>
|
||||
<ion-list class="width-100">
|
||||
<ion-item *ngFor="let attach of loadedEvent.Attachments; let i = index" class="width-100" class="ion-no-margin ion-no-padding">
|
||||
<ion-label class="width-100 d-flex " (click)="docIndex(i);LoadDocumentDetails()">
|
||||
|
||||
@@ -22,6 +22,7 @@ import { DateService } from 'src/app/services/date.service';
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
import { isHttpError } from 'src/app/services/http.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -75,7 +76,8 @@ export class ViewEventPage implements OnInit {
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private dateService: DateService,
|
||||
private agendaDataRepository: AgendaDataRepositoryService
|
||||
private agendaDataRepository: AgendaDataRepositoryService,
|
||||
public p: PermissionService,
|
||||
) {
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
<div class="header-title flex-grow-1">
|
||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
||||
</div>
|
||||
<div class="header-icon-right cursor-pointer" (click)="editar(loadedEvent.serialNumber)">
|
||||
<div class="header-icon-right cursor-pointer" (click)="editar(loadedEvent.serialNumber)" *ngIf="p.userPermission([p.permissionList.Agenda.creatEvent])">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-edit.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-edit.svg"></ion-icon>
|
||||
|
||||
+22
-20
@@ -13,6 +13,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event-modal',
|
||||
@@ -44,7 +45,8 @@ export class ApproveEventModalPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public TaskService: TaskService
|
||||
public TaskService: TaskService,
|
||||
public p: PermissionService,
|
||||
) {
|
||||
|
||||
|
||||
@@ -54,7 +56,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
return;
|
||||
}
|
||||
else{
|
||||
this.serialNumber = paramMap.get('serialNumber');
|
||||
this.serialNumber = paramMap.get('serialNumber');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -80,12 +82,12 @@ export class ApproveEventModalPage implements OnInit {
|
||||
this.loadedEvent = res;
|
||||
this.today = new Date(res.workflowInstanceDataFields.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
|
||||
|
||||
this.InstanceId = res.workflowInstanceDataFields.InstanceId
|
||||
this.getAttachments()
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
viewDocument(docId:string, applicationId:string){
|
||||
@@ -95,7 +97,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async approveTask(serialNumber:string) {
|
||||
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
||||
|
||||
@@ -112,7 +114,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -128,10 +130,10 @@ export class ApproveEventModalPage implements OnInit {
|
||||
async rejectTask(serialNumber:string) {
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService._successMessage('Evento Eliminado!', () =>{
|
||||
@@ -141,10 +143,10 @@ export class ApproveEventModalPage implements OnInit {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest('Evento não rejeitado')
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -158,7 +160,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
} catch (error) {
|
||||
console.error('getAttachments', error)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async openOptions(ev:any) {
|
||||
@@ -194,10 +196,10 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
if(res.data.option == 'save') {
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
if(res.data.option == 'save') {
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
@@ -206,7 +208,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
//
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
@@ -215,11 +217,11 @@ export class ApproveEventModalPage implements OnInit {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -243,7 +245,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
// backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
@@ -254,7 +256,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="header-title flex-grow-1 cursor-pointer" *ngIf="loadedEvent.workflowInstanceDataFields.Subject">
|
||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
||||
</div>
|
||||
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-true">
|
||||
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-true" *ngIf="p.userPermission([p.permissionList.Agenda.creatEvent])">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="edit" slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-edit.svg" ></ion-icon>
|
||||
@@ -74,7 +74,7 @@
|
||||
<div class="overflow-y-auto">
|
||||
<div class="middle-content">
|
||||
<div *ngIf="loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
||||
<h5 class="font-17-rem">Intervenientes</h5>
|
||||
<h5 class="font-17-rem">Intervenientes({{loadedEvent.workflowInstanceDataFields.ParticipantsList.length}})</h5>
|
||||
<div *ngFor="let att of loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
||||
<ion-label>{{att.Name}}</ion-label>
|
||||
</div>
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||
<ion-list>
|
||||
<h5 class="font-17-rem">Documentos Anexados</h5>
|
||||
<h5 class="font-17-rem">Documentos Anexados({{loadedAttachments.length}})</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
*ngFor="let attachment of loadedAttachments"
|
||||
(click)="viewDocument(attachment.DocId, attachment)">
|
||||
|
||||
@@ -20,6 +20,7 @@ import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
import { isHttpError } from 'src/app/services/http.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -63,7 +64,8 @@ export class ApproveEventPage implements OnInit {
|
||||
public TaskService: TaskService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
public AgendaDataRepositoryService: AgendaDataRepositoryService,
|
||||
public EventsService: EventsService
|
||||
public EventsService: EventsService,
|
||||
public p: PermissionService,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user