improve envarionment

This commit is contained in:
Peter Maquiran
2023-01-25 15:06:19 +01:00
parent f445050821
commit 891c44d674
14 changed files with 182 additions and 111 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ export class DeleteMessageModel extends models.Model {
}
models.register({
databaseName: 'chat-storage'+environment.version.lastCommitNumber,
databaseName: 'chat-storage'+environment.version.lastCommitNumber + environment.id,
type: 'indexedDB',
version: 11,
models: [MessageModel, DeleteMessageModel, attachments]
+30
View File
@@ -0,0 +1,30 @@
export interface Environment {
id: string;
apiURL: string;
apiChatUrl: string;
apiWsChatUrl: string;
logoLabel: string;
production: boolean;
domain: string;
defaultuser: string;
defaultuserpwd: string;
chatOffline: boolean;
presidencial: boolean;
version: version;
sentryUrl: string;
despachoLabel: string
}
export interface version {
shortSHA: string;
SHA: string;
branch: string;
lastCommitAuthor: string;
lastCommitTime: string;
lastCommitMessage: string;
lastCommitNumber: string;
change: string;
changeStatus: string;
changeAuthor: string;
}
@@ -229,7 +229,7 @@
</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 Titular</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do {{ environment.despachoLabel }}</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>
@@ -246,6 +246,17 @@
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Assinar</p>
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
</div>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks, p.permissionList.Gabinete.pr_tasks])" (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>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente-hover.svg"></ion-icon>
</div>
<p class="text-center exp-card-title " *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas assinados PR</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" >Diplomas</p>
<p class="text-center exp-card-content">{{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p>
</div>
<div *ngIf="SessionStore.user.Profile == 'Consultant'" (click)="openDiplomaPorElaborar('gerarDiplomas'); selectedElement='gerarDiplomas'" [class.active]="selectedElement == 'gerarDiplomas'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
@@ -260,17 +271,6 @@
<p class="text-center exp-card-content">{{ deplomasStore.DiplomaGerarList.length }} <span class="title1">Documentos</span></p>
</div>
<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>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente-hover.svg"></ion-icon>
</div>
<p class="text-center exp-card-title " *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas assinados PR</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" >Diplomas</p>
<p class="text-center exp-card-content">{{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p>
</div>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasParaAssinar'" [class.active]="selectedElement == 'DiplomasParaAssinar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
@@ -32,6 +32,7 @@ import { Storage } from '@ionic/storage';
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { SessionStore } from 'src/app/store/session.service';
import { NotificationsService } from 'src/app/services/notifications.service'
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-gabinete-digital',
templateUrl: './gabinete-digital.page.html',
@@ -107,7 +108,7 @@ export class GabineteDigitalPage implements OnInit {
AllProcess = []
// workerList : Worker
environment = environment
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
@ViewChild(PendentesPage) pendentesListPage: PendentesPage;
@ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage;
+8 -1
View File
@@ -18,7 +18,14 @@ export class PermissionService {
args = [args]
}
return args.includes(this.SessionStore.user.Profile)
for(const arg of args) {
if(arg == this.SessionStore.user.Profile) {
return true
}
}
return false
}
userPermission(args) {
+7 -7
View File
@@ -19,7 +19,7 @@
</div>
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<p class="logo-description-text tp-5" >doneIT</p>
<p class="logo-description-text tp-5" >{{ environment.logoLabel }}</p>
<div class="add-line"></div>
<p class="logo-description-text tp-5" >GABINETE DIGITAL</p>
@@ -27,7 +27,7 @@
</div>
<div *ngIf="ThemeService.currentTheme == 'default' " class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<p class="logo-description-text tp-5 color-white" >doneIT</p>
<p class="logo-description-text tp-5 color-white" >{{ environment.logoLabel }}</p>
<div class="add-line-white"></div>
<p class="logo-description-text tp-5 color-white" >GABINETE DIGITAL</p>
</div>
@@ -55,15 +55,15 @@
<div class="logo-description-content">
<div *ngIf="ThemeService.currentTheme == 'gov' " class="logo-description-content">
<p *ngIf="environment.presidencia" class="logo-description-text">Calendário Partilhado</p>
<p *ngIf="!environment.presidencia" class="logo-description-text" >doneIT</p>
<p class="logo-description-text" >{{ environment.logoLabel }}</p>
<div class="add-line"></div>
<p *ngIf="!environment.presidencia" class="logo-description-text" >GABINETE DIGITAL</p>
<p class="logo-description-text" >GABINETE DIGITAL</p>
</div>
<div *ngIf="ThemeService.currentTheme == 'default' " class="logo-description-content">
<p *ngIf="environment.presidencia" class="logo-description-text">Calendário Partilhado</p>
<p *ngIf="!environment.presidencia" class="logo-description-text" style="color: white;">GABINETE DIGITAL</p>
<p class="logo-description-text" style="color: white;">GABINETE DIGITAL</p>
<div class="add-line" style="border-bottom: 1px solid white;"></div>
</div>
+1 -1
View File
@@ -7,7 +7,7 @@ import { environment } from 'src/environments/environment';
})
export class LocalstoreService {
private prefix = environment.version.lastCommitNumber+"-";
private prefix = environment.version.lastCommitNumber + environment.id+"-";
private previewPrefix = 'v17-';
callbacks: {[key: string]: {
+24
View File
@@ -16,6 +16,30 @@ class SessionService {
forceToLoginWithForceToLogInWithPassword = false
permission = {
Agenda: {
access: false
},
Gabinete: {
access: false,
pr_tasks: false,
md_tasks: false,
aprove_event: false
},
Actions: {
access : false,
create : false,
delete : false,
edit : false,
createPost : false,
deletePost : false,
editPost : false
},
Chat: {
access: false
}
}
constructor() {
this.keyName = (SHA1("SessionService")).toString()
+5 -24
View File
@@ -1,25 +1,6 @@
import { versionData } from '../../version/git-version'
import { Environment } from './../app/models/envarioment'
import { oaprProd } from './suport/oapr'
import { doneITProd } from './suport/doneIt'
export const environment = {
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
apiURL: 'https://API.DONEIT.CO.AO/api/',
//apiURL: 'https://gd-api.oapr.gov.ao/api/',
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
apiChatUrl: 'https://CHAT.DONEIT.CO.AO/api/v1/',
apiWsChatUrl: 'wss://CHAT.DONEIT.CO.AO/websocket',
/* apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket', */
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
// apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
production: true,
domain: 'equilibrium.co.ao',
defaultuser: 'evandre.dasilva@equilibrium.co.ao',//paulo.pinto@gabinetedigital.local
defaultuserpwd: 'Luand@1219', //tabteste@006,06,
chatOffline: true,
presidencia: false,
version: versionData,
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712'
};
export const environment: Environment = oaprProd;
+6 -24
View File
@@ -1,24 +1,6 @@
import { versionData } from '../../version/git-version'
export const environment = {
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
apiURL: 'https://gd-api.oapr.gov.ao/api/',
//apiURL: 'https://API.DONEIT.CO.AO/api/',
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
//apiChatUrl: 'https://CHAT.DONEIT.CO.AO/api/v1/',
//apiWsChatUrl: 'wss://CHAT.DONEIT.CO.AO/websocket',
/* apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket', */
production: false,
domain: 'equilibrium.co.ao',
defaultuser: 'evandre.dasilva@equilibrium.co.ao',//evandre.dasilva@equilibrium.co.ao
defaultuserpwd: 'Luand@1219', //Luand@1219,
chatOffline: true,
presidencia: false,
version: versionData,
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712'
};
import { Environment } from './../app/models/envarioment'
import { oaprDev } from './suport/oapr'
import { doneITDev } from './suport/doneIt'
export const environment: Environment = oaprDev;
+36
View File
@@ -0,0 +1,36 @@
import { versionData } from '../../../version/git-version'
import { Environment } from './../../app/models/envarioment'
export const doneITProd: Environment = {
id:'1',
apiURL: 'https://API.DONEIT.CO.AO/api/',
apiChatUrl: 'https://CHAT.DONEIT.CO.AO/api/v1/',
apiWsChatUrl: 'wss://CHAT.DONEIT.CO.AO/websocket',
production: true,
domain: 'equilibrium.co.ao',
defaultuser: '',
defaultuserpwd: '',
chatOffline: true,
presidencial: false,
version: versionData,
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
logoLabel: 'doneIT',
despachoLabel: 'Titular',
};
export const doneITDev: Environment = {
id:'1',
apiURL: 'https://API.DONEIT.CO.AO/api/',
apiChatUrl: 'https://CHAT.DONEIT.CO.AO/api/v1/',
apiWsChatUrl: 'wss://CHAT.DONEIT.CO.AO/websocket',
production: true,
domain: 'equilibrium.co.ao',
defaultuser: 'evandre.dasilva@equilibrium.co.ao',
defaultuserpwd: 'Luand@1219',
chatOffline: true,
presidencial: false,
version: versionData,
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
logoLabel: 'doneIT',
despachoLabel: 'Titular',
};
+37
View File
@@ -0,0 +1,37 @@
import { versionData } from '../../../version/git-version'
import { Environment } from './../../app/models/envarioment'
export const oaprProd: Environment = {
id: '0',
apiURL: 'https://gd-api.oapr.gov.ao/api/',
apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
logoLabel: 'Presidente da República',
despachoLabel: 'Presidente da República',
production: false,
domain: 'oapr.gov.ao',
defaultuser: '',
defaultuserpwd: '',
chatOffline: true,
presidencial: true,
version: versionData,
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712'
};
export const oaprDev: Environment = {
id: '0',
apiURL: 'https://gd-api.oapr.gov.ao/api/',
apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
logoLabel: 'Presidente da República',
despachoLabel: 'Presidente da República',
production: false,
domain: 'oapr.gov.ao',
defaultuser: 'gmanuel@oapr.gov.ao',
defaultuserpwd: 'Tabteste@006',
chatOffline: true,
presidencial: true,
version: versionData,
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
};