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
+2 -2
View File
@@ -8,7 +8,7 @@ const chromPath = process.env.PUPPETEER_CHROME_PATH
module.exports = {
server: {
command: `http-server -a 127.0.0.1 --port ${port} ./www`,
command: ` `,
port: port,
launchTimeout: 10000
},
@@ -21,7 +21,7 @@ module.exports = {
width:1200,
height:1080
},
executablePath: chromPath
// executablePath: chromPath
},
browserContext: 'default',
+5133 -4112
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -151,7 +151,6 @@
"ionic2-alpha-scroll": "^2.0.1",
"ionic2-calendar": "^0.6.6",
"ionicons": "^5.5.3",
"jest": "^27.5.1",
"jest-puppeteer": "^7.0.1",
"jetifier": "^1.6.8",
"lite-server": "^2.6.1",
@@ -212,7 +211,8 @@
"es6-promise-plugin": "^4.2.2",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"jest-environment-jsdom": "^29.4.3",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"jest-jasmine2": "^29.4.3",
"jest-preset-angular": "^9.0.4",
"karma": "^6.3.20",
+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,
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = {
"shortSHA": "621e87c1f",
"SHA": "621e87c1f442f31e75ee85a588e6eed0dc292fe3",
"shortSHA": "06583abd2",
"SHA": "06583abd285d7c16db59d878736eecc02240d689",
"branch": "feature/gabinete-search",
"lastCommitAuthor": "'Eudes Inácio'",
"lastCommitTime": "'Mon May 29 15:44:08 2023 +0100'",
"lastCommitMessage": "changes",
"lastCommitNumber": "4953",
"lastCommitTime": "'Mon Jun 5 11:15:30 2023 +0100'",
"lastCommitMessage": "changes Peter",
"lastCommitNumber": "4956",
"change": "",
"changeStatus": "On branch feature/gabinete-search\nYour branch and 'origin/feature/gabinete-search' have diverged,\nand have 6 and 4 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts\n\tmodified: src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts\n\tmodified: src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts\n\tmodified: src/environments/environment.prod.ts\n\tmodified: src/environments/environment.ts",
"changeStatus": "On branch feature/gabinete-search\nYour branch and 'origin/feature/gabinete-search' have diverged,\nand have 7 and 2 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: jest-puppeteer.config.js\n\tmodified: package-lock.json\n\tmodified: package.json\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts\n\tmodified: src/app/services/aesencrypt.service.ts\n\tmodified: src/app/services/auth.service.ts\n\tmodified: src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.ts\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas/diplomas.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedients/expedients.page.ts\n\tmodified: src/environments/suport/doneIt.ts",
"changeAuthor": "eudes.inacio"
}