This commit is contained in:
Peter Maquiran
2023-01-18 17:03:58 +01:00
parent 16de340501
commit 3a2d89f98b
10 changed files with 74 additions and 20 deletions
@@ -1,13 +1,13 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
import { ModalController, NavParams } from '@ionic/angular'; import { NavParams } from '@ionic/angular';
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage'; import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page'; import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
import { ProcessesService } from 'src/app/services/processes.service'; import { ProcessesService } from 'src/app/services/processes.service';
import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page'; import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page';
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page'; import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
import { AlertService } from 'src/app/services/alert.service';
import { AlertController, ModalController } from '@ionic/angular';
@Component({ @Component({
selector: 'app-view-document', selector: 'app-view-document',
templateUrl: './view-document.page.html', templateUrl: './view-document.page.html',
@@ -27,6 +27,7 @@ export class ViewDocumentPage implements OnInit {
private navParams: NavParams, private navParams: NavParams,
private sanitazer: DomSanitizer, private sanitazer: DomSanitizer,
private processes: ProcessesService, private processes: ProcessesService,
private alertController: AlertController,
) { ) {
this.file = this.navParams.get('file'); this.file = this.navParams.get('file');
this.applicationId = this.navParams.get('applicationId'); this.applicationId = this.navParams.get('applicationId');
@@ -44,10 +45,27 @@ export class ViewDocumentPage implements OnInit {
ngOnInit() { ngOnInit() {
this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=> { this.processes.GetViewer(this.docId, this.applicationId).subscribe(async(res)=> {
console.log(res)
const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/') const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/')
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link); this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
if(res == "") {
const alert = await this.alertController.create({
cssClass: 'my-custom-class',
//header: 'Apagar evento!',
message: 'Sem imagem',
buttons: [
{
text: 'Sim',
handler: () => {
this.close();
}
}
]
});
}
}, ()=>{ }, ()=>{
this.close(); this.close();
}); });
+3 -1
View File
@@ -153,8 +153,8 @@ export class ViewEventPage implements OnInit {
}); });
} else { } else {
if(this.CalendarId) { if(this.CalendarId) {
console.log('calendar id')
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => { this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
this.loadedEvent = res; this.loadedEvent = res;
this.addEventToDb(res); this.addEventToDb(res);
@@ -172,6 +172,8 @@ export class ViewEventPage implements OnInit {
} }
loader.remove() loader.remove()
}); });
} else {
console.log('no calendar id')
} }
} }
@@ -331,6 +331,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
async goToEvent(event: any) { async goToEvent(event: any) {
// console.log(event)
let classs; let classs;
if (window.innerWidth < 701) { if (window.innerWidth < 701) {
classs = 'modal modal-desktop' classs = 'modal modal-desktop'
@@ -259,7 +259,7 @@
</div> </div>
<div (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center"> <div *ngIf="deplomasStore.countDiplomasAssinadoListCount >= 1" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon>
@@ -372,7 +372,6 @@
</div> </div>
</div> </div>
</div> </div>
@@ -106,6 +106,8 @@ export class GabineteDigitalPage implements OnInit {
AllProcess = [] AllProcess = []
workerList : Worker
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage; @ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
@ViewChild(PendentesPage) pendentesListPage: PendentesPage; @ViewChild(PendentesPage) pendentesListPage: PendentesPage;
@ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage; @ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage;
@@ -126,6 +128,12 @@ export class GabineteDigitalPage implements OnInit {
public NotificationsService: NotificationsService public NotificationsService: NotificationsService
) { ) {
this.workerList = new Worker(new URL('./list.worker.js', import.meta.url));
this.workerList.onmessage = (oEvent) => {
this.AllProcess = oEvent.data
}
window.onresize = (event) => { window.onresize = (event) => {
// if not mobile remove all component // if not mobile remove all component
if (window.innerWidth < 701) { if (window.innerWidth < 701) {
@@ -571,6 +579,20 @@ export class GabineteDigitalPage implements OnInit {
this.AllProcess = this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento) this.AllProcess = this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr).concat(this.despachoStore.list) .concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr).concat(this.despachoStore.list)
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList) .concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList)
// try{
// this.workerList.postMessage([
// this.expedientegbstore.list,this.pedidosstore.listparecer,this.pedidosstore.listdeferimento,
// this.despachoprstore.list, this.eventoaprovacaostore.listmd, this.eventoaprovacaostore.listpr, this.despachoStore.list,
// this.deplomasStore.diplomasParaAssinarList, this.deplomasStore.diplomasAssinadoList, this.deplomasStore.DiplomaGerarList
// ])
// } catch (e) {
// this.AllProcess = this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
// .concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr).concat(this.despachoStore.list)
// .concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList)
// }
} }
get getAllProcessCount() { get getAllProcessCount() {
@@ -0,0 +1,10 @@
onmessage = function(oEvent) {
const list = Event.data
var a = []
postMessage(
a.concat.apply([], [list])
);
};
@@ -25,6 +25,7 @@ export class ChatMethodsService {
"end_date": data.end, "end_date": data.end,
"venue": data.venue, "venue": data.venue,
"id": data.id, "id": data.id,
"calendarId": data.calendarId
} }
} }
} }
@@ -585,7 +585,6 @@ export class NewEventPage implements OnInit {
this.postEvent.CalendarName this.postEvent.CalendarName
const CalendarId = this.selectedCalendarId() const CalendarId = this.selectedCalendarId()
let loader = this.toastService.loading(); let loader = this.toastService.loading();
@@ -643,15 +642,18 @@ export class NewEventPage implements OnInit {
} }
selectedCalendarId () { selectedCalendarId () {
console.log('1:1',this.eventService.calendarNamesType,'2', this.CalendarName)
if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.postEvent.CalendarName == 'Oficial') { if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.postEvent.CalendarName == 'Oficial') {
console.log('1')
return this.eventService.calendarNamesType[this.CalendarName]['OficialId'] return this.eventService.calendarNamesType[this.CalendarName]['OficialId']
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal'] && this.postEvent.CalendarName == 'Pessoal') { } else if (this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal'] && this.postEvent.CalendarName == 'Pessoal') {
console.log('2')
return this.eventService.calendarNamesType[this.CalendarName]['PessoalId'] return this.eventService.calendarNamesType[this.CalendarName]['PessoalId']
} else { } else {
console.log('1:1',this.eventService.calendarNamesType,'2', this.CalendarName)
return '11:11' return '11:11'
} }
} }
@@ -1,5 +1,5 @@
<ion-header class="ion-no-border"> <ion-header class="ion-no-border">
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <!-- <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> -->
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Todas as tarefas</ion-label></div> <div class="thetitle"><ion-label >Todas as tarefas</ion-label></div>
<div class="theicon"> <div class="theicon">
@@ -120,5 +120,3 @@
</ion-content> </ion-content>
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = { export let versionData = {
"shortSHA": "b890b58a8", "shortSHA": "16de34050",
"SHA": "b890b58a86e4c459836236774015a1bc38ee0b1c", "SHA": "16de340501dfaa35a26f36e5dfcc4424eec7f9f3",
"branch": "no_bug_movemente", "branch": "no_bug_movemente",
"lastCommitAuthor": "'Peter Maquiran'", "lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Wed Jan 18 11:59:53 2023 +0100'", "lastCommitTime": "'Wed Jan 18 14:40:12 2023 +0100'",
"lastCommitMessage": "fix", "lastCommitMessage": "fix chat delete message",
"lastCommitNumber": "4652", "lastCommitNumber": "4653",
"change": "", "change": "",
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: .gitignore\n\tmodified: src/app/pages/chat/chat.page.ts\n\tmodified: src/app/services/chat/message.service.ts\n\tmodified: src/app/services/chat/room.service.ts\n\tmodified: src/app/services/events.service.ts", "changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/modals/view-document/view-document.page.ts\n\tmodified: src/app/modals/view-event/view-event.page.ts\n\tmodified: src/app/pages/chat/messages/messages.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tnew file: src/app/pages/gabinete-digital/list.worker.js\n\tmodified: src/app/services/chat/chat-methods.service.ts\n\tmodified: src/app/shared/agenda/new-event/new-event.page.ts\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.html",
"changeAuthor": "peter.maquiran" "changeAuthor": "peter.maquiran"
} }