This commit is contained in:
Peter Maquiran
2023-01-24 15:56:47 +01:00
parent 0748612054
commit fbd50137f3
153 changed files with 5997 additions and 953 deletions
+13 -14
View File
@@ -93,7 +93,6 @@
</div>
<!-- Move forward one screen of the slides -->
<div (click)="next()" class="arrow cursor-pointer resize">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
@@ -103,7 +102,7 @@
</ion-row>
<ion-row class="ion-align-items-center">
<div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="profile == 'mdgpr' " (click)="changeProfile()">
<div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.hasSharedCalendar && eventService.hasOwnCalendar" class="calendar-letters" [class.cal-reverse]="profile == 'mdgpr' " (click)="changeProfile()">
<div class="text" *ngIf="profile == 'mdgpr'">
MC
</div>
@@ -114,11 +113,11 @@
</div>
<button *ngIf="profile == 'mdgpr' && ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<button *ngIf="profile == 'mdgpr' && ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') && eventService.hasSharedCalendar " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<ion-icon class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
</button>
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') && eventService.hasSharedCalendar" (click)="changeProfile()" class="btn-no-color resize">
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
</button>
@@ -279,13 +278,12 @@
<div class="time-end text-center">o dia</div>
</div>
<div class="schedule-details">
{{ event.event.CalendarName }}
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -322,11 +320,11 @@
<div class="time-end">o dia</div>
</div>
<div class="schedule-details">
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -366,11 +364,12 @@
<div class="time-end">o dia</div>
</div>
<div class="schedule-details">
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
<p class="m-0">{{event.event.Subject}} ....</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'"> {{SessionStore.user.FullName}} </div>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'"> {{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -417,7 +416,7 @@
[eventAttendees]="contacts"
(clearContact)="clearContact()"
(setContact)="setContact($event)"
[CalendarDate]="viewDate"
(setIntervenient)="setIntervenient($event)"
(setIntervenientCC)="setIntervenientCC($event)"
></app-new-event>
+8 -3
View File
@@ -509,17 +509,21 @@ td.monthview-primary-with-event {
width: 100%;
overflow: auto;
.location{
.location {
width: 100%;
font-family: Roboto;
font-size: 13px;
color: black;
font-size: 14px;
}
.calendar-owner {
font-size: 14px;
}
.description{
width: 100%;
font-family: Roboto;
font-size: 15px;
font-weight: bold;
color: var(--title-text-color);
}
@@ -528,6 +532,7 @@ td.monthview-primary-with-event {
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis !important;
font-size: 17px;
}
}
+15 -3
View File
@@ -108,8 +108,8 @@ export class AgendaPage implements OnInit {
postEvent: any;
// temporary data
taskParticipants: any[] = [];
taskParticipantsCc: any[] = [];
taskParticipants: EventPerson[] = [];
taskParticipantsCc: EventPerson[] = [];
adding: "intervenient" | "CC" = "intervenient";
@ViewChild(CalendarComponent) myCal: CalendarComponent;
@@ -1225,12 +1225,19 @@ export class AgendaPage implements OnInit {
this.IsEvent = 'add';
if (window.innerWidth <= 1024) {
let taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
const modal = await this.modalCtrl.create({
component: NewEventPage,
componentProps: {
segment: this.segment,
profile: this.profile,
eventSelectedDate: this.eventSelectedDate
eventSelectedDate: this.eventSelectedDate,
attendees: taskParticipants,
CalendarDate: this.viewDate
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
@@ -1244,6 +1251,11 @@ export class AgendaPage implements OnInit {
});
} else {
this.mobileComponent.showAddNewEvent = true;
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
@@ -30,7 +30,7 @@
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars}}">
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
</mat-option>
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular';
import { ModalController, NavParams, Platform } from '@ionic/angular';
import { EventAttachment } from 'src/app/models/attachment.model';
import { EventBody } from 'src/app/models/eventbody.model';
import { EventPerson } from 'src/app/models/eventperson.model';
@@ -17,6 +17,7 @@ import { ThemeService } from 'src/app/services/theme.service';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { SessionStore } from 'src/app/store/session.service';
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -62,6 +63,7 @@ export class NewEventPage implements OnInit {
eventAttendees: EventPerson[];
selectedSegment: string;
selectedDate: Date;
CalendarDate: Date;
recurringTypes: any;
selectedRecurringType: any;
@@ -84,6 +86,7 @@ export class NewEventPage implements OnInit {
autoStartTime;
autoEndTime;
CalendarNamesOptions = ['Oficial', 'Pessoal']
roomId:string;
constructor(
private modalController: ModalController,
@@ -91,7 +94,9 @@ export class NewEventPage implements OnInit {
public eventService: EventsService,
private attachmentsService: AttachmentsService,
private toastService: ToastService,
public ThemeService: ThemeService
public ThemeService: ThemeService,
private platform: Platform,
private chatMethodService: ChatMethodsService,
) {
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
@@ -99,27 +104,29 @@ export class NewEventPage implements OnInit {
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
this.roomId = this.navParams.get('roomId');
this.selectedSegment = this.navParams.get('segment');
this.selectedDate = this.navParams.get('eventSelectedDate');
this.taskParticipants = this.navParams.get('attendees');
this.CalendarDate = this.navParams.get('CalendarDate')
}
ngOnInit() {
if (this.platform.is('desktop')) {
// this.taskParticipants = [];
}
if(!this.CalendarName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
} else if(this.eventService.calendarNamesAry.length == 1 ) {
console.log(this.eventService.calendarNamesAry)
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
}
ngOnInit() {
this.CalendarName = this.loggeduser.Profile;
this.selectedRecurringType = "-1";
this.getRecurrenceTypes();
@@ -174,14 +181,23 @@ export class NewEventPage implements OnInit {
}
};
this.setDefaultTime()
}
setDefaultTime() {
console.log(this.CalendarDate)
this.postEvent.StartDate = this.roundTimeQuarterHour(this.CalendarDate);
this.postEvent.EndDate = this.postEvent.StartDate;
}
close() {
this.modalController.dismiss();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
roundTimeQuarterHour(timeToReturn?) {
var timeToReturn = timeToReturn || new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
@@ -412,8 +428,22 @@ export class NewEventPage implements OnInit {
});
let data1 = {
"subject": this.postEvent.Subject,
"start": this.postEvent.StartDate,
"end": this.postEvent.EndDate,
"venue": this.postEvent.Location,
"id": eventId,
"calendarId": CalendarId
}
if(this.roomId) {
this.chatMethodService.sendMessage(this.roomId, data1);
}
this.toastService._successMessage()
this.modalController.dismiss(this.postEvent);
let data = Object.assign(this.postEvent,{id:eventId})
this.modalController.dismiss(data);
} catch (error) {
this.toastService._badRequest()
@@ -485,12 +515,8 @@ export class NewEventPage implements OnInit {
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
if(newAttendees.length) {
this.setIntervenient(newAttendees);
}
if(newAttendeesCC) {
this.setIntervenientCC(newAttendeesCC);
}
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
@@ -499,11 +525,13 @@ export class NewEventPage implements OnInit {
}
setIntervenient(data) {
this.taskParticipants = [];
this.taskParticipants = data;
this.postEvent.Attendees = data;
}
setIntervenientCC(data){
this.taskParticipantsCc = [];
this.taskParticipantsCc = data;
}
+3 -9
View File
@@ -1,4 +1,4 @@
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
import { HttpHeaders, HttpParams } from '@angular/common/http';
import {
Component,
OnInit,
@@ -115,7 +115,6 @@ export class ChatPage implements OnInit {
public ChatSystemService: ChatSystemService,
) {
this.loggedUserChat = SessionStore.user.ChatData?.data;
this.headers = new HttpHeaders();
window.onresize = (event) => {
if (window.innerWidth > 701) {
@@ -187,6 +186,8 @@ export class ChatPage implements OnInit {
if (window.innerWidth < 701) {
this.idSelected = '';
this.hideRefreshBtn = false;
this.closeAllDesktopComponents()
this.ChatSystemService.getRoomById(this.roomId).roomLeave()
}
else {
this.hideRefreshBtn = true;
@@ -352,8 +353,6 @@ export class ChatPage implements OnInit {
async closeNewEventComponentAndOpenChat({roomId}) {
this.closeAllDesktopComponents();
console.log(roomId)
this.ChatSystemService._group.forEach((room)=>{
if(room.id == roomId) {
@@ -591,11 +590,8 @@ export class ChatPage implements OnInit {
return dateB - dateA;
});
//
})
}
}
@@ -617,7 +613,6 @@ export class ChatPage implements OnInit {
_updatedAt: element._updatedAt
}
groupsArray.push(roomList)
});
@@ -636,7 +631,6 @@ export class ChatPage implements OnInit {
updatedat: element._updatedAt
}
this.sqlservice.addChatListRoom(roomList);
});
}
@@ -62,11 +62,12 @@
<ion-label *ngIf="msg.delate == true">{{msg.msg}}</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
{{last ? scrollToBottom() : ''}}
@@ -102,10 +103,12 @@
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image" >
<ion-icon *ngIf="msg.attachments[0].image_url == null" name="download-outline"></ion-icon>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
@@ -155,12 +158,14 @@
</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()"> Tentar</div>
</ion-label>
</div>
</div>
+19 -33
View File
@@ -60,10 +60,12 @@
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
@@ -97,10 +99,12 @@
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
@@ -160,13 +164,13 @@
</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
@@ -194,24 +198,6 @@
</div>
<div *ngIf="msg.file && msg.delate == false">
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
<button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal">
<ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label>
</button><br />
<ion-label class="info-meeting-medium">
<ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a
{{showDateDuration(msg.file.end_date)}}
</ion-label><br />
<ion-label class="info-meeting-medium">
<ion-icon></ion-icon>
<ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}
</ion-label><br />
</div>
{{last ? scrollToBottom() : ''}}
</div>
<div *ngIf="msg.file && msg.delate == true">
Apagou a mensagem
</div>
+21 -4
View File
@@ -11,7 +11,6 @@ import { ChatService } from 'src/app/services/chat.service';
import { FileService } from 'src/app/services/functions/file.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { NewEventPage } from 'src/app/shared/agenda/new-event/new-event.page';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/messages-options.page';
import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
@@ -41,6 +40,7 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { NewEventPage } from '../../agenda/new-event/new-event.page';
const IMAGE_DIR = 'stored-images';
@@ -331,6 +331,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
async goToEvent(event: any) {
// console.log(event)
let classs;
if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
@@ -584,7 +586,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
async bookMeeting() {
this.attendees = this.members.map((val) => {
let attendees = this.ChatSystemService.getDmRoom(this.roomId).members.map((val) => {
return {
Name: val.name,
EmailAddress: val.username + "@" + environment.domain,
@@ -597,15 +599,30 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
const modal = await this.modalController.create({
component: NewEventPage,
componentProps: {
attendees: this.attendees,
attendees: attendees,
roomId: this.roomId
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
if (data) {
if (data?.data && data.data.id) {
// const roomId = this.roomId
// this.ChatSystemService.getDmRoom(roomId).send({
// file: {
// "type": "application/meeting",
// "subject": data.data.Subject,
// "start_date": data.data.StartDate,
// "end_date": data.data.EndDate,
// "venue": data.data.venue,
// "id": data.data.id,
// "calendarId": data.data.CalendarId
// },
// temporaryData: {}
// })
}
});
}
@@ -81,9 +81,9 @@ export class AttendeesPageModal implements OnInit {
}
remove(itm: EventPerson){
remove(itm: EventPerson) {
if(this.adding == "intervenient"){
if(this.adding == "intervenient") {
this.taskParticipants = this.taskParticipants.filter((contact, index) =>{
@@ -135,10 +135,23 @@ export class AttendeesPageModal implements OnInit {
});
}
this.contacts = result;
this.contacts = this.sort(result as any);
this.showLoader = false;
}
);
}
sort(data: []) {
return data.sort(function (a: any, b: any) {
if (a.Name > b.Name) {
return -1;
}
if (b.Name > a.Name) {
return 1;
}
return 0;
}).reverse()
}
}
+1 -1
View File
@@ -125,7 +125,7 @@
(click)="goToExpediente(task.SerialNumber)">
<div class="item-exp d-flex">
<div class="schedule-date">
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yyyy'}}</div>
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yy'}}</div>
<div class="time-start">{{task.taskStartDate | date: 'HH:mm'}}</div>
</div>
<div class="schedule-details pointer">
@@ -147,7 +147,7 @@
[min]="minDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -186,7 +186,7 @@
[min]="endMinDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -59,7 +59,7 @@ export class BookMeetingModalPage implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
@@ -130,6 +130,8 @@ export class BookMeetingModalPage implements OnInit {
authService: AuthService,
private toastService: ToastService,
public ThemeService: ThemeService,
public eventService: EventsService,
) {
this.taskParticipants = [];
@@ -148,6 +150,23 @@ export class BookMeetingModalPage implements OnInit {
this.postData.Category = 'Reunião'
if(!this.CalendarName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
console.log(this.eventService.calendarNamesAry)
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
if(this.taskParticipants.length == 0) {
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
ngOnInit() {
@@ -481,4 +500,46 @@ export class BookMeetingModalPage implements OnInit {
this.taskParticipantsCc = data;
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
// console.log("AFTER IF MINUTES: " +m);
// console.log("AFTER HOURS: " +h);
return timeToReturn;
}
setStartDate(){
this.postData.StartDate = this.roundTimeQuarterHour();
}
setEndDate(){
this.postData.EndDate = this.postData.StartDate;
}
}
@@ -71,7 +71,8 @@
<div *ngIf="task.Agenda" class="item-middle-detail-extra">
<div class="item-middle-detail-extra-text">
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial PR' || task.WorkflowName == 'Agenda Pessoal PR'">
Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Presidente da República
<!-- Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Presidente da República -->
Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Titular
</ion-label>
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial MDGPR' || task.WorkflowName == 'Agenda Pessoal MDGPR'">
A sua agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}}
@@ -227,14 +228,15 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'showDespachosPr'" src="assets/images/theme/gov/icons-despachos-presidente-hover.svg"></ion-icon>
</div>
<div class="exp-card-text">
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p>
<!-- <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p> -->
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Titular</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && !p.userPermission([p.permissionList.Gabinete.md_tasks])">Despachos criados por mim</p>
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
</div>
</div>
</div>
<!-- <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
@@ -259,7 +261,7 @@
</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">
<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>
@@ -280,7 +282,7 @@
</div>
<p class="text-center exp-card-title">Diplomas para Assinar</p>
<p class="text-center exp-card-content">{{ deplomasStore.diplomasParaAssinartCount }} <span class="title1">Documentos</span></p>
</div> -->
</div>
</div>
<div *ngIf="!loadCount" class="width-100">
@@ -372,7 +374,6 @@
</div>
</div>
</div>
@@ -106,6 +106,8 @@ export class GabineteDigitalPage implements OnInit {
AllProcess = []
// workerList : Worker
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
@ViewChild(PendentesPage) pendentesListPage: PendentesPage;
@ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage;
@@ -126,6 +128,12 @@ export class GabineteDigitalPage implements OnInit {
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) => {
// if not mobile remove all component
if (window.innerWidth < 701) {
@@ -157,8 +165,8 @@ export class GabineteDigitalPage implements OnInit {
}
const pathname = window.location.pathname
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == pathname) {
//this.router.events.forEach((event) => {
//if (event instanceof NavigationEnd && event.url == pathname) {
this.waitForDomService.selector({
selector: 'app-gabinete-digital ion-content .aside-wrapper',
callback: () => {
@@ -171,88 +179,96 @@ export class GabineteDigitalPage implements OnInit {
}
}
})
}
});
//}
//});
this.hideRefreshButton();
this.waitForDomService.selector({
selector: 'app-gabinete-digital ion-content .aside-wrapper',
callback: () => {
// console.log('SECOND CALL')
this.loadAllProcesses();
}
})
// this.waitForDomService.selector({
// selector: 'app-gabinete-digital ion-content .aside-wrapper',
// callback: () => {
// // console.log('SECOND CALL')
// this.loadAllProcesses();
// }
// })
this.backgroundservice.registerBackService('Online', () => {
// this.loadAllProcesses();
});
this.NotificationsService.registerCallback(
'despachos',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'despachos-pr',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'expediente',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'gabinete-digital',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'parecer',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'deferimento',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'diplomas-assinar',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'diplomas',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'expedientes-pr',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
// this.NotificationsService.registerCallback({
// type:'despachos',
// funx:() => {
// // this.loadCount();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'*',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification *')
// }
// })
// this.NotificationsService.registerCallback({
// type:'despachos-pr',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'expediente',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'gabinete-digital',
// funx:() => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'parecer',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'deferimento',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas-assinar',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'expedientes-pr',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
}
@@ -570,7 +586,19 @@ export class GabineteDigitalPage implements OnInit {
updateAllProcess() {
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)
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList).concat(this.pendentesstore.list)
// 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() {
@@ -0,0 +1,10 @@
onmessage = function(oEvent) {
const list = Event.data
var a = []
postMessage(
a.concat.apply([], [list])
);
};
@@ -7,8 +7,8 @@
<div class="div-top-header">
<div class="div-logo">
<!-- <img style="max-width: 90px;" *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-bg-removebg-preview.png' alt='logo'>
<img style="max-width: 80px;" *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'> -->
<img style="max-width: 90px;" *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-bg-removebg-preview.png' alt='logo'>
<img style="max-width: 80px;" *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
</div>
</div>
+2 -2
View File
@@ -7,9 +7,9 @@
<div class="bg-4 d-flex justify-center align-center">
<div class="div-logo">
<!-- <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/fullLogo-no-g.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/fullLogo-no-g.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'> -->
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'>
</div>
</div>
+1
View File
@@ -123,6 +123,7 @@ export class LoginPage implements OnInit {
if (attempt.UserId == SessionStore.user.UserId) {
await this.authService.SetSession(attempt, this.userattempt);
this.changeProfileService.run();
if(attempt.ChatData) {
@@ -25,7 +25,7 @@ export class EditActionPage implements OnInit {
public minDate = new Date().toISOString()
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -44,7 +44,7 @@
[formControl]="dateControlStart"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -83,7 +83,7 @@
[min]="endMinDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -46,7 +46,7 @@ export class NewActionPage implements OnInit {
public minDate = new Date().toISOString()
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -98,9 +98,9 @@ export class NewActionPage implements OnInit {
var validado: boolean;
if (window.innerWidth <= 800) {
if ((this.folder.DateBegin < this.folder.DateEnd) && (new Date(this.folder.DateBegin).getTime() > this.currentDate.getTime())) {
if ((this.folder.DateBegin < this.folder.DateEnd)) {
validado = true;
}else{
} else {
validado = false;
}
return validado == true ? ['ok']: [];
@@ -111,8 +111,8 @@ export class NewActionPage implements OnInit {
runValidation() {
this.validateFrom = true;
if(new Date(this.folder.DateBegin).toISOString() > new Date(this.folder.DateEnd).toISOString()){
this.toastService.badRequest("A data de início não pode ser superior a data de fim");
if(new Date(this.folder.DateBegin).getTime() > new Date(this.folder.DateEnd).getTime()){
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
}
}
@@ -171,4 +171,42 @@ export class NewActionPage implements OnInit {
this.modalController.dismiss();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m) {
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
return timeToReturn;
}
setStartDate(){
this.dateControlStart = new FormControl(moment(this.roundTimeQuarterHour()));
}
setEndDate(){
this.dateControlEnd = this.dateControlStart;
}
}
@@ -44,7 +44,7 @@ export class NewPublicationPage implements OnInit {
public minDate = new Date().toISOString().slice(0, 10)
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public color: ThemePalette = 'primary';
@@ -15,7 +15,7 @@
<!-- Left -->
<div class="aside-left app-default-padding d-flex flex-grow-1 flex-column width-30 ">
<!-- Header -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader || skeletonLoader"></ion-progress-bar>
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-toolbar >
<div class="main-header">
@@ -24,7 +24,7 @@ import { PermissionService } from 'src/app/services/permission.service';
styleUrls: ['./publications.page.scss'],
})
export class PublicationsPage implements OnInit {
showLoader: boolean;
showLoader: boolean = false
publicationFolder: PublicationFolder;
publication: Publication;
@@ -57,7 +57,6 @@ export class PublicationsPage implements OnInit {
hideRefreshBtn = true;
showSlidingOptions = true;
idSelected: string;
skeletonLoader: boolean;
constructor(
private router: Router,
@@ -138,13 +137,10 @@ export class PublicationsPage implements OnInit {
return this.theDate.getDate() + " de " + (this.months[this.theDate.getMonth()]) + " de " + this.theDate.getFullYear()
}
loadList = false
getActions() {
if(this.loadList == false) {
this.loadList = true
if(this.showLoader == false) {
this.showLoader = true;
this.skeletonLoader = true;
this.publications.GetPublicationFolderList().subscribe(async res => {
const folders: PublicationFolder[] = this.getPublicationFolderMap(res)
@@ -162,13 +158,9 @@ export class PublicationsPage implements OnInit {
}
this.showLoader = false;
this.skeletonLoader = false;
this.loadList = false
}, (error) => {
this.showLoader = false;
this.skeletonLoader = false;
this.loadList = false
});
}
@@ -268,8 +260,9 @@ export class PublicationsPage implements OnInit {
}
finally {
loader.remove()
this.refreshing()
}
this.refreshing()
}
async AddPublicationFolder(item?: any) {
+22 -9
View File
@@ -27,29 +27,35 @@
<div class="btn-modal-dismiss" *ngIf="showSearchInput">
<button class="btn-no-color" (click)="close()">
<ion-icon c*ngIf="ThemeService.currentTheme == 'default' " lass="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</button>
</div>
</div>
<!-- Search drop down -->
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1" >
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1" >
<ion-form [class.d-none]="!showSearchInput">
<div class="d-flex search-input-container ion-justify-content-between" >
<div class="icon">
<!-- <div class="icon">
<button class="btn-no-color" (click)="basicSearch()">
<ion-icon class="icon-z" slot="end" name="search"></ion-icon>
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</button>
</div>
<div class="input-text d-flex ion-align-items-center">
</div> -->
<div class="input-text d-flex ion-align-items-center pm-10">
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input" type="search" placeholder="Pesquisar"></ion-input>
</div>
<div (click)="clearSearchInput()" class="d-flex align-center icon">
<!-- <div (click)="clearSearchInput()" class="d-flex align-center icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> -->
<div (click)="basicSearch()" class="d-flex align-center icon">
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</div>
</div>
</ion-form>
@@ -102,7 +108,14 @@
<div class="container ">
<div class="d-flex overflow-x-auto">
<!-- SLIDE -->
<div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': category.Active}" class="button cursor-pointer" (click)="filterDocList(category.Name)" (click)="activeCategoty(i)">
<div class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': TodosCategory}" class="button cursor-pointer" (click)="noFilter()">
<span>Todos</span>
<ion-label class="label">{{ searchDocuments.length }}</ion-label>
</div>
<div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': category.Active}" class="button cursor-pointer" (click)="activeCategoty(i); filterDocList(category.Name)">
<span>{{ category.Name }}</span>
<ion-label class="label">{{ category.Qtd }}</ion-label>
+169 -32
View File
@@ -11,6 +11,7 @@ import { DocumentDetailPage } from 'src/app/modals/document-detail/document-deta
import { SearchCategory, SearchList } from 'src/app/models/search-document';
import { ThemeService } from 'src/app/services/theme.service'
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { Router } from '@angular/router';
@Component({
selector: 'app-search',
@@ -62,7 +63,8 @@ export class SearchPage implements OnInit {
private search: SearchService,
private modalCtrl: ModalController,
private navParams: NavParams,
public ThemeService: ThemeService)
public ThemeService: ThemeService,
private router: Router)
{
this.ordinance = "recent";
this.currentPath= window.location.pathname;
@@ -166,9 +168,7 @@ export class SearchPage implements OnInit {
wordCloud() {
this.search.mostSeachWord("15").subscribe(res=>{
console.log('LOAD LIST');
this.search.mostSeachWord("15").subscribe( res => {
const highest= res[0].Hits;
const lowest = res[res.length-1].Hits;
@@ -191,7 +191,6 @@ export class SearchPage implements OnInit {
});
this.list = list
console.log('set list')
const elem = document.documentElement.querySelector('.most-searched-word-container');
@@ -213,7 +212,7 @@ export class SearchPage implements OnInit {
loadWordCloud() {
setTimeout(()=>{
setTimeout(() => {
const elem = document.documentElement.querySelector('.most-searched-word-container');
WordCloud(
@@ -386,7 +385,7 @@ export class SearchPage implements OnInit {
let counter = 0;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => {
res.Categories.forEach( e => {
e['Active'] = false;
this.searchCategories.push(e)
@@ -426,7 +425,7 @@ export class SearchPage implements OnInit {
});
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res => {
res.Categories.forEach( e => {
e['Active'] = false;
@@ -442,7 +441,7 @@ export class SearchPage implements OnInit {
this.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1){
if(this.searchDocuments.length >= 1) {
this.showDocuments = true;
} else {
this.showDocuments = false
@@ -544,7 +543,7 @@ export class SearchPage implements OnInit {
counter++;
if(counter ==2){
if(counter ==2) {
this.showLoader = false;
}
@@ -552,7 +551,7 @@ export class SearchPage implements OnInit {
},error => {
counter++;
if(counter ==2){
if(counter ==2) {
this.showLoader = false;
}
this.searchResult = "Registo não encontrado"
@@ -561,9 +560,13 @@ export class SearchPage implements OnInit {
}
}
else if (this.type == "AccoesPresidenciais"){
else if (this.type == "AccoesPresidenciais") {
let counter = 0;
this.showLoader = true;
this.searchCategories = []
this.searchDocuments = []
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{
@@ -571,12 +574,18 @@ export class SearchPage implements OnInit {
res.Categories.forEach( e => {
e['Active'] = false;
e['Name'] = "Publicações"
});
// bind respose
this.searchCategories = res.Categories;
for ( const a of res.Categories) {
this.searchCategories.push(a);
}
this.searchDocuments = this.sortArrayISODate(res.Documents);
for ( const a of this.sortArrayISODate(res.Documents)) {
a.DocTypeDesc = "Publicações"
this.searchDocuments.push(a);
}
this.reorderList(this.ordinance);
@@ -587,13 +596,71 @@ export class SearchPage implements OnInit {
this.showDocuments = false
}
this.showLoader = false;
counter++;
if(counter ==2){
this.showLoader = false;
}
this.loadWordCloud();
},error => {
this.showLoader = false;
counter++;
if(counter ==2){
this.showLoader = false;
}
this.searchResult = "Registo não encontrado"
console.log(error)
});
this.search.basicSearchPublication(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res => {
res.Categories.forEach( e => {
e['Active'] = false;
e['Name'] = "Acções"
});
// bind respose
for ( const a of res.Categories) {
this.searchCategories.push(a);
}
for ( const a of this.sortArrayISODate(res.Documents)) {
a.DocTypeDesc = "Acções"
this.searchDocuments.push(a);
}
this.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1) {
this.showDocuments = true;
} else {
this.showDocuments = false
}
counter++;
if(counter ==2) {
this.showLoader = false;
}
this.loadWordCloud();
}, error => {
counter++;
if(counter ==2) {
this.showLoader = false;
}
this.searchResult = "Registo não encontrado"
console.log(error)
});
}
}
@@ -636,7 +703,7 @@ export class SearchPage implements OnInit {
}
}
clearInputRemetente(){
clearInputRemetente() {
this.searchSender = "";
}
@@ -704,6 +771,7 @@ export class SearchPage implements OnInit {
}
TodosCategory = true
async filterDocList(categoryName:string){
// show all category
@@ -716,6 +784,27 @@ export class SearchPage implements OnInit {
}
this.showCategory = categoryName;
for(let category of this.searchCategories) {
if(category['Active']) {
this.TodosCategory = false
return false
}
}
this.TodosCategory = true
}
noFilter() {
this.TodosCategory = true
let n = 0
for(let category of this.searchCategories) {
this.searchCategories[n]['Active'] = false
n++
}
this.showSearchDocuments = this.searchDocuments;
}
@@ -735,6 +824,7 @@ export class SearchPage implements OnInit {
const ApplicationType = searchDocument.ApplicationType.toString()
const Id = searchDocument.Id
const CalendarId = searchDocument.ApplicationName.split(':')[1]
const DocTypeDesc = searchDocument.DocTypeDesc
if(this.select == false) {
if(this.type == "Agenda") {
@@ -754,31 +844,41 @@ export class SearchPage implements OnInit {
} else if(this.type == "AccoesPresidenciais") {
this.viewPublicationDetail(Id);
this.viewPublicationDetail(Id, DocTypeDesc);
}
else if(this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
if(ApplicationType == '8' || ApplicationType == '361') {
// 361
if(ApplicationType == '8') {
this.viewDocumentDetail(Id, ApplicationType);
} else if (ApplicationType == '361') {
this.viewDocumentModal(searchDocument)
}
}
}
}
async viewPublicationDetail(publicationId:string) {
const modal = await this.modalController.create({
component: PublicationDetailPage,
componentProps:{
publicationId: publicationId,
isModal: true
},
cssClass: 'publication-detail modal modal-desktop ',
//backdropDismiss: false
});
async viewPublicationDetail(publicationId:string, DocTypeDesc) {
// validation my friend
if(DocTypeDesc == 'Acções') {
this.router.navigate(['/home/publications', publicationId]);
} else if( DocTypeDesc == 'Publicações') {
const modal = await this.modalController.create({
component: PublicationDetailPage,
componentProps:{
publicationId: publicationId,
isModal: true
},
cssClass: 'publication-detail modal modal-desktop ',
//backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(()=>{});
}
await modal.present();
modal.onDidDismiss().then(()=>{});
}
@@ -805,4 +905,41 @@ export class SearchPage implements OnInit {
}
async viewDocumentModal(LoadedDocument) {
let task = {
serialNumber: '',
taskStartDate: '',
isEvent: true,
workflowInstanceDataFields: {
FolderID: '',
Subject: LoadedDocument.SourceName || LoadedDocument.Assunto,
SourceSecFsID: LoadedDocument.ApplicationId || LoadedDocument.ApplicationType,
SourceType: 'DOC',
SourceID: LoadedDocument.Id || LoadedDocument.Id,
DispatchNumber: ''
}
}
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: task.workflowInstanceDataFields.Subject,
url: '',
title_link: '',
},
Document: LoadedDocument,
applicationId: task.workflowInstanceDataFields.SourceSecFsID,
docId: task.workflowInstanceDataFields.SourceID ,
folderId: '',
task: task
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
}