mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
merge
This commit is contained in:
@@ -9,14 +9,14 @@
|
||||
</div>
|
||||
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<!-- <p class="logo-description-text">Presidente da República</p> -->
|
||||
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
|
||||
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
|
||||
<div class="add-line"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<!-- <p class="logo-description-text color-white">Presidente da República</p> -->
|
||||
<!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
|
||||
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
|
||||
<div class="add-line-white"></div>
|
||||
</div>
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
</div>
|
||||
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<!-- <p class="logo-description-text">Presidente da República</p> -->
|
||||
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
|
||||
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
|
||||
<div class="add-line"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<!-- <p class="logo-description-text color-white">Presidente da República</p> -->
|
||||
<!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
|
||||
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
|
||||
<div class="add-line-white"></div>
|
||||
</div>
|
||||
@@ -45,7 +45,8 @@
|
||||
</ion-buttons>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<ion-label (click)="asyncNotification()">{{notificationdata.length}} novas notificações</ion-label>
|
||||
<ion-label (click)="asyncNotification()" *ngIf="notificationdata">{{notificationdata.length}} novas notificações</ion-label>
|
||||
<ion-label (click)="asyncNotification()" *ngIf="!notificationdata">0 novas notificações</ion-label>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<span class="date">{{loadedEvent.Location}}</span>
|
||||
|
||||
<div *ngIf="loadedEvent.Organizer">
|
||||
<div *ngIf="loadedEvent.Organizer.Name == 'Agenda do Presidente da República' ">
|
||||
<div *ngIf="loadedEvent.Organizer.Name == 'Agenda do Calendário Partilhado' ">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
|
||||
@@ -21,6 +21,7 @@ import { Event } from '../../models/event.model';
|
||||
import { EditEventPage } from 'src/app/pages/agenda/edit-event/edit-event.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -54,6 +55,8 @@ export class ViewEventPage implements OnInit {
|
||||
header = true
|
||||
task: ExpedientTaskModalPageNavParamsTask;
|
||||
LoadedDocument: any = null;
|
||||
CalendarId
|
||||
sesseionStora = SessionStore
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -74,6 +77,7 @@ export class ViewEventPage implements OnInit {
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.eventId = this.navParams.get('eventId');
|
||||
this.CalendarId = this.navParams.get('CalendarId');
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
this.eventBody = { BodyType: "1", Text: "" };
|
||||
@@ -127,24 +131,51 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
loadEvent() {
|
||||
const loader = this.toastService.loading();
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
|
||||
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.RouteService.goBack();
|
||||
}, (error) => {
|
||||
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
} else {
|
||||
|
||||
|
||||
if(this.CalendarId) {
|
||||
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
deleteEvent() {
|
||||
|
||||
@@ -14,28 +14,32 @@
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-content fullscreen>
|
||||
<div class="media d-flex align-items-center justify-center">
|
||||
<div *ngIf="view" class="media d-flex align-items-center justify-center">
|
||||
<div class="media-content w-100 d-flex align-items-center justify-center">
|
||||
|
||||
<ion-slides style="width: 100%; height: 100%;" [options]="sliderOpts">
|
||||
<ion-slide>
|
||||
<div class="swiper-zoom-container">
|
||||
<div>
|
||||
<div class="swiper-zoom-container" >
|
||||
<div style="overflow: scroll; width: 100%; height:100%;">
|
||||
<img src="{{image}}">
|
||||
</div>
|
||||
<!-- <div *ngIf="type == 'application/pdf'">
|
||||
<iframe width="100%" height="100%" [src]="base64Sanitize" type="application/vnd.openxmlformats-officedocument.wordprocessingml.document"></iframe> -->
|
||||
|
||||
<!-- <pdf-viewer [src]="image"
|
||||
[render-text]="true"
|
||||
[original-size]="false"
|
||||
style="width: 400px; height: 500px"
|
||||
></pdf-viewer> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div *ngIf="!view" class="swiper-zoom-container" >
|
||||
<img src="{{image}}">
|
||||
</div>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-slides *ngIf="!view" style="width: 100%; height: 100%;" [options]="sliderOpts">
|
||||
<ion-slide>
|
||||
<div class="swiper-zoom-container" >
|
||||
<img src="{{image}}">
|
||||
</div>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
|
||||
|
||||
</ion-content>
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ModalController, NavParams, Platform } from '@ionic/angular';
|
||||
import { DomSanitizer} from '@angular/platform-browser';
|
||||
import { pdfDefaultOptions } from 'ngx-extended-pdf-viewer';
|
||||
|
||||
@@ -14,10 +14,10 @@ export class ViewMediaPage implements OnInit {
|
||||
type: any;
|
||||
name: string
|
||||
_updatedAt: string
|
||||
view: boolean
|
||||
|
||||
sliderOpts = {
|
||||
zoom: true,
|
||||
maxRation: 2
|
||||
zoom: true
|
||||
};
|
||||
|
||||
base64Sanitize:any = "";
|
||||
@@ -26,6 +26,7 @@ export class ViewMediaPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private navParams:NavParams,
|
||||
public sanitizer: DomSanitizer,
|
||||
private platform: Platform,
|
||||
|
||||
) {
|
||||
this.image = this.navParams.get('image')
|
||||
@@ -38,6 +39,12 @@ export class ViewMediaPage implements OnInit {
|
||||
ngOnInit() {
|
||||
console.log(this.image)
|
||||
this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image);
|
||||
|
||||
if (this.platform.is('desktop')) {
|
||||
this.view = true;
|
||||
} else {
|
||||
this.view = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,10 +67,6 @@ export class ViewMediaPage implements OnInit {
|
||||
const blob = new Blob(byteArrays, { type: contentType });
|
||||
return blob;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss()
|
||||
|
||||
Reference in New Issue
Block a user