This commit is contained in:
Eudes Inácio
2021-07-22 16:10:50 +01:00
33 changed files with 5818 additions and 4739 deletions
+10 -2
View File
@@ -42,7 +42,14 @@
"inject": true "inject": true
} }
], ],
"scripts": [] "scripts": [],
"aot": false,
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
}, },
"configurations": { "configurations": {
"production": { "production": {
@@ -71,7 +78,8 @@
"ci": { "ci": {
"progress": false "progress": false
} }
} },
"defaultConfiguration": ""
}, },
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
+1
View File
@@ -25,6 +25,7 @@
<application android:networkSecurityConfig="@xml/network_security_config" /> <application android:networkSecurityConfig="@xml/network_security_config" />
</edit-config> </edit-config>
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" /> <resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
<resource-file src="google-services.json" target="google-services.json" />
<allow-intent href="market:*" /> <allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /> <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /> <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
+5573 -4563
View File
File diff suppressed because it is too large Load Diff
+24 -22
View File
@@ -10,27 +10,27 @@
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e", "e2e": "ng e2e",
"test": "jest --detectOpenHandles --runInBand", "test": "jest --detectOpenHandles --runInBand",
"test:prof": "ionic build --prod && npm run test", "test:prof": "ionic build --configuration production && npm run test",
"dev:share": "lite-server --baseDir=serve" "dev": "lite-server --baseDir=www"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular-devkit/architect": "^0.1102.1", "@angular-devkit/architect": "^0.1201.2",
"@angular-devkit/core": "^11.2.1", "@angular-devkit/core": "^12.1.2",
"@angular-devkit/schematics": "^11.2.1", "@angular-devkit/schematics": "^12.1.2",
"@angular-material-components/datetime-picker": "^6.0.3", "@angular-material-components/datetime-picker": "^6.0.3",
"@angular-material-components/moment-adapter": "^6.0.0", "@angular-material-components/moment-adapter": "^6.0.0",
"@angular/animations": "^11.1.0", "@angular/animations": "^12.1.2",
"@angular/cdk": "^11.2.13", "@angular/cdk": "^11.2.13",
"@angular/common": "^11.2.2", "@angular/common": "^12.1.2",
"@angular/core": "^11.2.2", "@angular/core": "^12.1.2",
"@angular/forms": "~11.2.2", "@angular/forms": "~12.1.2",
"@angular/localize": "^11.2.2", "@angular/localize": "^12.1.2",
"@angular/material": "^11.2.13", "@angular/material": "^11.2.13",
"@angular/material-moment-adapter": "^12.0.5", "@angular/material-moment-adapter": "^12.0.5",
"@angular/platform-browser": "~11.2.2", "@angular/platform-browser": "~12.1.2",
"@angular/platform-browser-dynamic": "~11.2.2", "@angular/platform-browser-dynamic": "~12.1.2",
"@angular/router": "~11.2.2", "@angular/router": "~12.1.2",
"@fullcalendar/angular": "^5.3.0", "@fullcalendar/angular": "^5.3.0",
"@fullcalendar/daygrid": "^5.3.0", "@fullcalendar/daygrid": "^5.3.0",
"@fullcalendar/interaction": "^5.3.0", "@fullcalendar/interaction": "^5.3.0",
@@ -94,14 +94,14 @@
"uuidv4": "^6.2.11", "uuidv4": "^6.2.11",
"wordcloud": "^1.1.2", "wordcloud": "^1.1.2",
"ws": "^7.4.6", "ws": "^7.4.6",
"zone.js": "~0.10.2" "zone.js": "~0.11.4"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^0.1102.1", "@angular-devkit/build-angular": "^12.1.2",
"@angular/cli": "11.2.1", "@angular/cli": "12.1.2",
"@angular/compiler": "~11.2.2", "@angular/compiler": "^12.1.2",
"@angular/compiler-cli": "^11.2.2", "@angular/compiler-cli": "^12.1.2",
"@angular/language-service": "^11.2.6", "@angular/language-service": "^12.1.2",
"@ionic/angular-toolkit": "^3.0.0", "@ionic/angular-toolkit": "^3.0.0",
"@ionic/lab": "3.1.7", "@ionic/lab": "3.1.7",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",
@@ -132,7 +132,7 @@
"jasmine-spec-reporter": "~5.0.0", "jasmine-spec-reporter": "~5.0.0",
"jest": "^27.0.6", "jest": "^27.0.6",
"jest-preset-angular": "^9.0.4", "jest-preset-angular": "^9.0.4",
"karma": "~5.0.0", "karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0", "karma-jasmine": "~4.0.0",
@@ -141,7 +141,7 @@
"ts-jest-puppeteer": "0.0.5", "ts-jest-puppeteer": "0.0.5",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "^4.1.5" "typescript": "^4.3.5"
}, },
"description": "An Ionic project", "description": "An Ionic project",
"cordova": { "cordova": {
@@ -149,7 +149,9 @@
"cordova-plugin-statusbar": {}, "cordova-plugin-statusbar": {},
"cordova-plugin-device": {}, "cordova-plugin-device": {},
"cordova-plugin-splashscreen": {}, "cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {}, "cordova-plugin-ionic-keyboard": {},
"cordova-plugin-inappbrowser": {}, "cordova-plugin-inappbrowser": {},
"cordova-plugin-camera": { "cordova-plugin-camera": {
+2 -2
View File
@@ -22,10 +22,10 @@
<ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon> <ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
<ion-label class="overflow-visible">Ações</ion-label> <ion-label class="overflow-visible">Ações</ion-label>
</ion-tab-button> </ion-tab-button>
<ion-tab-button tab="chat"> <!-- <ion-tab-button tab="chat">
<ion-icon class="nav-icon" src="assets/images/icons-nav-chat-inactive.svg"></ion-icon> <ion-icon class="nav-icon" src="assets/images/icons-nav-chat-inactive.svg"></ion-icon>
<ion-label>Chat</ion-label> <ion-label>Chat</ion-label>
</ion-tab-button> </ion-tab-button> -->
</ion-tab-bar> </ion-tab-bar>
</ion-tabs> </ion-tabs>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
+7 -4
View File
@@ -79,8 +79,10 @@ export class HomePage implements OnInit {
} }
mobilefirstConnect() { mobilefirstConnect() {
window['WLAuthorizationManager'].obtainAccessToken("").then(
(token) => { try {
window['WLAuthorizationManager'].obtainAccessToken("").then( (token) => {
console.log('MobileFirst Server connect: Success ' + token); console.log('MobileFirst Server connect: Success ' + token);
var resourceRequest = new WLResourceRequest("/adapters/javaAdapter/resource/greet/", var resourceRequest = new WLResourceRequest("/adapters/javaAdapter/resource/greet/",
@@ -105,8 +107,9 @@ export class HomePage implements OnInit {
alert("Bummer..."); alert("Bummer...");
alert("Failed to connect to MobileFirst Server"); alert("Failed to connect to MobileFirst Server");
}); */ }); */
} });
); } catch {}
} }
} }
@@ -137,12 +137,17 @@ export class DespachoPrPage implements OnInit {
}); });
this.getDocumentDetails(this.task.FolderId, '361'); this.getDocumentDetails(this.task.FolderId, '361');
}, ()=>{ }, (error)=>{
try { try {
this.toastService.badRequest('Processo não encontrado')
this.goBack() this.goBack()
} catch (e) { } catch (e) {
window.history.back(); window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
}
} }
}); });
} }
@@ -139,12 +139,17 @@ export class DespachoPage implements OnInit {
}); });
}); });
this.getDocumentDetails(this.task.FolderId, '361'); this.getDocumentDetails(this.task.FolderId, '361');
}, ()=>{ }, (error)=>{
try { try {
this.toastService.badRequest('Processo não encontrado')
this.goBack() this.goBack()
} catch (e) { } catch (e) {
window.history.back(); window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
}
} }
}); });
} }
@@ -123,12 +123,18 @@ export class DiplomaAssinarPage implements OnInit {
}); });
this.getDocumentDetails(this.task.FolderId, '361'); this.getDocumentDetails(this.task.FolderId, '361');
}, ()=>{ }, (error)=>{
try { try {
this.toastService.badRequest('Processo não encontrado') this.toastService.badRequest('Processo não encontrado')
this.goBack() this.goBack()
} catch (e) { } catch (e) {
window.history.back(); window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
}
} }
}); });
@@ -138,12 +138,17 @@ export class DiplomaPage implements OnInit {
}); });
this.getDocumentDetails(this.task.FolderId, '361'); this.getDocumentDetails(this.task.FolderId, '361');
}, ()=>{ }, (error)=>{
try { try {
this.toastService.badRequest('Processo não encontrado')
this.goBack() this.goBack()
} catch (e) { } catch (e) {
window.history.back(); window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
}
} }
}); });
@@ -49,14 +49,14 @@ export class ExpedienteDetailPage implements OnInit {
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private toastService: ToastService, private toastService: ToastService,
) { ) {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) { if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber; this.serialnumber = params["params"].SerialNumber;
} }
if(params["params"].caller) { if(params["params"].caller) {
this.caller = params["params"].caller; this.caller = params["params"].caller;
} }
}); });
} }
ngOnInit() { ngOnInit() {
@@ -160,12 +160,18 @@ export class ExpedienteDetailPage implements OnInit {
console.log('this.task', this.task) console.log('this.task', this.task)
console.log('this.task.DocumentURL', this.task.DocumentURL) console.log('this.task.DocumentURL', this.task.DocumentURL)
}, ()=>{ }, (error)=>{
try { try {
this.toastService.badRequest('Processo não encontrado') this.toastService.badRequest('Processo não encontrado')
this.goBack() this.goBack()
} catch (e) { } catch (e) {
window.history.back(); window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
}
} }
}); });
@@ -187,12 +187,18 @@ export class ExpedientePrPage implements OnInit {
}) })
}, ()=>{ }, (error)=>{
try { try {
this.toastService.badRequest('Processo não encontrado') this.toastService.badRequest('Processo não encontrado')
this.goBack() this.goBack()
} catch (e) { } catch (e) {
window.history.back(); window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
}
} }
}); });
} }
@@ -156,13 +156,18 @@ export class PedidoPage implements OnInit {
}); });
}); });
this.getDocumentDetails(res.workflowInstanceDataFields.FolderID, '361'); this.getDocumentDetails(res.workflowInstanceDataFields.FolderID, '361');
}, ()=>{ }, (error)=>{
try { try {
this.toastService.badRequest('Processo não encontrado')
this.goBack() this.goBack()
this.close() this.close()
} catch (e) { } catch (e) {
window.history.back(); window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
}
} }
}); });
+1 -1
View File
@@ -16,7 +16,7 @@
</div> </div>
<h3 class="center text-white">Inicie a sessão</h3> <h3 class="center text-white">Inicie a sessão</h3>
<form class="form"> <form class="form">
<p class="form-label text-white">Nome de utilizador</p> <p class="form-label text-white">Email</p>
<ion-item class="form-input"> <ion-item class="form-input">
<ion-input type="text" [(ngModel)]="username" name="input-username"></ion-input> <ion-input type="text" [(ngModel)]="username" name="input-username"></ion-input>
</ion-item> </ion-item>
+1 -4
View File
@@ -124,7 +124,7 @@ export class LoginPage implements OnInit {
domainName: environment.domain, domainName: environment.domain,
BasicAuthKey: "" BasicAuthKey: ""
} }
let attempt = await this.authService.login(this.userattempt); let attempt = await this.authService.login(this.userattempt)
if (attempt) { if (attempt) {
this.authService.loginChat(this.userattempt); this.authService.loginChat(this.userattempt);
@@ -138,9 +138,6 @@ export class LoginPage implements OnInit {
this.router.navigate(['/home/events']); this.router.navigate(['/home/events']);
} }
} }
else {
this.toastService.badRequest('O nome de utilizador e/ou palavra-passe estão incorretas ou verifique a sua conexão com a internet e volte a tentar');
}
} }
else { else {
this.toastService.badRequest('Por favor, insira a sua palavra-passe'); this.toastService.badRequest('Por favor, insira a sua palavra-passe');
@@ -45,7 +45,7 @@
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon> <ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
</div> </div>
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-content flex-grow-1 cursor-pointer"> <div (click)="goToPublicationsList(viagem.ProcessId)" class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5">De {{viagem.DateBegin}} a {{viagem.DateEnd}}</p> <p class="item-content-date my-5">De {{getDate(viagem.DateBegin)}} a {{getDate(viagem.DateEnd)}}</p>
<p class="item-content-title my-10">{{viagem.Description}}</p> <p class="item-content-title my-10">{{viagem.Description}}</p>
<p class="item-content-detail my-5">{{viagem.Detail}}</p> <p class="item-content-detail my-5">{{viagem.Detail}}</p>
</div> </div>
@@ -86,7 +86,7 @@
> >
<ion-item lines="none" <ion-item lines="none"
class="width-100 d-flex ion-no-border ion-no-margin ion-no-padding" class="width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
(click)="viewPublications(evento)"> (click)="goToPublicationsList(evento.ProcessId)">
<div class="item-icon2"> <div class="item-icon2">
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon> <ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
</div> </div>
@@ -25,6 +25,7 @@ export class PublicationsPage implements OnInit {
publication: Publication; publication: Publication;
publicationsEventFolderList: PublicationFolder[]; publicationsEventFolderList: PublicationFolder[];
actionsListStorage: PublicationFolder[] = new Array();
publicationsTravelFolderList: PublicationFolder[]; publicationsTravelFolderList: PublicationFolder[];
theDate:any; theDate:any;
@@ -117,6 +118,11 @@ export class PublicationsPage implements OnInit {
return window.innerWidth return window.innerWidth
} }
getDate(date) {
this.theDate = new Date(date);
return this.theDate.getDate() +" de " + ( this.months[this.theDate.getMonth()])+" de " +this.theDate.getFullYear()
}
getActions() { getActions() {
this.showLoader = true; this.showLoader = true;
this.publications.GetPublicationFolderList().subscribe(res=>{ this.publications.GetPublicationFolderList().subscribe(res=>{
@@ -125,14 +131,12 @@ export class PublicationsPage implements OnInit {
this.publicationsTravelFolderList = new Array(); this.publicationsTravelFolderList = new Array();
res.forEach(data => { res.forEach(data => {
this.theDate = new Date(data.DateBegin);
this.theEndDate = new Date(data.DateEnd);
let folder: PublicationFolder = { let folder: PublicationFolder = {
ProcessId: data.ProcessId, ProcessId: data.ProcessId,
Description: data.Description, Description: data.Description,
Detail: data.Detail, Detail: data.Detail,
DateBegin: this.theDate.getDate() +" de " + ( this.months[this.theDate.getMonth()])+" de " +this.theDate.getFullYear(), DateBegin: data.DateBegin,
DateEnd: this.theEndDate.getDate() +" de " + ( this.months[this.theEndDate.getMonth()])+" de " +this.theEndDate.getFullYear(), DateEnd: data.DateEnd,
ActionType: data.ActionType, ActionType: data.ActionType,
} }
@@ -145,7 +149,7 @@ export class PublicationsPage implements OnInit {
this.showLoader = false; this.showLoader = false;
this.publicationEventFolderStorage.reset(this.publicationsEventFolderList) this.publicationEventFolderStorage.reset(this.publicationsEventFolderList)
this.publicationTravelFolderService.reset(this.publicationsTravelFolderList) this.publicationTravelFolderService.reset(this.publicationsEventFolderList)
}); });
@@ -84,13 +84,16 @@ export class ViewPublicationsPage implements OnInit {
} }
goBack() { goBack() {
this.modalController.dismiss();
this.router.navigate(['/home/publications']); this.router.navigate(['/home/publications']);
} }
getPublicationDetail() { getPublicationDetail() {
let allActions = this.publicationEventFolderStorage.list.concat(this.publicationTravelFolderService.list)
this.item = allActions.find((e)=> e.ProcessId == this.folderId) setTimeout(() => {
let allActions = this.publicationEventFolderStorage.list.concat(this.publicationTravelFolderService.list)
this.item = allActions.find((e)=> e.ProcessId == this.folderId);
}, 100);
} }
getPublications() { getPublications() {
+2 -3
View File
@@ -428,7 +428,7 @@ export class SearchPage implements OnInit {
/** /**
* @description set empty value to searchSubject * @description set empty value to searchSubject
*/ */
clearSearchInput(){ clearSearchInput() {
this.searchSubject = "" this.searchSubject = ""
this.searchCategories = []; this.searchCategories = [];
@@ -436,8 +436,7 @@ export class SearchPage implements OnInit {
this.showDocuments = false; this.showDocuments = false;
this.wordCloud(); this.wordCloud();
}
}
/** /**
* @param isoDate String Iso date * @param isoDate String Iso date
+8 -1
View File
@@ -9,6 +9,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
import { AuthConnstants } from '../config/auth-constants'; import { AuthConnstants } from '../config/auth-constants';
import { AlertController } from '@ionic/angular'; import { AlertController } from '@ionic/angular';
import { LocalstoreService } from '../store/localstore.service'; import { LocalstoreService } from '../store/localstore.service';
import { ToastService } from './toast.service';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@@ -27,7 +28,8 @@ export class AuthService {
private storageService:StorageService, private storageService:StorageService,
private router:Router, private router:Router,
public alertController: AlertController, public alertController: AlertController,
private localstoreService: LocalstoreService private localstoreService: LocalstoreService,
private toastService: ToastService,
) { ) {
this.headers = new HttpHeaders(); this.headers = new HttpHeaders();
@@ -80,6 +82,11 @@ export class AuthService {
} }
} catch (error) { } catch (error) {
if(error.status == 0) {
this.toastService.badRequest('Verifique a sua conexão com a internet e volte a tentar')
} else {
this.toastService.badRequest('O email e/ou palavra-passe estão incorretas ou verifique a sua conexão com a internet e volte a tentar');
}
return false; return false;
} }
@@ -100,12 +100,20 @@ export class ViewEventPage implements OnInit {
this.today = new Date(res.StartDate); this.today = new Date(res.StartDate);
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
this.getAttachments(this.loadedEvent.EventId); this.getAttachments(this.loadedEvent.EventId);
}, (errer)=> { }, (error)=> {
console.log('errer', )
this.viewEventDetailDismiss.emit({ this.viewEventDetailDismiss.emit({
type: 'close' type: 'close'
}) })
this.toastService.badRequest('Este evento já não existe na sua agenda') if(error.status == 0) {
this.toastService.badRequest('não é possível vizualizar este event no modo offline')
} else {
this.toastService.badRequest('Este evento já não existe na sua agenda')
}
}) })
; ;
} }
+2 -3
View File
@@ -49,10 +49,10 @@
</div> </div>
<div class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/chat')" [class.active]="locationPathname() == '/home/chat'"> <!-- <div class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/chat')" [class.active]="locationPathname() == '/home/chat'">
<ion-icon class="font-40" src='assets/images/icons-nav-grupos-inactive-dk-white.svg'></ion-icon> <ion-icon class="font-40" src='assets/images/icons-nav-grupos-inactive-dk-white.svg'></ion-icon>
<span>Chat</span> <span>Chat</span>
</div> </div> -->
</div> </div>
@@ -90,4 +90,3 @@
</div> </div>
</div> </div>
@@ -44,10 +44,10 @@
</div> </div>
<div class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/chat')" [class.active]="locationPathname() == '/home/chat'"> <!-- <div class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/chat')" [class.active]="locationPathname() == '/home/chat'">
<ion-icon class="font-40" src='assets/images/icons-nav-grupos-inactive-dk-white.svg'></ion-icon> <ion-icon class="font-40" src='assets/images/icons-nav-grupos-inactive-dk-white.svg'></ion-icon>
<span>Chat</span> <span>Chat</span>
</div> </div> -->
</div> </div>
@@ -67,4 +67,3 @@
</div> </div>
</div> </div>
@@ -115,7 +115,7 @@ export class ProfileComponent implements OnInit {
logout() { logout() {
// clear local storage // clear local storage
window.localStorage.clear(); window.localStorage.clear();
window.location.pathname = '/home/events' window.location.pathname = '/'
} }
LoginPreferenceMethod(type: string) { LoginPreferenceMethod(type: string) {
+3 -2
View File
@@ -8,7 +8,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
export class DespachoStoreService { export class DespachoStoreService {
// main data // main data
private _list: Event[] private _list: [] = []
// local storage keyName // local storage keyName
private keyName: string; private keyName: string;
private _count = 0 private _count = 0
@@ -27,8 +27,9 @@ export class DespachoStoreService {
} }
get list() { get list() {
return this._list return this._list || []
} }
get count() { get count() {
return this._count return this._count
} }
@@ -11,7 +11,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
class ExpedienteStorageServiceService { class ExpedienteStorageServiceService {
// main data // main data
private _list: Event[] private _list: Event[] = []
private _count = 0 private _count = 0
// local storage keyName // local storage keyName
private keyName: string; private keyName: string;
+1 -1
View File
@@ -6,7 +6,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
}) })
export class LocalstoreService { export class LocalstoreService {
private prefix = 'v9-' private prefix = 'v10-'
constructor() { constructor() {
@@ -10,7 +10,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
export class ToDayEventStorageService { export class ToDayEventStorageService {
// main data // main data
private _eventsList: Event[] private _eventsList: Event[] = []
// local storage keyName // local storage keyName
private keyName: string; private keyName: string;
private _count = 0 private _count = 0
+1 -1
View File
@@ -20,4 +20,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact * This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown. * on performance if an error is thrown.
*/ */
// import 'zone.js/dist/zone-error'; // Included with Angular CLI. // import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
+1 -1
View File
@@ -62,7 +62,7 @@ import './zone-flags';
* Zone JS is required by default for Angular itself. * Zone JS is required by default for Angular itself.
*/ */
import 'zone.js/dist/zone'; // Included with Angular CLI. import 'zone.js'; // Included with Angular CLI.
/*************************************************************************************************** /***************************************************************************************************
+1 -1
View File
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files // This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing'; import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing'; import { getTestBed } from '@angular/core/testing';
import { import {
BrowserDynamicTestingModule, BrowserDynamicTestingModule,