mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
+1
-1
@@ -156,4 +156,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,6 +2,7 @@ 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';
|
||||
@@ -13,7 +14,6 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'home',
|
||||
component: HomePage,
|
||||
/* canActivate: [HomeGuard], */
|
||||
resolve: {
|
||||
userData: UserDataResolver
|
||||
},
|
||||
@@ -80,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: [
|
||||
@@ -367,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]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export class ContactsPage implements OnInit {
|
||||
headers: HttpHeaders;
|
||||
options:any;
|
||||
|
||||
contacts: Contact[] = [
|
||||
contacts = [
|
||||
{
|
||||
first: 'Ana',
|
||||
last: 'Manuel',
|
||||
|
||||
+31
-15
@@ -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
|
||||
@@ -79,11 +96,11 @@
|
||||
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">
|
||||
<ion-datetime
|
||||
class="d-block d-md-none"
|
||||
placeholder="Fim*"
|
||||
@@ -118,11 +135,11 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+46
-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,11 @@ export class BookMeetingModalPage implements OnInit {
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate: any;
|
||||
public maxDate: any;
|
||||
public minDate = new Date();
|
||||
|
||||
// curent timestamp + 15 minutes
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
@@ -63,6 +66,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 +141,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 +167,40 @@ export class BookMeetingModalPage implements OnInit {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
}
|
||||
|
||||
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
|
||||
])
|
||||
// participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
// Validators.required
|
||||
// ]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
async saveTask(){
|
||||
// issue12323423
|
||||
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
this.eventBody={
|
||||
|
||||
+54
-7
@@ -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,18 +28,29 @@
|
||||
<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"
|
||||
@@ -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,12 +77,24 @@
|
||||
</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">
|
||||
<ion-select
|
||||
@@ -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;
|
||||
}
|
||||
+46
-6
@@ -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,7 +161,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
@@ -178,8 +177,49 @@ 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(){
|
||||
|
||||
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();
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -111,7 +111,7 @@
|
||||
>
|
||||
</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"
|
||||
@@ -149,7 +149,7 @@
|
||||
>
|
||||
</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">
|
||||
|
||||
@@ -179,7 +179,7 @@ export class EditEventPage implements OnInit {
|
||||
Validators.required
|
||||
]),
|
||||
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
Validators.required
|
||||
// Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
}));
|
||||
|
||||
@@ -110,6 +110,8 @@ export class ProfileComponent implements OnInit {
|
||||
}
|
||||
|
||||
logout() {
|
||||
// clear local storage
|
||||
window.localStorage.clear();
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
||||
|
||||
+19
-4
@@ -960,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;
|
||||
}
|
||||
@@ -972,7 +972,7 @@ background: rgb(92, 92, 92);
|
||||
.ng-star-inserted{
|
||||
// display: none;
|
||||
position: absolute;
|
||||
width: 447px;
|
||||
width: 100%;
|
||||
height: 43px;
|
||||
opacity: 0;
|
||||
button {
|
||||
@@ -980,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;
|
||||
@@ -1018,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