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
}
],
"scripts": []
"scripts": [],
"aot": false,
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
@@ -71,7 +78,8 @@
"ci": {
"progress": false
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
+1
View File
@@ -25,6 +25,7 @@
<application android:networkSecurityConfig="@xml/network_security_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="google-services.json" target="google-services.json" />
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-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",
"e2e": "ng e2e",
"test": "jest --detectOpenHandles --runInBand",
"test:prof": "ionic build --prod && npm run test",
"dev:share": "lite-server --baseDir=serve"
"test:prof": "ionic build --configuration production && npm run test",
"dev": "lite-server --baseDir=www"
},
"private": true,
"dependencies": {
"@angular-devkit/architect": "^0.1102.1",
"@angular-devkit/core": "^11.2.1",
"@angular-devkit/schematics": "^11.2.1",
"@angular-devkit/architect": "^0.1201.2",
"@angular-devkit/core": "^12.1.2",
"@angular-devkit/schematics": "^12.1.2",
"@angular-material-components/datetime-picker": "^6.0.3",
"@angular-material-components/moment-adapter": "^6.0.0",
"@angular/animations": "^11.1.0",
"@angular/animations": "^12.1.2",
"@angular/cdk": "^11.2.13",
"@angular/common": "^11.2.2",
"@angular/core": "^11.2.2",
"@angular/forms": "~11.2.2",
"@angular/localize": "^11.2.2",
"@angular/common": "^12.1.2",
"@angular/core": "^12.1.2",
"@angular/forms": "~12.1.2",
"@angular/localize": "^12.1.2",
"@angular/material": "^11.2.13",
"@angular/material-moment-adapter": "^12.0.5",
"@angular/platform-browser": "~11.2.2",
"@angular/platform-browser-dynamic": "~11.2.2",
"@angular/router": "~11.2.2",
"@angular/platform-browser": "~12.1.2",
"@angular/platform-browser-dynamic": "~12.1.2",
"@angular/router": "~12.1.2",
"@fullcalendar/angular": "^5.3.0",
"@fullcalendar/daygrid": "^5.3.0",
"@fullcalendar/interaction": "^5.3.0",
@@ -94,14 +94,14 @@
"uuidv4": "^6.2.11",
"wordcloud": "^1.1.2",
"ws": "^7.4.6",
"zone.js": "~0.10.2"
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1102.1",
"@angular/cli": "11.2.1",
"@angular/compiler": "~11.2.2",
"@angular/compiler-cli": "^11.2.2",
"@angular/language-service": "^11.2.6",
"@angular-devkit/build-angular": "^12.1.2",
"@angular/cli": "12.1.2",
"@angular/compiler": "^12.1.2",
"@angular/compiler-cli": "^12.1.2",
"@angular/language-service": "^12.1.2",
"@ionic/angular-toolkit": "^3.0.0",
"@ionic/lab": "3.1.7",
"@types/jasmine": "~3.6.0",
@@ -132,7 +132,7 @@
"jasmine-spec-reporter": "~5.0.0",
"jest": "^27.0.6",
"jest-preset-angular": "^9.0.4",
"karma": "~5.0.0",
"karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
@@ -141,7 +141,7 @@
"ts-jest-puppeteer": "0.0.5",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "^4.1.5"
"typescript": "^4.3.5"
},
"description": "An Ionic project",
"cordova": {
@@ -149,7 +149,9 @@
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-camera": {
+3 -3
View File
@@ -22,10 +22,10 @@
<ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
<ion-label class="overflow-visible">Ações</ion-label>
</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-label>Chat</ion-label>
</ion-tab-button>
</ion-tab-button> -->
</ion-tab-bar>
</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">
+8 -5
View File
@@ -79,10 +79,12 @@ export class HomePage implements OnInit {
}
mobilefirstConnect() {
window['WLAuthorizationManager'].obtainAccessToken("").then(
(token) => {
try {
window['WLAuthorizationManager'].obtainAccessToken("").then( (token) => {
console.log('MobileFirst Server connect: Success ' + token);
var resourceRequest = new WLResourceRequest("/adapters/javaAdapter/resource/greet/",
WLResourceRequest.GET
);
@@ -105,8 +107,9 @@ export class HomePage implements OnInit {
alert("Bummer...");
alert("Failed to connect to MobileFirst Server");
}); */
}
);
});
} catch {}
}
}
@@ -137,12 +137,17 @@ export class DespachoPrPage implements OnInit {
});
this.getDocumentDetails(this.task.FolderId, '361');
}, ()=>{
}, (error)=>{
try {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
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');
}, ()=>{
}, (error)=>{
try {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
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');
}, ()=>{
}, (error)=>{
try {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
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');
}, ()=>{
}, (error)=>{
try {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
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 toastService: ToastService,
) {
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber;
}
if(params["params"].caller) {
this.caller = params["params"].caller;
}
});
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber;
}
if(params["params"].caller) {
this.caller = params["params"].caller;
}
});
}
ngOnInit() {
@@ -160,12 +160,18 @@ export class ExpedienteDetailPage implements OnInit {
console.log('this.task', this.task)
console.log('this.task.DocumentURL', this.task.DocumentURL)
}, ()=>{
}, (error)=>{
try {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
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 {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
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');
}, ()=>{
}, (error)=>{
try {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
this.close()
} catch (e) {
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')
}
}
});
+12 -12
View File
@@ -16,17 +16,17 @@
</div>
<h3 class="center text-white">Inicie a sessão</h3>
<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-input type="text" [(ngModel)]="username" name="input-username"></ion-input>
</ion-item>
<p class="form-label text-white">Palavra-passe</p>
<ion-item class="form-input">
<ion-input (keyup.enter)="Login()" type="password" [(ngModel)]="password" name="input-password" ></ion-input>
</ion-item>
</ion-item>
<div class="d-flex pt-25">
<button class="btn-ok btn-login" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar</button>
</div>
</div>
</form>
<div class="msg-bottom d-flex">
<p class="msg-bottom-p">Uma iniciativa do Gabinete do Presidente da República</p>
@@ -40,7 +40,7 @@
<div class="div-logo">
<img src='assets/images/logo-bg.png' alt='logo'>
</div>
</div>
<ion-title *ngIf="hasPin" class="title">Digite o PIN</ion-title>
<ion-title *ngIf="!hasPin" class="title">Digite o novo PIN</ion-title>
@@ -52,25 +52,25 @@
<div class="dot"[class.dot-active]="code.length >= 4"></div>
</div>
<div class="terminal">
<div class="d-flex">
<div class="circle" (click)="setCode('1')">1</div> <div class="circle" (click)="setCode('2')">2</div> <div class="circle" (click)="setCode('3')">3</div>
</div>
<div class="d-flex">
<div class="circle" (click)="setCode('4')">4</div> <div class="circle" (click)="setCode('5')">5</div> <div class="circle" (click)="setCode('6')">6</div>
</div>
<div class="d-flex">
<div class="circle" (click)="setCode('7')">7</div> <div class="circle" (click)="setCode('8')">8</div> <div class="circle" (click)="setCode('9')">9</div>
</div>
<div class="d-flex align-center justify-center">
<div class="circle" (click)="setCode('0')">0</div>
</div>
</div>
<div *ngIf="hasPin" class="voltar d-flex align-center justify-center pt-25 clear" (click)="loginPreference = 'none'">
Entrar com senha
</div>
@@ -81,8 +81,8 @@
</div>
</div>
</div>
</ion-content>
</ion-content>
+19 -22
View File
@@ -34,7 +34,7 @@ export class LoginPage implements OnInit {
private toastService: ToastService,
public alertController: AlertController,
private localstoreService: LocalstoreService
) {
) {
}
ngOnInit() {
@@ -49,13 +49,13 @@ export class LoginPage implements OnInit {
// this.router.navigate(['/home/events']);
}
let userData = this.localstoreService.get('UserData', {})
let userData = this.localstoreService.get('UserData', {})
const loginPreference = userData?.loginPreference
const pin = userData?.PIN
if (pin) {
this.hasPin = true
this.hasPin = true
} else {
this.hasPin = false
}
@@ -74,7 +74,7 @@ export class LoginPage implements OnInit {
this.username.trim().length > 0
);
}
validatePassword() {
return (
this.password.trim().length > 0
@@ -124,8 +124,8 @@ export class LoginPage implements OnInit {
domainName: environment.domain,
BasicAuthKey: ""
}
let attempt = await this.authService.login(this.userattempt);
let attempt = await this.authService.login(this.userattempt)
if (attempt) {
this.authService.loginChat(this.userattempt);
this.getToken();
@@ -138,9 +138,6 @@ export class LoginPage implements OnInit {
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 {
this.toastService.badRequest('Por favor, insira a sua palavra-passe');
@@ -152,16 +149,16 @@ export class LoginPage implements OnInit {
}
setCode(code: string) {
if(this.code.length < 4) {
this.code.push(code)
}
if(this.code.length == 4) {
const code = this.code.join('')
const encrypted = crypto.SHA1(code)
if(!this.hasPin) {
// alert('storePin')
this.storePin()
@@ -177,15 +174,15 @@ export class LoginPage implements OnInit {
}
pinLogin() {
const code = this.code.join('')
const encrypted = crypto.SHA1(code)
let userData = this.localstoreService.get('UserData', {})
const pin = userData?.PIN
//if( encrypted == pin) {
if( encrypted == this.localstoreService.get('UserData', false)) {
//this.toastService.successMessage()
@@ -201,19 +198,19 @@ export class LoginPage implements OnInit {
const code = this.code.join('')
const encrypted = crypto.SHA1(code)
let userData: Object = this.localstoreService.get('UserData', {})
let userData: Object = this.localstoreService.get('UserData', {})
userData['PIN'] = encrypted
userData['loginPreference'] = 'none'
this.localstoreService.set('UserData', userData)
this.localstoreService.set('UserData', userData)
this.localstoreService.set('PIN', encrypted)
this.localstoreService.set('PIN', encrypted)
this.router.navigate(['/home/events']);
}
}
}
@@ -15,9 +15,9 @@
<!-- Header -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-toolbar >
<div class="main-header">
<div class="title-content width-100 d-flex justify-space-between">
<div class="div-title flex-grow-1">
<ion-label class="title ">Acções Presidenciais</ion-label>
@@ -34,10 +34,10 @@
</div>
</ion-toolbar>
<!-- Content -->
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
<!-- <ion-list class="width-100"> -->
<ion-item-sliding disabled="{{showSlidingOptions}}" class="item width-100 cursor-pointer"
<ion-item-sliding disabled="{{showSlidingOptions}}" class="item width-100 cursor-pointer"
*ngFor="let viagem of publicationTravelFolderService.list">
<ion-item lines="none"
class="width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
@@ -45,7 +45,7 @@
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
</div>
<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-detail my-5">{{viagem.Detail}}</p>
</div>
@@ -54,20 +54,20 @@
</div>
</ion-item>
<ion-item-options class="members-options" side="end">
<ion-item-option class="edit-option" (click)="editAction(viagem.ProcessId)">
<ion-item-option class="edit-option" (click)="editAction(viagem.ProcessId)">
<button class="btn-no-color">
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
</button>
</button>
</ion-item-option>
<ion-item-option class="delete-option" (click)="deleteAction(viagem.ProcessId)">
<ion-item-option class="delete-option" (click)="deleteAction(viagem.ProcessId)">
<button class="btn-no-color">
<ion-icon class="delete" name="trash-sharp"></ion-icon>
</button>
</button>
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
<!-- </ion-list> -->
<!-- <div class="item width-100 d-flex"
<!-- <div class="item width-100 d-flex"
*ngFor="let viagem of publicationsTravelFolderList">
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
@@ -86,7 +86,7 @@
>
<ion-item lines="none"
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">
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
</div>
@@ -101,15 +101,15 @@
</div>
</ion-item>
<ion-item-options class="members-options" side="end">
<ion-item-option class="edit-option" (click)="editAction(evento.ProcessId)">
<ion-item-option class="edit-option" (click)="editAction(evento.ProcessId)">
<button class="btn-no-color">
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
</button>
</button>
</ion-item-option>
<ion-item-option class="delete-option" (click)="deleteAction(evento.ProcessId)">
<ion-item-option class="delete-option" (click)="deleteAction(evento.ProcessId)">
<button class="btn-no-color">
<ion-icon class="delete" name="trash-sharp"></ion-icon>
</button>
</button>
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
@@ -129,13 +129,13 @@
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
</div>
</div> -->
</div>
</div>
</div>
<!-- Right -->
<div class="content content-right d-none flex-grow-1 flex-column ">
<div class="width-100 height-100 d-flex align-center justify-center"
<div class="width-100 height-100 d-flex align-center justify-center"
*ngIf="(
desktopComponent.showViewPublication == false &&
desktopComponent.showAddNewPublication == false &&
@@ -143,9 +143,9 @@
desktopComponent.showAddActions == false &&
desktopComponent.showEditActions == false
)"><div>Nenhuma ação presidencial selecionada</div></div>
<!-- View Publication -->
<app-view-publications
<app-view-publications
*ngIf="desktopComponent.showViewPublication"
[folderId]="folderId"
class="height-100 d-flex flex-column overflow-hidden flex-grow-1"
@@ -158,13 +158,13 @@
>
</app-view-publications>
<app-new-publication
<app-new-publication
*ngIf="desktopComponent.showAddNewPublication"
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
[folderId]="folderId"
[publicationType]="publicationType"
[publicationId]="publicationId"
(closeDesktopComponent)="closeDesktopComponent($event)"
(goBacktoPublicationDetails)="goBacktoPublicationDetails()"
(goBackToViewPublications)="goBackToViewPublications()"
@@ -205,4 +205,4 @@
</div>
</ion-content>
</ion-content>
+25 -21
View File
@@ -25,6 +25,7 @@ export class PublicationsPage implements OnInit {
publication: Publication;
publicationsEventFolderList: PublicationFolder[];
actionsListStorage: PublicationFolder[] = new Array();
publicationsTravelFolderList: PublicationFolder[];
theDate:any;
@@ -35,7 +36,7 @@ export class PublicationsPage implements OnInit {
publicationEventFolderStorage = PublicationEventFolderStorage
publicationTravelFolderService = PublicationTravelFolderStore
desktopComponent: any = {
showViewPublication: false,
showAddNewPublication: false,
@@ -55,7 +56,7 @@ export class PublicationsPage implements OnInit {
showSlidingOptions = true;
constructor(
private router: Router,
private router: Router,
private modalController: ModalController,
private animationController: AnimationController,
private publications: PublicationsService,
@@ -68,14 +69,14 @@ export class PublicationsPage implements OnInit {
ngOnInit() {
const pathname = window.location.pathname
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == pathname) {
this.getActions();
}
});
this.hideRefreshButton();
this.hideRefreshButton();
}
hideRefreshButton(){
@@ -104,7 +105,7 @@ export class PublicationsPage implements OnInit {
this.getActions();
}, 1500);
}
doRefresh(event) {
this.getActions();
@@ -117,6 +118,11 @@ export class PublicationsPage implements OnInit {
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() {
this.showLoader = true;
this.publications.GetPublicationFolderList().subscribe(res=>{
@@ -125,14 +131,12 @@ export class PublicationsPage implements OnInit {
this.publicationsTravelFolderList = new Array();
res.forEach(data => {
this.theDate = new Date(data.DateBegin);
this.theEndDate = new Date(data.DateEnd);
let folder: PublicationFolder = {
ProcessId: data.ProcessId,
Description: data.Description,
Detail: data.Detail,
DateBegin: this.theDate.getDate() +" de " + ( this.months[this.theDate.getMonth()])+" de " +this.theDate.getFullYear(),
DateEnd: this.theEndDate.getDate() +" de " + ( this.months[this.theEndDate.getMonth()])+" de " +this.theEndDate.getFullYear(),
DateBegin: data.DateBegin,
DateEnd: data.DateEnd,
ActionType: data.ActionType,
}
@@ -145,7 +149,7 @@ export class PublicationsPage implements OnInit {
this.showLoader = false;
this.publicationEventFolderStorage.reset(this.publicationsEventFolderList)
this.publicationTravelFolderService.reset(this.publicationsTravelFolderList)
this.publicationTravelFolderService.reset(this.publicationsEventFolderList)
});
@@ -186,7 +190,7 @@ export class PublicationsPage implements OnInit {
}
async AddPublicationFolder(item?:any) {
this.closeDesktopComponent();
if(window.innerWidth <= 1024) {
@@ -216,7 +220,7 @@ export class PublicationsPage implements OnInit {
} else {
this.closeDesktopComponent();
this.folderId = folderId
this.desktopComponent.showViewPublication = true;
this.desktopComponent.showViewPublication = true;
}
}
@@ -246,7 +250,7 @@ export class PublicationsPage implements OnInit {
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
this.closeDesktopComponent();
@@ -269,12 +273,12 @@ export class PublicationsPage implements OnInit {
} else {
// open angular component
this.folderId = folderId
this.desktopComponent.showViewPublication = true;
this.desktopComponent.showViewPublication = true;
}
}
// called from publications details
// called from publications details
// Emittter
goBackToViewPublications(){
@@ -308,16 +312,16 @@ export class PublicationsPage implements OnInit {
if (folderId != undefined) {
this.folderId = folderId;
}
this.publication = publication;
this.desktopComponent.showAddNewPublication = true;
}
async openPublicationDetails(publicationId: string){
this.publicationId = publicationId;
this.closeDesktopComponent();
this.desktopComponent.showPublicationDetail = true;
@@ -326,7 +330,7 @@ export class PublicationsPage implements OnInit {
async updateDesktopComponent(e?:any){
this.getActions();
}
async closeDesktopComponent (xx?: any){
this.desktopComponent = {
@@ -387,4 +391,4 @@ export class PublicationsPage implements OnInit {
});
}
}
}
@@ -87,5 +87,5 @@
</div>
</div>
</ion-list>
</div>
</div>
</ion-content>
@@ -28,7 +28,7 @@ export class ViewPublicationsPage implements OnInit {
//
publicationEventFolderStorage = PublicationEventFolderStorage
publicationTravelFolderService = PublicationTravelFolderStore
constructor(
private modalController: ModalController,
private publications: PublicationsService,
@@ -39,7 +39,7 @@ export class ViewPublicationsPage implements OnInit {
this.item = new PublicationFolder();
this.activatedRoute.paramMap.subscribe(params => {
console.log(params);
if(params["params"]) {
this.folderId = params["params"].folderId;
console.log(params["params"]);
@@ -84,23 +84,26 @@ export class ViewPublicationsPage implements OnInit {
}
goBack() {
this.modalController.dismiss();
this.router.navigate(['/home/publications']);
}
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() {
this.showLoader = true;
const folderId = this.folderId
this.publications.GetPublications(this.folderId).subscribe(res=>{
console.log(res);
let data = [];
res.forEach(element => {
let itemImage = {
title: 'Title',
@@ -119,7 +122,7 @@ export class ViewPublicationsPage implements OnInit {
"OriginalFileName": '',
"FileExtension": '',
}
// this.publicationList.push(item);
data.push(item)
@@ -136,9 +139,9 @@ export class ViewPublicationsPage implements OnInit {
}
this.showLoader = false;
});
}
async AddPublication(publicationType:any, folderId:any) {
+2 -3
View File
@@ -428,7 +428,7 @@ export class SearchPage implements OnInit {
/**
* @description set empty value to searchSubject
*/
clearSearchInput(){
clearSearchInput() {
this.searchSubject = ""
this.searchCategories = [];
@@ -436,8 +436,7 @@ export class SearchPage implements OnInit {
this.showDocuments = false;
this.wordCloud();
}
}
/**
* @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 { AlertController } from '@ionic/angular';
import { LocalstoreService } from '../store/localstore.service';
import { ToastService } from './toast.service';
@Injectable({
providedIn: 'root'
@@ -27,7 +28,8 @@ export class AuthService {
private storageService:StorageService,
private router:Router,
public alertController: AlertController,
private localstoreService: LocalstoreService
private localstoreService: LocalstoreService,
private toastService: ToastService,
) {
this.headers = new HttpHeaders();
@@ -80,6 +82,11 @@ export class AuthService {
}
} 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;
}
@@ -100,12 +100,20 @@ export class ViewEventPage implements OnInit {
this.today = new Date(res.StartDate);
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
this.getAttachments(this.loadedEvent.EventId);
}, (errer)=> {
}, (error)=> {
console.log('errer', )
this.viewEventDetailDismiss.emit({
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')
}
})
;
}
+7 -8
View File
@@ -25,9 +25,9 @@
<div tab="events" class="div-logo height-fit-content">
<img src='assets/images/logo-no-bg.png' alt='logo'>
</div>
<div class="d-flex flex-1 pr-20 pl-50">
<div class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/events')" [class.active]="locationPathname() == '/home/events'">
<ion-icon class="font-40" src='assets/images/icons-nav-home-active.svg'></ion-icon>
<span>Início</span>
@@ -49,11 +49,11 @@
</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>
<span>Chat</span>
</div>
</div> -->
</div>
<div class="d-flex">
@@ -64,7 +64,7 @@
<button class="btn-no-color" (click)="closeSearch();showSearch=false" *ngIf="showSearch" >
<ion-icon class="font-40" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
</button>
<div *ngIf="showSearch">
<div class="d-flex search-input-container ml-10 justify-between" *ngIf="showSearch" >
<div class="icon" (click)="basicSearch()">
@@ -88,6 +88,5 @@
</div>
</div>
</div>
@@ -8,7 +8,7 @@
<div class="div-logo height-fit-content">
<img src='assets/images/logo-no-bg.png' alt='logo'>
</div>
<div class="div-profile" (click)="openProfile()">
<ion-icon class="font-45" *ngIf="loggeduser.Profile == 'MDGPR'" src='assets/images/icons-profile.svg'></ion-icon>
<ion-icon class="font-45" *ngIf="loggeduser.Profile == 'PR' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
@@ -20,9 +20,9 @@
<div tab="events" class="div-logo height-fit-content">
<img src='assets/images/logo-no-bg.png' alt='logo'>
</div>
<div class="d-flex flex-1 pr-20 pl-50">
<div class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/events')" [class.active]="locationPathname() == '/home/events'">
<ion-icon class="font-40" src='assets/images/icons-nav-home-active.svg'></ion-icon>
<span>Início</span>
@@ -44,18 +44,18 @@
</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>
<span>Chat</span>
</div>
</div> -->
</div>
<div class="d-flex">
<!-- <div (click)="openSearch()" class="div-search mr-10">
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
</div> -->
<div class="div-profile cursor-pointer" (click)="openProfile()">
<ion-icon class="font-45" *ngIf="loggeduser.Profile == 'MDGPR'" src='assets/images/icons-profile.svg'></ion-icon>
<ion-icon class="font-45" *ngIf="loggeduser.Profile == 'PR' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
@@ -65,6 +65,5 @@
</div>
</div>
@@ -115,7 +115,7 @@ export class ProfileComponent implements OnInit {
logout() {
// clear local storage
window.localStorage.clear();
window.location.pathname = '/home/events'
window.location.pathname = '/'
}
LoginPreferenceMethod(type: string) {
+3 -2
View File
@@ -8,7 +8,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
export class DespachoStoreService {
// main data
private _list: Event[]
private _list: [] = []
// local storage keyName
private keyName: string;
private _count = 0
@@ -27,8 +27,9 @@ export class DespachoStoreService {
}
get list() {
return this._list
return this._list || []
}
get count() {
return this._count
}
@@ -11,7 +11,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
class ExpedienteStorageServiceService {
// main data
private _list: Event[]
private _list: Event[] = []
private _count = 0
// local storage keyName
private keyName: string;
+1 -1
View File
@@ -6,7 +6,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
})
export class LocalstoreService {
private prefix = 'v9-'
private prefix = 'v10-'
constructor() {
@@ -10,13 +10,13 @@ export class PublicationEventFolderService {
// main data
private _list: PublicationFolder[] = []
// local storage keyName
private keyName: string;
private keyName: string;
constructor() {
this.keyName = (SHA1(this.constructor.name+ 'PublicationEventFolder/local')).toString()
setTimeout(()=>{
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, [])
this._list = restore
}, 10)
@@ -34,10 +34,10 @@ export class PublicationEventFolderService {
}
private save(list: PublicationFolder[]) {
setTimeout(()=> {
setTimeout(()=> {
localstoreService.set(this.keyName, list)
}, 10)
}
}
export const PublicationEventFolderStorage = new PublicationEventFolderService()
export const PublicationEventFolderStorage = new PublicationEventFolderService()
@@ -10,7 +10,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
export class ToDayEventStorageService {
// main data
private _eventsList: Event[]
private _eventsList: Event[] = []
// local storage keyName
private keyName: string;
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
* 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.
*/
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
import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,