mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Merge branch 'developer' into developer_mobilefirst
This commit is contained in:
+1
-1
@@ -157,4 +157,4 @@
|
||||
"url": "git+https://Kayaya@bitbucket.org/equilibriumito/gabinete-digital.git"
|
||||
},
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LoginGuard } from './login.guard';
|
||||
|
||||
describe('LoginGuard', () => {
|
||||
let guard: LoginGuard;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
guard = TestBed.inject(LoginGuard);
|
||||
});
|
||||
|
||||
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 LoginGuard 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') != null ) {
|
||||
this.router.navigate(['/home/events']);
|
||||
return false
|
||||
} else {
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,8 +2,10 @@ import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { AuthGuard } from '../guards/auth.guard';
|
||||
import { HomeGuard } from '../guards/home.guard';
|
||||
import { LoginGuard } from '../guards/login.guard';
|
||||
import { GroupMessagesPage } from '../pages/chat/group-messages/group-messages.page';
|
||||
import { MessagesPage } from '../pages/chat/messages/messages.page';
|
||||
import { ProcessesResolverService } from '../resolvers/processes-resolver.service';
|
||||
import { UserDataResolver } from '../resolvers/userData.resolver';
|
||||
|
||||
import { HomePage } from './home.page';
|
||||
@@ -12,7 +14,6 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'home',
|
||||
component: HomePage,
|
||||
/* canActivate: [HomeGuard], */
|
||||
resolve: {
|
||||
userData: UserDataResolver
|
||||
},
|
||||
@@ -79,16 +80,17 @@ const routes: Routes = [
|
||||
],
|
||||
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
children: [
|
||||
{
|
||||
path:'',
|
||||
loadChildren: ()=> import('../pages/login/login.module').then(m => m.LoginPageModule)
|
||||
},
|
||||
],
|
||||
// {
|
||||
// path: 'login',
|
||||
// children: [
|
||||
// {
|
||||
// path:'',
|
||||
// loadChildren: ()=> import('../pages/login/login.module').then(m => m.LoginPageModule)
|
||||
// },
|
||||
// ],
|
||||
// canActivate: [LoginGuard]
|
||||
|
||||
},
|
||||
// },
|
||||
{
|
||||
path: 'agenda',
|
||||
children: [
|
||||
@@ -208,6 +210,34 @@ const routes: Routes = [
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'diplomas',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas/diplomas.module').then(m => m.DiplomasPageModule),
|
||||
/* resolve { diplomas: ProcessesResolverService}, */
|
||||
},
|
||||
{
|
||||
path:':SerialNumber/:caller',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas/diploma/diploma.module').then(m => m.DiplomaPageModule),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'diplomas-assinar',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas-assinar/diplomas-assinar.module').then(m => m.DiplomasAssinarPageModule),
|
||||
/* resolve { diplomas: ProcessesResolverService}, */
|
||||
},
|
||||
{
|
||||
path:':SerialNumber/:caller',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.module').then(m => m.DiplomaAssinarPageModule),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path:'event-list',
|
||||
children: [
|
||||
@@ -338,11 +368,6 @@ const routes: Routes = [
|
||||
],
|
||||
canActivate: [AuthGuard]
|
||||
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/home/events',
|
||||
pathMatch: 'full',
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { IndexGuard } from '../guards/index.guard';
|
||||
import { LoginGuard } from '../guards/login.guard';
|
||||
import { IndexPage } from './index.page';
|
||||
|
||||
const routes: Routes = [
|
||||
@@ -15,7 +16,8 @@ const routes: Routes = [
|
||||
}, */
|
||||
{
|
||||
path: '',
|
||||
loadChildren: ()=> import('../pages/login/login.module').then(m => m.LoginPageModule)
|
||||
loadChildren: ()=> import('../pages/login/login.module').then(m => m.LoginPageModule),
|
||||
canActivate: [LoginGuard]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
@@ -199,73 +199,69 @@ export class CreateProcessPage implements OnInit {
|
||||
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
||||
switch (this.loggeduser.Profile) {
|
||||
case 'MDGPR':
|
||||
if(this.taskParticipants.length > 0) {
|
||||
switch (this.taskType) {
|
||||
case '0':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
this.FinalizarDespacho('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
|
||||
break;
|
||||
case '1':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
try {
|
||||
await this.processes.postParecer(this.postData).toPromise();
|
||||
this.FinalizarParecer('Pedido de Parecer enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
|
||||
break;
|
||||
case '2':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
try {
|
||||
await this.processes.postDeferimento(this.postData).toPromise();
|
||||
this.FinalizarDeferimento('Pedido de deferimento enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
break;
|
||||
switch (this.taskType) {
|
||||
case '0':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
else {
|
||||
this.toastService.badRequest('Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.');
|
||||
}
|
||||
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
this.FinalizarDespacho('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
|
||||
break;
|
||||
case '1':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
try {
|
||||
await this.processes.postParecer(this.postData).toPromise();
|
||||
this.FinalizarParecer('Pedido de Parecer enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
|
||||
break;
|
||||
case '2':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
try {
|
||||
await this.processes.postDeferimento(this.postData).toPromise();
|
||||
this.FinalizarDeferimento('Pedido de deferimento enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
break;
|
||||
}
|
||||
this.modalController.dismiss();
|
||||
|
||||
break;
|
||||
|
||||
case 'PR':
|
||||
|
||||
@@ -370,7 +370,8 @@ td.monthview-primary-with-event {
|
||||
|
||||
|
||||
.calendar-tool-tip{
|
||||
padding: 20px 10px 30px 10px;
|
||||
padding: 30px 10px 20px 10px;
|
||||
//border: 1px solid orange;
|
||||
|
||||
}
|
||||
|
||||
@@ -597,9 +598,12 @@ td.monthview-primary-with-event {
|
||||
|
||||
.container-wrapper{
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
.calendar-timeline{
|
||||
border-top-right-radius: 24px;
|
||||
width: calc(100%);
|
||||
overflow: hidden;
|
||||
|
||||
.calendar-wrapper{
|
||||
width: 100%;
|
||||
@@ -621,7 +625,6 @@ td.monthview-primary-with-event {
|
||||
|
||||
|
||||
.event-details{
|
||||
// width: 411px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,19 +16,43 @@
|
||||
<ion-item-sliding class="overflow-y-auto">
|
||||
|
||||
<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)]="postEvent.Subject"></ion-input>
|
||||
</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="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</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)]="postEvent.Location"></ion-input>
|
||||
</div>
|
||||
</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 width-100">
|
||||
<div class="ion-item-class-2">
|
||||
@@ -47,13 +71,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('CalendarName').invalid " class="input-errror-message">
|
||||
{{ postEvent.Categories[0] }}
|
||||
<div *ngIf="Form.get('CalendarName').errors?.required">
|
||||
Campo obrigatório.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
[(ngModel)]="postEvent.Categories[0]"
|
||||
selectedText="{{postEvent.Categories[0]}}"
|
||||
@@ -67,6 +100,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Categories').invalid " class="input-errror-message">
|
||||
{{ postEvent.Categories[0] }}
|
||||
<div *ngIf="Form.get('Categories').errors?.required">
|
||||
Campo obrigatório.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2 width-100">
|
||||
@@ -80,8 +122,8 @@
|
||||
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"
|
||||
min="2021"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data início" [(ngModel)]="postData.StartDate"></ion-input> -->
|
||||
@@ -101,8 +143,8 @@
|
||||
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"
|
||||
min="2021"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color:#0d89d1;
|
||||
|
||||
}
|
||||
/* SPAN */
|
||||
.span-left{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
@@ -18,6 +19,10 @@ import { SearchPage } from '../../search/search.page';
|
||||
})
|
||||
export class EditEventPage implements OnInit {
|
||||
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
postEvent: Event;
|
||||
isRecurring:string;
|
||||
isEventEdited: boolean;
|
||||
@@ -115,7 +120,45 @@ export class EditEventPage implements OnInit {
|
||||
this.router.navigate(['/home',this.caller]);
|
||||
}
|
||||
|
||||
|
||||
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, [
|
||||
Validators.required
|
||||
]),
|
||||
Categories: new FormControl(this.postEvent.Categories[0], [
|
||||
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
|
||||
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
|
||||
try{
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
|
||||
@@ -14,15 +14,28 @@
|
||||
<div class="main-content">
|
||||
<!-- <input type="text" ngbDatepicker #d="ngbDatepicker"/> -->
|
||||
|
||||
<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>
|
||||
</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="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</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)]="postEvent.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,13 +45,24 @@
|
||||
</span> -->
|
||||
|
||||
</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="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione agenda*"
|
||||
selectedText="{{postEvent.CalendarName}}"
|
||||
[(ngModel)]="postEvent.CalendarName"
|
||||
@@ -51,12 +75,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('CalendarName').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('CalendarName').errors?.required">
|
||||
Campo obrigatório.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
[(ngModel)]="postEvent.Categories[0]"
|
||||
interface="action-sheet"
|
||||
@@ -69,21 +101,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Categories').invalid " class="input-errror-message">
|
||||
{{ postEvent.Categories[0] }}
|
||||
<div *ngIf="Form.get('Categories').errors?.required">
|
||||
Campo obrigatório.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
placeholder="Início*"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
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"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data início" [(ngModel)]="postData.StartDate"></ion-input> -->
|
||||
@@ -96,15 +137,16 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
placeholder="Fim*"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
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"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||
|
||||
@@ -12,6 +12,9 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Event } from '../../../models/event.model';
|
||||
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
|
||||
import { SearchPage } from '../../search/search.page';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-event',
|
||||
@@ -20,6 +23,23 @@ import { SearchPage } from '../../search/search.page';
|
||||
})
|
||||
|
||||
export class NewEventPage implements OnInit {
|
||||
// date picker
|
||||
public date: any;
|
||||
public disabled = false;
|
||||
public showSpinners = true;
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public color: ThemePalette = 'primary';
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
postEvent: Event;
|
||||
eventBody: EventBody;
|
||||
segment:string = "true";
|
||||
@@ -27,7 +47,6 @@ export class NewEventPage implements OnInit {
|
||||
eventAttendees: EventPerson[];
|
||||
selectedSegment: string;
|
||||
selectedDate: Date;
|
||||
minDate: string;
|
||||
|
||||
adding: "intervenient" | "CC";
|
||||
|
||||
@@ -65,7 +84,6 @@ export class NewEventPage implements OnInit {
|
||||
let selectedEndDate = new Date(this.selectedDate);
|
||||
/* Set + 30minutes to seleted datetime */
|
||||
selectedEndDate.setMinutes(this.selectedDate.getMinutes() + 30) ;
|
||||
this.minDate = this.selectedDate.toString();
|
||||
|
||||
if(this.selectedSegment != "Combinada"){
|
||||
this.postEvent ={
|
||||
@@ -122,9 +140,56 @@ export class NewEventPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
}
|
||||
|
||||
|
||||
get dateValid() {
|
||||
if (window.innerWidth <= 800) {
|
||||
return this.postEvent.StartDate < this.postEvent.EndDate? ['ok']: []
|
||||
} else {
|
||||
return ['ok']
|
||||
}
|
||||
}
|
||||
|
||||
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, [
|
||||
Validators.required
|
||||
]),
|
||||
Date: new FormControl(this.dateValid, [
|
||||
Validators.required
|
||||
]),
|
||||
Categories: new FormControl(this.postEvent.Categories[0], [
|
||||
Validators.required
|
||||
]),
|
||||
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||
Validators.required
|
||||
]),
|
||||
// participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
// Validators.required
|
||||
// ]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
async save() {
|
||||
/* console.log(this.postEvent);
|
||||
console.log(this.profile); */
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
console.log('passed')
|
||||
|
||||
if(this.documents.length >= 0) {
|
||||
this.postEvent.HasAttachments = true;
|
||||
|
||||
@@ -17,7 +17,7 @@ export class ContactsPage implements OnInit {
|
||||
headers: HttpHeaders;
|
||||
options:any;
|
||||
|
||||
contacts: Contact[] = [
|
||||
contacts = [
|
||||
{
|
||||
first: 'Ana',
|
||||
last: 'Manuel',
|
||||
|
||||
@@ -3,23 +3,16 @@ 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 { DailyWorkTask } from '../../../../models/dailyworktask.model';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { Event } from '../../../../models/event.model';
|
||||
import { AnimationController, MenuController, ModalController, 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 { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ExpedientTaskModalPage } from '../../expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.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 { DespachosOptionsPage } from 'src/app/shared/popover/despachos-options/despachos-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@@ -58,25 +51,18 @@ export class DespachoPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.serialnumber);
|
||||
|
||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
||||
if (!paramMap.has('SerialNumber')) {
|
||||
return;
|
||||
@@ -95,7 +81,7 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
goBack() {
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth <= 800) {
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else {
|
||||
@@ -108,7 +94,7 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (window.innerWidth <= 800) {
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
@@ -121,7 +107,6 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async LoadTaskDetail(serial: string) {
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
this.task = {
|
||||
@@ -141,14 +126,10 @@ export class DespachoPage implements OnInit {
|
||||
"Status": res.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.fulltask = res;
|
||||
console.log(this.task);
|
||||
|
||||
console.log('GetTask', res);
|
||||
|
||||
let thedate = new Date(this.task.CreateDate);
|
||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
|
||||
|
||||
this.processes.GetTaskParticipants(this.task.FolderId).subscribe(users=>{
|
||||
this.intervenientes = users.filter(user=>{
|
||||
return user.Type == 'I';
|
||||
@@ -156,37 +137,26 @@ export class DespachoPage implements OnInit {
|
||||
this.cc = users.filter(user=>{
|
||||
return user.Type == 'CC';
|
||||
});
|
||||
console.log(users);
|
||||
|
||||
});
|
||||
console.log(this.task.FolderId);
|
||||
|
||||
this.getDocumentDetails(this.task.FolderId, '361');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
getDocumentDetails(forlderId:string, applicationId:string) {
|
||||
console.log(forlderId);
|
||||
|
||||
this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{
|
||||
this.attachments = res.Documents;
|
||||
console.log(res['Documents']);
|
||||
console.log(this.attachments);
|
||||
})
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial: string) {
|
||||
if (this.eventsList == null) {
|
||||
this.attachmentsService.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
console.log(res);
|
||||
res.forEach(att => {
|
||||
if (this.eventsList == null) {
|
||||
this.eventsList = new Array();
|
||||
}
|
||||
this.events.getEvent(att.ParentId).subscribe(event => {
|
||||
this.eventsList.push(event);
|
||||
console.log(this.eventsList);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -195,7 +165,6 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
viewDocument(docId:string){
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
@@ -289,10 +258,7 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async sendExpedienteToPending() {
|
||||
console.log(this.serialnumber);
|
||||
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
this.toastService.successMessage('Processo enviado para despacho')
|
||||
},
|
||||
@@ -319,7 +285,6 @@ export class DespachoPage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
@@ -369,31 +334,11 @@ export class DespachoPage implements OnInit {
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
this.distartExpedientModal();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal2(task: any){
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: task.serialNumber,
|
||||
folderId: task.workflowInstanceDataFields.FolderID,
|
||||
action: 'discart',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
|
||||
@@ -53,16 +53,12 @@ export class DespachosPage implements OnInit {
|
||||
private router: Router,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
// alert('nice!')
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
this.authService.userData$.subscribe((res:any)=>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
@@ -70,25 +66,15 @@ export class DespachosPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data) {
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
|
||||
async LoadList() {
|
||||
console.log('HERE');
|
||||
|
||||
let result = await this.processes.GetTasksList("Despacho", false).toPromise();
|
||||
//let despachos = result.reverse().filter(data => data.activityInstanceName == "Despacho (Paralelo)");
|
||||
this.despachoList = new Array();
|
||||
|
||||
console.log(result);
|
||||
console.log('OI');
|
||||
|
||||
|
||||
await result.forEach( (element, index) => {
|
||||
|
||||
@@ -108,18 +94,11 @@ export class DespachosPage implements OnInit {
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
|
||||
this.despachoList.push(task)
|
||||
|
||||
});
|
||||
|
||||
console.log(this.despachoList);
|
||||
|
||||
|
||||
this.despachoList = this.sortArrayISODate(this.despachoList).reverse()
|
||||
|
||||
this.despachoList.forEach( (element, index) => {
|
||||
console.log(element);
|
||||
|
||||
// let aplicationId = element.workflowInstanceDataFields.SourceSecFsID;
|
||||
let FolderID = element['FolderID'];
|
||||
@@ -127,9 +106,7 @@ export class DespachosPage implements OnInit {
|
||||
this.processes.GetDocumentDetails(FolderID, '361').subscribe(res=>{
|
||||
element.DocumentsQty = res.DocumentsTotal
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any) {
|
||||
|
||||
-1
@@ -11,7 +11,6 @@
|
||||
|
||||
ion-content, .header-2, .main-content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
<ion-header class="ion-no-border header-2">
|
||||
<div class="title">
|
||||
<app-btn-modal-dismiss (click)="goBack()"></app-btn-modal-dismiss>
|
||||
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
|
||||
<div class="theicon btn-refresh">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
|
||||
@@ -54,8 +54,6 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
|
||||
console.log(diplomas);
|
||||
let diplomasAssinar = diplomas.reverse().filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
console.log(diplomasAssinar);
|
||||
diplomasAssinar.forEach(element => {
|
||||
|
||||
@@ -23,7 +23,8 @@ export class DiplomaPage implements OnInit {
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
|
||||
serialnumber: string;
|
||||
serialNumber: string;
|
||||
caller:string;
|
||||
profile: string;
|
||||
task: any
|
||||
fulltask: any
|
||||
@@ -42,32 +43,51 @@ export class DiplomaPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialNumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = "mdgpr";
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"diplomas": true,
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"pendentes": true,
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
'diplomas': true
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
@@ -86,7 +106,6 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
async LoadTaskDetail(serial: string) {
|
||||
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
this.task = {
|
||||
"SerialNumber": res.serialNumber,
|
||||
@@ -103,11 +122,7 @@ export class DiplomaPage implements OnInit {
|
||||
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
|
||||
"activityInstanceName": res.activityInstanceName,
|
||||
}
|
||||
|
||||
this.fulltask = res;
|
||||
console.log(this.task);
|
||||
|
||||
console.log('GetTask', res);
|
||||
|
||||
let thedate = new Date(this.task.CreateDate);
|
||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
@@ -118,9 +133,7 @@ export class DiplomaPage implements OnInit {
|
||||
});
|
||||
this.cc = users.filter(user=>{
|
||||
return user.Type == 'CC';
|
||||
});
|
||||
console.log(users);
|
||||
|
||||
});
|
||||
});
|
||||
this.getDocumentDetails(this.task.FolderId, '361');
|
||||
|
||||
@@ -130,7 +143,6 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
viewDocument(docId:string){
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
@@ -147,7 +159,7 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
async askSignature(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 99999840,
|
||||
"dataFields": {
|
||||
@@ -169,7 +181,7 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
async askToChange(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999841,
|
||||
"dataFields": {
|
||||
@@ -189,7 +201,7 @@ export class DiplomaPage implements OnInit {
|
||||
async finish(note:string, documents:any){
|
||||
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Concluir",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
|
||||
@@ -7,7 +7,6 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { DiplomasPageRoutingModule } from './diplomas-routing.module';
|
||||
|
||||
import { DiplomasPage } from './diplomas.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { ComponentsModule } from 'src/app/components/components.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
|
||||
@@ -65,34 +65,20 @@ constructor(
|
||||
}
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
|
||||
// this.LoadList();
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
goToDiploma(serialNumber:any) {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas/diploma'], navigationExtras);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
console.log('diplomas', diplomas);
|
||||
|
||||
switch (this.segment) {
|
||||
case 'validar':
|
||||
console.log(this.segment);
|
||||
this.diplomasList = new Array();
|
||||
let diplomasValidar = diplomas.reverse().filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
console.log(diplomasValidar);
|
||||
diplomasValidar.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
@@ -142,10 +128,8 @@ constructor(
|
||||
this.showLoader = false;
|
||||
break;
|
||||
case 'assinados':
|
||||
console.log(this.segment);
|
||||
this.diplomasList = new Array();
|
||||
let diplomasAssinados = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
console.log(diplomasAssinados);
|
||||
diplomasAssinados.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
@@ -193,7 +177,6 @@ constructor(
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -205,25 +188,6 @@ constructor(
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewPedidoDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiplomaPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
// window.history.back()
|
||||
|
||||
+36
-20
@@ -9,24 +9,41 @@
|
||||
</div>
|
||||
<div class="overflow-y-auto content-default-padding">
|
||||
|
||||
<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)]="postData.Subject"></ion-input>
|
||||
</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="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</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)]="postData.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Error messages -->
|
||||
<span class="error ion-padding" *ngIf="formLocationSatus">
|
||||
Campo obrigatório
|
||||
</span>
|
||||
</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">
|
||||
@@ -34,7 +51,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" >
|
||||
<ion-select
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="postData.CalendarName"
|
||||
@@ -46,7 +63,7 @@
|
||||
</ion-select>
|
||||
|
||||
|
||||
<mat-form-field floatLabel="never" class="d-none d-md-block width-100">
|
||||
<mat-form-field floatLabel="never" appearance="none" class="d-none d-md-block width-100">
|
||||
<mat-select placeholder="Selecione agenda" [(ngModel)]="postData.CalendarName" >
|
||||
<mat-option value="Oficial">
|
||||
Oficial
|
||||
@@ -66,7 +83,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
class="d-block d-md-none"
|
||||
placeholder="Início*"
|
||||
@@ -74,16 +91,16 @@
|
||||
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"
|
||||
min="{{ionicMinDate}}"
|
||||
max="2025"
|
||||
value="2020-11-19T11:06Z">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
||||
<mat-form-field class="width-100 date-hour-picker d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
[formControl]="dateControlStart"
|
||||
[min]="minDate" [max]="maxDate"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
@@ -105,7 +122,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
class="d-block d-md-none"
|
||||
placeholder="Fim*"
|
||||
@@ -113,16 +130,16 @@
|
||||
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"
|
||||
min="{{ionicMinDate}}"
|
||||
max="2025"
|
||||
value="2020-11-19T11:06Z">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<mat-form-field class="date-hour-picker width-100 d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date*S"
|
||||
[formControl]="dateControlEnd"
|
||||
[min]="minDate" [max]="maxDate"
|
||||
[min]="endMinDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||
@@ -168,6 +185,7 @@
|
||||
value="false"
|
||||
interface="action-sheet"
|
||||
required
|
||||
appearance="none"
|
||||
>
|
||||
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postData.IsRecurring" >
|
||||
<mat-option value="false">
|
||||
@@ -263,9 +281,7 @@
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="aside-righ flex-grow-1">
|
||||
|
||||
+1
-1
@@ -205,4 +205,4 @@
|
||||
.close-button {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+61
-4
@@ -14,7 +14,7 @@ import { User } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
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 _rollupMoment from 'moment';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
@@ -54,8 +54,12 @@ export class BookMeetingModalPage implements OnInit {
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate: any;
|
||||
public maxDate: any;
|
||||
public minDate = new Date();
|
||||
public ionicMinDate = new Date().toISOString().slice(0,10)
|
||||
|
||||
// curent timestamp + 15 minutes
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
@@ -63,6 +67,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
|
||||
showLoader = false
|
||||
|
||||
get dateStart () {
|
||||
@@ -134,6 +142,9 @@ export class BookMeetingModalPage implements OnInit {
|
||||
/* Set + 30minutes to seleted datetime */
|
||||
let selectedEndDate = new Date();
|
||||
/* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */
|
||||
|
||||
this.dateControlStart = new FormControl(moment(new Date()));
|
||||
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -157,8 +168,54 @@ export class BookMeetingModalPage implements OnInit {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
if (window.innerWidth <= 800) {
|
||||
return this.postData.StartDate < this.postData.EndDate? ['ok']: []
|
||||
} else {
|
||||
return ['ok']
|
||||
}
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postData.Subject, [
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
Location: new FormControl(this.postData.Location, [
|
||||
Validators.required,
|
||||
]),
|
||||
CalendarName: new FormControl(this.postData.CalendarName, [
|
||||
Validators.required
|
||||
]),
|
||||
Date: new FormControl(this.dateValid, [
|
||||
Validators.required
|
||||
]),
|
||||
// participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
// Validators.required
|
||||
// ]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
async saveTask(){
|
||||
// issue12323423
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
}
|
||||
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
this.eventBody={
|
||||
|
||||
+56
-9
@@ -4,10 +4,22 @@
|
||||
<ion-item lines="none">
|
||||
<ion-label class="title">{{modalTitle[taskType]}}</ion-label>
|
||||
</ion-item>
|
||||
<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)]="postData.DispatchFolder.Subject"></ion-input>
|
||||
</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>
|
||||
|
||||
<!-- Add scrolls -->
|
||||
<div class="d-flex flex-column height-100 overflow-y-auto">
|
||||
|
||||
@@ -16,25 +28,36 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</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-textarea class="add-border" placeholder="Descrição" [(ngModel)]="postData.DispatchFolder.Message"></ion-textarea>
|
||||
</div>
|
||||
</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 width-100">
|
||||
<div class="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon class="icon-time" slot="start" name="time-outline"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Priority')?.invalid && validateFrom ">
|
||||
<ion-select
|
||||
placeholder="Prazo*"
|
||||
[(ngModel)]="postData.Priority"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar"
|
||||
required
|
||||
class="d-md-none"
|
||||
class="d-block d-md-none"
|
||||
>
|
||||
<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>
|
||||
@@ -42,7 +65,7 @@
|
||||
<ion-select-option value="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
<mat-form-field appearance="fill" class="width-100 d-none d-md-block">
|
||||
<mat-form-field appearance="fill" class="width-100 d-none d-md-block" appearance="none">
|
||||
<mat-select placeholder="Prazo*" [(ngModel)]="postData.Priority">
|
||||
<mat-option [value]="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</mat-option>
|
||||
<mat-option [value]="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</mat-option>
|
||||
@@ -54,14 +77,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Priority').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Priority').errors?.required">
|
||||
Campo obrigatório.
|
||||
</div>
|
||||
<div *ngIf="Form.get('Priority').errors?.minlength">
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('selectedTypes')?.invalid && validateFrom ">
|
||||
<ion-item
|
||||
class="ion-no-border ion-no-padding ion-no-margin d-md-none">
|
||||
class="ion-no-border ion-no-padding ion-no-margin d-block d-md-none">
|
||||
<ion-select
|
||||
[(ngModel)]="selectedTypes"
|
||||
(ngModelChange)="onSelectedTypesChanged($event)"
|
||||
@@ -73,7 +108,8 @@
|
||||
<mat-form-field
|
||||
floatLabel="never"
|
||||
appearance="fill"
|
||||
class="width-100 d-none d-md-block">
|
||||
class="width-100 d-none d-md-block"
|
||||
appearance="none">
|
||||
<mat-select [formControl]="toppings" multiple placeholder="Selecione o tipo de evento*">
|
||||
<mat-option *ngFor="let type of subjectTypes" [value]="type.Code">{{type.Description}}</mat-option>
|
||||
</mat-select>
|
||||
@@ -81,6 +117,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('selectedTypes').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('selectedTypes').errors?.required">
|
||||
Campo obrigatório.
|
||||
</div>
|
||||
<div *ngIf="Form.get('selectedTypes').errors?.minlength">
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
@@ -155,7 +203,6 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="postData" class="aside-right flex-column height-100">
|
||||
<app-empty-container
|
||||
|
||||
+4
@@ -53,6 +53,7 @@
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
min-height: 44px;
|
||||
}
|
||||
.ion-input-class-no-height{
|
||||
border: 1px solid #ebebeb;
|
||||
@@ -208,3 +209,6 @@ font-size: 13px;
|
||||
}
|
||||
|
||||
|
||||
::ng-deep .mat-form-field-appearance-fill .mat-form-field-flex {
|
||||
background-color: #fff;
|
||||
}
|
||||
+49
-7
@@ -7,20 +7,16 @@ import { Participant } from 'src/app/models/participant.model';
|
||||
import { Folder } from 'src/app/models/folder.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { ExpedienteDetailPage } from '../expediente-detail/expediente-detail.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { EventAttachment } from 'src/app/models/attachment.model';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
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 { ToastService } from 'src/app/services/toast.service';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
|
||||
@@ -86,6 +82,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
loggeduser: User;
|
||||
toppings = new FormControl();
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
get toppingsValues() {
|
||||
return this.toppings.value;
|
||||
}
|
||||
@@ -162,12 +161,12 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
getSubjectType(){
|
||||
getSubjectType() {
|
||||
this.processes.GetSubjectType().subscribe(res=>{
|
||||
console.log(res);
|
||||
this.subjectTypes = res;
|
||||
@@ -178,8 +177,51 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postData.DispatchFolder.Subject, [
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
Location: new FormControl(this.postData.DispatchFolder.Message, [
|
||||
Validators.required,
|
||||
]),
|
||||
selectedTypes: new FormControl(this.toppingsValues, [
|
||||
Validators.required,
|
||||
]),
|
||||
Priority: new FormControl(this.postData.Priority, [
|
||||
Validators.required,
|
||||
]),
|
||||
// CalendarName: new FormControl(this.postEvent.CalendarName, [
|
||||
// Validators.required
|
||||
// ]),
|
||||
// Categories: new FormControl(this.postEvent.Categories[0], [
|
||||
// Validators.required
|
||||
// ]),
|
||||
// IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||
// Validators.required
|
||||
// ]),
|
||||
// participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
// Validators.required
|
||||
// ]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
async saveTask(){
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
}
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
if(this.postData.Priority=='99999861'){
|
||||
this.dispatchFolder.DeadlineType = 'Normal';
|
||||
}
|
||||
|
||||
+8
-11
@@ -3,20 +3,15 @@ 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 { DailyWorkTask } from '../../../../models/dailyworktask.model';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { Event } from '../../../../models/event.model';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ModalController, PopoverController } from '@ionic/angular';
|
||||
import { ExpedientTaskModalPage } from '../expedient-task-modal/expedient-task-modal.page';
|
||||
import { BookMeetingModalPage } from '../book-meeting-modal/book-meeting-modal.page';
|
||||
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
||||
import { momentG } from 'src/plugin/momentG'
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
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 { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
@@ -43,20 +38,16 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
hideSendToPendentes = true
|
||||
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
private attachments: AttachmentsService,
|
||||
private events: EventsService,
|
||||
private menu: MenuController,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
public popoverController: PopoverController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
private animationController: AnimationController,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
@@ -164,6 +155,11 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
console.log('this.task', this.task)
|
||||
console.log('this.task.DocumentURL', this.task.DocumentURL)
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -185,9 +181,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
viewDocument(){
|
||||
viewDocument() {
|
||||
this.processes.GetDocumentUrl(this.task.DocId, this.task.FsId).subscribe(res=>{
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
|
||||
@@ -124,7 +124,6 @@ export class ExpedientePrPage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -263,7 +262,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth < 801){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
|
||||
@@ -43,6 +43,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.LoadList();
|
||||
console.log('not run');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -102,7 +103,6 @@ export class ExpedientesPrPage implements OnInit {
|
||||
console.log(this.taskslist);
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.selectedElement='DiplomasPorValidar';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?diplomasassinar=true'){
|
||||
this.openDiplomasPage('');
|
||||
this. openDiplomasAssinarPage();
|
||||
this.selectedElement='DiplomasAssinar';
|
||||
}
|
||||
}
|
||||
@@ -276,7 +276,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
console.log(event);
|
||||
|
||||
this.closeAllDesktopComponents();
|
||||
switch(this.loggeduser.Profile){
|
||||
/* switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.selectedElement='Correspondence';
|
||||
this.showExpedients = true;
|
||||
@@ -286,7 +286,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.selectedElement='ExpedientesPr';
|
||||
this.showExpedientesPr = true;
|
||||
break;
|
||||
}
|
||||
} */
|
||||
this.LoadCounts();
|
||||
//this.refreshExpedientes();
|
||||
|
||||
@@ -445,21 +445,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openDiplomasAssinarPage() {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
if( window.innerWidth <= 801){
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showDiplomasAssinar = true;
|
||||
}
|
||||
} else {
|
||||
if( window.innerWidth <= 801){
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
||||
@@ -467,6 +454,5 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showDiplomasAssinar = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -137,7 +137,6 @@ export class PedidoPage implements OnInit {
|
||||
"activityInstanceName": res.activityInstanceName,
|
||||
"Status": res.workflowInstanceDataFields.Status,
|
||||
}
|
||||
console.log(this.task);
|
||||
}
|
||||
|
||||
let thedate = new Date(res.taskStartDate);
|
||||
@@ -150,7 +149,6 @@ export class PedidoPage implements OnInit {
|
||||
this.cc = users.filter(user=>{
|
||||
return user.Type == 'CC';
|
||||
});
|
||||
console.log(users);
|
||||
});
|
||||
this.getDocumentDetails(res.workflowInstanceDataFields.FolderID, '361');
|
||||
});
|
||||
@@ -160,13 +158,11 @@ export class PedidoPage implements OnInit {
|
||||
this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{
|
||||
this.attachments = res.Documents;
|
||||
// console.log(res['Documents']);
|
||||
console.log(this.attachments);
|
||||
})
|
||||
}
|
||||
|
||||
viewDocument(docId:string){
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
@@ -255,7 +251,6 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -101,8 +101,6 @@ export class PedidosPage implements OnInit {
|
||||
let parecerPr = await this.processes.GetTasksList("Pedido de Parecer do Presidente", false).toPromise();
|
||||
|
||||
let allParecer = parecer.concat(parecerPr).reverse();
|
||||
console.log(allParecer);
|
||||
|
||||
this.parecerList = new Array();
|
||||
|
||||
allParecer.forEach(element => {
|
||||
@@ -125,7 +123,6 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
console.log(this.parecerList);
|
||||
|
||||
}
|
||||
else if(this.segment == 'deferimento') {
|
||||
@@ -156,11 +153,9 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
console.log(this.deferimentoList);
|
||||
|
||||
});
|
||||
}
|
||||
console.log(this.taskType);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="hasPin" class="voltar d-flex align-center justify-center pt-25 clear" (click)="enterWithPassword=true">
|
||||
<div *ngIf="hasPin" class="voltar d-flex align-center justify-center pt-25 clear" (click)="loginPreference = 'none'">
|
||||
Entrar com senha
|
||||
</div>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022">
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022">
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ProcessesResolverService } from './processes-resolver.service';
|
||||
|
||||
describe('ProcessesResolverService', () => {
|
||||
let service: ProcessesResolverService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ProcessesResolverService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRoute, ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { DailyWorkTask } from '../models/dailyworktask.model';
|
||||
import { ProcessesService } from '../services/processes.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProcessesResolverService implements Resolve<any[]> {
|
||||
|
||||
constructor(
|
||||
private processesService: ProcessesService,
|
||||
) { }
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):
|
||||
Observable<any> | Promise<any> | any[] {
|
||||
return this.processesService.GetTasksList("Despacho do Presidente da República", false);
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@
|
||||
</ion-select>
|
||||
|
||||
|
||||
<mat-form-field class="d-none d-md-block width-100" >
|
||||
<mat-form-field appearance="none" class="d-none d-md-block width-100" >
|
||||
<mat-select placeholder="Selecione agenda" [(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda" >
|
||||
<mat-option value="Oficial">
|
||||
Oficial
|
||||
@@ -107,11 +107,11 @@
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
||||
<mat-form-field appearance="none" class="width-100 date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
[formControl]="dateControlStart"
|
||||
@@ -145,11 +145,11 @@
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
||||
<mat-form-field appearance="none" class="width-100 date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
[formControl]="dateControlEnd"
|
||||
@@ -193,6 +193,7 @@
|
||||
value="false"
|
||||
interface="action-sheet"
|
||||
required
|
||||
appearance="none"
|
||||
>
|
||||
<mat-select [(value)]="eventProcess.workflowInstanceDataFields.IsRecurring">
|
||||
<mat-option value="false">
|
||||
|
||||
@@ -220,7 +220,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
// Validators.required
|
||||
// ]),
|
||||
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
Validators.required
|
||||
// Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
|
||||
@@ -179,7 +179,7 @@ export class EditEventPage implements OnInit {
|
||||
Validators.required
|
||||
]),
|
||||
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
Validators.required
|
||||
// Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
[formControl]="dateControlStart"
|
||||
[min]="minDate" [max]="maxDate"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
@@ -193,7 +193,7 @@
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('participantes').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('participantes').errors?.required">
|
||||
Adicionar participant.
|
||||
Adicionar participante.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -134,7 +134,7 @@ export class NewEventPage implements OnInit {
|
||||
this.loggeduser = userService.ValidatedUser;
|
||||
|
||||
this.dateControlStart = new FormControl(moment(new Date()));
|
||||
this.dateControlEnd = new FormControl(moment(new Date()));
|
||||
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -252,7 +252,7 @@ export class NewEventPage implements OnInit {
|
||||
Validators.required
|
||||
]),
|
||||
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
Validators.required
|
||||
// Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
|
||||
@@ -17,7 +17,7 @@ export class ContactsPage implements OnInit {
|
||||
headers: HttpHeaders;
|
||||
options:any;
|
||||
|
||||
contacts: Contact[] = [
|
||||
contacts = [
|
||||
{
|
||||
first: 'Ana',
|
||||
last: 'Manuel',
|
||||
@@ -61,7 +61,6 @@ export class ContactsPage implements OnInit {
|
||||
this.headers = this.headers.set('Accept','application/json');
|
||||
this.headers = this.headers.set('content-type','application/json');
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -62,14 +62,14 @@ export class DespachosPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.doRefresh();
|
||||
}
|
||||
});
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.doRefresh();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -86,19 +86,14 @@ export class DespachosPage implements OnInit {
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
console.log('HERE DESK');
|
||||
|
||||
|
||||
let result = await this.processes.GetTasksList("Despacho", false).toPromise();
|
||||
//let despachos = result.reverse().filter(data => data.activityInstanceName == "Despacho (Paralelo)");
|
||||
this.despachoList = new Array();
|
||||
|
||||
console.log(result);
|
||||
|
||||
await result.forEach( (element, index) => {
|
||||
|
||||
@@ -127,7 +122,6 @@ export class DespachosPage implements OnInit {
|
||||
this.despachoList = this.sortArrayISODate(this.despachoList).reverse()
|
||||
|
||||
this.despachoList.forEach( (element, index) => {
|
||||
console.log(element['FolderID']);
|
||||
|
||||
// let aplicationId = element.workflowInstanceDataFields.SourceSecFsID;
|
||||
let FolderID = element['FolderID'];
|
||||
@@ -154,25 +148,6 @@ export class DespachosPage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
// old
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
|
||||
@@ -43,12 +43,7 @@ constructor(
|
||||
}
|
||||
|
||||
goToDiploma(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas/diploma'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EditEventPage } from './edit-event.page';
|
||||
import { EditEventToApproveComponent } from './edit-event.page';
|
||||
|
||||
describe('EditEventPage', () => {
|
||||
let component: EditEventPage;
|
||||
let fixture: ComponentFixture<EditEventPage>;
|
||||
let component: EditEventToApproveComponent;
|
||||
let fixture: ComponentFixture<EditEventToApproveComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditEventPage ],
|
||||
declarations: [ EditEventToApproveComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EditEventPage);
|
||||
fixture = TestBed.createComponent(EditEventToApproveComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
@@ -44,14 +44,12 @@ export class ExpedientsPage implements OnInit {
|
||||
this.LoadList();
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.doRefresh();
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
segmentChanged(){
|
||||
console.log(this.segment);
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -66,7 +64,6 @@ export class ExpedientsPage implements OnInit {
|
||||
|
||||
LoadList(){
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
console.log(result);
|
||||
this.taskslist = new Array();
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
res.forEach(element => {
|
||||
@@ -86,12 +83,10 @@ export class ExpedientsPage implements OnInit {
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
console.log(this.taskslist);
|
||||
});
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
console.log('refresh expedientes1');
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
<div *ngIf="parecerList" class="overflow-y-auto height-100">
|
||||
<div class="width-100 overflow-y-auto height-100" [ngSwitch]="segment">
|
||||
<div *ngIf="parecerList">
|
||||
<ion-list *ngSwitchCase="'parecer'">
|
||||
<!-- *ngFor = "let task of parecerList; let i = index"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
@@ -64,7 +64,7 @@
|
||||
</ion-list>
|
||||
|
||||
</div>
|
||||
<div *ngIf="deferimentoList" class="overflow-y-auto height-100">
|
||||
<div *ngIf="deferimentoList">
|
||||
<ion-list *ngSwitchCase="'deferimento'">
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
|
||||
@@ -102,7 +102,6 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
console.log(this.parecerList);
|
||||
|
||||
}
|
||||
else if(this.segment == 'deferimento') {
|
||||
@@ -110,8 +109,6 @@ export class PedidosPage implements OnInit {
|
||||
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(result => {
|
||||
this.taskslist = result;
|
||||
|
||||
console.log(result);
|
||||
|
||||
this.deferimentoList = new Array();
|
||||
let res = result.reverse();
|
||||
res.forEach(element => {
|
||||
@@ -134,11 +131,9 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
console.log(this.deferimentoList);
|
||||
|
||||
});
|
||||
}
|
||||
console.log(this.taskType);
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
@@ -152,7 +147,6 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
async viewPedidoDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: PedidoPage,
|
||||
|
||||
@@ -48,7 +48,7 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.doRefresh();
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -57,10 +57,6 @@ export class PendentesPage implements OnInit {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
@@ -69,9 +65,7 @@ export class PendentesPage implements OnInit {
|
||||
async LoadList(){
|
||||
this.showLoader = true;
|
||||
this.pendentesList = [];
|
||||
console.log('clear');
|
||||
|
||||
|
||||
let despachos = await this.processes.GetTasksList("Despacho", false).toPromise();
|
||||
let pareceres = await this.processes.GetTasksList("Pedido de Parecer", false).toPromise();
|
||||
let deferimentos = await this.processes.GetTasksList("Pedido de Deferimento", false).toPromise();
|
||||
@@ -85,7 +79,6 @@ export class PendentesPage implements OnInit {
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
@@ -132,12 +125,7 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
|
||||
doRefresh() {
|
||||
console.log('Refresh pendentes');
|
||||
|
||||
this.LoadList();
|
||||
|
||||
setTimeout(() => {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewTaskDetails(serialNumber:string, workflowName:string) {
|
||||
@@ -152,60 +140,6 @@ export class PendentesPage implements OnInit {
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
<ion-row>
|
||||
<ion-col class="align-center d-flex">
|
||||
<div class="d-flex align-center" (click)="LoginPreferenceMethod('pin')">
|
||||
<!-- -->
|
||||
<ion-checkbox [checked]="userLoginPreference=='pin' " class="checkBox" ></ion-checkbox>
|
||||
PIN
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@ import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
export class ProfileComponent implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
userLoginPreference: boolean
|
||||
userLoginPreference = ''
|
||||
|
||||
constructor(private modalController:ModalController,
|
||||
private authService: AuthService,
|
||||
@@ -110,6 +110,8 @@ export class ProfileComponent implements OnInit {
|
||||
}
|
||||
|
||||
logout() {
|
||||
// clear local storage
|
||||
window.localStorage.clear();
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
||||
@@ -140,7 +142,7 @@ export class ProfileComponent implements OnInit {
|
||||
if (userData.hasOwnProperty('loginPreference')) {
|
||||
this.userLoginPreference = userData.loginPreference
|
||||
} else {
|
||||
this.userLoginPreference = false
|
||||
this.userLoginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,6 +63,8 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
console.log(this.task.SerialNumber);
|
||||
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
@@ -119,7 +119,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
async approve(note:string, documents:any){
|
||||
this.popoverController.dismiss();
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 100000004 ,
|
||||
"dataFields": {
|
||||
@@ -182,7 +182,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
this.toastService.badRequest('Processo não descartado');
|
||||
}
|
||||
this.goBack();
|
||||
}
|
||||
@@ -193,7 +193,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
this.toastService.successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService.badRequest();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
async sendToReview(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999877,
|
||||
"dataFields": {
|
||||
@@ -213,7 +213,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
} catch(error) {
|
||||
@@ -223,7 +223,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
});
|
||||
@@ -285,15 +285,15 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"expedientes-pr": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
// window.history.back();
|
||||
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"expedientes-pr": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022">
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022">
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,7 +57,7 @@
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022">
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+24
-4
@@ -287,6 +287,10 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
|
||||
.btn-refresh{
|
||||
display: none;
|
||||
}
|
||||
.attach-title-item{
|
||||
width: 200px !important;
|
||||
border: 1px solid red;
|
||||
}
|
||||
}
|
||||
|
||||
.hideAsideOptions{
|
||||
@@ -646,6 +650,7 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
|
||||
|
||||
|
||||
// center
|
||||
app-diploma-assinar ion-content .main-content,
|
||||
app-approve-event ion-content .main-content,
|
||||
app-view-event ion-content .main-content,
|
||||
app-expediente-pr .main-content{
|
||||
@@ -955,11 +960,11 @@ background: rgb(92, 92, 92);
|
||||
|
||||
.date-hour-picker {
|
||||
margin-top: -6px;
|
||||
|
||||
|
||||
label#mat-form-field-label-7 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.span.ng-tns-c193-4, .ng-star-inserted {
|
||||
// display: none;
|
||||
}
|
||||
@@ -967,7 +972,7 @@ background: rgb(92, 92, 92);
|
||||
.ng-star-inserted{
|
||||
// display: none;
|
||||
position: absolute;
|
||||
width: 447px;
|
||||
width: 100%;
|
||||
height: 43px;
|
||||
opacity: 0;
|
||||
button {
|
||||
@@ -975,7 +980,15 @@ background: rgb(92, 92, 92);
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
button {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mat-datepicker-toggle, mat-datepicker-toggle {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-active span {
|
||||
color: #0d89d1 !important;
|
||||
@@ -1013,3 +1026,10 @@ ngx-mat-datetime-content{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// angular material inputs
|
||||
|
||||
.mat-form-field-infix, .mat-form-field-wrapper {
|
||||
padding: 0px !important;
|
||||
}
|
||||
Reference in New Issue
Block a user