Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer

This commit is contained in:
Peter Maquiran
2022-02-24 13:36:13 +01:00
10 changed files with 116 additions and 53 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ export class AuthGuard implements CanActivate {
this.router.navigate(['/']); this.router.navigate(['/']);
return false return false
} else { } else {
//this.authService.loginChat(); this.authService.loginChat();
return true; return true;
} }
} }
@@ -68,7 +68,7 @@ export class DarParecerPage implements OnInit {
try { try {
await this.processes.CompleteTask(body).toPromise(); await this.processes.CompleteTask(body).toPromise();
this.modalController.dismiss(); this.modalController.dismiss('sucess');
this.toastService._successMessage('Parecer enviado'); this.toastService._successMessage('Parecer enviado');
} catch (error) { } catch (error) {
this.toastService._badRequest("Parecer não solicitado"); this.toastService._badRequest("Parecer não solicitado");
+2 -2
View File
@@ -32,7 +32,7 @@
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon> <ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
<div class="text">A sua Agenda</div> <div class="text">A sua Agenda</div>
</div> </div>
<button class="btn-no-color" [routerLink]="['/home/agenda']"> <button title="Ir para a sua Agenda" class="btn-no-color" [routerLink]="['/home/agenda']">
<ion-icon <ion-icon
*ngIf="ThemeService.currentTheme == 'default' " *ngIf="ThemeService.currentTheme == 'default' "
class="icon-next" class="icon-next"
@@ -100,7 +100,7 @@
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon> <ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
<div class="text">Correspondência por ler</div> <div class="text">Correspondência por ler</div>
</div> </div>
<button (click)="viewExpedientListPage()" class="btn-no-color cursor-pointer"> <button title="Ir para o Gabinete Digital" (click)="viewExpedientListPage()" class="btn-no-color cursor-pointer">
<ion-icon <ion-icon
*ngIf="ThemeService.currentTheme == 'default' " *ngIf="ThemeService.currentTheme == 'default' "
class="icon-next" class="icon-next"
@@ -602,7 +602,7 @@ export class PedidoPage implements OnInit {
console.log(task); console.log(task);
let classs; let classs;
if (window.innerWidth <= 800) { if (window.innerWidth < 701) {
classs = 'book-meeting-modal modal modal-desktop' classs = 'book-meeting-modal modal modal-desktop'
} else { } else {
classs = 'add-note-modal-no-height showAsideOptions' classs = 'add-note-modal-no-height showAsideOptions'
@@ -618,7 +618,9 @@ export class PedidoPage implements OnInit {
}); });
await modal.present(); await modal.present();
modal.onDidDismiss().then(res => { modal.onDidDismiss().then(res => {
if(res.data == 'sucess'){
this.goBack(); this.goBack();
}
}); });
} }
+4 -4
View File
@@ -102,8 +102,8 @@ export class LoginPage implements OnInit {
if (attempt) { if (attempt) {
if (attempt.UserId == SessionStore.user.UserId) { if (attempt.UserId == SessionStore.user.UserId) {
await this.authService.SetSession(attempt, this.userattempt); await this.authService.SetSession(attempt, this.userattempt);
// await this.authService.loginChat(); await this.authService.loginChat();
// await this.authService.loginToChatWs() await this.authService.loginToChatWs()
this.getToken(); this.getToken();
SessionStore.setInativity(true); SessionStore.setInativity(true);
@@ -117,8 +117,8 @@ export class LoginPage implements OnInit {
await this.authService.SetSession(attempt, this.userattempt); await this.authService.SetSession(attempt, this.userattempt);
this.changeProfileService.run() this.changeProfileService.run()
// await this.authService.loginChat(); await this.authService.loginChat();
// await this.authService.loginToChatWs() await this.authService.loginToChatWs()
this.getToken(); this.getToken();
this.router.navigateByUrl('/pin', { replaceUrl: true }); this.router.navigateByUrl('/pin', { replaceUrl: true });
} }
+6 -6
View File
@@ -56,9 +56,9 @@ export class AuthService {
} }
/* if (localStorage.getItem("userChat") != null) { if (localStorage.getItem("userChat") != null) {
this.ValidatedUserChat = JSON.parse(localStorage.getItem('userChat')); this.ValidatedUserChat = JSON.parse(localStorage.getItem('userChat'));
} */ }
} }
@@ -112,7 +112,7 @@ export class AuthService {
//user: UserForm //user: UserForm
async loginChat() { async loginChat() {
/* const expirationMinutes = 30; const expirationMinutes = 30;
let date = new Date().getTime(); let date = new Date().getTime();
let expirationDate = new Date(new Date().getTime() + expirationMinutes*60*1000); let expirationDate = new Date(new Date().getTime() + expirationMinutes*60*1000);
@@ -135,7 +135,7 @@ export class AuthService {
this.presentAlert('Network error'); this.presentAlert('Network error');
} }
this.autoLoginChat(expirationDate.getTime() - date); */ this.autoLoginChat(expirationDate.getTime() - date);
} }
async autoLoginChat(expirationDate:number){ async autoLoginChat(expirationDate:number){
@@ -145,7 +145,7 @@ export class AuthService {
} }
loginToChatWs() { loginToChatWs() {
/* setTimeout(()=>{ setTimeout(()=>{
this.WsChatService.connect(); this.WsChatService.connect();
this.WsChatService.login().then((message) => { this.WsChatService.login().then((message) => {
@@ -225,7 +225,7 @@ export class AuthService {
return false return false
} }
}; };
}, 1) */ }, 1)
} }
autologout(expirationDate:number) { autologout(expirationDate:number) {
+2 -2
View File
@@ -32,13 +32,13 @@ export class ChatService {
private storageService:StorageService, private storageService:StorageService,
) )
{ {
/* this.loggedUserChat = authService.ValidatedUserChat; this.loggedUserChat = authService.ValidatedUserChat;
this.headers = new HttpHeaders(); this.headers = new HttpHeaders();
this.headers = this.headers.set('X-User-Id', this.loggedUserChat['data'].userId); this.headers = this.headers.set('X-User-Id', this.loggedUserChat['data'].userId);
this.headers = this.headers.set('X-Auth-Token', this.loggedUserChat['data'].authToken); this.headers = this.headers.set('X-Auth-Token', this.loggedUserChat['data'].authToken);
this.options = { this.options = {
headers: this.headers, headers: this.headers,
}; */ };
} }
+39 -16
View File
@@ -2,20 +2,36 @@
<div class="main-tab pb-10 ion-toolbar header-color"> <div class="main-tab pb-10 ion-toolbar header-color">
<div class="mobile d-flex div-top-header justify-space-between"> <div class="mobile pt-20 d-flex div-top-header justify-space-between">
<div *ngIf="!hideSearchBtn" class="div-search"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="div-search">
<div (click)="openSearch()"> <div (click)="openSearch()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-45" src='assets/images/icons-search.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-45" src='assets/images/icons-search.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-45" src='assets/images/theme/gov/icons-search.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-45" src='assets/images/theme/gov/icons-search.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="font-45" src='assets/images/theme/tribunal/icons-search.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="font-45" src='assets/images/theme/tribunal/icons-search.svg'></ion-icon>
</div> </div>
</div> </div>
<div class="div-logo height-fit-content">
<!-- <div class="div-logo align-center justify-center">
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/gabinetedigital_logo.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/gabinetedigital_logo.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'>
</div> -->
<div class="div-logo align-center justify-center">
<div class="logo-icon">
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'>
</div> </div>
<div class="div-profile cursor-pointer" (click)="openProfile()"> <div 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>
<div class="add-line"></div>
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
</div>
</div>
</div>
<div title="Perfil" class="div-profile cursor-pointer" (click)="openProfile()">
<div *ngIf="this.notificationLength > 0" class="icon-badge">{{notificationLength}}</div> <div *ngIf="this.notificationLength > 0" class="icon-badge">{{notificationLength}}</div>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" src='assets/images/icons-profile.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" src='assets/images/icons-profile.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src='assets/images/theme/gov/icons-profile.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src='assets/images/theme/gov/icons-profile.svg'></ion-icon>
@@ -27,11 +43,18 @@
<div class="desktop mx-20"> <div class="desktop mx-20">
<div class="d-flex justify-space-between align-center"> <div class="d-flex justify-space-between align-center">
<div tab="events" class="div-logo height-fit-content"> <div tab="events" class="div-logo height-fit-content">
<div class="logo-icon">
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/gabinetedigital_logo.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'>
</div>
<div 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>
<div class="add-line"></div>
<p class="logo-description-text">GABINETE DIGITAL</p>
</div>
</div>
</div> </div>
<div class="d-flex flex-1 pr-20 pl-50"> <div class="d-flex flex-1 pr-20 pl-50">
@@ -83,13 +106,13 @@
</div> </div>
<div class="header-btns d-flex"> <div class="header-btns d-flex">
<div *ngIf="!hideSearchBtn" class="mr-10 d-flex align-center cursor-pointer"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div style="padding-top: 5px;" (click)="openSearch();showSearch=true" *ngIf="!showSearch"> <div style="padding-top: 5px;" (click)="openSearch();showSearch=true" *ngIf="!showSearch">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-45" src='assets/images/icons-search.svg'></ion-icon> <ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'default' " class="font-45" src='assets/images/icons-search.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-45" src='assets/images/theme/gov/icons-search.svg'></ion-icon> <ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'gov' " class="font-45" src='assets/images/theme/gov/icons-search.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="font-45" src='assets/images/theme/tribunal/icons-search.svg'></ion-icon> <ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'tribunal' " class="font-45" src='assets/images/theme/tribunal/icons-search.svg'></ion-icon>
</div> </div>
<button class="btn-no-color" (click)="closeSearch();showSearch=false;searchSubject=''" *ngIf="showSearch"> <button title="Fechar" class="btn-no-color" (click)="closeSearch();showSearch=false;searchSubject=''" *ngIf="showSearch">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-40" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-40" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-40" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-40" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="font-40" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="font-40" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
@@ -105,15 +128,15 @@
class="search-input text-black" type="search" placeholder="Pesquisar"></ion-input> class="search-input text-black" type="search" placeholder="Pesquisar"></ion-input>
</div> </div>
<div class="icon" (click)="clearSearchInput()"> <div class="icon" (click)="clearSearchInput()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'tribunal' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="div-profile d-flex cursor-pointer" (click)="openProfile()"> <div title="Perfil" class="div-profile d-flex cursor-pointer" (click)="openProfile()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" src='assets/images/icons-profile.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" src='assets/images/icons-profile.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src='assets/images/theme/gov/icons-profile.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src='assets/images/theme/gov/icons-profile.svg'></ion-icon>
+42 -4
View File
@@ -12,11 +12,51 @@
width: em(140px); width: em(140px);
justify-content: center; justify-content: center;
display: flex; display: flex;
} color: black;
.div-logo img{ overflow: auto;
.logo-icon{
width: 25.33%;
overflow: auto;
img{
width: 100%; width: 100%;
margin: 0px auto; margin: 0px auto;
} }
}
.logo-description{
width: 74.67%;
margin: 0 auto;
overflow: auto;
font-size: 8.5px;
font-family: Bahnschrift;
.logo-description-content{
width: 100%;
.logo-description-text{
font-weight: 700;
text-align: center;
width: 100%;
margin: 0 !important;
padding: 0 !important;
}
.add-line{
width: 100%;
border-bottom: 1px solid #000;
margin-bottom: 2.5px !important;
padding: 0 !important;
}
}
.add-botton-border{
border-bottom: 1px solid #000;
}
}
}
.header-btns{ .header-btns{
justify-content: center; justify-content: center;
@@ -24,7 +64,6 @@
} }
.div-profile{ .div-profile{
width: 90px;
height: fit-content; height: fit-content;
font-size: 45px; font-size: 45px;
justify-content: flex-end; justify-content: flex-end;
@@ -64,7 +103,6 @@
//border: 1px solid red; //border: 1px solid red;
} }
.desktop{ .desktop{
display: none; display: none;
} }
+2 -2
View File
@@ -6,8 +6,8 @@ export const environment = {
production: false, production: false,
apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
apiChatUrl: 'https://gpr-dev-01.gabinetedigital.local/api/v1/', apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/',
apiWsChatUrl: 'ws://gpr-dev-01.gabinetedigital.local/websocket', apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket',
//apiChatUrl: 'https://www.tabularium.pt/api/v1/', //apiChatUrl: 'https://www.tabularium.pt/api/v1/',
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */ /* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
domain: 'gabinetedigital.local', //gabinetedigital.local domain: 'gabinetedigital.local', //gabinetedigital.local