mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' into developer_mobilefirst
This commit is contained in:
@@ -139,6 +139,14 @@ const routes: Routes = [
|
|||||||
{
|
{
|
||||||
path: 'edit-event-to-approve',
|
path: 'edit-event-to-approve',
|
||||||
loadChildren: () => import('./shared/agenda/edit-event-to-approve/edit-event-to-approve.module').then( m => m.EditEventToApprovePageModule)
|
loadChildren: () => import('./shared/agenda/edit-event-to-approve/edit-event-to-approve.module').then( m => m.EditEventToApprovePageModule)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'actions-options',
|
||||||
|
loadChildren: () => import('./shared/popover/actions-options/actions-options.module').then( m => m.ActionsOptionsPageModule)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'edit-action',
|
||||||
|
loadChildren: () => import('./shared/publication/edit-action/edit-action.module').then( m => m.EditActionPageModule)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { AuthGuard } from './auth.guard';
|
||||||
|
|
||||||
|
describe('AuthGuard', () => {
|
||||||
|
let guard: AuthGuard;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
guard = TestBed.inject(AuthGuard);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(guard).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, Router } from '@angular/router';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class AuthGuard implements CanActivate {
|
||||||
|
constructor(
|
||||||
|
private router:Router
|
||||||
|
){}
|
||||||
|
|
||||||
|
canActivate(
|
||||||
|
route: ActivatedRouteSnapshot,
|
||||||
|
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||||
|
|
||||||
|
if(window.location.pathname != '' && !localStorage.getItem('UserData')) {
|
||||||
|
this.router.navigate(['/']);
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
import { AuthGuard } from '../guards/auth.guard';
|
||||||
import { HomeGuard } from '../guards/home.guard';
|
import { HomeGuard } from '../guards/home.guard';
|
||||||
import { GroupMessagesPage } from '../pages/chat/group-messages/group-messages.page';
|
import { GroupMessagesPage } from '../pages/chat/group-messages/group-messages.page';
|
||||||
import { MessagesPage } from '../pages/chat/messages/messages.page';
|
import { MessagesPage } from '../pages/chat/messages/messages.page';
|
||||||
@@ -36,6 +37,15 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path:'expedientes-pr',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path:':SerialNumber/:caller',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.module').then(m => m.ExpedientePrPageModule),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -46,7 +56,8 @@ const routes: Routes = [
|
|||||||
loadChildren: ()=> import('../pages/events/attachments/attachments.module').then(m => m.AttachmentsPageModule)
|
loadChildren: ()=> import('../pages/events/attachments/attachments.module').then(m => m.AttachmentsPageModule)
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'attendees',
|
path: 'attendees',
|
||||||
@@ -55,7 +66,8 @@ const routes: Routes = [
|
|||||||
path:'',
|
path:'',
|
||||||
loadChildren: ()=> import('../pages/events/attendees/attendees.module').then(m => m.AttendeesPageModule)
|
loadChildren: ()=> import('../pages/events/attendees/attendees.module').then(m => m.AttendeesPageModule)
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'attendees-modal',
|
path: 'attendees-modal',
|
||||||
@@ -64,7 +76,8 @@ const routes: Routes = [
|
|||||||
path:'',
|
path:'',
|
||||||
loadChildren: ()=> import('../shared/event/attendee-modal/attendee-modal.module').then(m => m.AttendeeModalPageModule)
|
loadChildren: ()=> import('../shared/event/attendee-modal/attendee-modal.module').then(m => m.AttendeeModalPageModule)
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'login',
|
path: 'login',
|
||||||
@@ -73,7 +86,8 @@ const routes: Routes = [
|
|||||||
path:'',
|
path:'',
|
||||||
loadChildren: ()=> import('../pages/login/login.module').then(m => m.LoginPageModule)
|
loadChildren: ()=> import('../pages/login/login.module').then(m => m.LoginPageModule)
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'agenda',
|
path: 'agenda',
|
||||||
@@ -120,7 +134,8 @@ const routes: Routes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'gabinete-digital',
|
path: 'gabinete-digital',
|
||||||
@@ -154,6 +169,45 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'expedientes-pr',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/expedientes-pr/expedientes-pr.module').then(m => m.ExpedientesPrPageModule),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:':SerialNumber/:caller',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.module').then(m => m.ExpedientePrPageModule),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'despachos',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/despachos/despachos.module').then(m => m.DespachosPageModule),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:':SerialNumber/:caller',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/despachos/despacho/despacho.module').then(m => m.DespachoPageModule),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'pedidos',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/pedidos/pedidos.module').then(m => m.PedidosPageModule),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:':SerialNumber/:caller',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/pedidos/pedido/pedido.module').then(m => m.PedidoPageModule),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path:'event-list',
|
path:'event-list',
|
||||||
children: [
|
children: [
|
||||||
@@ -181,7 +235,9 @@ const routes: Routes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'search',
|
path: 'search',
|
||||||
@@ -190,7 +246,8 @@ const routes: Routes = [
|
|||||||
path:'',
|
path:'',
|
||||||
loadChildren: ()=> import('../pages/search/search.module').then(m => m.SearchPageModule)
|
loadChildren: ()=> import('../pages/search/search.module').then(m => m.SearchPageModule)
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'publications',
|
path: 'publications',
|
||||||
@@ -220,7 +277,8 @@ const routes: Routes = [
|
|||||||
path: 'request-options',
|
path: 'request-options',
|
||||||
loadChildren: () => import('../shared/popover/request-options/request-options.module').then( m => m.RequestOptionsPageModule)
|
loadChildren: () => import('../shared/popover/request-options/request-options.module').then( m => m.RequestOptionsPageModule)
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'chat',
|
path: 'chat',
|
||||||
@@ -264,7 +322,8 @@ const routes: Routes = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'document-detail',
|
path: 'document-detail',
|
||||||
@@ -273,14 +332,17 @@ const routes: Routes = [
|
|||||||
path:'',
|
path:'',
|
||||||
loadChildren: ()=> import('../modals/document-detail/document-detail.module').then(m => m.DocumentDetailPageModule)
|
loadChildren: ()=> import('../modals/document-detail/document-detail.module').then(m => m.DocumentDetailPageModule)
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
canActivate: [AuthGuard]
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
redirectTo: '/home/events',
|
redirectTo: '/home/events',
|
||||||
pathMatch: 'full'
|
pathMatch: 'full',
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -29,30 +29,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class">
|
||||||
|
|
||||||
<ion-select class="d-block d-md-none" [(ngModel)]="postData.Priority" interface="action-sheet" Cancel-text="Cancelar" required>
|
<ion-select class="d-block" [(ngModel)]="postData.Priority" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||||
<ion-select-option value="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</ion-select-option>
|
<ion-select-option value="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</ion-select-option>
|
||||||
<ion-select-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</ion-select-option>
|
<ion-select-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</ion-select-option>
|
||||||
<ion-select-option value="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</ion-select-option>
|
<ion-select-option value="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</ion-select-option>
|
||||||
<ion-select-option value="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</ion-select-option>
|
<ion-select-option value="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</ion-select-option>
|
||||||
</ion-select>
|
</ion-select>
|
||||||
|
|
||||||
<mat-form-field class="width-100 d-none d-md-block" floatLabel="never" required>
|
|
||||||
<mat-select matInput [(ngModel)]="postData.Priority" >
|
|
||||||
<mat-option value="99999861">
|
|
||||||
Normal
|
|
||||||
</mat-option>
|
|
||||||
<mat-option value="99999862">
|
|
||||||
Urgente
|
|
||||||
</mat-option>
|
|
||||||
<mat-option value="99999863">
|
|
||||||
Muito Urgente
|
|
||||||
</mat-option>
|
|
||||||
<mat-option value="99999864">
|
|
||||||
Urgentíssimo
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -435,6 +435,17 @@ export class CreateProcessPage implements OnInit {
|
|||||||
"AttachmentList" :null,
|
"AttachmentList" :null,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.task.activityInstanceName =='Tarefa de Despacho'){
|
||||||
|
body = {
|
||||||
|
"serialNumber": this.task.serialNumber,
|
||||||
|
"action": "Conhecimento",
|
||||||
|
"ActionTypeId": 92,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": message,
|
||||||
|
},
|
||||||
|
"AttachmentList" :null,
|
||||||
|
}
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
body = {
|
body = {
|
||||||
"serialNumber": this.task.serialNumber,
|
"serialNumber": this.task.serialNumber,
|
||||||
|
|||||||
@@ -1,41 +1,3 @@
|
|||||||
<ion-menu autoHide="false" side="end" content-id="main-content">
|
|
||||||
<ion-header>
|
|
||||||
<ion-toolbar translucent>
|
|
||||||
<ion-title>Menu</ion-title>
|
|
||||||
</ion-toolbar>
|
|
||||||
</ion-header>
|
|
||||||
<ion-content>
|
|
||||||
<ion-list>
|
|
||||||
<ion-item (click)="notImplemented()">
|
|
||||||
<ion-icon name="documents" slot="start"></ion-icon>
|
|
||||||
<ion-label>Efectuar Despacho</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="notImplemented()">
|
|
||||||
<ion-icon name="arrow-undo" slot="start"></ion-icon>
|
|
||||||
<ion-label>Pedido de Parecer</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="notImplemented()">
|
|
||||||
<ion-icon name="arrow-redo" slot="start"></ion-icon>
|
|
||||||
<ion-label>Pedido de Deferimento</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="notImplemented()">
|
|
||||||
<ion-icon name="calendar" slot="start"></ion-icon>
|
|
||||||
<ion-label>Marcar reunião</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="notImplemented()">
|
|
||||||
<ion-icon name="trash" slot="start"></ion-icon>
|
|
||||||
<ion-label>Descartar</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item disabled>
|
|
||||||
<ion-icon name="paper-plane" slot="start"></ion-icon>
|
|
||||||
<ion-label>Enviar para pendentes</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
</ion-content>
|
|
||||||
</ion-menu>
|
|
||||||
<div class="ion-page " id="main-content">
|
|
||||||
<ion-menu-button></ion-menu-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="main-content d-flex height-100">
|
<div class="main-content d-flex height-100">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export class PublicationFolder {
|
export class PublicationFolder {
|
||||||
ProcessId: number;
|
ProcessId: string;
|
||||||
Description: string;
|
Description: string;
|
||||||
Detail: string;
|
Detail: string;
|
||||||
DateBegin: string;
|
DateBegin: string;
|
||||||
|
|||||||
@@ -123,8 +123,8 @@
|
|||||||
<button class="btn-no-color" *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false">
|
<button class="btn-no-color" *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false">
|
||||||
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
|
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
<button class="collaps btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='317px';showCalendar=true">
|
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='317px';showCalendar=true">
|
||||||
<ion-icon src="assets/images/icons-collaps-down.svg" ></ion-icon>
|
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
|
||||||
</button >
|
</button >
|
||||||
|
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@
|
|||||||
>
|
>
|
||||||
</app-event-list>
|
</app-event-list>
|
||||||
|
|
||||||
|
<!-- Edit event to approve -->
|
||||||
<app-approve-event class="d-flex flex-column"
|
<app-approve-event class="d-flex flex-column"
|
||||||
*ngIf="mobileComponent.showEventToApprove"
|
*ngIf="mobileComponent.showEventToApprove"
|
||||||
[class.transparent]="mobileComponent.transparentEventToApprove"
|
[class.transparent]="mobileComponent.transparentEventToApprove"
|
||||||
@@ -437,6 +437,7 @@
|
|||||||
*ngIf="mobileComponent.showEditEventToApprove"
|
*ngIf="mobileComponent.showEditEventToApprove"
|
||||||
[taskParticipants]="taskParticipants"
|
[taskParticipants]="taskParticipants"
|
||||||
[taskParticipantsCc]="taskParticipantsCc"
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
|
[saveData] = "eventToaprove.saveData"
|
||||||
[serialNumber] = "eventToaprove.serialNumber"
|
[serialNumber] = "eventToaprove.serialNumber"
|
||||||
[saveData] = "eventToaprove.saveData"
|
[saveData] = "eventToaprove.saveData"
|
||||||
(setContact)="setContact($event)"
|
(setContact)="setContact($event)"
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export class AgendaPage implements OnInit {
|
|||||||
eventsListOficial: Event[];
|
eventsListOficial: Event[];
|
||||||
|
|
||||||
// this will make toggle add event and.
|
// this will make toggle add event and.
|
||||||
showEventEditOrOpen: "edit" | "add" | "" = ""
|
showEventEditOrOpen: "edit" | "add" | "" | "eventoToApprove" = ""
|
||||||
prEventList: Event[];
|
prEventList: Event[];
|
||||||
mdEventList: Event[];
|
mdEventList: Event[];
|
||||||
|
|
||||||
@@ -232,8 +232,6 @@ export class AgendaPage implements OnInit {
|
|||||||
this.eventSelectedDate = event.start;
|
this.eventSelectedDate = event.start;
|
||||||
this.selectedEventId = event.id;
|
this.selectedEventId = event.id;
|
||||||
|
|
||||||
// this.viewEventDetail(event.id);
|
|
||||||
|
|
||||||
this.cloneAllmobileComponent();
|
this.cloneAllmobileComponent();
|
||||||
|
|
||||||
|
|
||||||
@@ -1190,11 +1188,11 @@ export class AgendaPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// open component
|
// open component
|
||||||
async viewEventDetailDismiss(data){
|
async viewEventDetailDismiss(data) {
|
||||||
|
|
||||||
await this.cloneAllmobileComponent()
|
await this.cloneAllmobileComponent()
|
||||||
|
|
||||||
if (data.type == 'edit'){
|
if (data.type == 'edit') {
|
||||||
|
|
||||||
this.selectedEvent = data.event;
|
this.selectedEvent = data.event;
|
||||||
this.postEvent = data.event;
|
this.postEvent = data.event;
|
||||||
@@ -1221,7 +1219,6 @@ export class AgendaPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
approveEventDismissGoBack() {
|
approveEventDismissGoBack() {
|
||||||
|
|
||||||
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
||||||
@@ -1231,33 +1228,42 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
approveEventDismiss({saveData, serialNumber, action}) {
|
||||||
approveEventDismiss({saveData, serialNumber, action}){
|
|
||||||
|
|
||||||
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
||||||
|
|
||||||
if(action == 'Aprovar'){
|
if(action == 'Aprovar') {
|
||||||
this.eventToaprove = {
|
this.eventToaprove = {
|
||||||
back: true,
|
back: true,
|
||||||
saveData: saveData,
|
saveData: saveData,
|
||||||
serialNumber:serialNumber,
|
serialNumber:serialNumber,
|
||||||
|
action: action,
|
||||||
InstanceId: saveData.workflowInstanceDataFields.InstanceId || ""
|
InstanceId: saveData.workflowInstanceDataFields.InstanceId || ""
|
||||||
}
|
}
|
||||||
// this.mobileComponent.showEventList = false;
|
|
||||||
this.mobileComponent.transparentEventList = true;
|
this.mobileComponent.transparentEventList = true;
|
||||||
this.mobileComponent.showEventToApprove = true;
|
this.mobileComponent.showEventToApprove = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.showEventEditOrOpen = "eventoToApprove"
|
||||||
}
|
}
|
||||||
|
|
||||||
closeEventToApprove() {
|
closeEventToApprove() {
|
||||||
|
if (this.eventToaprove.back ==true && this.mobileComponent.showEventList ==true) {
|
||||||
this.mobileComponent.showEventToApprove = false;
|
this.mobileComponent.transparentEventList = false;
|
||||||
this.mobileComponent.showEventList = true;
|
this.mobileComponent.showEventToApprove = false;
|
||||||
|
this.eventToaprove.back = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
this.mobileComponent.showEventToApprove = false;
|
||||||
|
this.mobileComponent.showEventList = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
closeEventToApproveGoBack() {
|
closeEventToApproveGoBack() {
|
||||||
if( window.innerWidth <= 801){
|
if( window.innerWidth <= 801){
|
||||||
this.router.navigate(['/home/agenda/event-list']);
|
this.router.navigate(['/home/agenda/event-list']);
|
||||||
@@ -1269,12 +1275,14 @@ export class AgendaPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EditApproveEventDismiss(){
|
// called from emitters
|
||||||
|
/** @description open component to edit event to approve */
|
||||||
|
EditApproveEventDismiss() {
|
||||||
this.cloneAllmobileComponent();
|
this.cloneAllmobileComponent();
|
||||||
this.mobileComponent.showEditEventToApprove = true;
|
this.mobileComponent.showEditEventToApprove = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async cloneAllmobileComponent(){
|
async cloneAllmobileComponent() {
|
||||||
|
|
||||||
this.mobileComponent.showAddNewEvent = false;
|
this.mobileComponent.showAddNewEvent = false;
|
||||||
this.mobileComponent.showEditEvent = false;
|
this.mobileComponent.showEditEvent = false;
|
||||||
@@ -1288,7 +1296,7 @@ export class AgendaPage implements OnInit {
|
|||||||
this.closeEventToApprove();
|
this.closeEventToApprove();
|
||||||
}
|
}
|
||||||
|
|
||||||
async AproveEventEditEvent(data){
|
async AproveEventEditEvent(data) {
|
||||||
this.postEvent =data;
|
this.postEvent =data;
|
||||||
this.mobileComponent.transparentEventToApprove= true;
|
this.mobileComponent.transparentEventToApprove= true;
|
||||||
this.mobileComponent.showAddNewEvent = true;
|
this.mobileComponent.showAddNewEvent = true;
|
||||||
@@ -1303,11 +1311,11 @@ export class AgendaPage implements OnInit {
|
|||||||
this.mobileComponent.showAttendees = true;
|
this.mobileComponent.showAttendees = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async clearContact(){
|
async clearContact() {
|
||||||
this.contacts = [];
|
this.contacts = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
async setContact(data:EventPerson[]){
|
async setContact(data:EventPerson[]) {
|
||||||
this.contacts = data;
|
this.contacts = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1319,7 +1327,7 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
async GoBackEditOrAdd() {
|
async GoBackEditOrAdd() {
|
||||||
|
|
||||||
if(this.showEventEditOrOpen == "edit"){
|
if(this.showEventEditOrOpen == "edit") {
|
||||||
this.cloneAllmobileComponent();
|
this.cloneAllmobileComponent();
|
||||||
|
|
||||||
this.mobileComponent.showEditEvent = true;
|
this.mobileComponent.showEditEvent = true;
|
||||||
@@ -1327,7 +1335,11 @@ export class AgendaPage implements OnInit {
|
|||||||
this.cloneAllmobileComponent();
|
this.cloneAllmobileComponent();
|
||||||
|
|
||||||
this.mobileComponent.showAddNewEvent = true;
|
this.mobileComponent.showAddNewEvent = true;
|
||||||
} else {
|
} else if(this.showEventEditOrOpen == "eventoToApprove") {
|
||||||
|
this.cloneAllmobileComponent();
|
||||||
|
this.mobileComponent.showEditEventToApprove = true
|
||||||
|
}
|
||||||
|
else {
|
||||||
// do Nothings
|
// do Nothings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,8 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class-no-height width-100 flex-grow-1">
|
<div class="ion-input-class-no-height width-100 flex-grow-1">
|
||||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
<!-- rows="6" cols="20" -->
|
||||||
|
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" ></ion-textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -47,10 +47,12 @@ export class EditEventPage implements OnInit {
|
|||||||
private eventsService: EventsService,
|
private eventsService: EventsService,
|
||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
private attachmentsService: AttachmentsService,
|
private attachmentsService: AttachmentsService,
|
||||||
private animationController: AnimationController,
|
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
this.postEvent = this.navParams.get('event');
|
this.postEvent = this.navParams.get('event');
|
||||||
this.caller = this.navParams.get('caller');
|
this.caller = this.navParams.get('caller');
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export class EditEventPage implements OnInit {
|
|||||||
private iab: InAppBrowser) {
|
private iab: InAppBrowser) {
|
||||||
this.loadedEvent = new Event();
|
this.loadedEvent = new Event();
|
||||||
this.loadedEvent.Body = new EventBody();
|
this.loadedEvent.Body = new EventBody();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -310,18 +310,35 @@ export class EventsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goToExpediente(SerialNumber:any){
|
goToExpediente(SerialNumber:any){
|
||||||
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
if(this.loggeduser.Profile == 'MDGPR'){
|
||||||
|
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
||||||
|
}
|
||||||
|
else if(this.loggeduser.Profile == 'PR'){
|
||||||
|
this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewExpedientListPage(){
|
viewExpedientListPage(){
|
||||||
if( window.innerWidth <= 1024){
|
if(this.loggeduser.Profile == 'MDGPR'){
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
if( window.innerWidth < 801){
|
||||||
|
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let navigationExtras: NavigationExtras = { queryParams: {"expedientes": true,} };
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else if(this.loggeduser.Profile == 'PR'){
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientes": true,} };
|
if( window.innerWidth < 801){
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let navigationExtras: NavigationExtras = { queryParams: {"expedientes-pr": true,} };
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export class DespachoPage implements OnInit {
|
|||||||
fulltask: any;
|
fulltask: any;
|
||||||
eventsList: Event[] = [];
|
eventsList: Event[] = [];
|
||||||
serialnumber: string;
|
serialnumber: string;
|
||||||
|
caller:string;
|
||||||
profile: string;
|
profile: string;
|
||||||
intervenientes: any;
|
intervenientes: any;
|
||||||
cc: any = [];
|
cc: any = [];
|
||||||
@@ -58,11 +59,16 @@ export class DespachoPage implements OnInit {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.activatedRoute.queryParams.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
if(params["serialNumber"]) {
|
console.log(params["params"]);
|
||||||
this.serialnumber = params["serialNumber"];
|
|
||||||
console.log(params["serialNumber"]);
|
if(params["params"].SerialNumber) {
|
||||||
|
this.serialnumber = params["params"].SerialNumber;
|
||||||
}
|
}
|
||||||
|
if(params["params"].caller) {
|
||||||
|
this.caller = params["params"].caller;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -88,15 +94,30 @@ export class DespachoPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
if (window.innerWidth <= 800) {
|
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
if (window.innerWidth <= 800) {
|
||||||
} else {
|
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||||
let navigationExtras: NavigationExtras = {
|
}
|
||||||
queryParams: {
|
else {
|
||||||
'despachos': true
|
let navigationExtras: NavigationExtras = {
|
||||||
|
queryParams: {
|
||||||
|
"pendentes": true,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if (window.innerWidth <= 800) {
|
||||||
|
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||||
|
} else {
|
||||||
|
let navigationExtras: NavigationExtras = {
|
||||||
|
queryParams: {
|
||||||
|
'despachos': true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
}
|
}
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,6 +138,7 @@ export class DespachoPage implements OnInit {
|
|||||||
"WorkflowName": res.workflowDisplayName,
|
"WorkflowName": res.workflowDisplayName,
|
||||||
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
|
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
|
||||||
"activityInstanceName": res.activityInstanceName,
|
"activityInstanceName": res.activityInstanceName,
|
||||||
|
"Status": res.workflowInstanceDataFields.Status,
|
||||||
}
|
}
|
||||||
this.fulltask = res;
|
this.fulltask = res;
|
||||||
console.log(this.task);
|
console.log(this.task);
|
||||||
@@ -267,6 +289,8 @@ export class DespachoPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async sendExpedienteToPending() {
|
async sendExpedienteToPending() {
|
||||||
|
console.log(this.serialnumber);
|
||||||
|
|
||||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.close();
|
this.close();
|
||||||
@@ -405,7 +429,9 @@ export class DespachoPage implements OnInit {
|
|||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss();
|
modal.onDidDismiss().then(res=>{
|
||||||
|
this.goBack();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async distartExpedientModal(){
|
async distartExpedientModal(){
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<ion-item
|
<ion-item
|
||||||
class="expediente ion-no-padding cursor-pointer"
|
class="expediente ion-no-padding cursor-pointer"
|
||||||
*ngFor = "let task of despachoList; let i = index"
|
*ngFor = "let task of despachoList; let i = index"
|
||||||
(click)="viewExpedientDetail(task.SerialNumber)"
|
(click)="GoToDespacho(task.SerialNumber)"
|
||||||
>
|
>
|
||||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||||
<div class="item width-100">
|
<div class="item width-100">
|
||||||
|
|||||||
@@ -146,16 +146,8 @@ export class DespachosPage implements OnInit {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async viewExpedientDetail(serialNumber:any) {
|
async GoToDespacho(serialNumber:any) {
|
||||||
|
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
|
||||||
let navigationExtras: NavigationExtras = {
|
|
||||||
queryParams: {
|
|
||||||
"serialNumber": serialNumber,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
docIndex(index: number) {
|
docIndex(index: number) {
|
||||||
|
|||||||
+1
-32
@@ -45,7 +45,6 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private activateRoute: ActivatedRoute,
|
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
private iab: InAppBrowser,
|
private iab: InAppBrowser,
|
||||||
private attachments: AttachmentsService,
|
private attachments: AttachmentsService,
|
||||||
@@ -59,35 +58,17 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
) {
|
) {
|
||||||
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
this.activateRoute.paramMap.subscribe(params => {
|
|
||||||
console.log(params["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() {
|
||||||
this.profile = "mdgpr";
|
|
||||||
|
|
||||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
|
||||||
if (!paramMap["params"].SerialNumber) {
|
|
||||||
console.log('HERE');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
console.log(paramMap);
|
|
||||||
|
|
||||||
this.LoadTaskDetail(this.serialnumber);
|
|
||||||
this.LoadRelatedEvents(this.serialnumber);
|
|
||||||
});
|
|
||||||
this.LoadTaskDetail(this.serialnumber);
|
this.LoadTaskDetail(this.serialnumber);
|
||||||
this.LoadRelatedEvents(this.serialnumber);
|
this.LoadRelatedEvents(this.serialnumber);
|
||||||
}
|
}
|
||||||
@@ -115,7 +96,6 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log('HERE');
|
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
switch (params["params"].caller) {
|
switch (params["params"].caller) {
|
||||||
case 'events':
|
case 'events':
|
||||||
@@ -155,8 +135,6 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
async LoadTaskDetail(serial: string) {
|
async LoadTaskDetail(serial: string) {
|
||||||
|
|
||||||
this.processes.GetTask(serial).subscribe(res => {
|
this.processes.GetTask(serial).subscribe(res => {
|
||||||
/* console.log(res); */
|
|
||||||
|
|
||||||
this.task = {
|
this.task = {
|
||||||
"SerialNumber": res.serialNumber,
|
"SerialNumber": res.serialNumber,
|
||||||
"Folio": res.workflowInstanceDataFields.Subject,
|
"Folio": res.workflowInstanceDataFields.Subject,
|
||||||
@@ -171,11 +149,7 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
"WorkflowName": res.workflowDisplayName,
|
"WorkflowName": res.workflowDisplayName,
|
||||||
"Status": res.workflowInstanceDataFields.Status,
|
"Status": res.workflowInstanceDataFields.Status,
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log('task', this.task);
|
|
||||||
|
|
||||||
this.fulltask = res;
|
this.fulltask = res;
|
||||||
//console.log('GetTask', res);
|
|
||||||
|
|
||||||
let thedate = new Date(this.task.CreateDate);
|
let thedate = new Date(this.task.CreateDate);
|
||||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||||
@@ -188,8 +162,6 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
this.cc = users.filter(user=>{
|
this.cc = users.filter(user=>{
|
||||||
return user.Type == 'CC';
|
return user.Type == 'CC';
|
||||||
});
|
});
|
||||||
console.log(users);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -201,14 +173,12 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
async LoadRelatedEvents(serial: string) {
|
async LoadRelatedEvents(serial: string) {
|
||||||
if (this.eventsList == null) {
|
if (this.eventsList == null) {
|
||||||
this.attachments.getAttachmentsBySerial(serial).subscribe(res => {
|
this.attachments.getAttachmentsBySerial(serial).subscribe(res => {
|
||||||
console.log(res);
|
|
||||||
res.forEach(att => {
|
res.forEach(att => {
|
||||||
if (this.eventsList == null) {
|
if (this.eventsList == null) {
|
||||||
this.eventsList = new Array();
|
this.eventsList = new Array();
|
||||||
}
|
}
|
||||||
this.events.getEvent(att.ParentId).subscribe(event => {
|
this.events.getEvent(att.ParentId).subscribe(event => {
|
||||||
this.eventsList.push(event);
|
this.eventsList.push(event);
|
||||||
console.log(this.eventsList);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -217,7 +187,6 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
|
|
||||||
viewDocument(){
|
viewDocument(){
|
||||||
this.processes.GetDocumentUrl(this.task.DocId, this.task.FsId).subscribe(res=>{
|
this.processes.GetDocumentUrl(this.task.DocId, this.task.FsId).subscribe(res=>{
|
||||||
console.log(res);
|
|
||||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||||
const browser = this.iab.create(url,"_blank");
|
const browser = this.iab.create(url,"_blank");
|
||||||
browser.show();
|
browser.show();
|
||||||
|
|||||||
@@ -38,13 +38,14 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
fulltask: any;
|
fulltask: any;
|
||||||
eventsList: Event[];
|
eventsList: Event[];
|
||||||
serialnumber: string;
|
serialnumber: string;
|
||||||
|
caller:string;
|
||||||
profile: string;
|
profile: string;
|
||||||
intervenientes: any;
|
intervenientes: any;
|
||||||
cc: any = [];
|
cc: any = [];
|
||||||
|
|
||||||
loggeduser: User;
|
loggeduser: User;
|
||||||
|
|
||||||
constructor(private activateRoute: ActivatedRoute,
|
constructor(
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
private iab: InAppBrowser,
|
private iab: InAppBrowser,
|
||||||
private attachments: AttachmentsService,
|
private attachments: AttachmentsService,
|
||||||
@@ -52,7 +53,6 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
private menu: MenuController,
|
private menu: MenuController,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private alertService: AlertService,
|
|
||||||
public popoverController: PopoverController,
|
public popoverController: PopoverController,
|
||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private userAuth: AuthService,
|
private userAuth: AuthService,
|
||||||
@@ -61,10 +61,12 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
|
|
||||||
) {
|
) {
|
||||||
this.loggeduser = userAuth.ValidatedUser;
|
this.loggeduser = userAuth.ValidatedUser;
|
||||||
this.activatedRoute.queryParams.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
if(params["serialNumber"]) {
|
if(params["params"].SerialNumber) {
|
||||||
this.serialnumber = params["serialNumber"];
|
this.serialnumber = params["params"].SerialNumber;
|
||||||
console.log(params["serialNumber"]);
|
}
|
||||||
|
if(params["params"].caller) {
|
||||||
|
this.caller = params["params"].caller;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -73,7 +75,7 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
this.profile = "mdgpr";
|
this.profile = "mdgpr";
|
||||||
console.log(this.serialnumber);
|
console.log(this.serialnumber);
|
||||||
|
|
||||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
this.activatedRoute.paramMap.subscribe(paramMap => {
|
||||||
if (!paramMap.has('SerialNumber')) {
|
if (!paramMap.has('SerialNumber')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -90,15 +92,42 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
let navigationExtras: NavigationExtras = {
|
if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||||
queryParams: {
|
if (window.innerWidth <= 800) {
|
||||||
"expedientes-pr": true,
|
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let navigationExtras: NavigationExtras = {
|
||||||
|
queryParams: {
|
||||||
|
"pendentes": true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
else{
|
||||||
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
|
switch (params["params"].caller) {
|
||||||
|
case 'events':
|
||||||
|
this.router.navigate(['/home',params["params"].caller]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'gabinete-digital':
|
||||||
|
let navigationExtras: NavigationExtras = {
|
||||||
|
queryParams: {
|
||||||
|
"expedientes-pr": true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( window.innerWidth < 801) {
|
||||||
|
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||||
|
} else {
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sendExpedienteToPending(){
|
sendExpedienteToPending(){
|
||||||
@@ -332,14 +361,14 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.processes.CompleteTask(otherbody).toPromise();
|
await this.processes.CompleteTask(otherbody).toPromise()
|
||||||
this.toastService.successMessage('Processo descartado')
|
this.toastService.successMessage('Processo descartado');
|
||||||
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.badRequest('Processo não descartado')
|
this.toastService.badRequest('Processo não descartado')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(res['data'] == 'No'){
|
else if(res['data'] == 'No'){
|
||||||
//Do nothing
|
//Do nothing
|
||||||
@@ -347,30 +376,24 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(res['data']== 'Yes'){
|
if(res['data']== 'Yes'){
|
||||||
|
try {
|
||||||
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
|
this.toastService.successMessage('Processo descartado');
|
||||||
|
this.goBack();
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
|
this.goBack();
|
||||||
|
}
|
||||||
|
else if(res['data'] == 'No'){
|
||||||
|
console.log('Update');
|
||||||
try {
|
try {
|
||||||
//await this.processes.CompleteTask(body).toPromise()
|
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||||
this.toastService.successMessage()
|
this.toastService.successMessage();
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.badRequest()
|
this.toastService.badRequest()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(res['data'] == 'No'){
|
|
||||||
console.log('Update');
|
|
||||||
|
|
||||||
try {
|
|
||||||
await this.processes.UpdateTaskStatus(this.task.FolderId);
|
|
||||||
this.toastService.successMessage()
|
|
||||||
} catch (error) {
|
|
||||||
this.toastService.badRequest()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ export class ExpedientesPrPage implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
) {
|
) {
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
|
this.LoadList();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.LoadList();
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
@@ -47,15 +47,6 @@ export class ExpedientesPrPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
notImplemented(){
|
|
||||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
|
||||||
}
|
|
||||||
|
|
||||||
openExpedientDetailPage(data){
|
|
||||||
console.log(data);
|
|
||||||
this.openExpedientDetail.emit(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadList(){
|
LoadList(){
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
switch (this.loggeduser.Profile) {
|
switch (this.loggeduser.Profile) {
|
||||||
@@ -124,13 +115,7 @@ export class ExpedientesPrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goToExpediente(serialNumber:any){
|
goToExpediente(serialNumber:any){
|
||||||
let navigationExtras: NavigationExtras = {
|
this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']);
|
||||||
queryParams: {
|
|
||||||
"serialNumber": serialNumber,
|
|
||||||
"profile": this.loggeduser.Profile
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr/expediente-pr'], navigationExtras);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async viewExpedientDetail(serialNumber:any) {
|
async viewExpedientDetail(serialNumber:any) {
|
||||||
|
|||||||
@@ -104,17 +104,11 @@ ion-content{
|
|||||||
width: 173px;
|
width: 173px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
margin: 7px;
|
margin: 7px;
|
||||||
//margin: 8px;
|
|
||||||
padding: 30px 5px 30px 5px;
|
padding: 30px 5px 30px 5px;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||||
background: white;
|
background: white;
|
||||||
//border: solid 1px #e9e9e9;
|
|
||||||
/* --background-color: #ffffff !important; */
|
|
||||||
// background-color: #ffffff !important;
|
|
||||||
float: left;
|
float: left;
|
||||||
//border: 1px solid red;
|
|
||||||
//justify-content: center;
|
|
||||||
}
|
}
|
||||||
.exp-card-long{
|
.exp-card-long{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -125,7 +119,6 @@ ion-content{
|
|||||||
width: 360px;
|
width: 360px;
|
||||||
margin: 7px 20px;
|
margin: 7px 20px;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
// background-color: #ffffff !important;
|
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
border: blue !important;
|
border: blue !important;
|
||||||
|
|
||||||
@@ -229,7 +222,6 @@ ion-content{
|
|||||||
width: 35%;
|
width: 35%;
|
||||||
justify-content: flex-start !important;
|
justify-content: flex-start !important;
|
||||||
border-right: 1px solid #d8d8d8;
|
border-right: 1px solid #d8d8d8;
|
||||||
border: 1px solid red;
|
|
||||||
|
|
||||||
.aside{
|
.aside{
|
||||||
background:transparent;
|
background:transparent;
|
||||||
|
|||||||
@@ -58,14 +58,18 @@ export class PedidoPage implements OnInit {
|
|||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
private toastService: ToastService,) {
|
private toastService: ToastService,) {
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
this.activatedRoute.queryParams.subscribe(params => {
|
|
||||||
if(params["serialNumber"]) {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
this.serialnumber = params["serialNumber"];
|
console.log(params["params"]);
|
||||||
}
|
|
||||||
if(params["caller"]) {
|
if(params["params"].SerialNumber) {
|
||||||
this.caller = params["caller"];
|
this.serialnumber = params["params"].SerialNumber;
|
||||||
}
|
}
|
||||||
});
|
if(params["params"].caller) {
|
||||||
|
this.caller = params["params"].caller;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -81,12 +81,7 @@ export class PedidosPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goToPedido(serialNumber:any){
|
goToPedido(serialNumber:any){
|
||||||
let navigationExtras: NavigationExtras = {
|
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||||
queryParams: {
|
|
||||||
"serialNumber": serialNumber,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notImplemented(){
|
notImplemented(){
|
||||||
|
|||||||
@@ -129,78 +129,17 @@ export class PendentesPage implements OnInit {
|
|||||||
|
|
||||||
async viewTaskDetails(serialNumber:string, workflowName:string) {
|
async viewTaskDetails(serialNumber:string, workflowName:string) {
|
||||||
if(workflowName == 'Despacho'){
|
if(workflowName == 'Despacho'){
|
||||||
this.goToDespacho(serialNumber);
|
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento'){
|
else if(workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento'){
|
||||||
this.goToPedido(serialNumber);
|
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Expediente'){
|
else if(workflowName == 'Expediente'){
|
||||||
this.goToExpediente(serialNumber);
|
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
goToDespacho(serialNumber:any){
|
|
||||||
let navigationExtras: NavigationExtras = {
|
|
||||||
queryParams: {
|
|
||||||
"serialNumber": serialNumber,
|
|
||||||
"from": "pendentes"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras);
|
|
||||||
}
|
|
||||||
|
|
||||||
goToPedido(serialNumber:any) {
|
|
||||||
let navigationExtras: NavigationExtras = {
|
|
||||||
queryParams: {
|
|
||||||
"serialNumber": serialNumber,
|
|
||||||
"from": "pendentes"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
|
||||||
}
|
|
||||||
|
|
||||||
goToExpediente(serialNumber:any){
|
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async openDespacho(serialNumber:string){
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: DespachoPage,
|
|
||||||
componentProps:{
|
|
||||||
enterAnimation: "",
|
|
||||||
serialNumber: serialNumber,
|
|
||||||
profile: this.profile,
|
|
||||||
},
|
|
||||||
cssClass: 'modal modal-desktop',
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss().then((res)=>{
|
|
||||||
console.log('refresh list');
|
|
||||||
this.LoadList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async openPedido(serialNumber:string){
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: PedidoPage,
|
|
||||||
componentProps:{
|
|
||||||
enterAnimation: "",
|
|
||||||
serialNumber: serialNumber,
|
|
||||||
profile: this.profile,
|
|
||||||
},
|
|
||||||
cssClass: 'modal modal-desktop',
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss().then((res)=>{
|
|
||||||
console.log('refresh list');
|
|
||||||
this.LoadList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<ion-content class="text-white">
|
<ion-content class="text-white">
|
||||||
<div class="main-wrapper">
|
<div class="main-wrapper">
|
||||||
<div class="wrapper" *ngIf="userLoginPreference != 'pin' && userLoginPreference != 'fingerprint' && !setPint ">
|
<div class="wrapper" *ngIf="!hasSession && !setPin || loginPreference == 'none' && !setPin ">
|
||||||
|
|
||||||
<div class="bg-1 d-flex justify-center align-center">
|
<div class="bg-1 d-flex justify-center align-center">
|
||||||
<div class="bg-2 d-flex justify-center align-center">
|
<div class="bg-2 d-flex justify-center align-center">
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main-content height-100" *ngIf="userLoginPreference == 'pin' || setPint">
|
<div class="main-content height-100" *ngIf="setPin || hasSession && loginPreference == 'pin' ">
|
||||||
<div class=" align-center justify-center">
|
<div class=" align-center justify-center">
|
||||||
<div class="div-top-header">
|
<div class="div-top-header">
|
||||||
|
|
||||||
@@ -41,8 +41,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<ion-title *ngIf="!setPint" class="title">Digite o PIN</ion-title>
|
<ion-title *ngIf="hasPin" class="title">Digite o PIN</ion-title>
|
||||||
<ion-title *ngIf="setPint" class="title">Digite o novo PIN</ion-title>
|
<ion-title *ngIf="!hasPin" class="title">Digite o novo PIN</ion-title>
|
||||||
|
|
||||||
<div class="d-flex pt-25 align-center justify-center">
|
<div class="d-flex pt-25 align-center justify-center">
|
||||||
<div class="dot" [class.dot-active]="code.length >= 1"></div>
|
<div class="dot" [class.dot-active]="code.length >= 1"></div>
|
||||||
@@ -70,11 +70,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="!setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="setPint=false; userLoginPreference='none'">
|
<div *ngIf="hasPin" class="voltar d-flex align-center justify-center pt-25 clear" (click)="enterWithPassword=true">
|
||||||
Entrar com senha
|
Entrar com senha
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="clearCode()">
|
<div class="voltar d-flex align-center justify-center pt-25 clear" (click)="clearCode()">
|
||||||
Limpar
|
Limpar
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,12 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
import { User, UserForm } from 'src/app/models/user.model';
|
import { UserForm } from 'src/app/models/user.model';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { AlertController, AnimationController, ModalController } from '@ionic/angular';
|
import { AlertController } from '@ionic/angular';
|
||||||
import { StorageService } from 'src/app/services/storage.service';
|
|
||||||
import { AuthConnstants } from 'src/app/config/auth-constants';
|
|
||||||
import { PhotoService } from 'src/app/services/photo.service';
|
|
||||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
||||||
import crypto from 'crypto-js'
|
import crypto from 'crypto-js'
|
||||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
|
||||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
|
||||||
|
|
||||||
//import { Token } from '../../models/token.model';
|
|
||||||
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
|
||||||
|
|
||||||
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
|
||||||
const { PushNotifications } = Plugins;
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
@@ -34,43 +21,51 @@ export class LoginPage implements OnInit {
|
|||||||
userattempt: UserForm;
|
userattempt: UserForm;
|
||||||
code = []
|
code = []
|
||||||
|
|
||||||
setPint = false
|
hasPin: boolean
|
||||||
pin = false
|
loginPreference: string
|
||||||
|
hasSession = false
|
||||||
|
setPin = false
|
||||||
|
|
||||||
userLoginPreference: any
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
|
||||||
private notificatinsservice: NotificationsService,
|
private notificatinsservice: NotificationsService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private storageService: StorageService,
|
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private photoService: PhotoService,
|
public alertController: AlertController
|
||||||
public alertController: AlertController,
|
|
||||||
private modalController: ModalController,
|
|
||||||
private animationController: AnimationController,
|
|
||||||
|
|
||||||
//private fcm: FCM
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
|
||||||
|
|
||||||
if (userData.hasOwnProperty('loginPreference')) {
|
|
||||||
this.userLoginPreference = userData.loginPreference
|
|
||||||
this.pin = true
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
this.userLoginPreference = ''
|
|
||||||
this.setPint = false
|
|
||||||
this.pin = false
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {
|
||||||
|
|
||||||
|
// App has session
|
||||||
|
if(!localStorage.getItem('UserData')) {
|
||||||
|
this.hasSession = false
|
||||||
|
} else {
|
||||||
|
this.hasSession = true
|
||||||
|
// this.router.navigate(['/home/events']);
|
||||||
|
}
|
||||||
|
|
||||||
|
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||||
|
|
||||||
|
const loginPreference = userData?.loginPreference
|
||||||
|
const pin = userData?.PIN
|
||||||
|
|
||||||
|
if (pin) {
|
||||||
|
this.hasPin = true
|
||||||
|
} else {
|
||||||
|
this.hasPin = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loginPreference) {
|
||||||
|
this.loginPreference = loginPreference
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.loginPreference = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//Function to validade the login inputs
|
//Function to validade the login inputs
|
||||||
validateUsername() {
|
validateUsername() {
|
||||||
@@ -114,13 +109,14 @@ export class LoginPage implements OnInit {
|
|||||||
} */
|
} */
|
||||||
|
|
||||||
getToken() {
|
getToken() {
|
||||||
this.notificatinsservice.getAndpostToken(this.username);
|
this.notificatinsservice.getAndpostToken(this.username);
|
||||||
}
|
}
|
||||||
|
|
||||||
async Login() {
|
async Login() {
|
||||||
|
|
||||||
if (this.validateUsername()) {
|
if (this.validateUsername()) {
|
||||||
if(this.validatePassword()){
|
if(this.validatePassword()){
|
||||||
|
|
||||||
this.userattempt = {
|
this.userattempt = {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
password: this.password,
|
password: this.password,
|
||||||
@@ -128,26 +124,24 @@ export class LoginPage implements OnInit {
|
|||||||
BasicAuthKey: ""
|
BasicAuthKey: ""
|
||||||
}
|
}
|
||||||
let attempt = await this.authService.login(this.userattempt);
|
let attempt = await this.authService.login(this.userattempt);
|
||||||
console.log(JSON.stringify(attempt));
|
|
||||||
|
|
||||||
if (attempt) {
|
if (attempt) {
|
||||||
//this.loginRocketChat();
|
|
||||||
this.authService.loginChat(this.userattempt);
|
this.authService.loginChat(this.userattempt);
|
||||||
this.getToken();
|
this.getToken();
|
||||||
|
this.hasSession = true
|
||||||
|
this.hasPin = false
|
||||||
|
this.setPin = true
|
||||||
|
|
||||||
if(!this.pin) {
|
if(!this.hasPin || this.hasPin) {
|
||||||
this.setPint = true
|
|
||||||
this.pin = true
|
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate(['/home/events']);
|
this.router.navigate(['/home/events']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
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');
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,7 +152,6 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
setCode(code: string) {
|
setCode(code: string) {
|
||||||
|
|
||||||
|
|
||||||
if(this.code.length < 4) {
|
if(this.code.length < 4) {
|
||||||
this.code.push(code)
|
this.code.push(code)
|
||||||
}
|
}
|
||||||
@@ -168,25 +161,32 @@ export class LoginPage implements OnInit {
|
|||||||
const code = this.code.join('')
|
const code = this.code.join('')
|
||||||
const encrypted = crypto.SHA1(code)
|
const encrypted = crypto.SHA1(code)
|
||||||
|
|
||||||
if(this.setPint) {
|
if(!this.hasPin) {
|
||||||
|
// alert('storePin')
|
||||||
this.storePin()
|
this.storePin()
|
||||||
} else {
|
} else {
|
||||||
|
// alert('pinLogin')
|
||||||
this.pinLogin()
|
this.pinLogin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearCode() {
|
clearCode() {
|
||||||
this.code =[]
|
this.code =[]
|
||||||
}
|
}
|
||||||
|
|
||||||
pinLogin() {
|
pinLogin() {
|
||||||
|
|
||||||
const code = this.code.join('')
|
const code = this.code.join('')
|
||||||
const encrypted = crypto.SHA1(code)
|
const encrypted = crypto.SHA1(code)
|
||||||
|
|
||||||
|
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||||
|
const pin = userData?.PIN
|
||||||
|
|
||||||
|
//if( encrypted == pin) {
|
||||||
|
|
||||||
if( encrypted == localStorage.getItem('PIN')) {
|
if( encrypted == localStorage.getItem('PIN')) {
|
||||||
|
|
||||||
//this.toastService.successMessage()
|
//this.toastService.successMessage()
|
||||||
this.router.navigate(['/home/events']);
|
this.router.navigate(['/home/events']);
|
||||||
} else {
|
} else {
|
||||||
@@ -200,6 +200,12 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
const code = this.code.join('')
|
const code = this.code.join('')
|
||||||
const encrypted = crypto.SHA1(code)
|
const encrypted = crypto.SHA1(code)
|
||||||
|
let userData: Object = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||||
|
|
||||||
|
userData['PIN'] = encrypted
|
||||||
|
|
||||||
|
|
||||||
|
localStorage.setItem('UserData', JSON.stringify(userData) )
|
||||||
|
|
||||||
localStorage.setItem('PIN', encrypted)
|
localStorage.setItem('PIN', encrypted)
|
||||||
|
|
||||||
@@ -207,50 +213,4 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async badRequest(message?: string, callback?) {
|
|
||||||
|
|
||||||
|
|
||||||
const enterAnimation = (baseEl: any) => {
|
|
||||||
const backdropAnimation = this.animationController.create()
|
|
||||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
|
||||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
|
||||||
|
|
||||||
const wrapperAnimation = this.animationController.create()
|
|
||||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
|
||||||
.keyframes([
|
|
||||||
{ offset: 0, opacity: '1', right: '-100%' },
|
|
||||||
{ offset: 1, opacity: '1', right: '0px' }
|
|
||||||
]);
|
|
||||||
|
|
||||||
return this.animationController.create()
|
|
||||||
.addElement(baseEl)
|
|
||||||
.easing('ease-out')
|
|
||||||
.duration(500)
|
|
||||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
||||||
}
|
|
||||||
|
|
||||||
const leaveAnimation = (baseEl: any) => {
|
|
||||||
return enterAnimation(baseEl).direction('reverse');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
enterAnimation,
|
|
||||||
leaveAnimation,
|
|
||||||
component: BadRequestPage,
|
|
||||||
componentProps: {
|
|
||||||
message: message || 'Processo não efetuado' ,
|
|
||||||
},
|
|
||||||
cssClass: 'notification-modal'
|
|
||||||
});
|
|
||||||
|
|
||||||
modal.present()
|
|
||||||
|
|
||||||
setTimeout(()=> {
|
|
||||||
modal.dismiss()
|
|
||||||
},3000)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
this.clear();
|
this.clear();
|
||||||
// this.takePicture();
|
// this.takePicture();
|
||||||
}
|
}
|
||||||
takePicture(){
|
takePicture() {
|
||||||
const options: CameraOptions = {
|
const options: CameraOptions = {
|
||||||
quality: 90,
|
quality: 90,
|
||||||
destinationType: this.camera.DestinationType.DATA_URL,
|
destinationType: this.camera.DestinationType.DATA_URL,
|
||||||
@@ -177,16 +177,11 @@ export class NewPublicationPage implements OnInit {
|
|||||||
FileBase64: this.capturedImage,
|
FileBase64: this.capturedImage,
|
||||||
FileExtension: 'jpeg',
|
FileExtension: 'jpeg',
|
||||||
}
|
}
|
||||||
|
|
||||||
/* console.log('Create');
|
|
||||||
console.log(this.publication); */
|
|
||||||
this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
|
||||||
this.close();
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log(this.publication);
|
console.log(this.publication);
|
||||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise()
|
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||||
|
this.close();
|
||||||
this.toastService.successMessage("Publicação criado")
|
this.toastService.successMessage("Publicação criado")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { NewPublicationPageModule } from 'src/app/shared/publication/new-publica
|
|||||||
import { NewActionPageModule } from 'src/app/shared/publication/new-action/new-action.module';
|
import { NewActionPageModule } from 'src/app/shared/publication/new-action/new-action.module';
|
||||||
import { PublicationDetailPageModule } from 'src/app/shared/publication/view-publications/publication-detail/publication-detail.module';
|
import { PublicationDetailPageModule } from 'src/app/shared/publication/view-publications/publication-detail/publication-detail.module';
|
||||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||||
|
import { EditActionPageModule } from 'src/app/shared/publication/edit-action/edit-action.module';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -32,6 +33,7 @@ import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
|||||||
NewPublicationPageModule,
|
NewPublicationPageModule,
|
||||||
PublicationDetailPageModule,
|
PublicationDetailPageModule,
|
||||||
NewActionPageModule,
|
NewActionPageModule,
|
||||||
|
EditActionPageModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
PublicationsPage,
|
PublicationsPage,
|
||||||
|
|||||||
@@ -34,17 +34,19 @@
|
|||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
|
|
||||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||||
<div class="item d-flex"
|
<div class="item width-100 d-flex"
|
||||||
*ngFor="let viagem of publicationsTravelFolderList"
|
*ngFor="let viagem of publicationsTravelFolderList">
|
||||||
(click)="goToPublicationsList(viagem.ProcessId)">
|
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
|
||||||
<div class="item-icon">
|
<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 class="item-content">
|
<p class="item-content-date my-5">De {{viagem.DateBegin}} a {{viagem.DateEnd}}</p>
|
||||||
<p class="item-content-date my-5">De {{viagem.DateBegin}} a {{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>
|
<div (click)="openOptions(viagem.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||||
|
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item width-100 d-flex"
|
<div class="item width-100 d-flex"
|
||||||
*ngFor="let evento of publicationsEventFolderList"
|
*ngFor="let evento of publicationsEventFolderList"
|
||||||
@@ -52,12 +54,15 @@
|
|||||||
<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>
|
||||||
<div class="item-content">
|
<div class="item-content flex-grow-1">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<p class="item-content-date">{{evento.DateBegin}}</p>
|
<p class="item-content-date">{{evento.DateBegin}}</p>
|
||||||
<p class="item-content-title">{{evento.Description}}</p>
|
<p class="item-content-title">{{evento.Description}}</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</div>
|
</div>
|
||||||
|
<div (click)="openOptions(evento.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||||
|
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,7 +75,8 @@
|
|||||||
desktopComponent.showViewPublication == false &&
|
desktopComponent.showViewPublication == false &&
|
||||||
desktopComponent.showAddNewPublication == false &&
|
desktopComponent.showAddNewPublication == false &&
|
||||||
desktopComponent.showPublicationDetail == false &&
|
desktopComponent.showPublicationDetail == false &&
|
||||||
desktopComponent.showAddActions == false
|
desktopComponent.showAddActions == false &&
|
||||||
|
desktopComponent.showEditActions == false
|
||||||
)"><div>Nenhuma ação presidencial selecionada</div></div>
|
)"><div>Nenhuma ação presidencial selecionada</div></div>
|
||||||
|
|
||||||
<!-- View Publication -->
|
<!-- View Publication -->
|
||||||
@@ -116,6 +122,16 @@
|
|||||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||||
></app-new-action>
|
></app-new-action>
|
||||||
|
|
||||||
|
<app-edit-action
|
||||||
|
*ngIf="desktopComponent.showEditActions"
|
||||||
|
[folderId]="folderId"
|
||||||
|
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||||
|
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||||
|
(updateDesktopComponent)="updateDesktopComponent($event)"
|
||||||
|
>
|
||||||
|
</app-edit-action>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -104,44 +104,65 @@ ion-toolbar{
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
padding: 0 0px 0 0px !important;
|
padding: 0 0px 0 0px !important;
|
||||||
border-bottom: 1px solid #ebebeb;
|
border-bottom: 1px solid #ebebeb;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
.item-icon{
|
||||||
|
//margin-top: 28px;
|
||||||
|
width: 45px;
|
||||||
|
float: left;
|
||||||
|
font-size: 40px;
|
||||||
|
|
||||||
|
.item-icon ion-icon{
|
||||||
|
color: #061b52;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item-icon2{
|
||||||
|
//margin-top: 23px;
|
||||||
|
width: 45px;
|
||||||
|
float: left;
|
||||||
|
font-size: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-content{
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px 0 15px 10px;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
p{
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden !important;
|
||||||
|
text-overflow: ellipsis !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-content-date{
|
||||||
|
color: #797979;
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.item-content-title{
|
||||||
|
color: #0d89d1;
|
||||||
|
font-size: 15px;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.item-content-detail{
|
||||||
|
color: #000000;
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-options{
|
||||||
|
|
||||||
|
width: 25px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.item-icon{
|
|
||||||
margin-top: 28px;
|
|
||||||
width: 45px;
|
|
||||||
float: left;
|
|
||||||
font-size: 40px;
|
|
||||||
}
|
|
||||||
.item-icon2{
|
|
||||||
margin-top: 23px;
|
|
||||||
width: 45px;
|
|
||||||
float: left;
|
|
||||||
font-size: 40px;
|
|
||||||
}
|
|
||||||
.item-icon ion-icon{
|
|
||||||
color: #061b52;
|
|
||||||
}
|
|
||||||
.item-content{
|
|
||||||
float: left;
|
|
||||||
padding: 15px 0 15px 10px;
|
|
||||||
}
|
|
||||||
.item-content-date{
|
|
||||||
color: #797979;
|
|
||||||
font-size: 13px;
|
|
||||||
margin: 0 !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
.item-content-title{
|
|
||||||
color: #0d89d1;
|
|
||||||
font-size: 15px;
|
|
||||||
margin: 0 !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
.item-content-detail{
|
|
||||||
color: #000000;
|
|
||||||
font-size: 13px;
|
|
||||||
margin: 0 !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -154,4 +175,7 @@ ion-toolbar{
|
|||||||
.aside-left{
|
.aside-left{
|
||||||
width: 35%;
|
width: 35%;
|
||||||
}
|
}
|
||||||
|
.item-options{
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Router, NavigationEnd } from '@angular/router';
|
import { Router, NavigationEnd } from '@angular/router';
|
||||||
import { ModalController } from '@ionic/angular';
|
import { ModalController, PopoverController } from '@ionic/angular';
|
||||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
import { PublicationsService } from 'src/app/services/publications.service';
|
import { PublicationsService } from 'src/app/services/publications.service';
|
||||||
@@ -11,6 +11,7 @@ import { Animation, AnimationController } from '@ionic/angular';
|
|||||||
import { LoadingController } from '@ionic/angular';
|
import { LoadingController } from '@ionic/angular';
|
||||||
import { LoadingService } from 'src/app/services/loading.service';
|
import { LoadingService } from 'src/app/services/loading.service';
|
||||||
import { Publication } from 'src/app/models/publication';
|
import { Publication } from 'src/app/models/publication';
|
||||||
|
import { ActionsOptionsPage } from 'src/app/shared/popover/actions-options/actions-options.page';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -38,7 +39,8 @@ export class PublicationsPage implements OnInit {
|
|||||||
showViewPublication: false,
|
showViewPublication: false,
|
||||||
showAddNewPublication: false,
|
showAddNewPublication: false,
|
||||||
showPublicationDetail: false,
|
showPublicationDetail: false,
|
||||||
showAddActions: false
|
showAddActions: false,
|
||||||
|
showEditActions: false
|
||||||
}
|
}
|
||||||
|
|
||||||
folderId: string;
|
folderId: string;
|
||||||
@@ -56,6 +58,7 @@ export class PublicationsPage implements OnInit {
|
|||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
private loading: LoadingService,
|
private loading: LoadingService,
|
||||||
private publications: PublicationsService,
|
private publications: PublicationsService,
|
||||||
|
private popoverController:PopoverController,
|
||||||
) {
|
) {
|
||||||
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
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"];
|
this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||||
@@ -263,6 +266,10 @@ export class PublicationsPage implements OnInit {
|
|||||||
this.desktopComponent.showPublicationDetail = true;
|
this.desktopComponent.showPublicationDetail = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async updateDesktopComponent(e?:any){
|
||||||
|
this.getActions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
async closeDesktopComponent (xx?: any){
|
async closeDesktopComponent (xx?: any){
|
||||||
@@ -272,7 +279,52 @@ export class PublicationsPage implements OnInit {
|
|||||||
showAddNewPublication: false,
|
showAddNewPublication: false,
|
||||||
showPublicationDetail: false,
|
showPublicationDetail: false,
|
||||||
showAddActions: false,
|
showAddActions: false,
|
||||||
|
showEditActions: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async openOptions(id?: string) {
|
||||||
|
this.folderId = id;
|
||||||
|
const enterAnimation = (baseEl: any) => {
|
||||||
|
const backdropAnimation = this.animationController.create()
|
||||||
|
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||||
|
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||||
|
|
||||||
|
const wrapperAnimation = this.animationController.create()
|
||||||
|
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||||
|
.keyframes([
|
||||||
|
{ offset: 0, opacity: '1', right: '-100%' },
|
||||||
|
{ offset: 1, opacity: '1', right: '0px' }
|
||||||
|
]);
|
||||||
|
|
||||||
|
return this.animationController.create()
|
||||||
|
.addElement(baseEl)
|
||||||
|
.easing('ease-out')
|
||||||
|
.duration(500)
|
||||||
|
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||||
|
}
|
||||||
|
|
||||||
|
const leaveAnimation = (baseEl: any) => {
|
||||||
|
return enterAnimation(baseEl).direction('reverse');
|
||||||
|
}
|
||||||
|
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
enterAnimation,
|
||||||
|
leaveAnimation,
|
||||||
|
component: ActionsOptionsPage,
|
||||||
|
cssClass: 'model profile-modal search-submodal',
|
||||||
|
componentProps: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
//translucent: true
|
||||||
|
});
|
||||||
|
await modal.present();
|
||||||
|
modal.onDidDismiss().then(res =>{
|
||||||
|
if(res['data']=='edit'){
|
||||||
|
this.closeDesktopComponent();
|
||||||
|
this.desktopComponent.showEditActions = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getPublicationDetail(){
|
getPublicationDetail(){
|
||||||
this.publications.GetPublicationFolderById(this.folderId).subscribe(res=>{
|
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.item = res;
|
this.item = res;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ export class AuthService {
|
|||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.headers = new HttpHeaders();
|
this.headers = new HttpHeaders();
|
||||||
|
|
||||||
if (localStorage.getItem("user") != null) {
|
if (localStorage.getItem("user") != null) {
|
||||||
|
|||||||
@@ -41,55 +41,59 @@ export class EventsService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(this.loggeduser.Profile == 'MDGPR'){
|
if(this.loggeduser){
|
||||||
|
if(this.loggeduser.Profile == 'MDGPR'){
|
||||||
|
|
||||||
this.loggeduser.OwnerCalendars.forEach(calendar =>{
|
this.loggeduser.OwnerCalendars.forEach(calendar =>{
|
||||||
if(calendar.CalendarName == 'Oficial'){
|
if(calendar.CalendarName == 'Oficial'){
|
||||||
this.headersMdOficial = this.headersMdOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headersMdOficial = this.headersMdOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
this.headersMdOficial = this.headersMdOficial.set('CalendarId', calendar.CalendarId);
|
this.headersMdOficial = this.headersMdOficial.set('CalendarId', calendar.CalendarId);
|
||||||
this.headersMdOficial = this.headersMdOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
this.headersMdOficial = this.headersMdOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||||
}
|
}
|
||||||
else if(calendar.CalendarName == 'Pessoal'){
|
else if(calendar.CalendarName == 'Pessoal'){
|
||||||
this.headersMdPessoal = this.headersMdPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headersMdPessoal = this.headersMdPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
this.headersMdPessoal = this.headersMdPessoal.set('CalendarId', calendar.CalendarId);
|
this.headersMdPessoal = this.headersMdPessoal.set('CalendarId', calendar.CalendarId);
|
||||||
this.headersMdPessoal = this.headersMdPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
this.headersMdPessoal = this.headersMdPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.loggeduser.SharedCalendars.forEach(sharedCalendar =>{
|
this.loggeduser.SharedCalendars.forEach(sharedCalendar =>{
|
||||||
if(sharedCalendar.CalendarName == 'Oficial'){
|
if(sharedCalendar.CalendarName == 'Oficial'){
|
||||||
this.headersSharedOficial = this.headersSharedOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headersSharedOficial = this.headersSharedOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
this.headersSharedOficial = this.headersSharedOficial.set('CalendarId', sharedCalendar.CalendarId);
|
this.headersSharedOficial = this.headersSharedOficial.set('CalendarId', sharedCalendar.CalendarId);
|
||||||
this.headersSharedOficial = this.headersSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
this.headersSharedOficial = this.headersSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||||
}
|
}
|
||||||
else if(sharedCalendar.CalendarName == 'Pessoal'){
|
else if(sharedCalendar.CalendarName == 'Pessoal'){
|
||||||
this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarId', sharedCalendar.CalendarId);
|
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarId', sharedCalendar.CalendarId);
|
||||||
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(this.loggeduser.Profile == 'PR'){
|
else if(this.loggeduser.Profile == 'PR'){
|
||||||
|
|
||||||
this.loggeduser.OwnerCalendars.forEach(calendar =>{
|
this.loggeduser.OwnerCalendars.forEach(calendar =>{
|
||||||
if(calendar.CalendarName == 'Oficial'){
|
if(calendar.CalendarName == 'Oficial'){
|
||||||
this.headersPrOficial = this.headersPrOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headersPrOficial = this.headersPrOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
this.headersPrOficial = this.headersPrOficial.set('CalendarId', calendar.CalendarId);
|
this.headersPrOficial = this.headersPrOficial.set('CalendarId', calendar.CalendarId);
|
||||||
this.headersPrOficial = this.headersPrOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
this.headersPrOficial = this.headersPrOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||||
}
|
}
|
||||||
else if(calendar.CalendarName == 'Pessoal'){
|
else if(calendar.CalendarName == 'Pessoal'){
|
||||||
this.headersPrPessoal = this.headersPrPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headersPrPessoal = this.headersPrPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
this.headersPrPessoal = this.headersPrPessoal.set('CalendarId', calendar.CalendarId);
|
this.headersPrPessoal = this.headersPrPessoal.set('CalendarId', calendar.CalendarId);
|
||||||
this.headersPrPessoal = this.headersPrPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
this.headersPrPessoal = this.headersPrPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.headers = new HttpHeaders();
|
||||||
|
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.headers = new HttpHeaders();
|
|
||||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* getAllEvents(startdate:string, enddate:string): Observable<Event[]>{
|
/* getAllEvents(startdate:string, enddate:string): Observable<Event[]>{
|
||||||
@@ -245,9 +249,7 @@ export class EventsService {
|
|||||||
getEvent(eventid: string): Observable<Event>{
|
getEvent(eventid: string): Observable<Event>{
|
||||||
let geturl = environment.apiURL + 'calendar/GetEvent';
|
let geturl = environment.apiURL + 'calendar/GetEvent';
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
console.log(eventid);
|
|
||||||
|
|
||||||
|
|
||||||
params = params.set("EventId", eventid);
|
params = params.set("EventId", eventid);
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
|
|||||||
@@ -244,7 +244,6 @@ export class ProcessesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GetDocumentDetails(DocId:string, FsId:string){
|
GetDocumentDetails(DocId:string, FsId:string){
|
||||||
console.log(DocId);
|
|
||||||
|
|
||||||
const geturl = environment.apiURL + 'search/documents';
|
const geturl = environment.apiURL + 'search/documents';
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class PublicationsService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetPublicationFolderById(id:any){
|
GetPresidentialAction(id:any){
|
||||||
const geturl = environment.apiURL + 'presidentialActions/'+id;
|
const geturl = environment.apiURL + 'presidentialActions/'+id;
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
@@ -38,6 +38,15 @@ export class PublicationsService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdatePresidentialAction(body:any){
|
||||||
|
const geturl = environment.apiURL + 'presidentialActions';
|
||||||
|
|
||||||
|
let options = {
|
||||||
|
headers: this.headers,
|
||||||
|
};
|
||||||
|
return this.http.put<any>(`${geturl}`, body, options);
|
||||||
|
}
|
||||||
|
|
||||||
CreatePublicationFolder(body:any){
|
CreatePublicationFolder(body:any){
|
||||||
const geturl = environment.apiURL + 'presidentialActions';
|
const geturl = environment.apiURL + 'presidentialActions';
|
||||||
let options = {
|
let options = {
|
||||||
@@ -58,15 +67,11 @@ export class PublicationsService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
DeletePublicationFolderById(id:any){
|
DeletePresidentialAction(id:any){
|
||||||
const geturl = environment.apiURL + 'presidentialActions';
|
const geturl = environment.apiURL + 'presidentialActions/'+id;
|
||||||
let params = new HttpParams();
|
|
||||||
|
|
||||||
params = params.set("id", id);
|
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
params: params
|
|
||||||
};
|
};
|
||||||
return this.http.delete<any>(`${geturl}`, options);
|
return this.http.delete<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ export class ApproveEventPage implements OnInit {
|
|||||||
this.getTask();
|
this.getTask();
|
||||||
this.getAttachments();
|
this.getAttachments();
|
||||||
|
|
||||||
// console.log(this.showAside);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notImplemented() {
|
notImplemented() {
|
||||||
@@ -79,7 +78,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async approveTask(serialNumber:string){
|
async approveTask(serialNumber:string) {
|
||||||
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -101,8 +100,6 @@ export class ApproveEventPage implements OnInit {
|
|||||||
}); */
|
}); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async rejectTask(serialNumber:string) {
|
async rejectTask(serialNumber:string) {
|
||||||
|
|
||||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||||
@@ -117,13 +114,13 @@ export class ApproveEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAttachments(){
|
async getAttachments() {
|
||||||
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
|
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewDocument(sourceId){
|
viewDocument(sourceId) {
|
||||||
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{
|
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{
|
||||||
/* console.log(res); */
|
/* console.log(res); */
|
||||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||||
@@ -143,7 +140,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
return await popover.present();
|
return await popover.present();
|
||||||
}
|
}
|
||||||
|
|
||||||
async emendTask(serialNumber:string){
|
async emendTask(serialNumber:string) {
|
||||||
console.log('Desktop');
|
console.log('Desktop');
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
@@ -186,7 +183,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
//this.goBack();
|
//this.goBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
goToEventsToApprove(){
|
goToEventsToApprove() {
|
||||||
let navigationExtras: NavigationExtras = {
|
let navigationExtras: NavigationExtras = {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"eventos": true,
|
"eventos": true,
|
||||||
@@ -196,32 +193,10 @@ export class ApproveEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** @description edit event to aprove */
|
||||||
async editar(serialNumber: string) {
|
async editar(serialNumber: string) {
|
||||||
if(window.innerWidth > 800){
|
|
||||||
console.log('DESTOP');
|
this.EditApproveEventDismiss.emit();
|
||||||
|
|
||||||
this.EditApproveEventDismiss.emit();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
/* const modal = await this.modalController.create({
|
|
||||||
component: EditEventToApproveComponent,
|
|
||||||
componentProps: {
|
|
||||||
serialNumber: serialNumber,
|
|
||||||
InstanceId:this.InstanceId
|
|
||||||
},
|
|
||||||
cssClass: 'modal modal-desktop',
|
|
||||||
// backdropDismiss: false
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss().then(res => {
|
|
||||||
this.getTask();
|
|
||||||
this.getAttachments();
|
|
||||||
}); */
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,26 +13,43 @@
|
|||||||
</div>
|
</div>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
</div>
|
</div>
|
||||||
<ion-item-sliding class="overflow-y-auto">
|
<ion-item-sliding class="overflow-y-auto" >
|
||||||
<div class="px-20">
|
<div class="px-20">
|
||||||
<div class="ion-item-container width-100">
|
|
||||||
|
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||||
<ion-input placeholder="Assunto*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
|
<ion-input placeholder="Assunto*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('Subject').errors?.required">
|
||||||
|
Campo obrigatório.
|
||||||
|
</div>
|
||||||
|
<div *ngIf="Form.get('Subject').errors?.minlength">
|
||||||
|
O campo deve ter pelo menos 4 caracteres.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container-div width-100">
|
<div class="container-div width-100">
|
||||||
<div class="ion-item-class-2">
|
<div class="ion-item-class-2">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||||
<ion-input placeholder="Localização*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Location"></ion-input>
|
<ion-input placeholder="Localização*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Location"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Error messages -->
|
|
||||||
<!-- <span class="error ion-padding" >
|
|
||||||
Campo obrigatório
|
|
||||||
</span> -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('Location').errors?.required">
|
||||||
|
Campo obrigatório.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container-div width-100">
|
<div class="container-div width-100">
|
||||||
<div class="ion-item-class-2">
|
<div class="ion-item-class-2">
|
||||||
@@ -67,6 +84,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('participantes').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('participantes').errors?.required">
|
||||||
|
Adicionar participant.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container-div width-100">
|
<div class="container-div width-100">
|
||||||
<div class="ion-item-class-2 width-100">
|
<div class="ion-item-class-2 width-100">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { AlertController, ModalController } from '@ionic/angular';
|
import { AlertController, ModalController } from '@ionic/angular';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { Attachment } from 'src/app/models/attachment.model';
|
import { Attachment } from 'src/app/models/attachment.model';
|
||||||
@@ -11,6 +11,7 @@ import { EventsService } from 'src/app/services/events.service';
|
|||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||||
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||||
|
|
||||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
parse: {
|
parse: {
|
||||||
@@ -41,7 +42,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
public stepHour = 1;
|
public stepHour = 1;
|
||||||
public stepMinute = 5;
|
public stepMinute = 5;
|
||||||
public stepSecond = 5;
|
public stepSecond = 5;
|
||||||
|
|
||||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||||
|
|
||||||
@@ -59,8 +59,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
@ViewChild('fim') fim: any;
|
@ViewChild('fim') fim: any;
|
||||||
@ViewChild('inicio') inicio: any;
|
@ViewChild('inicio') inicio: any;
|
||||||
@ViewChild('picker1') picker1: any;
|
@ViewChild('picker1') picker1: any;
|
||||||
|
|
||||||
@Input() serialNumber: string
|
|
||||||
|
|
||||||
loadedAttachments: Attachment[]= []
|
loadedAttachments: Attachment[]= []
|
||||||
|
|
||||||
@@ -88,20 +86,18 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
show = false
|
show = false
|
||||||
isRecurring:string;
|
isRecurring:string;
|
||||||
isEventEdited: boolean;
|
isEventEdited: boolean;
|
||||||
segment:string = "true";
|
|
||||||
profile:string;
|
profile:string;
|
||||||
eventAttendees: EventPerson[];
|
eventAttendees: EventPerson[];
|
||||||
|
|
||||||
loadedEventAttachments: Attachment[];
|
loadedEventAttachments: Attachment[];
|
||||||
taskParticipants: any = [];
|
|
||||||
taskParticipantsCc: any = [];
|
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
Location = ''
|
|
||||||
|
|
||||||
showAttendees = false;
|
showAttendees = false;
|
||||||
|
|
||||||
InstanceId: string
|
InstanceId: string;
|
||||||
|
|
||||||
|
Form: FormGroup;
|
||||||
|
validateFrom = false
|
||||||
|
|
||||||
@Output() openAttendeesComponent = new EventEmitter<any>();
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
@Output() clearContact = new EventEmitter<any>();
|
@Output() clearContact = new EventEmitter<any>();
|
||||||
@@ -109,6 +105,11 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
@Output() setIntervenientCC = new EventEmitter<any>();
|
@Output() setIntervenientCC = new EventEmitter<any>();
|
||||||
@Output() closeComponent = new EventEmitter<any>();
|
@Output() closeComponent = new EventEmitter<any>();
|
||||||
|
|
||||||
|
@Input() saveData: any;
|
||||||
|
@Input() serialNumber: string
|
||||||
|
@Input() taskParticipants: EventPerson[];
|
||||||
|
@Input() taskParticipantsCc: EventPerson[];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private eventsService: EventsService,
|
private eventsService: EventsService,
|
||||||
@@ -117,64 +118,67 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
private processes:ProcessesService,
|
private processes:ProcessesService,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
/* this.serialNumber = this.navParams.get('serialNumber'); */
|
|
||||||
|
|
||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
if(!this.restoreTemporaryData()){
|
if(this.restoreTemporaryData()){
|
||||||
|
this.setOtherData()
|
||||||
} else {
|
} else {
|
||||||
alert('restore!!')
|
this.getTask();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getTask();
|
|
||||||
|
|
||||||
// console.log(this.serialNumber);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTask() {
|
async getTask() {
|
||||||
// console.log('this.eventProcess', this.eventProcess);
|
|
||||||
|
|
||||||
const result = await this.processes.GetTask(this.serialNumber).subscribe( result =>{
|
this.processes.GetTask(this.serialNumber).subscribe( result =>{
|
||||||
this.eventProcess = result
|
this.eventProcess = result
|
||||||
|
|
||||||
this.restoreDatepickerData()
|
this.restoreDatepickerData()
|
||||||
|
|
||||||
console.log(this.eventProcess.workflowInstanceDataFields.Subject)
|
|
||||||
|
|
||||||
// description
|
// description
|
||||||
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||||
this.Location = this.eventProcess.workflowInstanceDataFields.Location
|
|
||||||
|
|
||||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||||
this.getAttachments()
|
this.getAttachments()
|
||||||
|
|
||||||
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
|
this.setOtherData()
|
||||||
this.isRecurring = "Não se repete";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.isRecurring = "Repete";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.eventProcess.workflowInstanceDataFields.ParticipantsList) {
|
this.saveTemporaryData()
|
||||||
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
|
|
||||||
if(e.IsRequired) {
|
|
||||||
this.taskParticipants.push(e);
|
|
||||||
} else {
|
|
||||||
this.taskParticipantsCc.push(e);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setOtherData() {
|
||||||
|
if(this.eventProcess.workflowInstanceDataFields.ParticipantsList) {
|
||||||
|
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
|
||||||
|
if(e.IsRequired) {
|
||||||
|
this.taskParticipants.push(e);
|
||||||
|
} else {
|
||||||
|
this.taskParticipantsCc.push(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.taskParticipants = removeDuplicate(this.taskParticipants)
|
||||||
|
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc)
|
||||||
|
|
||||||
|
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
|
||||||
|
this.isRecurring = "Não se repete";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.isRecurring = "Repete";
|
||||||
|
}
|
||||||
|
|
||||||
|
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||||
|
|
||||||
|
this.getAttachments()
|
||||||
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
|
|
||||||
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
||||||
@@ -187,11 +191,52 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
//this.deleteTemporaryData();
|
//this.deleteTemporaryData();
|
||||||
}
|
}
|
||||||
|
|
||||||
save() {
|
|
||||||
|
runValidation() {
|
||||||
|
this.validateFrom = true
|
||||||
|
}
|
||||||
|
|
||||||
|
injectValidation() {
|
||||||
|
|
||||||
|
this.Form = new FormGroup({
|
||||||
|
Subject: new FormControl(this.eventProcess.workflowInstanceDataFields.Subject, [
|
||||||
|
Validators.required,
|
||||||
|
// Validators.minLength(4)
|
||||||
|
]),
|
||||||
|
Location: new FormControl(this.eventProcess.workflowInstanceDataFields.Location, [
|
||||||
|
Validators.required,
|
||||||
|
]),
|
||||||
|
//CalendarName: new FormControl(this.postEvent.CalendarName),
|
||||||
|
// Categories: new FormControl(this.postEvent.Categories[0], [
|
||||||
|
// Validators.required
|
||||||
|
// ]),
|
||||||
|
dateStart: new FormControl(this.dateStart, [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
dateEnd: new FormControl(this.dateEnd, [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
// IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||||
|
// Validators.required
|
||||||
|
// ]),
|
||||||
|
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
save() {
|
||||||
|
|
||||||
|
this.injectValidation()
|
||||||
|
this.runValidation()
|
||||||
|
|
||||||
|
if(this.Form.invalid) return false
|
||||||
|
|
||||||
// set dates to eventProcess object
|
// set dates to eventProcess object
|
||||||
this.getDatepickerData()
|
this.getDatepickerData()
|
||||||
|
|
||||||
this.taskParticipantsCc.forEach(e=>{
|
this.taskParticipantsCc.forEach( e => {
|
||||||
e.IsRequired = false
|
e.IsRequired = false
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -223,7 +268,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
ReviewUserComment: ''
|
ReviewUserComment: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(event);
|
|
||||||
|
|
||||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||||
this.toastService.successMessage('Evento editado');
|
this.toastService.successMessage('Evento editado');
|
||||||
@@ -231,7 +275,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
this.toastService.badRequest('Evento não editado');
|
this.toastService.badRequest('Evento não editado');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
this.loadedAttachments.forEach((document:any)=>{
|
this.loadedAttachments.forEach((document:any)=>{
|
||||||
if(document['action'] == 'add') {
|
if(document['action'] == 'add') {
|
||||||
delete document.action
|
delete document.action
|
||||||
@@ -251,7 +294,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -278,8 +320,8 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
|
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
|
||||||
this.taskParticipants = taskParticipants;
|
this.taskParticipants = removeDuplicate(taskParticipants) ;
|
||||||
this.taskParticipantsCc = taskParticipantsCc;
|
this.taskParticipantsCc = removeDuplicate(taskParticipantsCc) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -297,8 +339,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
|
|
||||||
async addParticipantsCC() {
|
async addParticipantsCC() {
|
||||||
|
|
||||||
//this.saveTemporaryData();
|
|
||||||
|
|
||||||
this.openAttendeesComponent.emit({
|
this.openAttendeesComponent.emit({
|
||||||
type: "CC"
|
type: "CC"
|
||||||
});
|
});
|
||||||
@@ -333,7 +373,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async getAttachments() {
|
async getAttachments() {
|
||||||
|
|
||||||
let result: any = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
|
let result: any = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
|
||||||
|
|||||||
@@ -13,15 +13,27 @@
|
|||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="ion-item-container">
|
|
||||||
|
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||||
<ion-input placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
<ion-input placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('Subject').errors?.required">
|
||||||
|
Campo obrigatório.
|
||||||
|
</div>
|
||||||
|
<div *ngIf="Form.get('Subject').errors?.minlength">
|
||||||
|
O campo deve ter pelo menos 4 caracteres.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
<div class="ion-item-class-2 width-100 d-flex">
|
<div class="ion-item-class-2 width-100 d-flex">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1">
|
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||||
<ion-input placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
<ion-input placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,8 +42,19 @@
|
|||||||
Campo obrigatório
|
Campo obrigatório
|
||||||
</span> -->
|
</span> -->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('Location').errors?.required">
|
||||||
|
Campo obrigatório.
|
||||||
|
</div>
|
||||||
|
<div *ngIf="Form.get('Location').errors?.minlength">
|
||||||
|
O campo deve ter pelo menos 4 caracteres.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
<div class="ion-item-class-2 width-100 d-flex">
|
<div class="ion-item-class-2 width-100 d-flex">
|
||||||
@@ -40,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1">
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
|
||||||
<mat-form-field floatLabel="never" class="width-100" >
|
<mat-form-field appearance="none" floatLabel="never" class="width-100 " >
|
||||||
<mat-select placeholder="Selecione agenda*" [(ngModel)]="postEvent.CalendarName" >
|
<mat-select placeholder="Selecione agenda*" [(ngModel)]="postEvent.CalendarName" >
|
||||||
<mat-option value="Oficial">
|
<mat-option value="Oficial">
|
||||||
Oficial
|
Oficial
|
||||||
@@ -62,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1">
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
|
||||||
<mat-form-field floatLabel="never" class="width-100" required>
|
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
||||||
<!-- <input matInput type="text" > -->
|
<!-- <input matInput type="text" > -->
|
||||||
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Categories[0]" >
|
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Categories[0]" >
|
||||||
<mat-option value="Reunião">
|
<mat-option value="Reunião">
|
||||||
@@ -91,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1">
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
|
||||||
<mat-form-field floatLabel="never" class="date-hour-picker">
|
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
|
||||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[formControl]="dateControlStart"
|
[formControl]="dateControlStart"
|
||||||
@@ -119,7 +142,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1">
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
|
||||||
<mat-form-field floatLabel="never" class="date-hour-picker">
|
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
|
||||||
<input matInput [ngxMatDatetimePicker]="fim"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[formControl]="dateControlEnd"
|
[formControl]="dateControlEnd"
|
||||||
@@ -147,7 +170,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1">
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
|
||||||
<mat-form-field floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
|
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
|
||||||
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postEvent.IsRecurring">
|
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postEvent.IsRecurring">
|
||||||
<mat-option value="false">
|
<mat-option value="false">
|
||||||
Não se repete
|
Não se repete
|
||||||
@@ -161,13 +184,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('participantes').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('participantes').errors?.required">
|
||||||
|
Adicionar participant.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class=" d-flex width-100">
|
<div class=" d-flex width-100">
|
||||||
<div class="ion-item-class-2 width-100">
|
<div class="ion-item-class-2 width-100">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class-no-height">
|
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom">
|
||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
@@ -190,7 +221,7 @@
|
|||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class-no-height">
|
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom">
|
||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
|
|||||||
@@ -201,4 +201,10 @@ ion-content{
|
|||||||
.close-button {
|
.close-button {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.materia-top {
|
||||||
|
padding-top: 7px;
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ import { SearchPage } from 'src/app/pages/search/search.page';
|
|||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||||
import { Attachment } from 'src/app/models/attachment.model';
|
import { Attachment } from 'src/app/models/attachment.model';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -20,7 +20,6 @@ import * as moment from 'moment';
|
|||||||
})
|
})
|
||||||
export class EditEventPage implements OnInit {
|
export class EditEventPage implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
stEvent: Event;
|
stEvent: Event;
|
||||||
isRecurring:string;
|
isRecurring:string;
|
||||||
isEventEdited: boolean;
|
isEventEdited: boolean;
|
||||||
@@ -44,6 +43,9 @@ export class EditEventPage implements OnInit {
|
|||||||
public stepMinute = 5;
|
public stepMinute = 5;
|
||||||
public stepSecond = 5;
|
public stepSecond = 5;
|
||||||
|
|
||||||
|
Form: FormGroup;
|
||||||
|
validateFrom = false
|
||||||
|
|
||||||
@Input() taskParticipants: EventPerson[];
|
@Input() taskParticipants: EventPerson[];
|
||||||
@Input() taskParticipantsCc: EventPerson[];
|
@Input() taskParticipantsCc: EventPerson[];
|
||||||
@Input() profile:string;
|
@Input() profile:string;
|
||||||
@@ -86,7 +88,6 @@ export class EditEventPage implements OnInit {
|
|||||||
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
||||||
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private eventsService: EventsService,
|
private eventsService: EventsService,
|
||||||
@@ -96,12 +97,11 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
|
||||||
if(!this.restoreTemporaryData()){
|
if(!this.restoreTemporaryData()) {
|
||||||
// clear
|
// clear
|
||||||
|
|
||||||
if(this.postEvent){
|
if(this.postEvent) {
|
||||||
if( this.postEvent.Body){
|
if( this.postEvent.Body){
|
||||||
if(typeof(this.postEvent.Body.Text) == 'string'){
|
if(typeof(this.postEvent.Body.Text) == 'string'){
|
||||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||||
@@ -128,7 +128,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
|
|
||||||
if(this.postEvent.IsRecurring == false){
|
if(this.postEvent.IsRecurring == false) {
|
||||||
this.isRecurring = "Não se repete";
|
this.isRecurring = "Não se repete";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -139,7 +139,6 @@ export class EditEventPage implements OnInit {
|
|||||||
this.getAttachments(this.postEvent.EventId);
|
this.getAttachments(this.postEvent.EventId);
|
||||||
|
|
||||||
this.restoreDatepickerData()
|
this.restoreDatepickerData()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
@@ -151,8 +150,49 @@ export class EditEventPage implements OnInit {
|
|||||||
this.deleteTemporaryData();
|
this.deleteTemporaryData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
runValidation() {
|
||||||
|
this.validateFrom = true
|
||||||
|
}
|
||||||
|
|
||||||
|
injectValidation() {
|
||||||
|
|
||||||
|
this.Form = new FormGroup({
|
||||||
|
Subject: new FormControl(this.postEvent.Subject, [
|
||||||
|
Validators.required,
|
||||||
|
// Validators.minLength(4)
|
||||||
|
]),
|
||||||
|
Location: new FormControl(this.postEvent.Location, [
|
||||||
|
Validators.required,
|
||||||
|
]),
|
||||||
|
CalendarName: new FormControl(this.postEvent.CalendarName),
|
||||||
|
Categories: new FormControl(this.postEvent.Categories[0], [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
dateStart: new FormControl(this.dateStart, [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
dateEnd: new FormControl(this.dateEnd, [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
|
|
||||||
|
this.injectValidation()
|
||||||
|
this.runValidation()
|
||||||
|
|
||||||
|
if(this.Form.invalid) return false
|
||||||
|
|
||||||
this.getDatepickerData()
|
this.getDatepickerData()
|
||||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||||
|
|
||||||
@@ -190,7 +230,6 @@ export class EditEventPage implements OnInit {
|
|||||||
this.clearContact.emit();
|
this.clearContact.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async addParticipantsCc() {
|
async addParticipantsCc() {
|
||||||
|
|
||||||
this.saveTemporaryData();
|
this.saveTemporaryData();
|
||||||
@@ -245,7 +284,6 @@ export class EditEventPage implements OnInit {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteTemporaryData(){
|
deleteTemporaryData(){
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ export class EventListPage implements OnInit {
|
|||||||
// [desktop] event list to approve
|
// [desktop] event list to approve
|
||||||
|
|
||||||
showLoader: boolean;
|
showLoader: boolean;
|
||||||
eventsPRList: any;
|
eventsPRList: any = []
|
||||||
eventsMDGPRList: any;
|
eventsMDGPRList: any = []
|
||||||
eventPerson: EventPerson;
|
eventPerson: EventPerson;
|
||||||
eventBody: EventBody;
|
eventBody: EventBody;
|
||||||
categories: string[];
|
categories: string[];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
|
|
||||||
<div class="ion-item-container" [className]="Form?.get('Subject')?.invalid && validateFrom ? 'input-error ion-item-container' : 'ion-item-container' ">
|
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||||
<ion-input type="text" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
<ion-input type="text" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -35,23 +35,23 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ion-input-class flex-grow-1 width-100" [className]="Form?.get('Subject')?.invalid && validateFrom ? 'input-error ion-input-class flex-grow-1 width-100' : 'ion-input-class flex-grow-1 width-100' " >
|
<div class="ion-input-class flex-grow-1 width-100" [class.input-error]="Form?.get('Location')?.invalid && validateFrom " >
|
||||||
<ion-input type="text" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
<ion-input type="text" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="Form && validateFrom" >
|
<div *ngIf="Form && validateFrom" >
|
||||||
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
|
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
|
||||||
<div *ngIf="Form.get('Location').errors?.required">
|
<div *ngIf="Form.get('Location').errors?.required">
|
||||||
Campo obrigatório.
|
Campo obrigatório.
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="Form.get('Location').errors?.minlength">
|
<div *ngIf="Form.get('Location').errors?.minlength">
|
||||||
O campo deve ter pelo menos 4 caracteres.
|
O campo deve ter pelo menos 4 caracteres.
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
<div class="ion-item-class-2 d-flex">
|
<div class="ion-item-class-2 d-flex">
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
<input matInput [ngxMatDatetimePicker]="fim"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[formControl]="dateControlEnd"
|
[formControl]="dateControlEnd"
|
||||||
[min]="minDate" [max]="maxDate"
|
[min]="endMinDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
>
|
>
|
||||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||||
@@ -190,12 +190,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('participantes').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('participantes').errors?.required">
|
||||||
|
Adicionar participant.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
<div class="ion-item-class-2 d-flex">
|
<div class="ion-item-class-2 d-flex">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class-no-height flex-grow-1">
|
<div class="ion-input-class-no-height flex-grow-1" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom">
|
||||||
|
|
||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
@@ -218,7 +226,7 @@
|
|||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class-no-height flex-grow-1">
|
<div class="ion-input-class-no-height flex-grow-1" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom">
|
||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
|
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
|
|||||||
@@ -214,4 +214,5 @@
|
|||||||
|
|
||||||
.materia-top {
|
.materia-top {
|
||||||
padding-top: 7px;
|
padding-top: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export class NewEventPage implements OnInit {
|
|||||||
public touchUi = false;
|
public touchUi = false;
|
||||||
public enableMeridian = false;
|
public enableMeridian = false;
|
||||||
public minDate = new Date();
|
public minDate = new Date();
|
||||||
public maxDate = '';
|
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||||
public stepHour = 1;
|
public stepHour = 1;
|
||||||
public stepMinute = 5;
|
public stepMinute = 5;
|
||||||
public stepSecond = 5;
|
public stepSecond = 5;
|
||||||
@@ -94,7 +94,7 @@ export class NewEventPage implements OnInit {
|
|||||||
@ViewChild('inicio') inicio: any;
|
@ViewChild('inicio') inicio: any;
|
||||||
@ViewChild('picker1') picker1: any;
|
@ViewChild('picker1') picker1: any;
|
||||||
|
|
||||||
Form: any = {}
|
Form: FormGroup;
|
||||||
validateFrom = false
|
validateFrom = false
|
||||||
|
|
||||||
|
|
||||||
@@ -125,11 +125,8 @@ export class NewEventPage implements OnInit {
|
|||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private eventService: EventsService,
|
private eventService: EventsService,
|
||||||
private attachmentsService: AttachmentsService,
|
private attachmentsService: AttachmentsService,
|
||||||
private animationController: AnimationController,
|
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private userService: AuthService,
|
private userService: AuthService,
|
||||||
private http: HttpClient,
|
|
||||||
private zone: NgZone,
|
|
||||||
private dateAdapter: DateAdapter<any>,
|
private dateAdapter: DateAdapter<any>,
|
||||||
// private translate: TranslateService
|
// private translate: TranslateService
|
||||||
) {
|
) {
|
||||||
@@ -212,7 +209,6 @@ export class NewEventPage implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.taskParticipants = removeDuplicate(this.taskParticipants);
|
this.taskParticipants = removeDuplicate(this.taskParticipants);
|
||||||
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||||
|
|
||||||
@@ -237,7 +233,7 @@ export class NewEventPage implements OnInit {
|
|||||||
this.Form = new FormGroup({
|
this.Form = new FormGroup({
|
||||||
Subject: new FormControl(this.postEvent.Subject, [
|
Subject: new FormControl(this.postEvent.Subject, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
Validators.minLength(4)
|
// Validators.minLength(4)
|
||||||
]),
|
]),
|
||||||
Location: new FormControl(this.postEvent.Location, [
|
Location: new FormControl(this.postEvent.Location, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
@@ -255,16 +251,13 @@ export class NewEventPage implements OnInit {
|
|||||||
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
participantes: new FormControl(this.participantes, [
|
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
get participantes() {
|
|
||||||
return this.taskParticipantsCc.concat(this.taskParticipants)
|
|
||||||
}
|
|
||||||
|
|
||||||
openInicio() {
|
openInicio() {
|
||||||
let input: any = document.querySelector('#new-inicio')
|
let input: any = document.querySelector('#new-inicio')
|
||||||
@@ -327,10 +320,10 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
|
|
||||||
|
this.injectValidation()
|
||||||
this.runValidation()
|
this.runValidation()
|
||||||
|
|
||||||
// dont runt this function
|
if(this.Form.invalid) return false
|
||||||
// if (!this.Form.valid) return false
|
|
||||||
|
|
||||||
this.getDatepickerData()
|
this.getDatepickerData()
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { ModalController } from '@ionic/angular';
|
|||||||
import { ContactsService } from 'src/app/services/contacts.service';
|
import { ContactsService } from 'src/app/services/contacts.service';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-attendee-modal',
|
selector: 'app-attendee-modal',
|
||||||
templateUrl: './attendee-modal.page.html',
|
templateUrl: './attendee-modal.page.html',
|
||||||
@@ -35,16 +36,14 @@ export class AttendeePage implements OnInit {
|
|||||||
private modalCtrl: ModalController,
|
private modalCtrl: ModalController,
|
||||||
private contactsService: ContactsService ) {
|
private contactsService: ContactsService ) {
|
||||||
|
|
||||||
this.LtaskParticipants = this.taskParticipants;
|
this.LtaskParticipants = removeDuplicate(this.taskParticipants);
|
||||||
this.LtaskParticipantsCc = this.taskParticipantsCc;
|
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(){
|
ngOnChanges(){
|
||||||
this.LtaskParticipants = this.taskParticipants;
|
this.LtaskParticipants = removeDuplicate(this.taskParticipants);
|
||||||
this.LtaskParticipantsCc = this.taskParticipantsCc;
|
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
currentPath = window.location.pathname;
|
currentPath = window.location.pathname;
|
||||||
@Input() adding: "intervenient" | "CC";
|
@Input() adding: "intervenient" | "CC";
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
) {
|
) {
|
||||||
|
// Edit event to approve
|
||||||
this.serialNumber = this.navParams.get('serialNumber');
|
this.serialNumber = this.navParams.get('serialNumber');
|
||||||
|
|
||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
<ion-icon class="icon" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon> <div>Perfil</div>
|
<ion-icon class="icon" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon> <div>Perfil</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex " (click)="close()">
|
<!-- <div class="d-flex " (click)="close()">
|
||||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div >
|
<div >
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<div class="email">{{loggeduser.Email}}</div>
|
<div class="email">{{loggeduser.Email}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="login-preference">
|
<div class="login-preference" (mouseover)="checkState()" (click)="checkState()">
|
||||||
<div class="preference">Preferência Login</div>
|
<div class="preference">Preferência Login</div>
|
||||||
|
|
||||||
<ion-row>
|
<ion-row>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
||||||
<ion-footer class=" footer-container ion-no-border bg-blue">
|
<!-- <ion-footer class=" footer-container ion-no-border bg-blue">
|
||||||
|
|
||||||
<div class="d-flex justify-space-between">
|
<div class="d-flex justify-space-between">
|
||||||
|
|
||||||
@@ -80,4 +80,4 @@
|
|||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ion-footer>
|
</ion-footer> -->
|
||||||
@@ -14,6 +14,7 @@ import { PinPage } from 'src/app/shared/pin/pin.page';
|
|||||||
export class ProfileComponent implements OnInit {
|
export class ProfileComponent implements OnInit {
|
||||||
|
|
||||||
loggeduser: User;
|
loggeduser: User;
|
||||||
|
userLoginPreference: boolean
|
||||||
|
|
||||||
constructor(private modalController:ModalController,
|
constructor(private modalController:ModalController,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
@@ -23,6 +24,8 @@ export class ProfileComponent implements OnInit {
|
|||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
|
|
||||||
console.log(this.loggeduser.RoleDescription)
|
console.log(this.loggeduser.RoleDescription)
|
||||||
|
|
||||||
|
this.checkState()
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
@@ -130,15 +133,14 @@ export class ProfileComponent implements OnInit {
|
|||||||
localStorage.setItem('UserData', JSON.stringify(userData) )
|
localStorage.setItem('UserData', JSON.stringify(userData) )
|
||||||
}
|
}
|
||||||
|
|
||||||
get userLoginPreference() {
|
checkState() {
|
||||||
|
|
||||||
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||||
|
|
||||||
if (userData.hasOwnProperty('loginPreference')) {
|
if (userData.hasOwnProperty('loginPreference')) {
|
||||||
console.log( userData.loginPreference)
|
this.userLoginPreference = userData.loginPreference
|
||||||
return userData.loginPreference
|
|
||||||
} else {
|
} else {
|
||||||
return false
|
this.userLoginPreference = false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { ActionsOptionsPage } from './actions-options.page';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: ActionsOptionsPage
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class ActionsOptionsPageRoutingModule {}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { ActionsOptionsPageRoutingModule } from './actions-options-routing.module';
|
||||||
|
|
||||||
|
import { ActionsOptionsPage } from './actions-options.page';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
IonicModule,
|
||||||
|
ActionsOptionsPageRoutingModule
|
||||||
|
],
|
||||||
|
declarations: [ActionsOptionsPage]
|
||||||
|
})
|
||||||
|
export class ActionsOptionsPageModule {}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<ion-content class="container">
|
||||||
|
<div class="arrow-right" (click)="close()">
|
||||||
|
<button class="btn-no-color">
|
||||||
|
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="buttons">
|
||||||
|
<button (click)="editAction()" class="btn-cancel" shape="round" >Editar</button>
|
||||||
|
<div class="solid"></div>
|
||||||
|
<button (click)="deleteAction()" class="btn-delete" shape="round" >Eliminar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
.container{
|
||||||
|
--padding-top:20px !important;
|
||||||
|
--padding-bottom:20px !important;
|
||||||
|
--padding-start:20px !important;
|
||||||
|
--padding-end:20px !important;
|
||||||
|
}
|
||||||
|
.arrow-right {
|
||||||
|
display: none;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.arrow-right-icon {
|
||||||
|
width: 37px;
|
||||||
|
float: right;
|
||||||
|
font-size: 35px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.buttons {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
.solid {
|
||||||
|
display: none;
|
||||||
|
width: 90%;
|
||||||
|
border-top: 1px solid #bbb;
|
||||||
|
margin: 0 auto !important;
|
||||||
|
}
|
||||||
|
.btn-ok, .btn-cancel{
|
||||||
|
//width: 50% !important;
|
||||||
|
margin-bottom: 5px !important;
|
||||||
|
margin-top: 5px !important;
|
||||||
|
}
|
||||||
|
.btn-cancel:hover, .btn-delete:hover{
|
||||||
|
color: #ffffff !important;
|
||||||
|
background-color: #42b9fe;
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 800px) {
|
||||||
|
.btn-ok, .btn-cancel, .btn-delete{
|
||||||
|
width: 47% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (min-width: 1024px) {
|
||||||
|
.arrow-right{
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
.btn-cancel{
|
||||||
|
width: 100% !important;
|
||||||
|
margin-bottom: 10px !important;
|
||||||
|
}
|
||||||
|
.btn-delete, .btn-ok{
|
||||||
|
width: 100% !important;
|
||||||
|
margin-bottom: 10px !important;
|
||||||
|
margin-top: 10px !important;
|
||||||
|
}
|
||||||
|
.solid{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { ActionsOptionsPage } from './actions-options.page';
|
||||||
|
|
||||||
|
describe('ActionsOptionsPage', () => {
|
||||||
|
let component: ActionsOptionsPage;
|
||||||
|
let fixture: ComponentFixture<ActionsOptionsPage>;
|
||||||
|
|
||||||
|
beforeEach(waitForAsync(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ActionsOptionsPage ],
|
||||||
|
imports: [IonicModule.forRoot()]
|
||||||
|
}).compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(ActionsOptionsPage);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { ModalController, NavParams } from '@ionic/angular';
|
||||||
|
import { PublicationsService } from 'src/app/services/publications.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-actions-options',
|
||||||
|
templateUrl: './actions-options.page.html',
|
||||||
|
styleUrls: ['./actions-options.page.scss'],
|
||||||
|
})
|
||||||
|
export class ActionsOptionsPage implements OnInit {
|
||||||
|
|
||||||
|
id:string;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private modalController: ModalController,
|
||||||
|
private navParams: NavParams,
|
||||||
|
private publicationsService: PublicationsService,
|
||||||
|
) {
|
||||||
|
this.id = this.navParams.get('id');
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
close () {
|
||||||
|
this.modalController.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
editAction(){
|
||||||
|
this.modalController.dismiss('edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteAction(){
|
||||||
|
this.publicationsService.DeletePresidentialAction(this.id).toPromise();
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
|
||||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
||||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||||
import { formatDate } from '@angular/common';
|
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||||
import { AnimationController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
|
||||||
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
|
||||||
import { momentG } from 'src/plugin/momentG'
|
|
||||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
|
||||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
|
||||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
|
||||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
@@ -30,46 +20,27 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
task: any;
|
task: any;
|
||||||
fulltask: any;
|
fulltask: any;
|
||||||
serialnumber: string;
|
serialnumber: string;
|
||||||
profile: string
|
|
||||||
|
|
||||||
constructor(private activateRoute: ActivatedRoute,
|
constructor(private activateRoute: ActivatedRoute,
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
private iab: InAppBrowser,
|
|
||||||
private attachmentsService: AttachmentsService,
|
|
||||||
private events: EventsService,
|
|
||||||
private menu: MenuController,
|
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private alertService: AlertService,
|
|
||||||
public popoverController: PopoverController,
|
public popoverController: PopoverController,
|
||||||
private activatedRoute: ActivatedRoute,
|
|
||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
private toastService: ToastService) {
|
private toastService: ToastService) {
|
||||||
|
|
||||||
this.task = this.navParams.get('task')
|
this.task = this.navParams.get('task')
|
||||||
this.fulltask = this.navParams.get('fulltask')
|
this.fulltask = this.navParams.get('fulltask')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.profile = "mdgpr";
|
|
||||||
|
|
||||||
this.activatedRoute.queryParams.subscribe(params => {
|
|
||||||
if(params["serialNumber"]) {
|
|
||||||
this.serialnumber = params["serialNumber"];
|
|
||||||
console.log(params["serialNumber"]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close () {
|
close () {
|
||||||
this.goBack()
|
this.goBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async openTaskProcessModal(taskAction: any, task: any) {
|
||||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
|
||||||
this.popoverController.dismiss();
|
this.popoverController.dismiss();
|
||||||
let classs;
|
let classs;
|
||||||
if( window.innerWidth <= 800){
|
if( window.innerWidth <= 800){
|
||||||
@@ -82,25 +53,18 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
taskAction: taskAction,
|
taskAction: taskAction,
|
||||||
task: task,
|
task: task,
|
||||||
profile: this.profile,
|
|
||||||
},
|
},
|
||||||
cssClass: classs,
|
cssClass: classs,
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(res=>{
|
modal.onDidDismiss().then(res=>{
|
||||||
console.log(res['data']);
|
this.goBack();
|
||||||
if(res['data']=='openDiscart'){
|
|
||||||
console.log('open discart');
|
|
||||||
|
|
||||||
this.distartExpedientModal();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
sendExpedienteToPending(){
|
sendExpedienteToPending(){
|
||||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
this.popoverController.dismiss();
|
||||||
|
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.close();
|
this.close();
|
||||||
});
|
});
|
||||||
@@ -124,11 +88,7 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
modal.onDidDismiss().then(res=>{
|
modal.onDidDismiss().then(res=>{
|
||||||
if(res['data']=='close'){
|
if(res['data']=='close'){
|
||||||
this.close();
|
this.close();
|
||||||
/* console.log('2Expedient Discard closed2');
|
|
||||||
this.close();
|
|
||||||
this.openMenu(); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,6 +114,7 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openDelegarModal(task: any) {
|
async openDelegarModal(task: any) {
|
||||||
|
this.popoverController.dismiss();
|
||||||
let classs;
|
let classs;
|
||||||
if( window.innerWidth <= 800){
|
if( window.innerWidth <= 800){
|
||||||
classs = 'book-meeting-modal modal modal-desktop'
|
classs = 'book-meeting-modal modal modal-desktop'
|
||||||
@@ -169,7 +130,9 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss();
|
modal.onDidDismiss().then(res=>{
|
||||||
|
this.goBack();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async generateDiploma(note:string, documents:any){
|
async generateDiploma(note:string, documents:any){
|
||||||
@@ -310,18 +273,8 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
|
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||||
let navigationExtras: NavigationExtras = {
|
|
||||||
queryParams: {
|
|
||||||
// "despachospr": true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos'], navigationExtras);
|
|
||||||
|
|
||||||
// window.history.back()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button>
|
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button>
|
||||||
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="distartExpedientModal(fulltask)" class="btn-cancel" shape="round" >Descartar</button>
|
<button (click)="distartExpedientModal('descartar')" full class="btn-ok" shape="round" >Descartar</button>
|
||||||
<div hidden class="solid"></div>
|
<div hidden class="solid"></div>
|
||||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="loggeduser.Profile =='PR' " class="buttons">
|
<div *ngIf="loggeduser.Profile =='PR' " class="buttons">
|
||||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Marcar para Despacho</button>
|
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Marcar para Despacho</button>
|
||||||
<button (click)="distartExpedientModal(fulltask)" class="btn-cancel" shape="round" >Descartar</button>
|
<button (click)="distartExpedientModal('descartar')" full class="btn-ok" shape="round" >Descartar</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
serialnumber: string;
|
serialnumber: string;
|
||||||
profile: string;
|
profile: string;
|
||||||
|
|
||||||
|
showEnviarPendentes = false;
|
||||||
|
|
||||||
loggeduser: User;
|
loggeduser: User;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -53,18 +55,21 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
this.fulltask = this.navParams.get('fulltask');
|
this.fulltask = this.navParams.get('fulltask');
|
||||||
|
|
||||||
this.loggeduser = userAuth.ValidatedUser;
|
this.loggeduser = userAuth.ValidatedUser;
|
||||||
this.activatedRoute.queryParams.subscribe(params => {
|
if(this.task.Status != 'Pending'){
|
||||||
if(params["serialNumber"]) {
|
this.showEnviarPendentes = true;
|
||||||
this.serialnumber = params["serialNumber"];
|
}
|
||||||
console.log(params["serialNumber"]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.profile = "mdgpr";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
close(){
|
||||||
|
if( window.innerWidth <= 1024){
|
||||||
|
this.popoverController.dismiss();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.modalController.dismiss();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async openAddNoteModal(actionName:string) {
|
async openAddNoteModal(actionName:string) {
|
||||||
@@ -112,6 +117,7 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async approve(note:string, documents:any){
|
async approve(note:string, documents:any){
|
||||||
|
this.popoverController.dismiss();
|
||||||
let body = {
|
let body = {
|
||||||
"serialNumber": this.serialnumber,
|
"serialNumber": this.serialnumber,
|
||||||
"action": "Aprovar",
|
"action": "Aprovar",
|
||||||
@@ -131,15 +137,11 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async distartExpedientModal(body:any) {
|
async distartExpedientModal(body:any){
|
||||||
this.popoverController.dismiss();
|
this.popoverController.dismiss();
|
||||||
console.log(this.fulltask);
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: DiscartExpedientModalPage,
|
component: DiscartExpedientModalPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
serialNumber: this.fulltask.serialNumber,
|
|
||||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
|
||||||
action: 'complete',
|
|
||||||
},
|
},
|
||||||
cssClass: 'discart-expedient-modal',
|
cssClass: 'discart-expedient-modal',
|
||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
@@ -148,42 +150,53 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then( async (res)=>{
|
modal.onDidDismiss().then( async (res)=>{
|
||||||
console.log(res['data']);
|
console.log(res['data']);
|
||||||
if(res['data']== 'Yes'){
|
|
||||||
|
|
||||||
try {
|
if(body == 'descartar'){
|
||||||
await this.processes.CompleteTask(body).toPromise()
|
if(res['data']== 'Yes'){
|
||||||
this.toastService.successMessage()
|
let otherbody = {
|
||||||
this.goBack();
|
"serialNumber": this.task.SerialNumber,
|
||||||
|
"action": "Passivo",
|
||||||
|
"ActionTypeId": 99999877,
|
||||||
|
"dataFields": {
|
||||||
|
"Note": "",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.processes.CompleteTask(otherbody).toPromise()
|
||||||
|
this.toastService.successMessage('Processo descartado');
|
||||||
|
this.goBack();
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
this.toastService.badRequest()
|
|
||||||
}
|
}
|
||||||
|
else if(res['data'] == 'No'){
|
||||||
|
//Do nothing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(res['data'] == 'No'){
|
else{
|
||||||
let otherbody = {
|
if(res['data']== 'Yes'){
|
||||||
"serialNumber": body.serialNumber,
|
try {
|
||||||
"action": "Passivo",
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
"ActionTypeId": 99999877,
|
this.toastService.successMessage('Processo descartado');
|
||||||
"dataFields": {
|
this.goBack();
|
||||||
"Note": "",
|
} catch (error) {
|
||||||
|
this.toastService.badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
|
this.goBack();
|
||||||
|
}
|
||||||
|
else if(res['data'] == 'No'){
|
||||||
|
console.log('Update');
|
||||||
|
try {
|
||||||
|
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||||
|
this.toastService.successMessage();
|
||||||
|
this.goBack();
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
await this.processes.CompleteTask(otherbody).toPromise()
|
|
||||||
this.toastService.successMessage()
|
|
||||||
} catch (error) {
|
|
||||||
this.toastService.badRequest()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//Volta na lista principal
|
|
||||||
this.goBack();
|
|
||||||
this.modalController.dismiss();
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,6 +222,7 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendExpedienteToPending(){
|
sendExpedienteToPending(){
|
||||||
|
this.popoverController.dismiss();
|
||||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.close();
|
this.close();
|
||||||
@@ -270,16 +284,6 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
modal.onDidDismiss();
|
modal.onDidDismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
close() {
|
|
||||||
if( window.innerWidth <= 1024) {
|
|
||||||
this.popoverController.dismiss();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
this.modalController.dismiss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
let navigationExtras: NavigationExtras = {
|
let navigationExtras: NavigationExtras = {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<button (click)="openExpedientActionsModal('1',fulltask)" full class="btn-ok" shape="round" >Pedido de Parecer</button>
|
<button (click)="openExpedientActionsModal('1',fulltask)" full class="btn-ok" shape="round" >Pedido de Parecer</button>
|
||||||
<button (click)="openExpedientActionsModal('2',fulltask)" full class="btn-ok" shape="round" >Pedido de Deferimento</button>
|
<button (click)="openExpedientActionsModal('2',fulltask)" full class="btn-ok" shape="round" >Pedido de Deferimento</button>
|
||||||
<button (click)="openBookMeetingModal()" full class="btn-ok" shape="round" >Marcar reunião</button>
|
<button (click)="openBookMeetingModal()" full class="btn-ok" shape="round" >Marcar reunião</button>
|
||||||
<button (click)="distartExpedientModal()" full class="btn-ok" shape="round" >Descartar</button>
|
<button (click)="distartExpedientModal('descartar')" full class="btn-ok" shape="round" >Descartar</button>
|
||||||
<button (click)="sendExpedienteToPending()" full class="btn-ok" shape="round" *ngIf="showEnviarPendentes" >Enviar para pendentes</button>
|
<button (click)="sendExpedienteToPending()" full class="btn-ok" shape="round" *ngIf="showEnviarPendentes" >Enviar para pendentes</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-opts-expediente',
|
selector: 'app-opts-expediente',
|
||||||
@@ -14,6 +16,7 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
task:any;
|
task:any;
|
||||||
fulltask: any;
|
fulltask: any;
|
||||||
profile:string;
|
profile:string;
|
||||||
|
caller:string;
|
||||||
|
|
||||||
showEnviarPendentes = false
|
showEnviarPendentes = false
|
||||||
|
|
||||||
@@ -22,20 +25,19 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
|
private toastService: ToastService,
|
||||||
|
private router: Router,
|
||||||
|
private activatedRoute: ActivatedRoute,
|
||||||
) {
|
) {
|
||||||
this.task = this.navParams.get('task');
|
this.task = this.navParams.get('task');
|
||||||
this.fulltask = this.navParams.get('fulltask');
|
this.fulltask = this.navParams.get('fulltask');
|
||||||
|
|
||||||
this.showEnviarPendentes = this.navParams.get('showEnviarPendentes');
|
if(this.task.Status != 'Pending'){
|
||||||
|
this.showEnviarPendentes = true;
|
||||||
if(!this.showEnviarPendentes) this.showEnviarPendentes = false
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.task);
|
|
||||||
this.profile = "mdgpr";
|
|
||||||
|
|
||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
if( window.innerWidth >= 800){
|
if( window.innerWidth >= 800){
|
||||||
this.popoverController.dismiss();
|
this.popoverController.dismiss();
|
||||||
@@ -52,10 +54,50 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
goBack() {
|
||||||
|
if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||||
|
if (window.innerWidth <= 800) {
|
||||||
|
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let navigationExtras: NavigationExtras = {
|
||||||
|
queryParams: {
|
||||||
|
"pendentes": true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
|
switch (params["params"].caller) {
|
||||||
|
case 'events':
|
||||||
|
this.router.navigate(['/home',params["params"].caller]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'gabinete-digital':
|
||||||
|
let navigationExtras: NavigationExtras = {
|
||||||
|
queryParams: {
|
||||||
|
"expedientes": true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( window.innerWidth < 801) {
|
||||||
|
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||||
|
} else {
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sendExpedienteToPending() {
|
sendExpedienteToPending() {
|
||||||
|
this.close();
|
||||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||||
console.log(res);
|
this.goBack();
|
||||||
this.close();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,45 +134,82 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
taskAction: taskAction,
|
taskAction: taskAction,
|
||||||
task: task,
|
task: task,
|
||||||
profile: this.profile,
|
|
||||||
},
|
},
|
||||||
cssClass: classs,
|
cssClass: classs,
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(res=>{
|
modal.onDidDismiss().then(res=>{
|
||||||
console.log(res['data']);
|
console.log(res['data']);
|
||||||
if(res['data']=='openDiscart'){
|
let body = res['data'];
|
||||||
console.log('open discart');
|
if(res['data']){
|
||||||
|
console.log('open discart')
|
||||||
this.distartExpedientModal();
|
this.distartExpedientModal(body);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log('Not open');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async distartExpedientModal(){
|
async distartExpedientModal(body:any){
|
||||||
this.close();
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: DiscartExpedientModalPage,
|
component: DiscartExpedientModalPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
serialNumber: this.fulltask.serialNumber,
|
|
||||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
|
||||||
action: 'complete',
|
|
||||||
},
|
},
|
||||||
cssClass: 'discart-expedient-modal',
|
cssClass: 'discart-expedient-modal',
|
||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
});
|
});
|
||||||
|
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(res=>{
|
modal.onDidDismiss().then( async (res)=>{
|
||||||
if(res['data']=='close'){
|
console.log(res['data']);
|
||||||
this.close();
|
|
||||||
/* console.log('2Expedient Discard closed2');
|
if(body == 'descartar'){
|
||||||
this.close();
|
if(res['data']== 'Yes'){
|
||||||
this.openMenu(); */
|
let otherbody = {
|
||||||
|
"serialNumber": this.task.SerialNumber,
|
||||||
|
"action": "Passivo",
|
||||||
|
"ActionTypeId": 99999877,
|
||||||
|
"dataFields": {
|
||||||
|
"Note": "",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.processes.CompleteTask(otherbody).toPromise()
|
||||||
|
this.toastService.successMessage('Processo descartado');
|
||||||
|
this.goBack();
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(res['data'] == 'No'){
|
||||||
|
//Do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(res['data']== 'Yes'){
|
||||||
|
try {
|
||||||
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
|
this.toastService.successMessage('Processo descartado');
|
||||||
|
this.goBack();
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
|
this.goBack();
|
||||||
|
}
|
||||||
|
else if(res['data'] == 'No'){
|
||||||
|
console.log('Update');
|
||||||
|
try {
|
||||||
|
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||||
|
this.toastService.successMessage();
|
||||||
|
this.goBack();
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { EditActionPage } from './edit-action.page';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: EditActionPage
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class EditActionPageRoutingModule {}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { EditActionPageRoutingModule } from './edit-action-routing.module';
|
||||||
|
|
||||||
|
import { EditActionPage } from './edit-action.page';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
IonicModule,
|
||||||
|
EditActionPageRoutingModule
|
||||||
|
],
|
||||||
|
exports: [EditActionPage],
|
||||||
|
declarations: [EditActionPage]
|
||||||
|
})
|
||||||
|
export class EditActionPageModule {}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
<ion-header class="ion-no-border pt-20 px-20">
|
||||||
|
<div class="title-content d-flex align-center justify-space-between ">
|
||||||
|
<div class="div-title">
|
||||||
|
<ion-label class="title"> Editar acção presidencial</ion-label>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="actionType">
|
||||||
|
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||||
|
<ion-segment-button value="Viagem">
|
||||||
|
<ion-label>Viagem</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="Evento">
|
||||||
|
<ion-label>Evento</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
|
</ion-segment>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<div class="content-container">
|
||||||
|
|
||||||
|
<div class="ion-item-container">
|
||||||
|
<ion-input [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex ">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
<ion-datetime
|
||||||
|
[(ngModel)]="folder.DateBegin"
|
||||||
|
placeholder="Início"
|
||||||
|
displayFormat="D MMM YYYY H:mm"
|
||||||
|
minuteValues="0,15,30,45"
|
||||||
|
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||||
|
min="2018"
|
||||||
|
max="2022">
|
||||||
|
</ion-datetime>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class d-flex flex-grow-1">
|
||||||
|
<ion-datetime
|
||||||
|
class="flex-grow-1"
|
||||||
|
[(ngModel)]="folder.DateEnd"
|
||||||
|
placeholder="Fim"
|
||||||
|
displayFormat="D MMM YYYY H:mm"
|
||||||
|
minuteValues="0,15,30,45"
|
||||||
|
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||||
|
min="2018"
|
||||||
|
max="2022">
|
||||||
|
</ion-datetime>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-textarea-class flex-grow-1">
|
||||||
|
<ion-textarea [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
<ion-footer class="ion-no-border">
|
||||||
|
<ion-toolbar class="footer-toolbar width-100 justify-space-between d-flex px-20">
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
|
||||||
|
<ion-label>Cancelar</ion-label>
|
||||||
|
</button>
|
||||||
|
</ion-buttons>
|
||||||
|
<ion-buttons slot="end">
|
||||||
|
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||||
|
<ion-label>Gravar</ion-label>
|
||||||
|
</button>
|
||||||
|
</ion-buttons>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-footer>
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
:host{
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
ion-content{
|
||||||
|
--background: transparent;
|
||||||
|
transform: translate3d(0, 5px, 0);
|
||||||
|
--border-radius: 30px;
|
||||||
|
}
|
||||||
|
ion-footer{
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
ion-toolbar{
|
||||||
|
/* --background:#0782c9; */
|
||||||
|
border-width: 0 !important;
|
||||||
|
}
|
||||||
|
.div-top-header{
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #0782c9;
|
||||||
|
overflow: auto;
|
||||||
|
padding-top: 15px;
|
||||||
|
border: 0!important;
|
||||||
|
}
|
||||||
|
.div-search{
|
||||||
|
font-size: 45px;
|
||||||
|
float: left;
|
||||||
|
margin: 0 0 0 10px
|
||||||
|
}
|
||||||
|
.div-logo{
|
||||||
|
background: transparent;
|
||||||
|
width: 140px;
|
||||||
|
margin: 5px 0 0px 71px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.div-logo img{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.div-profile{
|
||||||
|
font-size: 45px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.content-top{
|
||||||
|
background: #f3f2f2;
|
||||||
|
height: 20px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-top-left-radius: 25px;
|
||||||
|
border-top-right-radius: 25px;
|
||||||
|
}
|
||||||
|
.content-container{
|
||||||
|
width: 100%;
|
||||||
|
margin:0 auto;
|
||||||
|
border-top-left-radius: 25px;
|
||||||
|
border-top-right-radius: 25px;
|
||||||
|
background: #ffffff;
|
||||||
|
height: 100%;
|
||||||
|
padding: 25px 20px 0 20px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.title-content{
|
||||||
|
margin: 0px auto;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.div-title{
|
||||||
|
width: fit-content;
|
||||||
|
float: left;
|
||||||
|
margin: 2.5px 0 0 5px;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
.container-div{
|
||||||
|
margin-bottom: 15px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.ion-item-container{
|
||||||
|
margin: 15px auto;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.ion-item-container-no-border{
|
||||||
|
width: 100%;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 0 !important;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.ion-item-class-2{
|
||||||
|
margin: 0px auto;
|
||||||
|
}
|
||||||
|
.ion-icon-class{
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
float: left;
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
.ion-input-class{
|
||||||
|
height: auto;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 10px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.ion-textarea-class{
|
||||||
|
width: 315px;
|
||||||
|
height: auto;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 10px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.ion-input-class-no-height{
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.actionType{
|
||||||
|
float: right;
|
||||||
|
overflow: auto;
|
||||||
|
border-radius: 30px;
|
||||||
|
}
|
||||||
|
.ion-segment{
|
||||||
|
--background: #0782c9;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { EditActionPage } from './edit-action.page';
|
||||||
|
|
||||||
|
describe('EditActionPage', () => {
|
||||||
|
let component: EditActionPage;
|
||||||
|
let fixture: ComponentFixture<EditActionPage>;
|
||||||
|
|
||||||
|
beforeEach(waitForAsync(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EditActionPage ],
|
||||||
|
imports: [IonicModule.forRoot()]
|
||||||
|
}).compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(EditActionPage);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
|
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||||
|
import { PublicationsService } from 'src/app/services/publications.service';
|
||||||
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-edit-action',
|
||||||
|
templateUrl: './edit-action.page.html',
|
||||||
|
styleUrls: ['./edit-action.page.scss'],
|
||||||
|
})
|
||||||
|
export class EditActionPage implements OnInit {
|
||||||
|
|
||||||
|
folder: PublicationFolder;
|
||||||
|
@Input() folderId: string;
|
||||||
|
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||||
|
@Output() updateDesktopComponent= new EventEmitter<any>();
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private publicationsService: PublicationsService,
|
||||||
|
private toastService: ToastService,
|
||||||
|
) {
|
||||||
|
this.folder = new PublicationFolder();
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.getPublicationDetail();
|
||||||
|
}
|
||||||
|
|
||||||
|
close(){
|
||||||
|
this.closeDesktopComponent.emit();
|
||||||
|
}
|
||||||
|
|
||||||
|
getPublicationDetail(){
|
||||||
|
this.publicationsService.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||||
|
this.folder = res;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async save(){
|
||||||
|
let body = {
|
||||||
|
ProcessId: this.folderId,
|
||||||
|
Description: this.folder.Description,
|
||||||
|
Detail: this.folder.Detail,
|
||||||
|
DateBegin: this.folder.DateBegin,
|
||||||
|
DateEnd: this.folder.DateEnd,
|
||||||
|
ActionType: this.folder.ActionType,
|
||||||
|
}
|
||||||
|
console.log(body);
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.publicationsService.UpdatePresidentialAction(body).toPromise()
|
||||||
|
this.close();
|
||||||
|
this.updateDesktopComponent.emit();
|
||||||
|
this.toastService.successMessage('Acção presidencial atualizada')
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest('Não foi possivel atualizar a acção presidencial')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -65,7 +65,7 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getPublicationDetail() {
|
getPublicationDetail() {
|
||||||
this.publications.GetPublicationFolderById(this.folderId).subscribe(res=>{
|
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.item = res;
|
this.item = res;
|
||||||
});
|
});
|
||||||
|
|||||||
+18
-1
@@ -995,4 +995,21 @@ background: rgb(92, 92, 92);
|
|||||||
margin-top: -16px;
|
margin-top: -16px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mat-selected {
|
||||||
|
background-color: #87cefa !important;
|
||||||
|
span {
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ngx-mat-datetime-content{
|
||||||
|
.actions {
|
||||||
|
.mat-button-disabled {
|
||||||
|
background-color: #ff5a5a59 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user