Peter changes 05/06

This commit is contained in:
Eudes Inácio
2023-06-05 11:35:04 +01:00
17 changed files with 5203 additions and 4156 deletions
+18 -11
View File
@@ -291,23 +291,30 @@ export class EventsPage implements OnInit {
}
firstEnter = false
LoadList() {
this.showCorrespondenciasLoader = true
this.processes.GetTaskListExpediente(false).subscribe(result => {
if(this.firstEnter) {
this.showCorrespondenciasLoader = true
this.processes.GetTaskListExpediente(false).subscribe(result => {
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
this.listToPresentexpediente = ExpedienteTask;
this.listToPresentexpediente = ExpedienteTask;
this.storage.set('process', ExpedienteTask)
this.storage.set('process', ExpedienteTask)
this.showCorrespondenciasLoader = false
}, ((error) => {
this.showCorrespondenciasLoader = false
}, ((error) => {
this.showCorrespondenciasLoader = false
//
this.getEventsFromLocalDb();
}));
this.showCorrespondenciasLoader = false
//
this.getEventsFromLocalDb();
}));
}
this.firstEnter = true
}
sortArrayISODate(myArray: any) {
@@ -260,7 +260,7 @@ export class BookMeetingModalPage implements OnInit {
async saveTask() {
if(SessionStore.user.Profile == 'MDGPR') {
if(SessionStore.user.Profile != 'PR') {
this.injectValidation()
this.runValidation()
if(this.Form.invalid) return false
+11 -6
View File
@@ -9,21 +9,26 @@ export class AESEncrypt {
ivArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
constructor() { }
encrypt(encryptData, pass) {
encrypt(password, email) {
// debugger;
// console.log({password, email})
var text = "Pro-it te espera!!!!";
//Creating the Vector Key
//console.log({'this.toHexString(this.ivArray)': this.toHexString(this.ivArray),'this.ivArray': this.ivArray })
var iv = CryptoJS.enc.Hex.parse(this.toHexString(this.ivArray));
//Encoding the Password in from UTF8 to byte array
var Pass = CryptoJS.enc.Utf8.parse(pass);
var Email = CryptoJS.enc.Utf8.parse(email);
//console.log('Pass.toString()', Email.toString())
//Encoding the Salt in from UTF8 to byte array
var Salt = CryptoJS.enc.Utf8.parse("gabinetedigital");
//console.log('Salt.toString()', Salt.toString())
//Creating the key in PBKDF2 format to be used during the decryption
var key128Bits1000Iterations = CryptoJS.PBKDF2(Pass.toString(CryptoJS.enc.Utf8), Salt, { keySize: 128 / 32, iterations: 1000 });
var key128Bits1000Iterations = CryptoJS.PBKDF2(Email.toString(CryptoJS.enc.Utf8), Salt, { keySize: 128 / 32, iterations: 1000 });
//console.log(key128Bits1000Iterations.toString())
//Decrypting the string contained in cipherParams using the PBKDF2 key
var decrypted = CryptoJS.AES.encrypt(encryptData, key128Bits1000Iterations, { mode: CryptoJS.mode.CBC, iv: iv, padding: CryptoJS.pad.Pkcs7 });
//
var decrypted = CryptoJS.AES.encrypt(password, key128Bits1000Iterations, { mode: CryptoJS.mode.CBC, iv: iv, padding: CryptoJS.pad.Pkcs7 });
//
return decrypted.toString();
}
+3
View File
@@ -75,6 +75,9 @@ export class AuthService {
async login(user: UserForm, {saveSession = true}): Promise<LoginUserRespose> {
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + this.aesencrypt.encrypt(user.password,user.username ));
// Basic peter.maquiran@equilibrium.co.ao:senha123456
// console.log(user.BasicAuthKey)
this.headers = this.headers.set('Authorization', user.BasicAuthKey);
this.opts = {
headers: this.headers,
@@ -21,7 +21,7 @@ import { ThemeService } from 'src/app/services/theme.service'
export class DespachosPrPage implements OnInit {
customTaskPipe = new CustomTaskPipe()
skeletonLoader = true
skeletonLoader = false
loggeduser: LoginUserRespose;
despachosprstore = DespachosprStore;
@@ -48,7 +48,7 @@ constructor (
ngOnInit() {
this.LoadList()
// this.LoadList()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart &&
@@ -12,7 +12,7 @@ import { ThemeService } from 'src/app/services/theme.service'
})
export class DespachosPage implements OnInit {
skeletonLoader = true;
skeletonLoader = false;
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
showSearch = false
searchSubject = ''
@@ -29,7 +29,7 @@ export class DespachosPage implements OnInit {
ngOnInit() {
this.LoadList();
// this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?despachos=true')) {
@@ -16,7 +16,7 @@ import { TaskService } from 'src/app/services/task.service'
export class DiplomasAssinarPage implements OnInit {
serialNumber:string;
skeletonLoader = true
skeletonLoader = false
deplomasStore = DeplomasStore
customTaskPipe = new CustomTaskPipe()
@@ -39,7 +39,7 @@ export class DiplomasAssinarPage implements OnInit {
ngOnInit() {
this.LoadList()
// this.LoadList()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {
@@ -17,7 +17,7 @@ export class DiplomasGerarPage implements OnInit {
diplomasList:DailyWorkTask[] = [];
serialNumber:string;
skeletonLoader = true
skeletonLoader = false
deplomasStore = DeplomasStore
customTaskPipe = new CustomTaskPipe()
@@ -39,8 +39,19 @@ export class DiplomasGerarPage implements OnInit {
ngOnInit() {
this.LoadList()
this.dynamicSearch()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital/?gerarDiplomas=true'.startsWith(event.url)) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.LoadList()
this.dynamicSearch()
} else {
this.LoadList()
this.dynamicSearch()
}
}
});
}
@@ -48,7 +48,7 @@ export class DiplomasPage implements OnInit {
ngOnInit() {
// update list
this.LoadList()
// this.LoadList()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomas=true'.startsWith(event.url)) {
@@ -67,7 +67,7 @@ export class EventsToApprovePage implements OnInit {
}
}
this.LoadToApproveEvents();
// this.LoadToApproveEvents();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart &&
@@ -20,7 +20,7 @@ export class ExpedientesPrPage implements OnInit {
taskslist = [];
serialNumber:string;
skeletonLoader = true;
skeletonLoader = false;
expedienteGdStore = ExpedienteGdStore;
customTaskPipe = new CustomTaskPipe()
expedienteTaskPipe = new ExpedienteTaskPipe()
@@ -48,7 +48,7 @@ export class ExpedientesPrPage implements OnInit {
ngOnInit() {
this.LoadList()
// this.LoadList()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart &&
@@ -20,7 +20,7 @@ export class ExpedientsPage implements OnInit {
serialNumber: string;
@Input() profile: string;
skeletonLoader = true
skeletonLoader = false
expedientegbstore = ExpedienteGdStore
expedienteTaskPipe = new ExpedienteTaskPipe()
@@ -53,7 +53,7 @@ export class ExpedientsPage implements OnInit {
ngOnInit() {
//Inicializar segment
this.segment = "expedientes";
this.LoadList()
// this.LoadList()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart &&
+1 -1
View File
@@ -31,7 +31,7 @@ export const doneITDev: Environment = {
production: true,
domain: 'equilibrium.co.ao',
defaultuser: 'evandre.dasilva@equilibrium.co.ao',
defaultuserpwd: 'Luand@1113',
defaultuserpwd: 'Luand@1114',
chatOffline: true,
presidential: false,
version: versionData,