Fix option

This commit is contained in:
Peter Maquiran
2021-08-19 16:19:29 +01:00
parent a04304e5e5
commit 29add3f3d5
6 changed files with 58 additions and 23 deletions
+1 -4
View File
@@ -42,10 +42,7 @@
</ion-item>
</ion-list>
</div>
<ion-item hidden lines="none">
<ion-textarea [(ngModel)]="note" rows="4" cols="20" placeholder="Adicionar um comentário para execução..."></ion-textarea>
</ion-item>
</div>
</div>
</ion-content>
<ion-footer class="ion-no-border">
<div class="buttons width-100">
+2 -2
View File
@@ -32,11 +32,11 @@ export class AddNotePage implements OnInit {
}
close(){
close() {
this.modalController.dismiss('');
}
save(){
save() {
let body = {
"note":this.note,
"documents":this.documents,
+19 -14
View File
@@ -41,8 +41,8 @@
</div>
</div>
<div hidden class="ion-item-container-no-border">
<ion-label>
<div *ngIf="hideThisFeature" class="ion-item-container-no-border">
<ion-label (click)="getDoc()">
<div class="attach-icon">
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
</div>
@@ -52,18 +52,23 @@
</ion-label>
</div>
<div *ngIf="loadedAttachments">
<ion-item>
<ion-label>Documentos Anexados</ion-label>
</ion-item>
<ion-list>
<ion-item *ngFor="let attachment of loadedAttachments">
<ion-label>
<h4 class="attach-title-item">{{attachment.Description}}</h4>
<p><span class="span-left">{{attachment.Stakeholders}}</span><span class="span-right"> {{ attachment.CreateDate | date: 'dd/MM/yyyy' }}</span></p>
</ion-label>
</ion-item>
</ion-list>
<div class="content width-100 overflow-y-auto height-100">
<div class="list">
<ion-list *ngFor="let document of documents; let i = index">
<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 cursor-pointer" (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 | date: 'dd-MM-yyyy HH:mm'}} </span></p>
</ion-label>
</ion-item>
</ion-list>
</div>
</div>
</div>
+34
View File
@@ -13,6 +13,8 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ToastService } from 'src/app/services/toast.service';
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
import { SearchDocument } from 'src/app/models/search-document';
import { SearchPage } from 'src/app/pages/search/search.page';
@Component({
selector: 'app-delegar',
@@ -38,6 +40,9 @@ export class DelegarPage implements OnInit {
formLocationSatus: boolean = false;
showAttendees= false;
hideThisFeature: boolean = true;
documents: SearchDocument[] = [];
constructor(
private modalController: ModalController,
private router:Router,
@@ -63,6 +68,7 @@ export class DelegarPage implements OnInit {
let selectedEndDate = new Date();
/* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */
this.hideThisFeature = this.navParams.get('showAttachmentBtn');
}
ngOnInit() {
@@ -187,4 +193,32 @@ export class DelegarPage implements OnInit {
this.taskParticipants = taskParticipants;
}
async getDoc() {
const modal = await this.modalController.create({
component: SearchPage,
cssClass: 'modal-width-100-width-background modal',
componentProps: {
type: 'AccoesPresidenciais & ArquivoDespachoElect',
showSearchInput: true,
select: true
}
});
await modal.present();
modal.onDidDismiss().then((res)=>{
if(res){
const data = res.data;
this.documents.push(data.selected);
}
});
}
removeAttachment(index: number){
this.documents = this.documents.filter( (e, i) => index != i);
}
}