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
+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);
}
}