mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
route problem solved
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div class="main-header d-flex">
|
||||
<div class="title-content d-flex justify-between width-100">
|
||||
<div class="left">
|
||||
<button class="btn-no-color d-flex align-center" (click)="close()">
|
||||
<button class="btn-no-color d-flex align-center" (click)="goBack()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ExpedientTaskModalPage } from '../../gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { BookMeetingModalPage } from '../../gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -51,18 +51,25 @@ export class ViewEventPage implements OnInit {
|
||||
private iab: InAppBrowser,
|
||||
private processes: ProcessesService,
|
||||
public popoverController: PopoverController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
)
|
||||
{
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.loadedEvent.Body = this.eventBody;
|
||||
/* this.eventId = this.navParams.get('eventId'); */
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>{
|
||||
this.eventId = paramMap['params'].eventId;
|
||||
});
|
||||
|
||||
/* this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["eventId"]) {
|
||||
this.eventId = params["eventId"];
|
||||
console.log(params["eventId"]);
|
||||
}
|
||||
}); */
|
||||
|
||||
}
|
||||
|
||||
@@ -82,10 +89,22 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
close(){
|
||||
/* console.log(this.isEventEdited); */
|
||||
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
this.router.navigate(['/home',params["params"].caller]);
|
||||
});
|
||||
|
||||
/* this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["caller"]) {
|
||||
this.router.navigate(['/home',params["caller"]]);
|
||||
}
|
||||
}); */
|
||||
}
|
||||
|
||||
loadEvent(){
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, LOCALE_ID, EventEmitter, Output } from '@angular/core';
|
||||
import { Component, OnInit, LOCALE_ID, EventEmitter, Output, Renderer2, ElementRef } from '@angular/core';
|
||||
|
||||
import { Event } from '../../models/event.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
@@ -65,7 +65,8 @@ export class EventsPage implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
|
||||
constructor(private eventService: EventsService,
|
||||
constructor(
|
||||
private eventService: EventsService,
|
||||
private router: Router,
|
||||
private storageService:StorageService,
|
||||
public activatedRoute: ActivatedRoute,
|
||||
@@ -73,7 +74,8 @@ export class EventsPage implements OnInit {
|
||||
private authService: AuthService,
|
||||
private processes:ProcessesService,
|
||||
/* private gabineteService: GabineteDigitalPage, */
|
||||
private modalController:ModalController) {
|
||||
private modalController:ModalController,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -273,37 +275,7 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
|
||||
goToEvent(eventId:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"eventId": eventId,
|
||||
"caller": "agenda"
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/agenda', eventId, 'events']);
|
||||
}
|
||||
|
||||
async viewEventDetail(eventId:any) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
componentProps:{
|
||||
eventId: eventId,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res){
|
||||
console.log(res);
|
||||
this.RefreshEvents();
|
||||
}
|
||||
});
|
||||
this.router.navigate(['/home/events', eventId, 'events']);
|
||||
}
|
||||
|
||||
|
||||
@@ -334,14 +306,14 @@ export class EventsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goToExpediente(serialNumber:any){
|
||||
goToExpediente(SerialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"serialNumber": SerialNumber,
|
||||
"caller": "agenda"
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'events']);
|
||||
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
|
||||
+2
-1
@@ -75,11 +75,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
||||
if (!paramMap["params"].SerialNumber) {
|
||||
console.log('HERE');
|
||||
|
||||
return;
|
||||
}
|
||||
console.log(paramMap);
|
||||
|
||||
/* this.serialnumber = paramMap.get('SerialNumber'); */
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
});
|
||||
|
||||
@@ -13,15 +13,18 @@
|
||||
padding-right: 10px;
|
||||
}
|
||||
.btn-modal-dismiss{
|
||||
display: flex;
|
||||
width: 50px !important;
|
||||
|
||||
height: fit-content;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
margin-left: 25px !important;
|
||||
/* border: 1px solid red; */
|
||||
margin-top: 5px !important;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
|
||||
btn-modal-dismiss icon{
|
||||
font-size: 45px !important;
|
||||
ion-icon{
|
||||
font-size: 32pt !important;
|
||||
}
|
||||
}
|
||||
.ion-align-content-center{
|
||||
|
||||
Reference in New Issue
Block a user