Merge with developer-c

This commit is contained in:
Eudes Inácio
2021-02-24 11:04:11 +01:00
374 changed files with 5470 additions and 204982 deletions
+2 -2
View File
@@ -101,8 +101,8 @@ const routes: Routes = [
},
{
path:':serialNumber',
loadChildren: ()=> import('../pages/gabinete-digital/event-list/approve-event/approve-event.module').then(m => m.ApproveEventPageModule),
}
loadChildren: ()=> import('../pages/gabinete-digital/event-list/approve-event/approve-event.module').then(m => m.ApproveEventPageModule)
},
]
},
]
+1 -1
View File
@@ -22,7 +22,7 @@
</ion-tab-button>
<ion-tab-button tab="publications">
<ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
<ion-label>Acções</ion-label>
<ion-label>Ações</ion-label>
</ion-tab-button>
<ion-tab-button tab="chat">
<ion-icon class="nav-icon" src="assets/images/icons-nav-chat-inactive.svg"></ion-icon>
+56 -145
View File
@@ -11,11 +11,11 @@ import { ExpedienteDetailPage } from '../../app/pages/gabinete-digital/expedient
import { ViewEventPage } from '../../app/pages/agenda/view-event/view-event.page'
import { ApproveEventModalPage } from '../../app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page';
import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed, Modals } from '@capacitor/core';
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed, Modals } from '@capacitor/core'; */
import { Router } from '@angular/router';
import { MethodCall } from '@angular/compiler';
const { PushNotifications, LocalNotifications, LocalNotificationAction } = Plugins;
/* const { PushNotifications, LocalNotifications, LocalNotificationAction } = Plugins; */
@Component({
selector: 'app-home',
@@ -31,19 +31,25 @@ export class HomePage implements OnInit {
totalExpediente = 0;
profile: string;
constructor(private zone: NgZone, private eventService: EventsService, private processesbackend: ProcessesService, private router: Router, private modalController: ModalController,) { }
constructor(private ngZone: NgZone,private eventService: EventsService, private processesbackend: ProcessesService, private router: Router, private modalController: ModalController,) { }
ngOnInit() {
//Initialize profile as mdgpr
/* //Initialize profile as mdgpr
let date = new Date();
date.setMonth(date.getMonth() + 1);
let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
let end = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" 23:59:59";
this.profile = "mdgpr";
if (this.profile == "mdgpr") {
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss', 'pt'), formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
this.eventService.getAllMdEvents(start, end).subscribe(res => {
this.eventsList = res;
this.totalEvent = this.eventsList.length;
});
}
else {
this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss', 'pt'), formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
this.eventService.getAllPrEvents(start, end).subscribe(res => {
this.eventsList = res;
this.totalEvent = this.eventsList.length;
});
@@ -53,55 +59,22 @@ export class HomePage implements OnInit {
this.totalExpediente = result;
});
//Mobile first
/* WLAuthorizationManager.obtainAccessToken("").then(
(token) => {
console.log('--> pingMFP(): Success ', token);
this.zone.run(() => {
//this.title = "Yay!";
//this.status = "Connected to MobileFirst Server";
});
var resourceRequest = new WLResourceRequest( "/adapters/javaAdapter/resource/greet/",
WLResourceRequest.GET
);
resourceRequest.setQueryParameter("name", "world");
resourceRequest.send().then(
(response) => {
// Will display "Hello world" in an alert dialog.
alert("Success: " + response.responseText);
},
(error) => {
alert("Failure: " + JSON.stringify(error));
}
);
}, (error) => {
console.log('--> pingMFP(): failure ', error.responseText);
this.zone.run(() => {
//this.title = "Bummer...";
//this.status = "Failed to connect to MobileFirst Server";
});
}
); */
PushNotifications.addListener('registrationError', (error: any) => {
alert('Error on registration: ' + JSON.stringify(error));
});
PushNotifications.addListener('pushNotificationReceived', notification => {
PushNotifications.addListener('pushNotificationReceived', notification => {
//const isPushNotification = !!notification.title || !!notification.body;
// if this is a push notification received when the app is in the foreground on Android
//if (isAndroid && isPushNotification) {
// We schedule a LocalNotification 1 second later since Capacitor for Android doesn't show anything in this case
console.log('Recived: ', notification)
// We schedule a LocalNotification 1 second later since Capacitor for Android doesn't show anything in this case
console.log('Recived: ', notification)
//}
});
});
PushNotifications.addListener(
'pushNotificationActionPerformed',
@@ -110,110 +83,38 @@ export class HomePage implements OnInit {
let object = notification.notification.data.Object;
let idObject = notification.notification.data.IdObject;
console.log('Complete Object: ', notification.notification)
console.log('Complete Object: ', notification.notification )
console.log('Service: ', service);
console.log('Object: ', object);
console.log('idObject: ', idObject);
/* if (service === "events") {
this.router.navigate(['/home/', service, idObject, 'home']);
} else if (service === "agenda") {
this.router.navigate(['/home/', service, idObject, 'home']);
} else if (service === "gabinete-digital" && object != "expediente") {*/
// this.router.navigate(['/home/', service]);
// }
//if (service != null) {
/*const routeValue = {
"agenda": this.router.navigate(['/home/', service, idObject, 'home']),
"gabinete-digital": this.router.navigate(['/home/', service]),
"accoes": this.viewExpedientDetail(idObject),
}
const route = routeValue[service] && object ;
service = "agenda" ? this.router.navigate(['/home/', service, idObject, 'home']) : */
if (service === "agenda") {
//this.router.navigate(['/home/', service, idObject, 'home']);
this.viewEventDetail(idObject)
} /*else if (service === "gabinete-digital" && object != "expediente" || object != "event-list") {
this.router.navigate(['/home/gabinete-digital']);
} */else if (service === "gabinete-digital" && object === "expediente") {
this.viewExpedientDetail(idObject)
} else if (service === "gabinete-digital" && object === "event-list") {
/* this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', idObject])}) */
this.openApproveModal(idObject);
} else if (service === "accoes" && object === "accao") {
this.viewPublications(idObject)
} else if (service === "accoes" && object === "publicacao") {
this.viewPublicationDetail(idObject)
}
/*switch (service) {
case "events":
this.router.navigate(['/home/', service, idObject, 'home']);
break;
case "agenda":
this.router.navigate(['/home/', service, idObject, 'home']);
break;
case "gabinete-digital":
this.router.navigate(['/home/', service]);
break;
case "gabinete-digital-expediente":
this.router.navigate(['/home/gabinete-digital/', object, idObject, 'home']);
break;
case "": {
if(publicationId && processId != null) {
this.viewPublicationDetail(publicationId,processId)
}
if (folder.ProcessId != null) {
this.viewPublications(folder)
}
if (service === "agenda") {
//this.router.navigate(['/home/', service, idObject, 'home']);
this.viewEventDetail(idObject)
}
else if (service === "gabinete-digital" && object === "expediente") {
this.viewExpedientDetail(idObject)
}
else if (service === "gabinete-digital" && object === "event-list") {
// this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', idObject])})
this.openApproveModal(idObject);
}
else if (service === "accoes" && object === "accao") {
this.viewPublications(idObject)
}
else if (service === "accoes" && object === "publicacao") {
this.viewPublicationDetail(idObject)
}
default:
this.router.navigate(['/home/']);
}*/
},
);
); */
}
async localNotificationPresent(notification) {
LocalNotificationAction.
LocalNotifications.schedule({
notifications: [
{
title: notification.title,
body: notification.body,
id: 1,
schedule: { at: new Date(Date.now() + 1000) },
sound: null,
attachments: null,
actionTypeId: "",
extra: null,
foreground: true,
}
]
});
}
async openApproveModal(eventSerialNumber) {
async openApproveModal(eventSerialNumber){
const modal = await this.modalController.create({
component: ApproveEventModalPage,
componentProps: {
componentProps:{
serialNumber: eventSerialNumber,
},
cssClass: 'cal-modal',
@@ -221,11 +122,25 @@ export class HomePage implements OnInit {
});
await modal.present();
modal.onDidDismiss();
}
async viewEventDetail(eventId:any) {
console.log(this.profile);
const modal = await this.modalController.create({
component: ViewEventPage,
componentProps:{
eventId: eventId,
},
cssClass: 'modal',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
}
async viewEventDetail(eventId: any) {
/* async viewExpedientDetail(serialNumber:any) {
console.log(this.profile);
const modal = await this.modalController.create({
@@ -259,12 +174,8 @@ export class HomePage implements OnInit {
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((res) => {
if (res) {
console.log(res);
}
});
}
modal.onDidDismiss();
} */
+1
View File
@@ -5,6 +5,7 @@ export class Despacho{
DistributionType: string;
CountryCode: string;
Priority: string;
SubjectTypeId:string;
UserEmail: string;
UsersSelected: Participant[];
DispatchFolder: Folder;
+11 -7
View File
@@ -8,7 +8,7 @@
<div>
<!-- Calendar is here -->
<div [ngSwitch]="segment">
<div *ngSwitchCase="'Combinada'">
<div class="calendar-container" *ngSwitchCase="'Combinada'" [style.height]="calendarHeight">
<ion-row class="ion-justify-content-between calendar-tool-tip">
<ion-row class="ion-align-items-center">
@@ -84,7 +84,7 @@
</div>
</ng-template>
</div>
<div *ngSwitchCase="'Pessoal'">
<div class="calendar-container" *ngSwitchCase="'Pessoal'">
<ion-row>
<!-- Move back one screen of the slides -->
<ion-col size="2">
@@ -150,7 +150,7 @@
</ng-template>
</div>
<div *ngSwitchCase="'Oficial'">
<div class="calendar-container" *ngSwitchCase="'Oficial'">
<ion-row>
<!-- Move back one screen of the slides -->
<ion-col size="2">
@@ -217,13 +217,17 @@
</div>
</div>
<div class="calendar-border">
</div>
<!-- Calendar currente date -->
<ion-row class="ion-justify-content-between ion-align-items-center currente-date-timelien">
<ion-row class="timeline-header ion-justify-content-between ion-align-items-center currente-date-timelien">
<ion-row class="timeline-date align-center">
<!-- <ion-icon *ngIf="showCalendar" (click)="showCalendar=false" class="collaps" src="assets/images/icons-add-new-event.svg" >1</ion-icon>
<ion-icon *ngIf="!showCalendar" (click)="showCalendar=true" class="collaps" src="assets/images/icons-add-new-event.svg" >2</ion-icon> -->
<ion-icon *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false" class="collaps" src="assets/images/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="!showCalendar" (click)="calendarHeight='347px';showCalendar=true" class="collaps" src="assets/images/icons-collaps-down.svg" ></ion-icon>
<span *ngIf="timelineIsCurrentDate()">Hoje, &nbsp;</span> {{ timelineDate }}
</ion-row>
<ion-row class="filter ion-align-items-center">
+20 -1
View File
@@ -416,7 +416,7 @@ td.monthview-primary-with-event {
font-weight: bold;
}
.collaps{
font-size: 28px;
font-size: 26px;
padding-right: 8px;
}
.filter{
@@ -460,4 +460,23 @@ td.monthview-primary-with-event {
.showcalendar{
display: none;
}
.timeline-header{
z-index: 1000000;
position: absolute;
width: 100%;
background-color: white;
}
.timeline-container{
margin-top: 67px;
}
.calendar-border{
background: #ebebeb;
margin: 13px 20px;
height: 2px;
}
+2 -10
View File
@@ -53,6 +53,7 @@ export class AgendaPage implements OnInit {
// calendar
showCalendar: boolean;
calendarHeight: string;
// timeline
monthList = [
@@ -122,19 +123,10 @@ export class AgendaPage implements OnInit {
private alertCrontroller: AlertService
) {
this.calendarHeight = "347px";
this.showCalendar = true;
this.timelineDate = momentG(new Date(),'dd MMMM yyyy');
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
// AccoesPresidenciais = Correspondencia = 0
setCookie('searchModalAPPType','0', 99999999);
this.showLoader = false;
this.showTimelineFilterState = false;
this.showTimeline = false;
+2 -2
View File
@@ -95,10 +95,10 @@ export class ChatPage implements OnInit {
this.userDirectMessages = res.ims.sort((a,b)=>{
var dateA = new Date(a._updatedAt).getTime();
var dateB = new Date(b._updatedAt).getTime();
this.showLoader = false;
return dateB - dateA;
});
console.log(this.userDirectMessages);
this.showLoader = false;
});
}
getChatMembers(){
@@ -116,10 +116,10 @@ export class ChatPage implements OnInit {
this.allGroups = all.sort((a,b)=>{
var dateA = new Date(a._updatedAt).getTime();
var dateB = new Date(b._updatedAt).getTime();
this.showLoader = false;
return dateB - dateA;
});
console.log(this.allGroups);
this.showLoader = false;
});
});
}
+1 -1
View File
@@ -92,7 +92,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
/* console.log(res); */
this.messages = res['messages'].reverse();
console.log(this.messages);
this.showLoader = false;
})
}
getChatMembers(){
+36 -11
View File
@@ -1,6 +1,21 @@
<ion-header class="ion-no-border">
<app-header-no-search></app-header-no-search>
</ion-header>
<ion-header class="ion-no-border">
<ion-toolbar class="bg-blue">
<ion-label>
<p class="time ion-text-center">{{customDate}}</p>
</ion-label>
<ion-label>
<p class="event-number p-small ion-text-center"> <strong>{{totalEvent}}</strong> eventos agendados para hoje</p>
</ion-label>
<div class="next-meeting">
<div class="meeting-time">{{currentHoursMinutes | date: 'HH:mm'}}</div>
<div class="meeting-description"> "{{currentEvent}}"</div>
</div>
</ion-toolbar>
</ion-header>
<!-- Default Refresher -->
@@ -12,7 +27,7 @@
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-label>
<!-- <ion-label>
<p class="time ion-text-center">{{customDate}}</p>
</ion-label>
<ion-label>
@@ -22,7 +37,7 @@
<div class="next-meeting">
<div class="meeting-time">{{currentHoursMinutes | date: 'HH:mm'}}</div>
<div class="meeting-description"> "{{currentEvent}}"</div>
</div>
</div> -->
<div class="conteiner-box" ng-swipe-up="swipe($event)">
<div class="schedule">
@@ -31,7 +46,12 @@
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
<div class="text">A sua Agenda</div>
</div>
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg" ></ion-icon>
<ion-icon
class="icon-next"
slot="end"
src="assets/images/icons-arrow-circle-arrow-right.svg"
[routerLink]="['/home/agenda']"
></ion-icon>
</div>
<div class="content">
@@ -69,23 +89,28 @@
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
<div class="text">Correspondência por ler</div>
</div>
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg" ></ion-icon>
<ion-icon
class="icon-next"
slot="end"
src="assets/images/icons-arrow-circle-arrow-right.svg"
(click)="openExpedientList()"
></ion-icon>
</div>
<div class="content">
<ul>
<li *ngFor = "let task of taskslist"
(click)="viewExpedientDetail(task.SerialNumber)">
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
<li *ngFor = "let task of expedientList"
(click)="viewExpedientDetail(task.serialNumber)">
<!-- [routerLink]="['/home/gabinete-digital/expediente']" -->
>
<div class="d-flex">
<div class="schedule-date">
<div class="time-end">{{task.CreateDate | date: 'd/M/yy'}}</div>
<div class="time-start">{{task.CreateDate | date: 'HH:mm'}}</div>
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yy'}}</div>
<div class="time-start">{{task.taskStartDate | date: 'HH:mm'}}</div>
</div>
<div class="schedule-details pointer">
<div class="description">{{ task.Folio }}</div>
<div class="location">{{ task.Remetente }}</div>
<div class="description">{{ task.workflowInstanceFolio }}</div>
<div class="location">{{ task.workflowInstanceDataFields.Sender }}</div>
</div>
</div>
</li>
+20 -23
View File
@@ -58,6 +58,7 @@ export class EventsPage implements OnInit {
showLoader: boolean;
taskslist:DailyWorkTask[];
expedientList:any;
constructor(private eventService: EventsService,
private router: Router,
@@ -86,9 +87,9 @@ export class EventsPage implements OnInit {
this.profile = "mdgpr";
console.log(this.profile);
this.storageService.get(AuthConnstants.USER).then(res=>{
/* this.storageService.get(AuthConnstants.USER).then(res=>{
console.log(res);
});
}); */
this.showGreeting();
@@ -248,26 +249,8 @@ export class EventsPage implements OnInit {
LoadList()
{
this.processes.GetTasksList("Expediente", false).subscribe(result => {
const AllResult = new Array();
result.forEach(element => {
let task: DailyWorkTask = {
"SerialNumber": element.serialNumber,
"Folio": element.workflowInstanceFolio,
"Senders": element.originator.email,
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
"DocumentURL": element.formURL,
"Remetente": element.workflowInstanceDataFields.Remetente
}
// CreateDate
AllResult.push(task);
});
console.log(AllResult);
this.taskslist = this.sortArrayISODate(AllResult).reverse()
this.expedientList = result.reverse();
console.log(this.expedientList);
});
}
@@ -299,7 +282,8 @@ export class EventsPage implements OnInit {
}
async viewExpedientDetail(serialNumber:any) {
console.log(this.profile);
/* console.log(this.profile);
console.log(serialNumber); */
const modal = await this.modalController.create({
component: ExpedienteDetailPage,
@@ -319,6 +303,19 @@ export class EventsPage implements OnInit {
});
}
async openExpedientList(){
const modal = await this.modalController.create({
component: ExpedientePage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
}
@@ -1,4 +1,5 @@
ion-content{
<<<<<<< HEAD
--padding-top:0px;
--padding-start: 20px;
--padding-end: 20px;
@@ -139,4 +140,146 @@ ion-content{
border-radius: 22.5px;
--background: #ffe0e0;
}
=======
--padding-top:0px;
--padding-start: 20px;
--padding-end: 20px;
font-size: 18px;
}
ion-menu{
--height: 225px;
}
.header-content{
width: 360px;
overflow: auto;
margin: 25px auto;
}
.header-icon-left{
width: 36px;
font-size: 33px;
color: #42b9fe;
float: left;
}
.header-title{
width: 264px;
font-family: Roboto;
font-size: 25px;
margin: 0 5px 0 5px;
padding: 0;
color:#000;
float: left;
}
.header-icon-right{
width: 45px;
font-size: 45px;
float: left;
overflow: auto;
}
.upper-content{
margin-left: 50px;
overflow: auto;
font-size: 18px;
.content-location{
width: 360px;
margin: 0 auto;
padding: 0;
overflow: auto;
}
.location-detail{
width: 210px;
font-weight: 700;
font-size: 18px;
float: left;
margin: 5px 5px 5px 0px;
}
.button-calendar-type{
width: 91px;
--border-radius: 12.5px;
--background: #ffb703;
margin-left: 5px;
float: left;
}
.button-calendar-type ion-button{
height: 25px;
}
.button-edit-event {
width: 140px;
height: 44px;
border-radius: 22.5px;
--background: #e0e9ee;
--color:#061b52;
}
.content-details p{
font-size: 16px;
}
}
.middle-conten{
.middle-content h3, .middle-content p{
font-size: 16px;
}
}
.bottom-content{
width: 360px;
margin: 0 auto;
.bottom-content h3{
font-size: 16px;
margin: 0 0 0 10px;
}
.attach-document{
font-size: 15px;
color: #0d89d1;
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
}
.attach-icon{
width: 37px;
font-size: 35px;
float: left;
}
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
}
/* SPAN */
.span-left{
float: left;
font-size: 15x;
}
.span-right{
text-align: right;
float: right;
font-size: 13px;
}
}
.buttons{
width: 360px;
margin: 0 auto;
}
.button-options {
height: 44px;
--color: #42b9fe;
/* opacity: 0; */
}
.button-approve {
width: 140px;
height: 44px;
border-radius: 22.5px;
--background: #42b9fe;
}
.button-reject {
width: 140px;
height: 44px;
--color: #d30a0a;
border-radius: 22.5px;
--background: #ffe0e0;
}
>>>>>>> developer-c
@@ -32,6 +32,18 @@
</div>
</div>
</div>
<div class="container-div">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class">
<ion-select placeholder="Tipo" [(ngModel)]="postData.SubjectTypeId" interface="action-sheet" Cancel-text="Cancelar" required>
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
</ion-select>
</div>
</div>
</div>
<div class="container-div">
<div class="ion-item-class-2">
@@ -34,6 +34,7 @@ export class ExpedientTaskModalPage implements OnInit {
taskDescription: string;
user: string;
loadedAttachments:any;
subjectTypes:any;
postData: Despacho;
dispatchFolder: Folder;
@@ -65,6 +66,8 @@ export class ExpedientTaskModalPage implements OnInit {
this.postData.UsersSelected = this.participants;
/* By Default TypeDeadline should be 'Normal' */
this.postData.Priority = '99999861';
/* By Default TypeDeadline should be 'Economia' */
this.postData.SubjectTypeId = '99999844';
/* Initialize 'Subject' with the title of the expedient */
this.postData.DispatchFolder.Subject = this.task.workflowInstanceFolio;
}
@@ -79,7 +82,9 @@ export class ExpedientTaskModalPage implements OnInit {
console.log(this.task.serialNumber);
this.getAttachments();
console.log(this.getSubjectType());
}
close(){
@@ -89,6 +94,12 @@ export class ExpedientTaskModalPage implements OnInit {
cancelTask(){
this.modalController.dismiss(null);
}
getSubjectType(){
this.processes.GetSubjectType().subscribe(res=>{
console.log(res);
this.subjectTypes = res;
});
}
saveTask(){
console.log(this.taskType);
@@ -100,6 +111,7 @@ export class ExpedientTaskModalPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
SubjectTypeId: this.postData.SubjectTypeId,
UsersSelected: this.participants,
DispatchFolder: this.dispatchFolder,
}
@@ -113,6 +125,7 @@ export class ExpedientTaskModalPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
SubjectTypeId: this.postData.SubjectTypeId,
UsersSelected: this.participants,
DispatchFolder: this.dispatchFolder,
}
@@ -124,6 +137,7 @@ export class ExpedientTaskModalPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
SubjectTypeId: this.postData.SubjectTypeId,
UsersSelected: this.participants,
DispatchFolder: this.dispatchFolder,
}
@@ -201,6 +215,7 @@ export class ExpedientTaskModalPage implements OnInit {
}
async distartExpedientModal(){
console.log(this.task.serialNumber);
const modal = await this.modalController.create({
component: DiscartExpedientModalPage,
componentProps: {
@@ -149,7 +149,7 @@
</div>
<div *ngIf="!eventsList">
<!-- <div *ngIf="!eventsList">
<ion-list>
<ion-list-header>
<ion-label>
@@ -190,7 +190,7 @@
</ion-item>
</ion-list>
</div>
</div> -->
</div>
@@ -12,6 +12,7 @@ import { AlertService } from 'src/app/services/alert.service';
import { ExpedientTaskModalPage } from '../expedient-task-modal/expedient-task-modal.page';
import { BookMeetingModalPage } from '../book-meeting-modal/book-meeting-modal.page';
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
import { momentG } from 'src/plugin/momentG'
@Component({
selector: 'app-expediente-detail',
@@ -35,18 +36,27 @@ export class ExpedienteDetailPage implements OnInit {
private router: Router,
private modalController: ModalController,
private navParams: NavParams,
<<<<<<< HEAD
private alertService: AlertService) {
this.serialnumber = this.navParams.get('serialNumber');
this.profile = this.navParams.get('profile');
}
=======
private alertService: AlertService) {
this.serialnumber = this.navParams.get('serialNumber');
this.profile = this.navParams.get('profile');
}
>>>>>>> developer-c
ngOnInit() {
this.profile = "mdgpr";
console.log(this.serialnumber);
this.activateRoute.paramMap.subscribe(paramMap => {
if (!paramMap.has('SerialNumber')) {
return;
}
this.serialnumber = paramMap.get('SerialNumber');
/* this.serialnumber = paramMap.get('SerialNumber'); */
this.LoadTaskDetail(this.serialnumber);
this.LoadRelatedEvents(this.serialnumber);
});
@@ -61,9 +71,9 @@ export class ExpedienteDetailPage implements OnInit {
"SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceFolio,
"Senders": res.originator.email,
"CreateDate": formatDate(new Date(res.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
"DocumentURL": res.formURL,
"Remetente": res.workflowInstanceDataFields.Remetente
"CreateDate": momentG(new Date(res.taskStartDate),'yyyy-MM-dd HH:mm:ss'),
"DocumentURL": res.workflowInstanceDataFields.ViewerRequest,
"Remetente": res.workflowInstanceDataFields.Sender,
}
this.fulltask = res;
console.log(res);
@@ -88,9 +98,15 @@ export class ExpedienteDetailPage implements OnInit {
}
}
<<<<<<< HEAD
viewDocument() {
const url: string = this.task.DocumentURL.replace("webTRIX.Viewer", "webTRIX.Viewer.Branch1");
const browser = this.iab.create(url, "_blank");
=======
viewDocument(){
const url: string = this.task.DocumentURL.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_parent");
>>>>>>> developer-c
browser.show();
}
@@ -48,7 +48,7 @@ export class ExpedientePage implements OnInit {
"Folio": element.workflowInstanceFolio,
"Senders": element.originator.email,
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
"DocumentURL": element.formURL,
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
"Remetente": element.workflowInstanceDataFields.Remetente
}
this.taskslist.push(task);
@@ -8,7 +8,7 @@
<div class="div-title">
<ion-label class="title">Gabinete Digital</ion-label>
</div>
<div class="div-icon">
<div hidden class="div-icon">
<ion-icon slot="end" src='assets/images/icons-add.svg'></ion-icon>
</div>
</div>
@@ -22,15 +22,7 @@ export class GabineteDigitalPage implements OnInit {
private modalController: ModalController,
private eventService: EventsService,
private alertService: AlertService) {
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
// AccoesPresidenciais = Correspondencia = 8
setCookie('searchModalAPPType','8,361', 99999999);
}
count_exp_dailywork=0;
+9 -13
View File
@@ -12,10 +12,10 @@ import { NotificationsService } from 'src/app/services/notifications.service';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Token } from '../../models/token.model';
import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
const { PushNotifications } = Plugins;
*/
@Component({
@@ -70,7 +70,7 @@ export class LoginPage implements OnInit {
}
this.authService.loginChat(postData).subscribe((res: any) => {
console.log(res.data);
this.storageService.store(AuthConnstants.AUTH, res.data);
//this.storageService.store(AuthConnstants.AUTH, res.data);
console.log('Login to Rocket chat OK');
}, (error: any) => {
console.log('Network error');
@@ -78,9 +78,9 @@ export class LoginPage implements OnInit {
});
}
storeUserIdANdToken() {
/* storeUserIdANdToken() {
(PushNotifications as any).requestPermission().then(result => {
(PushNotifications as any).requestPermission().then(result => {
PushNotifications.register();
});
@@ -104,18 +104,14 @@ export class LoginPage implements OnInit {
this.http.post<Token>('https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/notifications/token', body, { headers }).subscribe(data => {
console.log('TOKEN USER MIDLE', data);
})
/*this.http.get<Token>('http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V4/api/notifications/user/'+res).subscribe(data => {
console.log('TOKEN USER MIDLE',data);
})*/
});
});
});
},
);
);
};
}; */
async Login() {
@@ -131,7 +127,7 @@ export class LoginPage implements OnInit {
}
if (await this.authService.login(this.userattempt)) {
this.loginRocketChat();
this.storeUserIdANdToken();
//this.storeUserIdANdToken();
this.router.navigate(['/home/events']);
}
@@ -66,7 +66,7 @@ export class NewPublicationPage implements OnInit {
}
takePicture(){
const options: CameraOptions = {
quality: 100,
quality: 90,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
@@ -86,8 +86,8 @@ export class NewPublicationPage implements OnInit {
}
getPicture(){
/* const options: CameraOptions = {
quality: 100,
const options: CameraOptions = {
quality: 90,
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
@@ -103,7 +103,7 @@ export class NewPublicationPage implements OnInit {
this.capturedImageTitle = new Date().getTime() + '.jpeg';
}, (err) => {
console.log(err);
}); */
});
}
async save(){
@@ -6,7 +6,7 @@
<div class="main-header">
<div class="title-content">
<div class="div-title">
<ion-label class="title">Acções Presidenciais</ion-label>
<ion-label class="title">Ações Presidenciais</ion-label>
</div>
<div class="div-icon">
<ion-icon (click)="AddPublicationFolder()" slot="end" src='assets/images/icons-add.svg'></ion-icon>
@@ -41,15 +41,6 @@ export class PublicationsPage implements OnInit {
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
// AccoesPresidenciais = AccoesPresidenciais = 386,,
setCookie('searchModalAPPType','386', 99999999);
}
ngOnInit() {
@@ -59,12 +50,12 @@ export class PublicationsPage implements OnInit {
}
});
}
doRefresh(event) {
doRefresh() {
/* this.getActions(); */
setTimeout(() => {
this.getActions();
event.target.complete();
/* event.target.complete(); */
}, 2000);
}
@@ -108,7 +99,7 @@ export class PublicationsPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then(()=>{
this.doRefresh(event);
this.doRefresh();
});
}
@@ -22,7 +22,7 @@ export class PublicationDetailPage implements OnInit {
private publications:PublicationsService,
) {
this.publicationId = this.navParams.get('publicationId');
this.folderId = this.navParams.get('folderIdId');
/* this.folderId = this.navParams.get('folderIdId'); */
this.publication = {
DateIndex: null,
DocumentId: '',
@@ -52,7 +52,7 @@ export class PublicationDetailPage implements OnInit {
getPublicationDetail(){
this.showLoader = true;
console.log(this.publicationId);
console.log(this.folderId);
/* console.log(this.folderId); */
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
console.log(res);
/* this.publication = res; */
@@ -47,7 +47,7 @@
<!-- [routerLink]="['/home/publications/view-publications/publication-detail', publication.publicationId]" -->
<div class="post-item"
*ngFor="let publication of publicationList"
(click)="viewPublicationDetail(publication.ProcessId,publication.DocumentId)">
(click)="viewPublicationDetail(publication.DocumentId)">
<div *ngIf="publication.FileBase64.length > 30" class="post-img">
<img src="{{publication.FileBase64}}" alt="image">
</div>
@@ -102,12 +102,11 @@ export class ViewPublicationsPage implements OnInit {
});
}
async viewPublicationDetail(processId:string, publicationId:string) {
async viewPublicationDetail(publicationId:string) {
const modal = await this.modalController.create({
component: PublicationDetailPage,
componentProps:{
publicationId: publicationId,
folderId: processId,
},
cssClass: 'publication-detail',
backdropDismiss: false
+4 -21
View File
@@ -120,25 +120,8 @@ export class SearchPage implements OnInit {
*/
basicSearch(){
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
const APPType = getCookie('searchModalAPPType');
if(APPType == '0'){
if(window.location.pathname == '/home/agenda'){
console.log('aplication type 0');
@@ -168,7 +151,7 @@ export class SearchPage implements OnInit {
this.showLoader = false;
});
} else if (APPType == '8,361'){
} else if (window.location.pathname =='/home/gabinete-digital'){
console.log('aplication type 8,361');
@@ -222,7 +205,7 @@ export class SearchPage implements OnInit {
this.showLoader = false;
});
} else if (APPType == '386'){
} else if (window.location.pathname == '/home/publications'){
this.showLoader = true;
+9 -9
View File
@@ -52,7 +52,7 @@ export class AuthService {
if (result)
{
this.ValidatedUser = user;
this.storageService.store(AuthConnstants.USER, response);
//this.storageService.store(AuthConnstants.USER, response);
}
return result;
}
@@ -70,29 +70,29 @@ export class AuthService {
//Get user data from RocketChat | global object
getUserData(){
this.storageService.get(AuthConnstants.AUTH).then(res=>{
/* this.storageService.get(AuthConnstants.AUTH).then(res=>{
this.userData$.next(res);
});
}); */
}
//Get user Id | global object
getUserId(){
this.storageService.get(AuthConnstants.USER).then(res=>{
/* this.storageService.get(AuthConnstants.USER).then(res=>{
this.userId$.next(res);
});
}); */
}
getProfile(){
this.storageService.get(AuthConnstants.PROFILE).then(res=>{
/* this.storageService.get(AuthConnstants.PROFILE).then(res=>{
return res;
});
}); */
}
logoutChat(){
//this.storageService.clear();
this.storageService.removeStorageItem(AuthConnstants.AUTH).then(res =>{
/* this.storageService.removeStorageItem(AuthConnstants.AUTH).then(res =>{
this.userData$.next('');
this.router.navigate(['']);
})
}) */
}
}
+8 -1
View File
@@ -92,7 +92,7 @@ export class ProcessesService {
let options = {
headers: this.headers,
params: params
params: params,
};
return this.http.get<any>(`${geturl}`, options);
}
@@ -148,6 +148,13 @@ export class ProcessesService {
return this.http.get<any>(`${geturl}`, options);
}
GetSubjectType(){
const geturl = environment.apiURL + 'ecm/SubjectType';
let options = {
headers: this.headers,
};
return this.http.get<any>(`${geturl}`, options);
}
+2 -2
View File
@@ -87,7 +87,7 @@ export class PublicationsService {
const geturl = environment.apiURL + 'presidentialActions/posts/'+ publicationId;
let params = new HttpParams();
params = params.set("id", publicationId);
/* params = params.set("id", publicationId); */
console.log(params);
@@ -95,7 +95,7 @@ export class PublicationsService {
let options = {
headers: this.headers,
params: params
/* params: params */
};
return this.http.get<any>(`${geturl}`, options);
}
+4 -4
View File
@@ -1,13 +1,13 @@
import { Injectable } from '@angular/core';
import { Plugins } from '@capacitor/core';
const { Storage } = Plugins;
/* import { Plugins } from '@capacitor/core';
const { Storage } = Plugins; */
@Injectable({
providedIn: 'root'
})
export class StorageService {
constructor() {}
// Store the value
/* // Store the value
async store(storageKey: string, value: any) {
const encryptedValue = btoa(escape(JSON.stringify(value)));
await Storage.set({
@@ -29,5 +29,5 @@ const { Storage } = Plugins;
// Clear storage
async clear() {
await Storage.clear();
}
} */
}