mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
change route for publications
This commit is contained in:
@@ -133,7 +133,13 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
|
||||
async getAttachments(instanceId:string){
|
||||
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(instanceId).toPromise();
|
||||
try {
|
||||
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(instanceId).toPromise();
|
||||
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
viewDocument(sourceId){
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<ion-list>
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle cursor-pointer" lines="none"
|
||||
*ngFor="let event of eventsMDGPRList" (click)="goToEventDetail(event)">
|
||||
*ngFor="let event of eventsMDGPRList" (click)="goToEventToApproveDetail(event.serialNumber)">
|
||||
|
||||
<div class="content-mdgpr-{{event.workflowInstanceDataFields.Agenda}} width-100">
|
||||
<div class="approve-event-time">
|
||||
@@ -57,7 +57,7 @@
|
||||
<div *ngIf="eventsPRList">
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle cursor-pointer" lines="none"
|
||||
*ngFor="let event of eventsPRList" (click)="goToEventDetail(event)">
|
||||
*ngFor="let event of eventsPRList" (click)="goToEventToApproveDetail(event.serialNumber)">
|
||||
<div class="content-pr-{{event.workflowInstanceDataFields.Agenda}} width-100">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.workflowInstanceDataFields.StartDate | date: 'hh:mm'}}</p>
|
||||
|
||||
@@ -75,27 +75,15 @@ export class EventListPage implements OnInit {
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
goToEventDetail(eventToAprove){
|
||||
let InstanceId;
|
||||
|
||||
if(!eventToAprove.workflowInstanceDataFields.hasOwnProperty('InstanceId')){
|
||||
InstanceId = ''
|
||||
} else {
|
||||
InstanceId =eventToAprove.workflowInstanceDataFields.InstanceId
|
||||
}
|
||||
|
||||
goToEventToApproveDetail(serialNumber:string){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": eventToAprove.serialNumber,
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/event-list/approve-event'], navigationExtras)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
doRefresh() {
|
||||
this.LoadToApproveEvents();
|
||||
console.log('refresh');
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="main-content overflow-auto-y">
|
||||
<div class="item d-flex"
|
||||
*ngFor="let viagem of publicationsTravelFolderList"
|
||||
(click)="viewPublications(viagem.ProcessId)">
|
||||
(click)="goToPublicationsList(viagem.ProcessId)">
|
||||
<div class="item-icon">
|
||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -152,6 +152,17 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
goToPublicationsList(folderId: string){
|
||||
if( window.innerWidth <= 800){
|
||||
this.router.navigate(['/home/publications',folderId]);
|
||||
} else {
|
||||
this.closeDesktopComponent();
|
||||
this.folderId = folderId
|
||||
this.desktopComponent.showViewPublication = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async viewPublications(folderId: string) {
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
|
||||
@@ -8,6 +8,7 @@ import { ViewPublicationsPageRoutingModule } from './view-publications-routing.m
|
||||
|
||||
import { ViewPublicationsPage } from './view-publications.page';
|
||||
import { ComponentsModule } from 'src/app/components/components.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -15,7 +16,8 @@ import { ComponentsModule } from 'src/app/components/components.module';
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
ComponentsModule,
|
||||
ViewPublicationsPageRoutingModule
|
||||
ViewPublicationsPageRoutingModule,
|
||||
HeaderPageModule,
|
||||
],
|
||||
exports: [ViewPublicationsPage],
|
||||
declarations: [ViewPublicationsPage]
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
|
||||
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="bg-blue">
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-header class="ion-no-border">
|
||||
<!-- <ion-toolbar class="bg-blue"> -->
|
||||
<div class="main-header">
|
||||
<div class="title-content d-flex">
|
||||
<div class="back-icon" (click)="close()">
|
||||
<div class="back-icon" (click)="goBack()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-title flex-grow-1">
|
||||
@@ -18,7 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
<!-- </ion-toolbar> -->
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
}
|
||||
ion-content{
|
||||
--background: transparent;
|
||||
transform: translate3d(0, 5px, 0);
|
||||
//transform: translate3d(0, 5px, 0);
|
||||
--border-radius: 30px;
|
||||
}
|
||||
ion-toolbar{
|
||||
@@ -52,7 +52,6 @@
|
||||
overflow:hidden;
|
||||
padding: 25px 20px 0px 20px;
|
||||
color:#000;
|
||||
|
||||
}
|
||||
.main-content{
|
||||
width: 100%; /* 400px */
|
||||
@@ -60,7 +59,6 @@
|
||||
font-family: Roboto;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
|
||||
padding: 15px 20px 0 20px;
|
||||
}
|
||||
.content-top{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { Publication } from 'src/app/models/publication';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
@@ -24,11 +25,22 @@ export class ViewPublicationsPage implements OnInit {
|
||||
private loadingController: LoadingService,
|
||||
private modalController: ModalController,
|
||||
private publications: PublicationsService,
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
/* private navParams: NavParams, */
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
)
|
||||
{
|
||||
this.item = new PublicationFolder();
|
||||
this.folderId = this.navParams.get('folderId');
|
||||
}
|
||||
/* this.folderId = this.navParams.get('folderId'); */
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params);
|
||||
|
||||
if(params["params"]) {
|
||||
this.folderId = params["params"].folderId;
|
||||
console.log(params["params"]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.folderId);
|
||||
@@ -48,6 +60,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
goBack(){
|
||||
this.router.navigate(['/home/publications']);
|
||||
}
|
||||
getPublicationDetail(){
|
||||
this.publications.GetPublicationFolderById(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
Reference in New Issue
Block a user