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": {
+2 -2
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">
+7 -4
View File
@@ -79,8 +79,10 @@ 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/",
@@ -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')
}
}
});
+1 -1
View File
@@ -16,7 +16,7 @@
</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>
+1 -4
View File
@@ -124,7 +124,7 @@ 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);
@@ -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');
@@ -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>
@@ -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>
@@ -25,6 +25,7 @@ export class PublicationsPage implements OnInit {
publication: Publication;
publicationsEventFolderList: PublicationFolder[];
actionsListStorage: PublicationFolder[] = new Array();
publicationsTravelFolderList: PublicationFolder[];
theDate:any;
@@ -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)
});
@@ -84,13 +84,16 @@ 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() {
+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')
}
})
;
}
+2 -3
View File
@@ -49,10 +49,10 @@
</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>
@@ -90,4 +90,3 @@
</div>
</div>
@@ -44,10 +44,10 @@
</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>
@@ -67,4 +67,3 @@
</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,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,