mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Improve add attachment
This commit is contained in:
@@ -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