Merge branch 'develop_bitOut' into sentry

This commit is contained in:
Eudes Inácio
2022-12-19 12:08:58 +01:00
36 changed files with 306 additions and 133 deletions
@@ -163,7 +163,7 @@
<input matInput [ngxMatDatetimePicker]="fim"
placeholder="Choose a date"
[(ngModel)]="postEvent.EndDate"
[min]="currentDate"
[min]="postEvent.StartDate"
[max]="maxDate"
[disabled]="disabled"
>
@@ -180,7 +180,7 @@
</div>
</div>
<div class="container-div d-flex width-100">
<!-- <div class="container-div d-flex width-100">
<div class="ion-item-class-2 width-100 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
@@ -201,7 +201,7 @@
</div>
</div>
</div>
</div> -->
<div *ngIf="selectedRecurringType != '-1'" class="container-div width-100">
<div class="ion-item-class-2 d-flex">
@@ -66,9 +66,9 @@ export class EditEventPage implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000).toISOString().slice(0,10)
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepSecond = 5;
currentDate = new Date();
public stepMinute = 15;
public stepSecond = 15;
currentDate = this.roundTimeQuarterHour();
loadedEventAttachments: Attachment[] = [];
taskParticipants: any = [];
@@ -171,6 +171,39 @@ export class EditEventPage implements OnInit {
});
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
// var minutes = timeToReturn.getMinutes();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
// console.log("MINUTOS: " +minutes);
// console.log("BEFORE MINUTES: " +(Math.round(minutes/15) * 15));
var m = (Math.round(minutes/15) * 15) % 60;
// console.log("AFTER MINUTES: " +m);
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);
}
}
}
onSelectedRecurringChanged(ev?:any) {
this.calculetedLastOccurrence(ev);
@@ -310,6 +310,24 @@
</ion-item>
</ion-list>
</div>
<!--
<div >
<ion-list class="list">
<ion-item>
<ion-label>
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">Assunto</span>
<span class="app-name">appName</span>
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left">EntidadeOrganicaNome</span><span class="span-right"> document </span></p>
</ion-label>
</ion-item>
</ion-list>
</div> -->
</div>
</ion-content>
<ion-footer class="ion-no-border d-flex justify-center px-20">
+11
View File
@@ -218,6 +218,17 @@
class=" height-100 flex-column">
</app-contacts>
<!-- <app-contacts
(openMessage)="openMessagesPage($event)"
(backToChat)="backToChat($event)"
(emptyTextDescriptionOpen)="emptyTextDescriptionOpen()"
(closeAllDesktopComponents)="closeAllDesktopComponents()"
*ngIf="showContacts"
[roomId]="roomId"
[style.display]="showContacts ? 'flex' : 'none'"
class=" height-100 flex-column">
</app-contacts> -->
<app-new-group
(addGroupMessage)="openGroupContactsPage($event)"
[roomId]="roomId"
+1 -1
View File
@@ -62,7 +62,7 @@
<ion-list>
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent"
(click)="goToEvent(event.EventId)"
(click)="goToEvent(event)"
>
<div class="d-flex content-{{loggeduser.Profile}}-{{event.CalendarName}}">
+5 -8
View File
@@ -460,18 +460,15 @@ export class EventsPage implements OnInit {
});
}
goToEvent(eventId: any) {
this.router.navigate(['/home/events', eventId, 'events']);
goToEvent(event: any) {
let navigationExtras: NavigationExtras = { queryParams: { CalendarId: event.CalendarId } }
this.router.navigate(['/home/events', event.EventId, 'agenda'], navigationExtras);
}
goToExpediente(SerialNumber: any) {
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
/* if (this.loggeduser.Profile == 'MDGPR') {
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
}
else if (this.loggeduser.Profile == 'PR') {
this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']);
} */
}
viewExpedientListPage() {
@@ -199,7 +199,7 @@
</div>
</div>
<div class="container-div width-100">
<!-- <div class="container-div width-100">
<div class="ion-item-class-2 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
@@ -220,7 +220,7 @@
</div>
</div>
</div>
</div> -->
<div *ngIf="EventRecurrenceType != '-1'" class="container-div width-100">
<div class="ion-item-class-2 d-flex">
@@ -12,7 +12,6 @@
</div>
</div>
<div class=" align-center justify-center d-flex flex-column width-100">
<div *ngIf="SessionStore.hasPin" class="title">Digite o PIN</div>
<div *ngIf="!SessionStore.hasPin" class="title">Digite o novo PIN</div>
@@ -26,7 +25,7 @@
</div>
<div class="d-flex align-center justify-center">
<div class="d-flex align-center justify-center">
<div class="circle" (click)="setCode('1')">1</div> <div class="circle" (click)="setCode('2')">2</div> <div class="circle" (click)="setCode('3')">3</div>
</div>
+5 -57
View File
@@ -39,41 +39,9 @@ export class InactivityPage implements OnInit {
ngOnInit() {
// window.addEventListener('resize', (event) => {
// if(this.router.url != '/login') return false
// if(this.loop == false) {
// this.loop = true
// this.runloop()
// }
// }, true);
}
runloop() {
// const containerHeight = 651
// let circleHeight = document.querySelector('.circle')['offsetHeight']
// let circleWidth = document.querySelector('.circle')['offsetWidth']
//
//
// document.querySelectorAll('.circle').forEach(e=>{
// e['style']['height'] = (circleHeight -1 )+'px'
// e['style']['width'] = (circleWidth -1 )+'px'
// })
// if( window.innerHeight< containerHeight) {
// setTimeout(()=>{
// this.runloop()
// }, 100)
// } else {
// this.loop = false
// }
}
@@ -165,8 +133,8 @@ export class InactivityPage implements OnInit {
if(!SessionStore.hasPin) {
//
this.storePin()
this.pinLogin()
} else {
//
this.pinLogin()
}
}
@@ -187,7 +155,7 @@ export class InactivityPage implements OnInit {
setTimeout(() => {
this.clearCode()
}, 1000)
}, 5000)
} else {
this.toastService._badRequest('Pin incorreto')
@@ -222,7 +190,7 @@ export class InactivityPage implements OnInit {
}
}, 5000)
}, 100)
}
@@ -230,28 +198,8 @@ export class InactivityPage implements OnInit {
storePin() {
setTimeout(() => {
const code = this.code.join('');
SessionStore.setPin(code);
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){
//When user has got access to Agenda but does not have their own calendar, goes to Agenda
if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){
this.router.navigate(['/home/agenda']);
}
else{
this.router.navigate(['/home/events']);
}
}
//If user has access permission to both Chat and Action, goes to Chat by default.
else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){
this.router.navigate(['/home/chat']);
}
else if(this.p.userPermission(this.p.permissionList.Actions.access)){
this.router.navigate(['/home/publications']);
}
}, 5000)
const code = this.code.join('');
SessionStore.setPin(code);
}
+1 -2
View File
@@ -11,7 +11,6 @@ import { ClearStoreService } from 'src/app/services/clear-store.service';
import { ChangeProfileService } from 'src/app/services/change-profile.service';
import { ThemeService } from 'src/app/services/theme.service';
import { PermissionService } from 'src/app/services/permission.service';
import { PermissionList } from 'src/app/models/permission/permissionList';
import { MessageModel, DeleteMessageModel } from '../../models/beast-orm';
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
@@ -159,7 +158,7 @@ export class LoginPage implements OnInit {
this.getToken();
this.router.navigateByUrl('/pin', { replaceUrl: true });
this.router.navigateByUrl('/home/events', { replaceUrl: true });
}
}
else{
@@ -35,7 +35,6 @@
displayFormat="D MMM YYYY H:mm"
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
min="{{minDate}}"
max="2025">
</ion-datetime>
@@ -43,7 +42,6 @@
<input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Data inicio*"
[formControl]="dateControlStart"
[min]="minDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
@@ -37,7 +37,7 @@
</div>
</div>
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<!-- <ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar> -->
</div>
</ion-toolbar>
+8 -3
View File
@@ -258,10 +258,8 @@ export class SearchPage implements OnInit {
if(this.type == "Agenda" ){
this.showLoader = true;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{
@@ -287,7 +285,8 @@ export class SearchPage implements OnInit {
this.loadWordCloud();
},error => {
this.searchResult = "Registo não encontrado"
this.showLoader = false;
// this.searchResult = "Registo não encontrado"
console.log(error)
});
}
@@ -551,6 +550,11 @@ export class SearchPage implements OnInit {
this.loadWordCloud();
},error => {
counter++;
if(counter ==2){
this.showLoader = false;
}
this.searchResult = "Registo não encontrado"
console.log(error)
});
@@ -586,6 +590,7 @@ export class SearchPage implements OnInit {
this.showLoader = false;
this.loadWordCloud();
},error => {
this.showLoader = false;
this.searchResult = "Registo não encontrado"
console.log(error)
});