remove publicates

This commit is contained in:
Peter Maquiran
2023-06-05 10:14:48 +01:00
parent a1657b1e84
commit 005643ae92
14 changed files with 66 additions and 40 deletions
+18 -11
View File
@@ -291,23 +291,30 @@ export class EventsPage implements OnInit {
} }
firstEnter = false
LoadList() { LoadList() {
this.showCorrespondenciasLoader = true if(this.firstEnter) {
this.processes.GetTaskListExpediente(false).subscribe(result => { 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
//
this.getEventsFromLocalDb();
}));
}
this.firstEnter = true
this.showCorrespondenciasLoader = false
}, ((error) => {
this.showCorrespondenciasLoader = false
//
this.getEventsFromLocalDb();
}));
} }
sortArrayISODate(myArray: any) { sortArrayISODate(myArray: any) {
@@ -260,7 +260,7 @@ export class BookMeetingModalPage implements OnInit {
async saveTask() { async saveTask() {
if(SessionStore.user.Profile == 'MDGPR') { if(SessionStore.user.Profile != 'PR') {
this.injectValidation() this.injectValidation()
this.runValidation() this.runValidation()
if(this.Form.invalid) return false if(this.Form.invalid) return false
+10 -5
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] ivArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
constructor() { } constructor() { }
encrypt(encryptData, pass) { encrypt(password, email) {
// debugger;
// console.log({password, email})
var text = "Pro-it te espera!!!!"; var text = "Pro-it te espera!!!!";
//Creating the Vector Key //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)); var iv = CryptoJS.enc.Hex.parse(this.toHexString(this.ivArray));
//Encoding the Password in from UTF8 to byte array //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 //Encoding the Salt in from UTF8 to byte array
var Salt = CryptoJS.enc.Utf8.parse("gabinetedigital"); 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 //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 //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(); return decrypted.toString();
} }
+3
View File
@@ -75,6 +75,9 @@ export class AuthService {
async login(user: UserForm, {saveSession = true}): Promise<LoginUserRespose> { async login(user: UserForm, {saveSession = true}): Promise<LoginUserRespose> {
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + this.aesencrypt.encrypt(user.password,user.username )); 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.headers = this.headers.set('Authorization', user.BasicAuthKey);
this.opts = { this.opts = {
headers: this.headers, headers: this.headers,
@@ -21,7 +21,7 @@ import { ThemeService } from 'src/app/services/theme.service'
export class DespachosPrPage implements OnInit { export class DespachosPrPage implements OnInit {
customTaskPipe = new CustomTaskPipe() customTaskPipe = new CustomTaskPipe()
skeletonLoader = true skeletonLoader = false
loggeduser: LoginUserRespose; loggeduser: LoginUserRespose;
despachosprstore = DespachosprStore; despachosprstore = DespachosprStore;
@@ -48,7 +48,7 @@ constructor (
ngOnInit() { ngOnInit() {
this.LoadList() // this.LoadList()
this.router.events.forEach((event) => { this.router.events.forEach((event) => {
if (event instanceof NavigationStart && if (event instanceof NavigationStart &&
@@ -12,7 +12,7 @@ import { ThemeService } from 'src/app/services/theme.service'
}) })
export class DespachosPage implements OnInit { export class DespachosPage implements OnInit {
skeletonLoader = true; skeletonLoader = false;
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos' filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
@@ -29,7 +29,7 @@ export class DespachosPage implements OnInit {
ngOnInit() { ngOnInit() {
this.LoadList(); // this.LoadList();
this.router.events.forEach((event) => { this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?despachos=true')) { 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 { export class DiplomasAssinarPage implements OnInit {
serialNumber:string; serialNumber:string;
skeletonLoader = true skeletonLoader = false
deplomasStore = DeplomasStore deplomasStore = DeplomasStore
customTaskPipe = new CustomTaskPipe() customTaskPipe = new CustomTaskPipe()
@@ -39,7 +39,7 @@ export class DiplomasAssinarPage implements OnInit {
ngOnInit() { ngOnInit() {
this.LoadList() // this.LoadList()
this.router.events.forEach((event) => { this.router.events.forEach((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) { if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {
@@ -17,7 +17,7 @@ export class DiplomasGerarPage implements OnInit {
diplomasList:DailyWorkTask[] = []; diplomasList:DailyWorkTask[] = [];
serialNumber:string; serialNumber:string;
skeletonLoader = true skeletonLoader = false
deplomasStore = DeplomasStore deplomasStore = DeplomasStore
customTaskPipe = new CustomTaskPipe() customTaskPipe = new CustomTaskPipe()
@@ -39,8 +39,19 @@ export class DiplomasGerarPage implements OnInit {
ngOnInit() { ngOnInit() {
this.LoadList() this.router.events.forEach((event) => {
this.dynamicSearch() 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() { ngOnInit() {
// update list // update list
this.LoadList() // this.LoadList()
this.router.events.forEach((event) => { this.router.events.forEach((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomas=true'.startsWith(event.url)) { 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) => { this.router.events.forEach((event) => {
if (event instanceof NavigationStart && if (event instanceof NavigationStart &&
@@ -20,7 +20,7 @@ export class ExpedientesPrPage implements OnInit {
taskslist = []; taskslist = [];
serialNumber:string; serialNumber:string;
skeletonLoader = true; skeletonLoader = false;
expedienteGdStore = ExpedienteGdStore; expedienteGdStore = ExpedienteGdStore;
customTaskPipe = new CustomTaskPipe() customTaskPipe = new CustomTaskPipe()
expedienteTaskPipe = new ExpedienteTaskPipe() expedienteTaskPipe = new ExpedienteTaskPipe()
@@ -48,7 +48,7 @@ export class ExpedientesPrPage implements OnInit {
ngOnInit() { ngOnInit() {
this.LoadList() // this.LoadList()
this.router.events.forEach((event) => { this.router.events.forEach((event) => {
if (event instanceof NavigationStart && if (event instanceof NavigationStart &&
@@ -20,7 +20,7 @@ export class ExpedientsPage implements OnInit {
serialNumber: string; serialNumber: string;
@Input() profile: string; @Input() profile: string;
skeletonLoader = true skeletonLoader = false
expedientegbstore = ExpedienteGdStore expedientegbstore = ExpedienteGdStore
expedienteTaskPipe = new ExpedienteTaskPipe() expedienteTaskPipe = new ExpedienteTaskPipe()
@@ -53,7 +53,7 @@ export class ExpedientsPage implements OnInit {
ngOnInit() { ngOnInit() {
//Inicializar segment //Inicializar segment
this.segment = "expedientes"; this.segment = "expedientes";
this.LoadList() // this.LoadList()
this.router.events.forEach((event) => { this.router.events.forEach((event) => {
if (event instanceof NavigationStart && if (event instanceof NavigationStart &&
+1 -1
View File
@@ -31,7 +31,7 @@ export const doneITDev: Environment = {
production: true, production: true,
domain: 'equilibrium.co.ao', domain: 'equilibrium.co.ao',
defaultuser: 'evandre.dasilva@equilibrium.co.ao', defaultuser: 'evandre.dasilva@equilibrium.co.ao',
defaultuserpwd: 'Luand@1113', defaultuserpwd: 'Luand@1114',
chatOffline: true, chatOffline: true,
presidential: false, presidential: false,
version: versionData, version: versionData,
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = { export let versionData = {
"shortSHA": "1fee8518c", "shortSHA": "a1657b1e8",
"SHA": "1fee8518ce6dcf725444ab92aac7b4749d5a5fca", "SHA": "a1657b1e846abdb35846a4534096dad901aea6eb",
"branch": "feature/gabinete-search", "branch": "feature/gabinete-search",
"lastCommitAuthor": "'Peter Maquiran'", "lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Mon May 29 15:19:13 2023 +0100'", "lastCommitTime": "'Mon May 29 15:29:24 2023 +0100'",
"lastCommitMessage": "add notification message", "lastCommitMessage": "update",
"lastCommitNumber": "4948", "lastCommitNumber": "4949",
"change": "", "change": "",
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\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", "changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\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": "peter.maquiran" "changeAuthor": "peter.maquiran"
} }