mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
web new api done
This commit is contained in:
@@ -107,13 +107,13 @@
|
|||||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
||||||
<!-- <input matInput type="text" > -->
|
<!-- <input matInput type="text" > -->
|
||||||
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Category" >
|
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Category" >
|
||||||
<mat-option value="Reunião">
|
<mat-option value="Meeting">
|
||||||
Reunião
|
Reunião
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="Viagem">
|
<mat-option value="Travel">
|
||||||
Viagem
|
Viagem
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="Conferência">
|
<mat-option value="Conference">
|
||||||
Conferência
|
Conferência
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="Encontro">
|
<mat-option value="Encontro">
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ export class Utils {
|
|||||||
|
|
||||||
calendarTypeSeleted(calendarName) {
|
calendarTypeSeleted(calendarName) {
|
||||||
var selectedType = {
|
var selectedType = {
|
||||||
'Reunião': 1,
|
'Meeting': 1,
|
||||||
'Viagem': 2,
|
'Travel': 2,
|
||||||
'Conferência': 3,
|
'Conference': 3,
|
||||||
'Encontro': 1
|
'Encontro': 1
|
||||||
}
|
}
|
||||||
return selectedType[calendarName];
|
return selectedType[calendarName];
|
||||||
|
|||||||
@@ -242,7 +242,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div *ngIf="eventProcess.workflowInstanceDataFields.OccurrenceType != '-1'"
|
<!-- <div *ngIf="eventProcess.workflowInstanceDataFields.OccurrenceType != '-1'"
|
||||||
class="container-div width-100">
|
class="container-div width-100">
|
||||||
<div class="ion-item-class-2 d-flex">
|
<div class="ion-item-class-2 d-flex">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
@@ -270,7 +270,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<div class="container-div width-100">
|
<div class="container-div width-100">
|
||||||
@@ -352,7 +352,7 @@
|
|||||||
<ion-item class="width-100" *ngFor="let document of loadedAttachments; let i = index">
|
<ion-item class="width-100" *ngFor="let document of loadedAttachments; let i = index">
|
||||||
<ion-label class="width-100 d-block list" >
|
<ion-label class="width-100 d-block list" >
|
||||||
<p class="d-flex ion-justify-content-between">
|
<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 == 8"> Correspondencia </span>
|
||||||
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
|
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
|
||||||
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
|
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
loadedAttachments: any[] = []
|
loadedAttachments: any[] = []
|
||||||
|
|
||||||
eventProcess = {
|
eventProcess = {
|
||||||
|
Attachments: [],
|
||||||
serialNumber: "",
|
serialNumber: "",
|
||||||
taskStartDate: "",
|
taskStartDate: "",
|
||||||
workflowInstanceDataFields: {
|
workflowInstanceDataFields: {
|
||||||
@@ -172,7 +173,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||||
this.loadedAttachments = res.value.Attachments;
|
this.loadedAttachments = res.value.Attachments;
|
||||||
console.log(this.loadedAttachments)
|
console.log(this.loadedAttachments)
|
||||||
this.getAttachments()
|
|
||||||
|
|
||||||
this.setOtherData()
|
this.setOtherData()
|
||||||
|
|
||||||
@@ -260,7 +260,7 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
|
|
||||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||||
|
|
||||||
this.getAttachments()
|
/* this.getAttachments() */
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
@@ -538,7 +538,8 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
this.getDatepickerData()
|
this.getDatepickerData()
|
||||||
|
|
||||||
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {
|
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']
|
const restoredData = window['temp.path:/shared/agenda/edit-event-to-approve.ts']
|
||||||
|
|
||||||
if (JSON.stringify(restoredData) != "{}" && undefined != restoredData) {
|
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
|
// restore dater for date and hours picker
|
||||||
this.restoreDatepickerData()
|
this.restoreDatepickerData()
|
||||||
@@ -578,12 +580,15 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deleteAttachment(attachment: Attachment, index) {
|
deleteAttachment(attachment: Attachment, index) {
|
||||||
if (this.loadedEventAttachments[index].Id) {
|
const id: any = this.loadedAttachments[index].id
|
||||||
const id: any = this.loadedEventAttachments[index].Id
|
console.log(this.loadedAttachments)
|
||||||
console.log(attachment)
|
let update = this.removeItemById(this.loadedAttachments,id)
|
||||||
this.loadedAttachments[index]['action'] = 'delete'
|
this.loadedAttachments = update;
|
||||||
this.deletedAttachmentsList.push(id)
|
this.deletedAttachmentsList.push(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeItemById(array, id) {
|
||||||
|
return array.filter(item => item.id !== id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDoc() {
|
async getDoc() {
|
||||||
|
|||||||
@@ -104,13 +104,13 @@
|
|||||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
||||||
<!-- <input matInput type="text" > -->
|
<!-- <input matInput type="text" > -->
|
||||||
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="_postEvent.Category">
|
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="_postEvent.Category">
|
||||||
<mat-option value="Reunião">
|
<mat-option value="Meeting">
|
||||||
Reunião
|
Reunião
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="Viagem">
|
<mat-option value="Travel">
|
||||||
Viagem
|
Viagem
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="Conferência">
|
<mat-option value="Conference">
|
||||||
Conferência
|
Conferência
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="Encontro">
|
<mat-option value="Encontro">
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.postEvent.Category = 'Reunião';
|
|
||||||
console.log(this.postEvent)
|
console.log(this.postEvent)
|
||||||
this._postEvent = this.postEvent
|
this._postEvent = this.postEvent
|
||||||
this.allDayCheck = this.postEvent.IsAllDayEvent;
|
this.allDayCheck = this.postEvent.IsAllDayEvent;
|
||||||
@@ -583,21 +582,17 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deleteAttachment(attachmentID: string, index) {
|
deleteAttachment(attachmentID: string, index) {
|
||||||
|
console.log(JSON.stringify(this.loadedEventAttachments))
|
||||||
const id: any = this.loadedEventAttachments[index].Id
|
const id: any = this.loadedEventAttachments[index].Id
|
||||||
|
console.log(JSON.stringify(id))
|
||||||
this.loadedEventAttachments[index]['remove'] = true
|
let update = this.removeItemById(this.loadedEventAttachments, id)
|
||||||
console.log(id)
|
this.loadedEventAttachments = update
|
||||||
|
console.log( update)
|
||||||
this.deletedAttachmentsList.push(id)
|
this.deletedAttachmentsList.push(id)
|
||||||
|
}
|
||||||
|
|
||||||
/* if (id == 'add') {
|
removeItemById(array, id) {
|
||||||
this.loadedEventAttachments = this.loadedEventAttachments.filter((e, i) => i != index)
|
return array.filter(item => item.Id !== id);
|
||||||
} else {
|
|
||||||
this.loadedEventAttachments[index]['remove'] = true
|
|
||||||
console.log(id)
|
|
||||||
this.deletedAttachmentsList.push(id)
|
|
||||||
} */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDoc() {
|
async getDoc() {
|
||||||
|
|||||||
Reference in New Issue
Block a user