Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer

This commit is contained in:
Peter Maquiran
2021-06-30 16:14:02 +01:00
13 changed files with 401 additions and 22 deletions
@@ -18,6 +18,7 @@ import { NewPublicationPageModule } from 'src/app/shared/publication/new-publica
import { NewActionPageModule } from 'src/app/shared/publication/new-action/new-action.module';
import { PublicationDetailPageModule } from 'src/app/shared/publication/view-publications/publication-detail/publication-detail.module';
import { HeaderPageModule } from 'src/app/shared/header/header.module';
import { EditActionPageModule } from 'src/app/shared/publication/edit-action/edit-action.module';
@NgModule({
@@ -32,6 +33,7 @@ import { HeaderPageModule } from 'src/app/shared/header/header.module';
NewPublicationPageModule,
PublicationDetailPageModule,
NewActionPageModule,
EditActionPageModule,
],
declarations: [
PublicationsPage,
@@ -44,7 +44,7 @@
<p class="item-content-title my-10">{{viagem.Description}}</p>
<p class="item-content-detail my-5">{{viagem.Detail}}</p>
</div>
<div (click)="openOptions(viagem.ProcessId)" class="item-options cursor-pointer" autoHide="false">
<div (click)="openOptions(viagem.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
</div>
</div>
@@ -60,7 +60,7 @@
<p class="item-content-title">{{evento.Description}}</p>
</ion-label>
</div>
<div (click)="openOptions(evento.ProcessId)" class="item-options cursor-pointer" autoHide="false">
<div (click)="openOptions(evento.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
</div>
</div>
@@ -120,6 +120,10 @@
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
(closeDesktopComponent)="closeDesktopComponent($event)"
></app-new-action>
<app-edit-action>
</app-edit-action>
</div>
@@ -157,6 +157,7 @@ ion-toolbar{
}
.item-options{
width: 25px;
font-size: 20px;
}
@@ -174,4 +175,7 @@ ion-toolbar{
.aside-left{
width: 35%;
}
.item-options{
display: block !important;
}
}
@@ -277,20 +277,46 @@ export class PublicationsPage implements OnInit {
}
}
async openOptions(taskAction?: any) {
const popover = await this.modalController.create({
async openOptions(id?: string) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: ActionsOptionsPage,
cssClass: 'model aside-modal',
cssClass: 'model profile-modal search-submodal',
componentProps: {
/* task: this.task,
fulltask: this.fulltask, */
taskAction: taskAction,
showEnviarPendentes: false
id: id,
},
//translucent: true
});
return await popover.present();
await modal.present();
modal.onDidDismiss().then(res =>{
if(res['data']=='edit'){
this.desktopComponent.showAddActions = true;
}
});
}
}