web new api done

This commit is contained in:
Eudes Inácio
2024-06-04 11:56:56 +01:00
parent 399700c67c
commit 87ba7a6cd9
6 changed files with 34 additions and 34 deletions
@@ -107,13 +107,13 @@
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
<!-- <input matInput type="text" > -->
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Category" >
<mat-option value="Reunião">
<mat-option value="Meeting">
Reunião
</mat-option>
<mat-option value="Viagem">
<mat-option value="Travel">
Viagem
</mat-option>
<mat-option value="Conferência">
<mat-option value="Conference">
Conferência
</mat-option>
<mat-option value="Encontro">
+3 -3
View File
@@ -52,9 +52,9 @@ export class Utils {
calendarTypeSeleted(calendarName) {
var selectedType = {
'Reunião': 1,
'Viagem': 2,
'Conferência': 3,
'Meeting': 1,
'Travel': 2,
'Conference': 3,
'Encontro': 1
}
return selectedType[calendarName];
@@ -242,7 +242,7 @@
</div>
</div> -->
<div *ngIf="eventProcess.workflowInstanceDataFields.OccurrenceType != '-1'"
<!-- <div *ngIf="eventProcess.workflowInstanceDataFields.OccurrenceType != '-1'"
class="container-div width-100">
<div class="ion-item-class-2 d-flex">
<div class="ion-icon-class">
@@ -270,7 +270,7 @@
</div>
</div>
</div>
</div> -->
<div class="container-div width-100">
@@ -352,7 +352,7 @@
<ion-item class="width-100" *ngFor="let document of loadedAttachments; let i = index">
<ion-label class="width-100 d-block list" >
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.subject}}</span>
<span class="attach-title-item">{{document.subject || document.Description || document.SourceName || document.sourceName || 'Sem título'}}</span>
<span class="app-name" *ngIf="document.ApplicationId == 8"> Correspondencia </span>
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
@@ -72,6 +72,7 @@ export class EditEventToApprovePage implements OnInit {
loadedAttachments: any[] = []
eventProcess = {
Attachments: [],
serialNumber: "",
taskStartDate: "",
workflowInstanceDataFields: {
@@ -172,7 +173,6 @@ export class EditEventToApprovePage implements OnInit {
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
this.loadedAttachments = res.value.Attachments;
console.log(this.loadedAttachments)
this.getAttachments()
this.setOtherData()
@@ -260,7 +260,7 @@ export class EditEventToApprovePage implements OnInit {
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
this.getAttachments()
/* this.getAttachments() */
}
close() {
@@ -538,7 +538,8 @@ export class EditEventToApprovePage implements OnInit {
this.getDatepickerData()
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {
eventProcess: this.eventProcess
eventProcess: this.eventProcess,
attachment: this.loadedAttachments
}
}
@@ -548,7 +549,8 @@ export class EditEventToApprovePage implements OnInit {
const restoredData = window['temp.path:/shared/agenda/edit-event-to-approve.ts']
if (JSON.stringify(restoredData) != "{}" && undefined != restoredData) {
this.eventProcess = restoredData.eventProcess
this.eventProcess = restoredData.eventProcess,
this.loadedAttachments = restoredData.attachment
// restore dater for date and hours picker
this.restoreDatepickerData()
@@ -578,12 +580,15 @@ export class EditEventToApprovePage implements OnInit {
}
deleteAttachment(attachment: Attachment, index) {
if (this.loadedEventAttachments[index].Id) {
const id: any = this.loadedEventAttachments[index].Id
console.log(attachment)
this.loadedAttachments[index]['action'] = 'delete'
const id: any = this.loadedAttachments[index].id
console.log(this.loadedAttachments)
let update = this.removeItemById(this.loadedAttachments,id)
this.loadedAttachments = update;
this.deletedAttachmentsList.push(id)
}
}
removeItemById(array, id) {
return array.filter(item => item.id !== id);
}
async getDoc() {
@@ -104,13 +104,13 @@
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
<!-- <input matInput type="text" > -->
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="_postEvent.Category">
<mat-option value="Reunião">
<mat-option value="Meeting">
Reunião
</mat-option>
<mat-option value="Viagem">
<mat-option value="Travel">
Viagem
</mat-option>
<mat-option value="Conferência">
<mat-option value="Conference">
Conferência
</mat-option>
<mat-option value="Encontro">
@@ -114,7 +114,6 @@ export class EditEventPage implements OnInit {
}
ngOnInit() {
this.postEvent.Category = 'Reunião';
console.log(this.postEvent)
this._postEvent = this.postEvent
this.allDayCheck = this.postEvent.IsAllDayEvent;
@@ -583,21 +582,17 @@ export class EditEventPage implements OnInit {
}
deleteAttachment(attachmentID: string, index) {
console.log(JSON.stringify(this.loadedEventAttachments))
const id: any = this.loadedEventAttachments[index].Id
this.loadedEventAttachments[index]['remove'] = true
console.log(id)
console.log(JSON.stringify(id))
let update = this.removeItemById(this.loadedEventAttachments, id)
this.loadedEventAttachments = update
console.log( update)
this.deletedAttachmentsList.push(id)
}
/* if (id == 'add') {
this.loadedEventAttachments = this.loadedEventAttachments.filter((e, i) => i != index)
} else {
this.loadedEventAttachments[index]['remove'] = true
console.log(id)
this.deletedAttachmentsList.push(id)
} */
removeItemById(array, id) {
return array.filter(item => item.Id !== id);
}
async getDoc() {