mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Improve add attachment
This commit is contained in:
@@ -199,15 +199,18 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex container-div width-100" *ngFor="let document of loadedEventAttachments" >
|
||||
<ion-list class="width-100">
|
||||
<ion-list class="width-100 list">
|
||||
<ion-item class="width-100">
|
||||
<ion-label class="width-100">
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.SourceName}}</span>
|
||||
<span class="app-name" *ngIf="document.Source == 1"> webTRIX</span>
|
||||
<span class="app-name" *ngIf="document.Source == 2"> K2</span>
|
||||
<span class="app-name" *ngIf="document.Source == 3"> Exchange</span>
|
||||
<span class="app-name" *ngIf="document.Source == 4"> File</span>
|
||||
<span class="app-name" *ngIf="document.Source == 1"> webTRIX</span>
|
||||
<span class="app-name" *ngIf="document.Source == 2"> K2</span>
|
||||
<span class="app-name" *ngIf="document.Source == 3"> Exchange</span>
|
||||
<span class="app-name" *ngIf="document.Source == 4"> File</span>
|
||||
<span class="close-button text-black" (click)="deleteAttachment(document.Id)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
|
||||
</p>
|
||||
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate}} </span></p>
|
||||
|
||||
@@ -185,4 +185,20 @@ ion-content{
|
||||
-moz-border-radius: 18px;
|
||||
-ms-border-radius: 18px;
|
||||
-o-border-radius: 18px;
|
||||
}
|
||||
|
||||
|
||||
.close-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.list:hover {
|
||||
|
||||
.app-name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
@@ -62,8 +62,6 @@ export class EditEventComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// attendees list
|
||||
if(this.postEvent.Attendees != null) {
|
||||
@@ -186,7 +184,17 @@ export class EditEventComponent implements OnInit {
|
||||
getAttachments(eventId: string){
|
||||
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
||||
this.loadedEventAttachments = res;
|
||||
console.log('res', res);
|
||||
});
|
||||
}
|
||||
|
||||
deleteAttachment(attachmentID: string) {
|
||||
|
||||
this.attachmentsService.deleteEventAttachmentById(attachmentID).subscribe(
|
||||
res=>{
|
||||
this.loadedEventAttachments = this.loadedEventAttachments.filter(e=> e.Id.toString() != attachmentID);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -194,13 +194,16 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let document of documents" >
|
||||
<div class="list" *ngFor="let document of documents; let i = index" >
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.Assunto}}</span>
|
||||
<span class="app-name">{{document.appName}}</span>
|
||||
<span class="close-button text-black" (click)="removeAttachment(i)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
</p>
|
||||
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data}} </span></p>
|
||||
</ion-label>
|
||||
|
||||
@@ -194,4 +194,20 @@ ion-content{
|
||||
-moz-border-radius: 18px;
|
||||
-ms-border-radius: 18px;
|
||||
-o-border-radius: 18px;
|
||||
}
|
||||
|
||||
|
||||
.close-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.list:hover {
|
||||
|
||||
.app-name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
@@ -173,6 +173,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||
return {
|
||||
SourceTitle: e.Assunto,
|
||||
ParentId: eventId,
|
||||
Source: '1',
|
||||
SourceId: e.Id,
|
||||
@@ -197,10 +198,14 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
const toDocumentTosSave: EventAttachment[] = this.documents.map((e) => {
|
||||
return {
|
||||
SourceTitle: e.Assunto,
|
||||
ParentId: eventId,
|
||||
Source: '1',
|
||||
SourceId: e.Id,
|
||||
ApplicationId: e.ApplicationType.toString(),
|
||||
Id: '',
|
||||
Link: '',
|
||||
SerialNumber: ''
|
||||
};
|
||||
});
|
||||
|
||||
@@ -210,16 +215,12 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
this.gobackOnSave();
|
||||
}
|
||||
|
||||
async gobackOnSave(){
|
||||
//this.onAddEvent.emit(this.postEvent);
|
||||
//this.GoBackEditOrAdd.emit();
|
||||
//this.deleteTemporaryData();
|
||||
//this.setIntervenient.emit([]);
|
||||
//this.setIntervenientCC.emit([]);
|
||||
removeAttachment(index: number){
|
||||
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +256,7 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
restoreTemporaryData(): boolean{
|
||||
restoreTemporaryData(): boolean {
|
||||
|
||||
const restoredData = window['temp.path:/home/agenda/new-event.component.ts']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user