This commit is contained in:
Eudes Inácio
2021-07-29 16:03:06 +01:00
39 changed files with 1664 additions and 459 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ export class DespachoMdService {
return this.processes.CompleteTask(body)
}
sendExpedienteToPending(serialnumber) {
return this.processes.SetTaskToPending(serialnumber)
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { DocumentService } from './document.service';
describe('DocumentService', () => {
let service: DocumentService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DocumentService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+19
View File
@@ -0,0 +1,19 @@
import { Injectable } from '@angular/core';
import { DocumentSetUpMeeting } from '../models/CallMeeting';
import { ProcessesService } from '../services/processes.service';
@Injectable({
providedIn: 'root'
})
export class DocumentService {
constructor(
private processes: ProcessesService
) { }
setUpMeeting(data: DocumentSetUpMeeting) {
return this.processes.documentSetUpMeeting(data)
}
}
+7 -2
View File
@@ -151,9 +151,13 @@ const routes = [
{
path: 'eliminate-event',
loadChildren: () => import('./modals/eliminate-event/eliminate-event.module').then( m => m.EliminateEventPageModule)
},
{
path: 'inactivity',
loadChildren: () => import('./pages/inactivity/inactivity.module').then( m => m.InactivityPageModule)
},
{
path: 'inactivity',
{
path: 'document-set-up-meeting',
loadChildren: () => import('./modals/document-set-up-meeting/document-set-up-meeting.module').then( m => m.DocumentSetUpMeetingPageModule)
},
{
@@ -162,6 +166,7 @@ const routes = [
},
/*
path: 'chat',
@@ -5,6 +5,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
@Component({
selector: 'app-document-detail',
@@ -37,7 +38,6 @@ export class DocumentDetailPage implements OnInit {
ngOnInit() {
this.LoadDocumentDetails();
}
async LoadDocumentDetails() {
@@ -163,9 +163,10 @@ export class DocumentDetailPage implements OnInit {
classs = 'modal modal-desktop showAsideOptions'
}
const modal = await this.modalController.create({
component: BookMeetingModalPage,
component: DocumentSetUpMeetingPage,
componentProps: {
task: task,
document: this.LoadedDocument
},
cssClass: classs,
backdropDismiss: false
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DocumentSetUpMeetingPage } from './document-set-up-meeting.page';
const routes: Routes = [
{
path: '',
component: DocumentSetUpMeetingPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class DocumentSetUpMeetingPageRoutingModule {}
@@ -0,0 +1,57 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { DocumentSetUpMeetingPageRoutingModule } from './document-set-up-meeting-routing.module';
import { DocumentSetUpMeetingPage } from './document-set-up-meeting.page';
import { EmptyContainerPageModule } from 'src/app/shared/empty-container/empty-container.module';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
import { MatNativeDateModule } from '@angular/material/core';
import {
NgxMatDateFormats,
NgxMatDatetimePickerModule,
NgxMatNativeDateModule,
NgxMatTimepickerModule,
NGX_MAT_DATE_FORMATS
} from '@angular-material-components/datetime-picker';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatSelectModule } from '@angular/material/select';
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
import { MAT_DATE_LOCALE } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatInputModule } from '@angular/material/input';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
DocumentSetUpMeetingPageRoutingModule,
//
EmptyContainerPageModule,
AttendeeModalPageModule,
EmptyContainerPageModule,
BtnModalDismissPageModule,
// Angular material
MatDatepickerModule,
MatInputModule,
MatNativeDateModule,
NgxMatDatetimePickerModule,
NgxMatTimepickerModule,
NgxMatNativeDateModule,
NgxMatMomentModule,
MatSelectModule,
MatButtonModule,
ReactiveFormsModule
],
declarations: [DocumentSetUpMeetingPage]
})
export class DocumentSetUpMeetingPageModule {}
@@ -0,0 +1,355 @@
<ion-content>
<div class="main-content d-flex height-100">
<div class="content d-flex flex-column width-100 height-100 ">
<div class="header-content header-default-padding">
<div class="header-title" >
<!-- *ngIf="p.userRole('PR')" -->
<!-- *ngIf="p.role(['PR','MD']).permissionAnyOf(['view','edit'])" -->
<label >Convocar Reunião</label>
</div>
</div>
<div class="overflow-y-auto content-default-padding">
<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" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
<ion-input placeholder="Localização*" [(ngModel)]="postData.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">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class" >
<ion-select
class="d-block d-md-none"
[(ngModel)]="postData.CalendarName"
placeholder="Selecione repetição"
interface="action-sheet"
Cancel-text="Cancelar" required>
<ion-select-option value="Oficial">Oficial</ion-select-option>
<ion-select-option value="Pessoal">Pessoal</ion-select-option>
</ion-select>
<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
</mat-option>
<mat-option value="Pessoal">
Pessoal
</mat-option>
</mat-select>
</mat-form-field>
</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" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
<ion-select placeholder="Selecione tipo de evento*"
class="d-block d-md-none"
[(ngModel)]="postData.Category"
interface="action-sheet"
Cancel-text="Cancelar" required>
<ion-select-option value="Reunião">Reunião</ion-select-option>
<ion-select-option value="Viagem">Viagem</ion-select-option>
<ion-select-option value="Conferência">Conferência</ion-select-option>
<ion-select-option value="Encontro">Encontro</ion-select-option>
</ion-select>
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
<!-- <input matInput type="text" > -->
<mat-select [(ngModel)]="postData.Category" >
<mat-option value="Reunião">
Reunião
</mat-option>
<mat-option value="Viagem">
Viagem
</mat-option>
<mat-option value="Conferência">
Conferência
</mat-option>
<mat-option value="Encontro">
Encontro
</mat-option>
</mat-select>
</mat-form-field>
</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" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
<ion-datetime
class="d-block d-md-none"
placeholder="Início*"
[(ngModel)]="postData.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"
value="2020-11-19T11:06Z">
</ion-datetime>
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
<input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Choose a date*"
[formControl]="dateControlStart"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
[touchUi]="touchUi">
</ngx-mat-datetime-picker>
</mat-form-field>
</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 flex-grow-1" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
<ion-datetime
class="d-block d-md-none"
placeholder="Fim*"
[(ngModel)]="postData.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"
value="2020-11-19T11:06Z">
</ion-datetime>
<mat-form-field appearance="none" class="date-hour-picker width-100 d-none d-md-block">
<input matInput [ngxMatDatetimePicker]="fim"
placeholder="Choose a date*S"
[formControl]="dateControlEnd"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
[touchUi]="touchUi">
</ngx-mat-datetime-picker>
</mat-form-field>
</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-refresh.svg"></ion-icon>
</div>
<div class="ion-input-class">
<ion-select
class="d-block d-md-none"
[(ngModel)]="postData.IsRecurring"
placeholder="Selecione repetição*"
value="false"
interface="action-sheet"
Cancel-text="Cancelar"
required
>
<ion-select-option value="false">Não se repete</ion-select-option>
<ion-select-option value="true">Repete</ion-select-option>
<!-- <ion-select-option value="true">Semanal</ion-select-option>
<ion-select-option value="true">Diário</ion-select-option>
<ion-select-option value="true">Anual</ion-select-option> -->
</ion-select>
<mat-form-field
floatLabel="never"
class="width-100 d-none d-md-block"
value="false"
interface="action-sheet"
required
appearance="none"
>
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postData.IsRecurring" >
<mat-option value="false">
Não se repete
</mat-option>
<mat-option value="true">
Repete
</mat-option>
</mat-select>
</mat-form-field>
</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-person.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
<div class="list-people">
<ion-item lines="none">
<ion-list>
<ion-label *ngIf="taskParticipants?.length < 1" class="list-people-title">Adicionar intervenientes*</ion-label>
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
</div>
<div class="add-people" (click)="addParticipants()">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
</div>
</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-people-cc.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height">
<div class="list-people">
<ion-item lines="none">
<ion-list>
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com conhecimento</ion-label>
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
</div>
<div class="add-people" (click)="addParticipantsCc()">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
</div>
<div class="container-div">
<div class="ion-item-class-2 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height width-100">
<ion-textarea [(ngModel)]="postData.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
</div>
</div>
</div>
<div class="ion-item-container-no-border cursor-pointer" (click)="getDoc()">
<ion-label>
<div class="attach-icon">
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
</div>
<div class="attach-document">
<ion-label>Anexar Documentos</ion-label>
</div>
</ion-label>
</div>
<div class="list " *ngFor="let document of attachments; let i = index" >
<ion-list>
<ion-item>
<ion-label>
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.Assunto}}</span>
<span class="app-name">{{document.appName}}</span>
<span class="close-button text-black" (click)="removeAttachment(i)" >
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yy'}} </span></p>
</ion-label>
</ion-item>
</ion-list>
</div>
</div>
</div>
<div class="aside-righ flex-grow-1">
<app-empty-container
[texto]="emptyTextDescription"
*ngIf="!showAttendees"
class="d-flex height-100 flex-column">
</app-empty-container>
<app-attendee-modal class=" d-flex flex-column height-100"
*ngIf="showAttendees"
[footer]="false"
[taskParticipants]="taskParticipants"
[taskParticipantsCc]="taskParticipantsCc"
[adding]="adding"
(dynamicSetIntervenient)="dynamicSetIntervenient($event)"
>
</app-attendee-modal>
</div>
</div>
</ion-content>
<ion-footer>
<div class="buttons">
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
<button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
</div>
</ion-footer>
@@ -0,0 +1,209 @@
.content{
margin: 0;
float: left;
.header-content{
}
.header-title{
font-family: Roboto;
font-size: 25px;
padding: 0;
color:#000;
float: left;
}
.ion-item-container{
margin: 15px auto;
border: 1px solid #ebebeb;
border-radius: 5px;
padding-left: 10px;
}
.ion-item-container-no-border{
margin: 0px auto;
padding: 0 !important;
overflow: auto;
}
.container-div{
margin-bottom: 15px;
overflow: hidden;
}
.ion-item-class-2{
margin: 0px auto;
}
.ion-icon-class{
width: 45px;
height: 45px;
float: left;
padding: 10px;
font-size: 25px;
}
ion-select{
padding-left: 5px;
margin-left: 0;
}
.ion-input-class{
width: calc(100% - 45px);
height: 45px;
border: 1px solid #ebebeb;
border-radius: 5px;
padding-left: 5px;
padding-right: 10px;
float: left;
}
.ion-input-class-no-height{
border: 1px solid #ebebeb;
border-radius: 5px;
overflow: auto;
}
.list-people{
width: 256px;
float: left;
}
.add-people{
width: 45px;
float: right;
overflow: auto;
font-size: 25px;
padding: 10px;
}
.list-people-title{
/* font-size: 13px; */
color: #a3a3a3;
}
.attach-document{
font-size: 15px;
color: #0d89d1;
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
}
.attach-icon{
width: 37px;
font-size: 35px;
float: left;
}
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
}
/* SPAN */
.span-left{
float: left;
font-size: 15x;
}
.span-right{
text-align: right;
float: right;
font-size: 13px;
}
}
.container-footer{
margin:0 auto;
overflow: auto;
}
.button-cancel {
width: 170px;
height: 44px;
border-radius: 22.5px;
--background: #e0e9ee;
--color: #061b52;
margin:10px;
}
.button-save {
width: 170px;
height: 44px;
border-radius: 22.5px;
--background: #42b9fe;
--color:#ffffff;
margin:10px;
}
.text-input{
width: 100%;
border: 1px solid #ebebeb;
margin: 0px 15px 15px 0px;
padding: 0 !important;
border-radius: 5px;
}
/* Error Messages */
.error{
color:red;
font-size: 12px;
font-weight: bold;
padding-bottom: 20px;
}
.span-color{
color:red;
}
.buttons{
display: flex;
justify-content: space-between;
padding: 20px;
overflow: auto;
}
.attach-icon{
width: 37px;
font-size: 35px;
float: left;
}
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
}
/* SPAN */
.span-left{
float: left;
font-size: 15x;
}
.span-right{
text-align: right;
float: right;
font-size: 13px;
}
.app-name{
background: #42b9f2;
border-radius: 18px;
text-align: center;
display: flex;
align-items: center;
padding: 0px 5px;
color: white;
font-size: 9pt;
font-weight: 500;
height: 19px;
-webkit-border-radius: 18px;
-moz-border-radius: 18px;
-ms-border-radius: 18px;
-o-border-radius: 18px;
}
.close-button {
display: none;
}
.list:hover {
.app-name {
display: none;
}
.close-button {
display: block !important;
}
}
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { DocumentSetUpMeetingPage } from './document-set-up-meeting.page';
describe('DocumentSetUpMeetingPage', () => {
let component: DocumentSetUpMeetingPage;
let fixture: ComponentFixture<DocumentSetUpMeetingPage>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ DocumentSetUpMeetingPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(DocumentSetUpMeetingPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,379 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { ModalController, NavParams } from '@ionic/angular';
import { Event } from 'src/app/models/event.model'
import { ProcessesService } from 'src/app/services/processes.service';
import { EventPerson } from 'src/app/models/eventperson.model';
import { SearchPage } from 'src/app/pages/search/search.page';
import { SearchDocument } from 'src/app/models/search-document';
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, FormGroup, Validators } from '@angular/forms';
import * as _moment from 'moment';
import * as _rollupMoment from 'moment';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { MAT_DATE_LOCALE } from '@angular/material/core';
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
import { DocumentService } from 'src/app/Rules/document.service';
import { DocumentSetUpMeeting, Attachments } from 'src/app/models/CallMeeting';
const moment = _rollupMoment || _moment;
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
dateInput: "YYYY-MMMM-DD HH:mm"
},
display: {
dateInput: "DD MMM YYYY H:mm",
monthYearLabel: "MMM YYYY",
dateA11yLabel: "LL",
monthYearA11yLabel: "MMMM YYYY"
}
}
@Component({
selector: 'app-document-set-up-meeting',
templateUrl: './document-set-up-meeting.page.html',
styleUrls: ['./document-set-up-meeting.page.scss'],
})
export class DocumentSetUpMeetingPage implements OnInit {
public date: any;
public disabled = false;
public showSpinners = true;
public showSeconds = false;
public touchUi = false;
public enableMeridian = false;
public minDate = new Date();
public stepHour = 1;
public stepMinute = 5;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
p: any = {}
Form: FormGroup;
validateFrom = false
showLoader = false
get dateStart () {
if( window.innerWidth < 801) {
return this.postData.StartDate;
}
else{
return this.dateControlStart.value;
}
}
get dateEnd () {
if( window.innerWidth < 801) {
return this.postData.EndDate;
}
else{
return this.dateControlEnd.value;
}
}
@ViewChild('picker') picker: any;
@ViewChild('fim') fim: any;
@ViewChild('inicio') inicio: any;
@ViewChild('picker1') picker1: any;
task: any;
taskParticipants: EventPerson[] = [];
taskParticipantsCc: EventPerson[] = [];
taskDocId:string;
loadedAttachments:any;
documents: SearchDocument[] = [];
attachments:SearchDocument[] = [];
adding: "intervenient" | "CC" = "intervenient";
postData: Event;
formLocationSatus: boolean = false;
showAttendees= false;
loggeduser: User;
emptyTextDescription = "Sem intervenientes selecionados";
document: any;
constructor(
private modalController: ModalController,
private router:Router,
private navParams: NavParams,
private processes:ProcessesService,
authService: AuthService,
private toastService: ToastService,
private documentService: DocumentService
) {
this.loggeduser = authService.ValidatedUser;
this.task = this.navParams.get('task');
this.document = this.navParams.get('document')
this.postData = new Event();
this.postData.Body ={ BodyType : "1", Text : ""};
this.postData.Subject = this.task.Folio;
this.postData.CalendarName = "Oficial";
this.postData.Category = 'Reunião'
}
ngOnInit() {
this.adding = "intervenient";
console.log(this.task);
this.setDefaultTime()
}
setDefaultTime() {
this.postData.StartDate = new Date()
this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
}
close() {
this.modalController.dismiss(null);
}
goBack() {
this.modalController.dismiss(null);
}
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.taskParticipants, [
// Validators.required
]),
Categories: new FormControl(this.postData.Category, [
// Validators.required
]),
})
}
async saveTask() {
if(this.loggeduser.Profile == 'MDGPR') {
this.injectValidation()
this.runValidation()
}
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
let data: DocumentSetUpMeeting = {
EventProcess: {
Body: this.postData.Body.Text,
Location: this.postData.Location,
StartDate: this.dateStart,
EndDate: this.dateEnd,
EventType: 'Reunião',
ParticipantsList: Attendees,
EventRecurrence: null,
Subject: this.postData.Subject,
IsRecurring: this.postData.IsRecurring,
Message: this.postData.Subject,
IsAllDayEvent: this.postData.IsRecurring,
},
Attachments: []
}
if(this.document.Documents) {
this.document.Documents.forEach( (ele) => {
console.log(ele)
data.Attachments.push({
ApplicationId: 361,
Source: 1,
SourceId: ele.docID || ele.docId || ele.DocId,
SourceName: ele.Assunto
})
});
} else {
data.Attachments.push({
ApplicationId: 8,
Source: 1,
SourceId: this.document.docID || this.document.docId || this.document.DocId,
SourceName: this.document.Assunto
})
}
this.attachments.forEach((e)=> {
console.log('e', e)
data.Attachments.push({
ApplicationId: e.ApplicationType,
Source: 1,
SourceId: e.Id,
SourceName: e.Assunto
})
})
const loader = this.toastService.loading()
try {
await this.documentService.setUpMeeting(data).toPromise()
this.toastService.successMessage('Processo criado')
this.close()
} catch(e) {
this.toastService.badRequest("Processo não criado")
} finally {
loader.remove()
}
}
async addParticipants() {
this.adding = "intervenient";
if(window.innerWidth <= 801){
const modal = await this.modalController.create({
component: AttendeesPageModal,
componentProps: {
adding: this.adding,
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
if(data) {
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
});
} else {
this.showAttendees = true;
}
}
async addParticipantsCc() {
this.adding = "CC";
if(window.innerWidth <= 800) {
const modal = await this.modalController.create({
component: AttendeesPageModal,
componentProps: {
adding: this.adding,
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
if(data){
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
});
} else {
this.showAttendees = true;
}
}
async getDoc() {
const modal = await this.modalController.create({
component: SearchPage,
cssClass: 'modal modal-desktop modal-width-100-width-background',
componentProps: {
type: 'AccoesPresidenciais & ArquivoDespachoElect',
showSearchInput: true,
select: true
}
});
await modal.present();
modal.onDidDismiss().then((res)=> {
if(res){
const data = res.data;
this.attachments.push(data.selected);
}
});
}
removeAttachment(index: number) {
this.attachments = this.attachments.filter( (e, i) => index != i);
}
validateFormInputs(){
let formLocation = this.postData.Location.trim();
if(!this.postData.Location && formLocation.length <= 0){
this.formLocationSatus = true;
}
}
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
this.taskParticipants = taskParticipants;
this.taskParticipantsCc = taskParticipantsCc;
}
goToGabinete() {
this.router.navigate(['/home/gabinete-digital']);
}
setIntervenient(data) {
this.taskParticipants = data;
}
setIntervenientCC(data) {
this.taskParticipantsCc = data;
}
}
@@ -1,63 +1,91 @@
<ion-content class=" bg-blue">
<div class="btn-close d-flex" (click)="close()">
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
</div>
<div class="profile-content width-100">
<div class="d-flex justify-space-between align-center">
<div class="go-back d-flex align-center" (click)="close()">
<ion-icon class="icon" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon> <div>Perfil</div>
<div class="main-content width-100 overflow-y-auto height-100">
<div class="profile-header width-100">
<div class="div-logo d-md-none">
<div class="logo height-fit-content">
<img class="img" src='assets/images/logo-no-bg.png' alt='logo'>
</div>
</div>
<!-- <div class="d-flex " (click)="close()">
<div class="btn-close d-flex" (click)="close()">
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
</div> -->
</div>
<div >
<div class="d-flex align-center">
<ion-icon class="profile-pic" src="assets/images/icons-default-profile.svg"></ion-icon>
</div>
</div>
<div class="profile-content overflow-y-auto width-100 height-100">
<div class="profile-title d-flex justify-space-between align-center width-100">
<div class="d-flex align-center">
<div>Dados do perfil</div>
</div>
<div class="profile-info">
<div class="label-text">Dados Perfil</div>
<div class="user-role">{{loggeduser.RoleDescription}}</div>
<div class="email">{{loggeduser.Email}}</div>
</div>
<!-- <div class="d-flex " (click)="close()">
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
</div> -->
</div>
<div class="login-preference" (mouseover)="checkState()" (click)="checkState()">
<div class="preference">Preferência Login</div>
<div >
<div class="d-flex align-center">
<ion-icon class="profile-pic" src="assets/images/icons-default-profile.svg"></ion-icon>
</div>
</div>
<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 class="profile-info">
<div class="user-role">{{loggeduser.RoleDescription}}</div>
<div class="container-div width-100">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" name="person"></ion-icon>
</div>
<div class="ion-input-class">
<ion-input placeholder="Nome" [(ngModel)]="loggeduser.FullName"></ion-input>
</div>
</div>
</div>
</ion-col>
<ion-col class="align-center d-flex">
<div (click)="addFingerprint()" class="d-flex align-center">
<ion-checkbox class="checkBox" [checked]="false"></ion-checkbox>
Impressão Digital
<div class="container-div width-100">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" name="mail"></ion-icon>
</div>
<div class="ion-input-class">
<ion-input placeholder="Email" [(ngModel)]="loggeduser.Email"></ion-input>
</div>
</div>
</ion-col>
</div>
</div>
</ion-row>
</div>
<div class="login-preference width-100" (mouseover)="checkState()" (click)="checkState()">
<div class="preference">Preferência Login</div>
<div class="d-flex justify-center mt-10">
<button (click)="addPin()" class="btn-ok buttonSize" fill="clear" color="#fff" >
<ion-label>Alterar PIN</ion-label>
</button>
<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>
</ion-col>
<ion-col class="align-center d-flex">
<div (click)="addFingerprint()" class="d-flex align-center">
<ion-checkbox class="checkBox" [checked]="false"></ion-checkbox>
Impressão Digital
</div>
</ion-col>
</ion-row>
</div>
<div class="d-flex width-100 justify-center mt-10">
<button (click)="addPin()" class="btn-ok buttonSize" fill="clear" color="#fff" >
<ion-label>Alterar PIN</ion-label>
</button>
</div>
</div>
</div>
</ion-content>
<ion-footer class=" footer-container ion-no-border bg-blue">
<!--
Para adicionar a funcionalidade assim que o método
para alterar o nome e email estiver pronto
-->
<ion-footer hidden class=" footer-container ion-no-border bg-blue">
<div class="d-flex justify-space-between">
@@ -1,67 +1,111 @@
.btn-close{
padding: 20px 20px;
.main-content{
overflow: hidden !important;
}
.profile-header{
margin: 0 em(20px);
// background-color: #0782c9;
padding: 20px 20px;
border: 0!important;
overflow: auto;
.div-logo{
background: transparent;
width: calc(100% - 40px) !important;
justify-content: center;
align-items: center;
float: right;
display: flex;
float: left;
.logo{
width: 140px;
.img{
width: 100%;
margin: 0px auto;
}
}
}
}
.btn-close{
float: right !important;
}
.profile-content{
width: 100% !important;
padding: 0px 20px;
padding: 0 20px 50px 20px;
float: left;
.profile-title{
font-size: 20px;
font-weight: 300;
margin-bottom: 20px;
}
.profile-info{
margin-top: 20px;
color: #fff;
font-family: Roboto;
font-size: 13px;
.user-role{
background-color: white;
border-radius: 5px;
padding: 12px;
color: black;
text-align: center;
margin-bottom: 5px;
}
.container-div{
margin-bottom: 5px;
float: left;
overflow: hidden;
.ion-item-class-2{
margin: 0px auto;
}
.ion-icon-class{
color: #ebebeb;
width: 40px;
height: 40px;
float: left;
padding: 5px;
font-size: 25px;
}
.ion-input-class{
width: calc(100% - 40px);
height: 40px;
border: 1px solid #ebebeb;
border-radius: 5px;
padding-left: 5px;
padding-right: 10px;
float: left;
background-color: transparent;
}
}
}
}
.icon{
font-size: 35px;
}
.go-back{
font-family: Roboto;
font-size: 25px;
.icon{
margin-right: 7px;
}
font-size: 40px;
}
.profile-pic{
width: 200px;
height: 200px;
border-radius: 20px;
margin: 0px auto;
}
.profile-info{
.label-text{
font-size: 15px;
font-weight: bold;
color: white;
margin-bottom: 10px;
}
.user-role{
background-color: white;
border-radius: 5px;
padding: 12px;
font-family: Roboto;
font-size: 13px;
color: black;
text-align: center;
}
.email {
margin-top: 15px;
}
width: 150px;
height: 150px;
border-radius: 50%;
margin: 0 auto;
border-color: transparent !important;
}
.login-preference{
margin-top: 44px;
margin-top: 15px;
float: left;
font-family: Roboto;
font-size: 13px;
font-weight: 300;
.preference{
font-family: Roboto;
font-size: 15px;
margin-bottom: 20px;
font-weight: bold;
font-size: 20px;
margin-bottom: 0 !important;
}
.checkBox{
margin-right: 10px;
@@ -70,4 +114,5 @@
.buttonSize {
width: 100% !important;
margin: 15px 0 15px 0 !important;
}
+1 -1
View File
@@ -1,7 +1,7 @@
<ion-content class=" bg-blue">
<div class="profile-header width-100">
<div class="div-logo">
<div class="div-logo d-md-none">
<div class="logo height-fit-content">
<img class="img" src='assets/images/logo-no-bg.png' alt='logo'>
</div>
+1 -5
View File
@@ -22,9 +22,7 @@
}
}
.btn-close{
justify-content: center;
align-items: center;
float: left;
float: right !important;
}
.profile-content{
padding: 20px 20px;
@@ -77,8 +75,6 @@ ion-list{
color: #000;
overflow: hidden;
border: 1px solid blue;
.notification-item{
width: fit-content;
float: left;
+35 -47
View File
@@ -1,50 +1,38 @@
export class CallMeeting {
"EventProcess": {
"SerialNumber": "sample string 1",
"Body": "sample string 2",
"Location": "sample string 3",
"Subject": "sample string 4",
"StartDate": "2021-07-28T13:22:55.031857+01:00",
"EndDate": "2021-07-28T13:22:55.031857+01:00",
"ReviewUserComment": "sample string 7",
"MDName": "sample string 8",
"MDEmail": "sample string 9",
"IsAllDayEvent": true,
"Status": "sample string 11",
"EventType": "sample string 12",
"IsRecurring": true,
"ParticipantsList": [
{
"Id": 1,
"EmailAddress": "sample string 2",
"Name": "sample string 3",
"IsRequired": true
},
{
"Id": 1,
"EmailAddress": "sample string 2",
"Name": "sample string 3",
"IsRequired": true
}
],
"Message": "sample string 14",
import { EventPerson } from "./eventperson.model"
export class Attachments {
Id?: number
Source: number
SourceId: any
SourceName: any
ApplicationId: number | string
}
export class DocumentSetUpMeeting {
EventProcess: {
"SerialNumber"?: "sample string 1",
"Body": string,
"Location": string,
"Subject": string,
"StartDate"?: "2021-07-28T13:22:55.031857+01:00",
"EndDate"?: "2021-07-28T13:22:55.031857+01:00",
"ReviewUserComment"?: "sample string 7",
"MDName"?: "sample string 8",
"MDEmail"?: "sample string 9",
"IsAllDayEvent"?: boolean,
"Status"?: "sample string 11",
"EventType"?: string,
"IsRecurring": boolean,
"ParticipantsList"?: EventPerson[],
"Message": string,
"EventRecurrence": {
"Type": 0,
"Day": 1,
"DayOfWeek": 0,
"Month": 1,
"LastOccurrence": "2021-07-28T13:22:55.031857+01:00"
},
"Participants": "sample string 15",
"CC": "sample string 16"
"Day"?: 1,
"DayOfWeek"?: 0,
"Month"?: 1,
"LastOccurrence"?: "2021-07-28T13:22:55.031857+01:00"
}
}
"Attachment": {
"Id": 1,
"ParentId": "sample string 2",
"Source": 0,
"SourceId": "sample string 3",
"SourceName": "sample string 4",
"ApplicationId": 1
}
}
Attachments: Attachments[]
}
+1 -1
View File
@@ -1,6 +1,6 @@
export class SearchDocument {
ApplicationType: number;
ApplicationType: number | string;
Assunto: string;
Data: string;
DocTypeDesc: string;
+108 -106
View File
@@ -41,7 +41,7 @@ import { CalendarService } from 'src/app/store/calendar.service';
],
})
export class AgendaPage implements OnInit {
view: CalendarView = CalendarView.Day;
viewDate: Date = new Date();
@@ -73,16 +73,16 @@ export class AgendaPage implements OnInit {
showTimelinePR = false;
showTimelineMD = false;
// timeline filter
timelineFilterState: string = 'Todos';
showTimelineFilterState: boolean;
showTimeline=true;
/* List of events of our calendar */
eventSource : eventSource[] = []
/* The title of the calendar */
viewTitle: string;
@@ -108,12 +108,12 @@ export class AgendaPage implements OnInit {
taskParticipants: any = [];
taskParticipantsCc: any = [];
adding: "intervenient" | "CC" = "intervenient";
@ViewChild(CalendarComponent) myCal: CalendarComponent;
segment: "Combinado" | "Pessoal" | "Oficial" = "Combinado";
timelineSedment : "Combinado" | "Pessoal" | "Oficial";
profile:'mdgpr' | 'pr';
// this will make toggle add event and.
@@ -153,7 +153,7 @@ export class AgendaPage implements OnInit {
IsEvent: "edit" | "add" | "view";
viewingEventObject: CalendarEvent ;
loggeduser: User;
constructor(
private alertCtrl: AlertController,
@Inject(LOCALE_ID) private locale: string,
@@ -194,7 +194,7 @@ export class AgendaPage implements OnInit {
this.updateEventListBox()
}, 1000)
}
ngOnInit() {
@@ -215,7 +215,7 @@ export class AgendaPage implements OnInit {
if ( realoadCounter != 0) {
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
}
realoadCounter++;
}
@@ -258,7 +258,7 @@ export class AgendaPage implements OnInit {
this.clearPostEvent();
this.IsEvent= "view";
this.viewingEventObject = event;
this.eventSelectedDate = event.start;
@@ -266,7 +266,7 @@ export class AgendaPage implements OnInit {
this.cloneAllmobileComponent();
this.showEventEditOrOpen = 'edit';
if( window.innerWidth <= 1024) {
@@ -289,7 +289,7 @@ export class AgendaPage implements OnInit {
onCurrentChanged = (ev: Date) => {
// timeline change date
this.timelineDate = momentG(new Date(ev),'dd MMMM yyyy');
this.timelineDate = momentG(new Date(ev),'dd MMMM yyyy');
this.viewDate = new Date(ev);
// calendar change date
this.eventSelectedDate = new Date(ev);
@@ -313,7 +313,7 @@ export class AgendaPage implements OnInit {
this.rangeEndDate = ev.endTime;
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
try {
this.myCal.update();
@@ -326,19 +326,19 @@ export class AgendaPage implements OnInit {
// for calendar
currentDayEventDisplayBorder(day: any, id: any) {
const events = day[id].events;
if (events.length == 0) {
return "";
} else if (events.length >= 1) {
let classs = [];
events.forEach(element => {
const profile_ = element.profile == 'md'? 'mdgpr': 'pr';
const eventtype = element.event.CalendarName;
@@ -347,11 +347,11 @@ export class AgendaPage implements OnInit {
// // console.log(id, (endMinutes + endHours))
// classs.push(`calendar-event-border`);
// }
classs.push(`calendar-event-border calendar-${profile_}-event-type-${eventtype}`);
});
return classs.join(' ');
}
@@ -389,7 +389,7 @@ export class AgendaPage implements OnInit {
this.showTimelineFilterState = false;
eventsList.forEach((element, eventIndex) => {
// timeline start
const startHours = new Date(element.StartDate).getHours().toLocaleString();
const EndHours = new Date(element.EndDate).getHours().toLocaleString();
@@ -413,7 +413,7 @@ export class AgendaPage implements OnInit {
return events;
}
eventFilter() {}
TimelineDayEvent(day): string {
@@ -421,7 +421,7 @@ export class AgendaPage implements OnInit {
}
get calendarDay(): string {
return ((new Date(this.timelineDate)).getDate()).toString().padStart(2,'0')
}
@@ -431,7 +431,7 @@ export class AgendaPage implements OnInit {
const endTimeSamp = new Date(endTime).toLocaleDateString()
const endMinutes = new Date(endTime).getMinutes()
const endHours = new Date(endTime).getHours()
const endHours = new Date(endTime).getHours()
if (startTimeSamp < endTimeSamp && (endMinutes + endHours) == 0) {
@@ -449,7 +449,7 @@ export class AgendaPage implements OnInit {
this.showLoader = true;
if(window.innerWidth < 800){
// this.showTimeline = false;
switch (this.segment) {
@@ -458,27 +458,29 @@ export class AgendaPage implements OnInit {
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR' ) {
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then(
(response:any) => {
console.log(response);
// calendar
this.calendarService.removeRange(startTime, endTime, 'md')
// loop
this.calendarService.pushEvent(response, 'md');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
this.showLoader = false;
this.showTimeline = true;
}).finally(()=>{
this.showLoader = false;
})
}
else if(this.profile == "pr" && this.loggeduser.Profile == 'MDGPR') {
@@ -487,7 +489,7 @@ export class AgendaPage implements OnInit {
this.calendarService.removeRange(startTime, endTime, 'pr')
// calendar
this.calendarService.pushEvent(response, 'pr');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
@@ -495,31 +497,31 @@ export class AgendaPage implements OnInit {
this.showLoader = false;
this.showTimeline = true;
}).finally(()=>{
this.showLoader = false;
})
})
}
else if(this.loggeduser.Profile == 'PR') {
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then(
(response:any) => {
// calendar
// this.eventSource=[];
// clear the current month only
this.calendarService.removeRange(startTime, endTime, 'pr')
this.calendarService.pushEvent(response, 'pr');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
this.showLoader = false;
this.showTimeline = true;
@@ -529,21 +531,21 @@ export class AgendaPage implements OnInit {
})
}
break;
case "Pessoal":
//Inicializa o array eventSource
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
this.eventService.getAllMdPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
this.calendarService.removeRange(startTime, endTime, 'md')
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
// loop
this.calendarService.pushEvent(eventsList, 'md');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -552,22 +554,22 @@ export class AgendaPage implements OnInit {
}).finally(()=>{
this.showLoader = false;
})
}
else{
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
//this.eventSource=[];
// clear the current month only
this.calendarService.removeRange(startTime, endTime, 'pr')
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
this.calendarService.pushEvent(eventsList, 'pr');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -579,7 +581,7 @@ export class AgendaPage implements OnInit {
})
}
break;
case "Oficial":
//Inicializa o array eventSource
@@ -587,37 +589,37 @@ export class AgendaPage implements OnInit {
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => {
this.calendarService.removeRange(startTime, endTime, 'md')
const eventsList = res.filter(data => data.CalendarName == "Oficial");
this.calendarService.pushEvent(eventsList, 'md');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
this.showLoader = false;
this.showTimeline = true;
}).finally(()=>{
this.showLoader = false;
})
} else {
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => {
// this.eventSource=[];
// this.eventSource=[];
this.calendarService.removeRange(startTime, endTime, 'pr')
const eventsList = res.filter(data => data.CalendarName == "Oficial");
this.calendarService.pushEvent(eventsList, 'pr');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
@@ -631,24 +633,24 @@ export class AgendaPage implements OnInit {
})
}
break;
}
}
} else {
// calendar
let counter = 0;
if(this.loggeduser.Profile == 'MDGPR') {
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then( (response:any) => {
let eventsList = response;
this.calendarService.removeRange(startTime, endTime, 'md')
// loop
this.calendarService.pushEvent(eventsList, 'md');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
@@ -660,7 +662,7 @@ export class AgendaPage implements OnInit {
if(counter==2) {
this.showLoader = false;
}
}).finally(()=> {
counter++;
@@ -670,21 +672,21 @@ export class AgendaPage implements OnInit {
})
this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
let eventsList = response;
// clear the current month only
this.calendarService.removeRange(startTime, endTime, 'pr')
this.calendarService.pushEvent(eventsList, 'pr');
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
this.showTimelinePR = true;
counter++;
if(counter==2 || this.loggeduser.Profile == 'PR') {
@@ -701,7 +703,7 @@ export class AgendaPage implements OnInit {
} else {
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
let eventsList;
if(this.segment == 'Oficial') {
eventsList = response.filter(data => data.CalendarName == "Oficial");
@@ -710,20 +712,20 @@ export class AgendaPage implements OnInit {
} else {
eventsList = response;
}
// clear the current month only
this.calendarService.removeRange(startTime, endTime, 'pr')
this.calendarService.pushEvent(eventsList, 'pr');
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
this.showTimelinePR = true;
counter++;
if(counter==1 || this.loggeduser.Profile == 'PR') {
@@ -737,7 +739,7 @@ export class AgendaPage implements OnInit {
})
}
}
}
@@ -756,34 +758,34 @@ export class AgendaPage implements OnInit {
var startDate: any = new Date(event.start);
var endDate: any = this.EventTretment({
startTime: startDate,
startTime: startDate,
endTime: event.end
})
const day = (((new Date (event.start)).getDate())).toString().padStart(2,'0')
event.manyDays = false
event.todayOnly = new Date(event.start).toLocaleDateString() == new Date(event.end).toLocaleDateString()
if(!days.hasOwnProperty(day)) {
days[day] = []
}
if (new Date(startDate).toLocaleDateString() != new Date(endDate).toLocaleDateString()) {
// difference
const diffTime = Math.abs(endDate - startDate);
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
if (diffDays >= 1) {
const StartEvent = Object.assign({}, {
title: event.title,
start: event.start,
@@ -805,28 +807,28 @@ export class AgendaPage implements OnInit {
endMany: false,
middle: false
})
days[day].push(StartEvent)
let i = 1;
while (startDate.getFullYear() != endDate.getFullYear() ||
while (startDate.getFullYear() != endDate.getFullYear() ||
startDate.getMonth() != endDate.getMonth() ||
startDate.getDate() != endDate.getDate()) {
const newDate = startDate.setDate(startDate.getDate()+ i)
let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0')
event.other = true
event.start = newDate
if(!days.hasOwnProperty(otherDays)) {
days[otherDays] = []
}
if (!(startDate.getFullYear() != endDate.getFullYear() ||
if (!(startDate.getFullYear() != endDate.getFullYear() ||
startDate.getMonth() != endDate.getMonth() ||
startDate.getDate() != endDate.getDate())) {
// last push
@@ -881,7 +883,7 @@ export class AgendaPage implements OnInit {
})
days[otherDays].push(EndEvent)
}
}
} else {
@@ -893,7 +895,7 @@ export class AgendaPage implements OnInit {
}
}
}
days[day].push(event)
@@ -908,7 +910,7 @@ export class AgendaPage implements OnInit {
}
})
}, 10)
return days
}
@@ -955,7 +957,7 @@ export class AgendaPage implements OnInit {
}
async openAddEvent() {
await this.cloneAllmobileComponent();
this.showEventEditOrOpen = 'add';
@@ -975,7 +977,7 @@ export class AgendaPage implements OnInit {
await modal.present();
modal.onDidDismiss().then((data) => {
if(data){
}
this.openAddEventDismiss(data['data'])
});
@@ -1015,7 +1017,7 @@ export class AgendaPage implements OnInit {
this.router.navigate(['/home/agenda', eventId, 'agenda']);
/* console.log(this.profile);
const modal = await this.modalCtrl.create({
component: ViewEventPage,
componentProps:{
@@ -1035,11 +1037,11 @@ export class AgendaPage implements OnInit {
// open component
async viewEventDetailDismiss(data) {
await this.cloneAllmobileComponent()
if (data.type == 'edit') {
this.selectedEvent = data.event;
this.postEvent = data.event;
@@ -1055,7 +1057,7 @@ export class AgendaPage implements OnInit {
async viewEventsToApprove() {
await this.cloneAllmobileComponent();
if( window.innerWidth <= 801){
if( window.innerWidth <= 801) {
this.router.navigate(['/home/agenda/event-list']);
} else {
// hide all components
@@ -1079,7 +1081,7 @@ export class AgendaPage implements OnInit {
approveEventDismiss({saveData, serialNumber, action}) {
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
if(action == 'Aprovar') {
this.eventToaprove = {
back: true,
@@ -1111,7 +1113,7 @@ export class AgendaPage implements OnInit {
}
}
closeEventToApproveGoBack() {
if( window.innerWidth <= 801){
this.router.navigate(['/home/agenda/event-list']);
@@ -1154,7 +1156,7 @@ export class AgendaPage implements OnInit {
async openAttendeesComponent(data) {
this.adding = data.type
this.cloneAllmobileComponent();
this.mobileComponent.showAttendees = true;
}
@@ -1174,7 +1176,7 @@ export class AgendaPage implements OnInit {
async GoBackEditOrAdd() {
if(this.showEventEditOrOpen == "edit") {
this.cloneAllmobileComponent();
@@ -1210,7 +1212,7 @@ export class AgendaPage implements OnInit {
this.taskParticipants = removeDuplicate(data)
}
async setIntervenientCC(data) {
this.taskParticipantsCc = removeDuplicate(data)
}
@@ -1255,11 +1257,11 @@ export class AgendaPage implements OnInit {
}
})
}, 100)
}
async showEventBox(event) {
if ( event.event.CalendarName == this.segment || this.segment == 'Combinado') {
return true
}
@@ -1279,4 +1281,4 @@ export class AgendaPage implements OnInit {
return reuslt.length != 0
}
}
}
@@ -3,7 +3,7 @@
<ion-buttons slot="start">
<ion-back-button defaultHref="{{ backURL }}"></ion-back-button>
</ion-buttons>
<ion-title class="header-title">21Visualizar Evento</ion-title>
<ion-title class="header-title">Visualizar Evento</ion-title>
<ion-buttons slot="end">
<button (click)="deleteConfirm()" class="ion-icon-delete">
<ion-icon name="trash"></ion-icon>
@@ -23,7 +23,7 @@
<!-- Error messages -->
<span class="error ion-padding" *ngIf="errorControl.subject.errors?.required">
Campo obrigatório
</span>
</span>
<ion-item>
<ion-label position="stacked">Descrição</ion-label>
<ion-input class="capitalizeText" [(ngModel)]='loadedEvent.Body.Text'></ion-input>
@@ -60,7 +60,7 @@
displayFormat="D MMM YYYY HH:mm" minuteValues="0,15,30,45"
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
</ion-item>
<div class="div-attach" >
<ion-item>
<ion-buttons slot="end" (click)="openAttendees()">
@@ -74,11 +74,11 @@
<ion-list >
<ion-item class="attendees" lines="none" >
<ion-icon class="attendees-icon" name="person" slot="start"></ion-icon>
<ion-label class="capitalizeText" class="attendees-list">{{attendee.Name}}</ion-label>
<ion-label class="capitalizeText" class="attendees-list">{{attendee.Name}}</ion-label>
</ion-item>
</ion-list>
</div>
</div>
<div *ngIf="loadedEvent.Attendees.length > 1">
<ion-button class="see-more-button" fill="none" shape="round" (click)="openAttendees()">
@@ -104,7 +104,7 @@
<ion-label>
<p>{{ att.Description }}</p>
<p>{{ att.CreateDate }}</p>
</ion-label>
</ion-label>
</ion-item>
</ion-list>
</div>
-1
View File
@@ -16,7 +16,6 @@ import { HeaderNoSearchPageModule } from 'src/app/shared/headers/header-no-searc
CommonModule,
FormsModule,
IonicModule,
EventsPageRoutingModule,
HeaderNoSearchPageModule,
],
+26 -25
View File
@@ -28,7 +28,7 @@ import { ExpedienteStorage } from 'src/app/store/expediente-storage-service.serv
export class EventsPage implements OnInit {
/* Get current system date */
today = new Date();
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"];
@@ -59,7 +59,7 @@ export class EventsPage implements OnInit {
currentHoursMinutes: Date;
showLoader: boolean;
taskslist:DailyWorkTask[] = [];
expedientList:any;
@@ -72,8 +72,8 @@ export class EventsPage implements OnInit {
loggeduser: User;
constructor(
private eventService: EventsService,
private router: Router,
private eventService: EventsService,
private router: Router,
private storageService:StorageService,
public activatedRoute: ActivatedRoute,
private alertController: AlertService,
@@ -89,7 +89,7 @@ export class EventsPage implements OnInit {
// list
this.LoadList();
}
ngOnInit() {
@@ -102,7 +102,7 @@ export class EventsPage implements OnInit {
this.showGreeting();
const pathname = window.location.pathname
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == pathname) {
this.RefreshEvents();
@@ -130,30 +130,30 @@ export class EventsPage implements OnInit {
let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
let end = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" 23:59:59";
if(this.loggeduser.Profile == 'MDGPR') {
let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise();
let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise();
const list = mdOficialEvents.concat(mdPessoalEvents);
this.toDayEventStorage.reset(list)
if(this.toDayEventStorage.eventsList.length > 0){
this.currentEvent = this.toDayEventStorage.eventsList[0].Subject;
this.currentHoursMinutes = this.toDayEventStorage.eventsList[0].StartDate;
}
this.totalEvent = this.toDayEventStorage.eventsList.length;
this.showLoader = false;
}
else if (this.loggeduser.Profile == 'PR') {
let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise();
let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
const list = prOficialEvents.concat(prPessoalEvents);
this.toDayEventStorage.reset(list)
@@ -165,7 +165,7 @@ export class EventsPage implements OnInit {
this.totalEvent = this.toDayEventStorage.eventsList.length;
this.showLoader = false;
}
@@ -176,17 +176,17 @@ export class EventsPage implements OnInit {
let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise();
let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise();
this.eventsList = mdOficialEvents.concat(mdPessoalEvents);
if(this.eventsList.length > 0){
this.currentEvent = this.eventsList[0].Subject;
this.currentHoursMinutes = this.eventsList[0].StartDate;
}
this.totalEvent = this.eventsList.length;
this.showLoader = false;
}
else{
@@ -203,9 +203,9 @@ export class EventsPage implements OnInit {
this.totalEvent = this.eventsList.length;
this.showLoader = false;
}
break;
case "Pessoal":
if(this.loggeduser.Profile == 'MDGPR'){
@@ -220,7 +220,7 @@ export class EventsPage implements OnInit {
this.showLoader = false;
});
}
break;
case "Oficial":
if(this.loggeduser.Profile == 'MDGPR'){
@@ -234,7 +234,7 @@ export class EventsPage implements OnInit {
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
this.showLoader = false;
});
}
}
break;
} */
}
@@ -276,7 +276,7 @@ export class EventsPage implements OnInit {
async openEventDetail1(id:any){
console.log(id);
const modal = await this.modalController.create({
component: EventDetailPage,
componentProps: {
@@ -294,6 +294,7 @@ export class EventsPage implements OnInit {
switch (this.loggeduser.Profile) {
case 'MDGPR':
this.processes.GetTasksList("Expediente", false).subscribe(result => {
console.log(result);
this.expedienteStorage.reset(result)
});
break;
@@ -301,7 +302,7 @@ export class EventsPage implements OnInit {
this.processes.GetTasksList("Expediente do Presidente", false).subscribe(result => {
this.expedienteStorage.reset(result)
});
break;
break;
default:
break;
}
@@ -346,7 +347,7 @@ export class EventsPage implements OnInit {
}
}
}
}
@@ -58,14 +58,14 @@ export class DespachoPage implements OnInit {
private location: Location
) {
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber;
}
if(params["params"].caller) {
this.caller = params["params"].caller;
}
});
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber;
}
if(params["params"].caller) {
this.caller = params["params"].caller;
}
});
}
ngOnInit() {
@@ -82,7 +82,7 @@ export class DespachoPage implements OnInit {
this.LoadRelatedEvents(this.serialnumber);
}
close(){
close() {
this.modalController.dismiss();
}
@@ -1,77 +1,84 @@
<ion-header class="ion-no-border">
<app-header></app-header>
</ion-header>
<ion-header class="ion-no-border header-2">
<div class="header-content">
<div class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="goBack()">
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
</button>
</div>
<div class="header-title">
<label>Eventos para Aprovação</label>
</div>
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment-button value="MDGPR">
Meu calendário
</ion-segment-button>
<ion-segment-button value="PR">
Presidente da República
</ion-segment-button>
</ion-segment>
</ion-toolbar>
</div>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<div class="main-content d-flex height-100" [ngSwitch]="segment">
<div class="content d-flex flex-column">
<div class="header-content">
<div class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="goBack()">
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
</button>
</div>
<div class="header-title">
<label>Eventos para Aprovação</label>
</div>
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment-button value="MDGPR">
Meu calendário
</ion-segment-button>
<ion-segment-button value="PR">
Presidente da República
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
</div>
<div class="main-content d-flex height-100" >
<ion-list *ngSwitchCase="'MDGPR'">
<div *ngIf="eventaprovacaostore.listmd" class="overflow-y-auto height-100">
<div class="content d-flex flex-column">
<div [ngSwitch]="segment">
<ion-list *ngSwitchCase="'MDGPR'">
<div *ngIf="eventaprovacaostore.listmd" class="overflow-y-auto height-100">
<ion-item-sliding>
<ion-item class="Rectangle cursor-pointer" lines="none"
*ngFor="let event of eventaprovacaostore.listmd" (click)="goToEventToApproveDetail(event.serialNumber)">
<div class="content-mdgpr-{{event.workflowInstanceDataFields.Agenda}} width-100">
<div class="approve-event-time">
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
</div>
<div class="approve-event-detail">
<p *ngIf="event.workflowInstanceDataFields.StartDate != event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ event.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} | {{event.workflowInstanceDataFields.Location}}</p>
<p *ngIf="event.workflowInstanceDataFields.StartDate == event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} | {{event.workflowInstanceDataFields.Location}}</p>
<h3>{{event.workflowInstanceDataFields.Subject}}</h3>
</div>
</div>
</ion-item>
</ion-item-sliding>
</div>
</ion-list>
<ion-list *ngSwitchCase="'PR'">
<div *ngIf="eventaprovacaostore.listpr" class="overflow-y-auto height-100">
<ion-item-sliding>
<ion-item class="Rectangle cursor-pointer" lines="none"
*ngFor="let event of eventaprovacaostore.listmd" (click)="goToEventToApproveDetail(event.serialNumber)">
<div class="content-mdgpr-{{event.workflowInstanceDataFields.Agenda}} width-100">
<div class="approve-event-time">
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
*ngFor="let event of eventaprovacaostore.listpr" (click)="goToEventToApproveDetail(event.serialNumber)">
<div class="content-pr-{{event.workflowInstanceDataFields.Agenda}} width-100">
<div class="approve-event-time">
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
</div>
<div class="approve-event-detail">
<p *ngIf="event.workflowInstanceDataFields.StartDate != event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ event.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} | {{event.workflowInstanceDataFields.Location}}</p>
<p *ngIf="event.workflowInstanceDataFields.StartDate == event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} | {{event.workflowInstanceDataFields.Location}}</p>
<h3>{{event.workflowInstanceDataFields.Subject}}</h3>
</div>
</div>
<div class="approve-event-detail">
<p *ngIf="event.workflowInstanceDataFields.StartDate != event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ event.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} | {{event.workflowInstanceDataFields.Location}}</p>
<p *ngIf="event.workflowInstanceDataFields.StartDate == event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} | {{event.workflowInstanceDataFields.Location}}</p>
<h3>{{event.workflowInstanceDataFields.Subject}}</h3>
</div>
</div>
</ion-item>
</ion-item>
</ion-item-sliding>
</div>
</ion-list>
<ion-list *ngSwitchCase="'PR'">
<div *ngIf="eventaprovacaostore.listpr" class="overflow-y-auto height-100">
<ion-item-sliding>
<ion-item class="Rectangle cursor-pointer" lines="none"
*ngFor="let event of eventaprovacaostore.listpr" (click)="goToEventToApproveDetail(event.serialNumber)">
<div class="content-pr-{{event.workflowInstanceDataFields.Agenda}} width-100">
<div class="approve-event-time">
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
</div>
<div class="approve-event-detail">
<p *ngIf="event.workflowInstanceDataFields.StartDate != event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ event.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} | {{event.workflowInstanceDataFields.Location}}</p>
<p *ngIf="event.workflowInstanceDataFields.StartDate == event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} | {{event.workflowInstanceDataFields.Location}}</p>
<h3>{{event.workflowInstanceDataFields.Subject}}</h3>
</div>
</div>
</ion-item>
</ion-item-sliding>
</div>
</ion-list>
</div>
</ion-list>
</div>
</div>
</div>
</ion-content>
@@ -1,11 +1,17 @@
@import '~src/function.scss';
.header-2 {
border-top-right-radius: 24px;
border-top-left-radius: 24px;
}
.header-2{
padding: 30px 20px 0 20px !important;
background-color: white;
}
.main-content{
background-color: #fff !important;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
}
.content{
padding: 30px 20px 0 20px !important;
padding: 0px 20px 0 20px !important;
/* margin: 0 auto; */
float: left;
overflow: auto;
@@ -45,7 +45,7 @@ export class EventListPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.refreshing()
} else {
this.LoadToApproveEvents()
}
@@ -124,18 +124,19 @@ export class EventListPage implements OnInit {
}, 1000);
}
doRefresh() {
doRefresh(event) {
setTimeout(() => {
this.LoadToApproveEvents();
event.target.complete();
}, 1000);
}
close(){
this.modalController.dismiss(null);
}
goBack(){
if(this.router.url == '/home/agenda/event-list'){
goBack() {
if(this.router.url == '/home/agenda/event-list') {
this.router.navigate(['/home/agenda']);
}
else if(this.router.url == '/home/gabinete-digital/event-list'){
@@ -167,7 +167,7 @@ export class BookMeetingModalPage implements OnInit {
});
}
close(){
close() {
this.modalController.dismiss(null);
}
+6 -6
View File
@@ -124,7 +124,7 @@ export class SearchPage implements OnInit {
}
wordCloud(){
wordCloud() {
this.search.mostSeachWord("15").subscribe(res=>{
@@ -173,7 +173,7 @@ export class SearchPage implements OnInit {
}
loadWordCloud(){
loadWordCloud() {
setTimeout(()=>{
const elem = document.documentElement.querySelector('.most-searched-word-container');
@@ -191,12 +191,12 @@ export class SearchPage implements OnInit {
}
close(){
close() {
this.modalController.dismiss();
}
reorderList(orderBy: string){
reorderList(orderBy: string) {
this.ordinance = orderBy;
@@ -207,7 +207,7 @@ export class SearchPage implements OnInit {
}
}
sortArrayISODate(myArray: any){
sortArrayISODate(myArray: any) {
return myArray.sort(function(a, b) {
return (a.Data < b.Data) ? -1 : ((a.Data > b.Data) ? 1 : 0);
});
@@ -216,7 +216,7 @@ export class SearchPage implements OnInit {
/**
* @description Basic search
*/
basicSearch(){
basicSearch() {
if(this.type == "Agenda" ){
+18 -6
View File
@@ -112,7 +112,9 @@ export class EventsService {
getAllPrOficialEvents(startdate:string, enddate:string): Observable<Event[]>{
const geturl = environment.apiURL + 'calendar/pr';
let geturl = environment.apiURL + 'calendar/pr';
geturl = geturl.replace('/V4/','/V5/')
let params = new HttpParams();
params = params.set("Start", startdate);
@@ -126,7 +128,9 @@ export class EventsService {
}
getAllPrPessoalEvents(startdate:string, enddate:string): Observable<Event[]>{
const geturl = environment.apiURL + 'calendar/pr';
let geturl = environment.apiURL + 'calendar/pr';
geturl = geturl.replace('/V4/','/V5/')
let params = new HttpParams();
params = params.set("Start", startdate);
@@ -149,7 +153,9 @@ export class EventsService {
}
getAllMdOficialEvents(startdate:string, enddate:string): any{
const geturl = environment.apiURL + 'calendar/md';
let geturl = environment.apiURL + 'calendar/md';
geturl = geturl.replace('/V4/','/V5/')
let params = new HttpParams();
params = params.set("Start", startdate);
@@ -163,7 +169,9 @@ export class EventsService {
}
getAllMdPessoalEvents(startdate:string, enddate:string): any{
const geturl = environment.apiURL + 'calendar/md';
let geturl = environment.apiURL + 'calendar/md';
geturl = geturl.replace('/V4/','/V5/')
let params = new HttpParams();
params = params.set("Start", startdate);
@@ -198,7 +206,9 @@ export class EventsService {
getAllSharedOficialEvents(startdate:string, enddate:string): Observable<Event[]>{
const geturl = environment.apiURL + 'calendar/pr';
let geturl = environment.apiURL + 'calendar/pr';
geturl = geturl.replace('/V4/','/V5/')
let params = new HttpParams();
params = params.set("Start", startdate);
@@ -214,7 +224,9 @@ export class EventsService {
}
getAllSharedPessoalEvents(startdate:string, enddate:string): Observable<Event[]>{
const geturl = environment.apiURL + 'calendar/pr';
let geturl = environment.apiURL + 'calendar/pr';
geturl = geturl.replace('/V4/','/V5/')
let params = new HttpParams();
params = params.set("Start", startdate);
+6 -5
View File
@@ -5,7 +5,7 @@ import { AuthService } from '../services/auth.service';
import { User } from '../models/user.model';
import { environment } from 'src/environments/environment';
import { Observable } from 'rxjs';
import { CallMeeting } from '../models/CallMeeting';
import { DocumentSetUpMeeting } from '../models/CallMeeting';
import { Excludetask } from '../models/Excludetask';
@Injectable({
@@ -275,14 +275,15 @@ export class ProcessesService {
return this.http.get<any>(`${geturl}`, options);
}
CallMeeting(body: CallMeeting) {
const geturl = environment.apiURL + 'Processes/CallMeeting';
documentSetUpMeeting(body: DocumentSetUpMeeting) {
let url = environment.apiURL + 'Processes/CallMeeting';
url = url.replace('/V4/','/V5/')
let options: any = {
headers: this.headers,
}
return this.http.post<any>(`${geturl}`,body, options);
return this.http.post<any>(`${url}`,body, options);
}
}
@@ -147,7 +147,6 @@ export class DespachosPage implements OnInit {
doRefresh() {
setTimeout(() => {
this.LoadList();
}, 1000);
@@ -155,7 +154,7 @@ export class DespachosPage implements OnInit {
// old
async openExpedientActionsModal(taskAction: any, task: any) {
//this.modalController.dismiss();
let classs;
if( window.innerWidth <= 800){
classs = 'modal modal-desktop'
@@ -174,7 +173,7 @@ export class DespachosPage implements OnInit {
FolderID: null,
DocId: doc.SourceId,
Subject: doc.SourceName
},
}
}
const modal = await this.modalController.create({
+4 -4
View File
@@ -55,7 +55,7 @@
</div>
<div class="d-flex">
<div class="header-btns d-flex">
<div class="mr-10 d-flex align-center cursor-pointer">
<button (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="btn-no-color">
<ion-icon class="font-45" src='assets/images/icons-search.svg'></ion-icon>
@@ -79,9 +79,9 @@
</div>
</div>
<div class="div-profile justify-end d-flex cursor-pointer" (click)="openProfile()">
<ion-icon class="font-45" *ngIf="loggeduser.Profile == 'MDGPR'" src='assets/images/icons-profile.svg'></ion-icon>
<ion-icon class="font-45" *ngIf="loggeduser.Profile == 'PR' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
<div class="div-profile d-flex cursor-pointer" (click)="openProfile()">
<ion-icon class="icon" src='assets/images/icons-profile.svg'></ion-icon>
<ion-label class="profile-text">{{loggeduser.Profile}}</ion-label>
</div>
</div>
</div>
+30 -1
View File
@@ -18,6 +18,35 @@
margin: 0px auto;
}
.header-btns{
justify-content: center;
align-items: center;
}
.div-profile{
width: 90px;
height: fit-content;
font-size: 45px;
justify-content: flex-end;
display: flex;
background-color: transparent;
justify-content: center;
align-items: center;
overflow: auto;
.icon{
position: relative;
border: none !important;
}
.profile-text{
font-size: 20px;
font-weight: 300;
width: fit-content;
position: absolute;
}
}
.desktop{
display: none;
@@ -64,4 +93,4 @@
.icon-z{
width: 20px;
}
}
}
+5 -4
View File
@@ -5,6 +5,7 @@ import { Router } from '@angular/router';
import { ProfileComponent } from '../headers/header-no-search/profile/profile.page';
import { AuthService } from 'src/app/services/auth.service';
import { User } from 'src/app/models/user.model';
import { ProfilePage } from 'src/app/modals/profile/profile.page';
@Component({
selector: 'app-header',
@@ -16,7 +17,7 @@ export class HeaderPage implements OnInit {
searchSubject: string = '';
showSearch=false;
loggeduser: User;
constructor(
private router: Router,
private modalController: ModalController,
@@ -100,12 +101,12 @@ export class HeaderPage implements OnInit {
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: ProfileComponent,
component: ProfilePage,
cssClass: 'model profile-modal search-submodal',
componentProps: {
}
@@ -133,4 +134,4 @@ export class HeaderPage implements OnInit {
async basicSearch(){
window['searchTriger']()
}
}
}
@@ -56,9 +56,9 @@
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
</div> -->
<div class="div-profile cursor-pointer" (click)="openProfile()">
<ion-icon class="font-45" *ngIf="loggeduser.Profile == 'MDGPR'" src='assets/images/icons-profile.svg'></ion-icon>
<ion-icon class="font-45" *ngIf="loggeduser.Profile == 'PR' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
<div class="div-profile d-flex cursor-pointer" (click)="openProfile()">
<ion-icon class="icon" src='assets/images/icons-profile.svg'></ion-icon>
<ion-label class="profile-text">{{loggeduser.Profile}}</ion-label>
</div>
</div>
</div>
@@ -18,9 +18,27 @@
margin: 0px auto;
}
.div-profile{
width: 45px;
height: 45px;
font-size: 45px;
justify-content: flex-end;
display: flex;
background-color: transparent;
justify-content: center;
align-items: center;
overflow: hidden;
.icon{
position: relative;
border: none !important;
}
.profile-text{
font-size: 20px;
font-weight: 300;
width: fit-content;
position: absolute;
}
}
.desktop{
@@ -44,4 +62,4 @@
.active{
border-top: 7px solid white;
}
}
+30 -33
View File
@@ -1,34 +1,31 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="120" height="120" viewBox="0 0 120 120">
<defs>
<filter id="b8vhf9zcla" width="111.2%" height="106.5%" x="-5.6%" y="-3.3%" filterUnits="objectBoundingBox">
<feOffset in="SourceAlpha" result="shadowOffsetOuter1"/>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="7.5"/>
<feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.490302666 0"/>
</filter>
<circle id="u6jbltuc9c" cx="60" cy="60" r="60"/>
<path id="ggtp3ri2hb" d="M25 0h350c13.807 0 25 11.193 25 25v664H0V25C0 11.193 11.193 0 25 0z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<g>
<path fill="#0782C9" d="M0 75H1024V708H0z" transform="translate(-764 -120)"/>
<g fill="#0782C9">
<path d="M0 0H1024V150H0z" transform="translate(-764 -120)"/>
</g>
<g>
<g transform="translate(-764 -120) translate(624) matrix(1 0 0 -1 0 689)">
<use fill="#000" filter="url(#b8vhf9zcla)" xlink:href="#ggtp3ri2hb"/>
<use fill="#0782C9" xlink:href="#ggtp3ri2hb"/>
</g>
<g transform="translate(-764 -120) translate(624) translate(140 120)">
<rect width="120" height="120" fill="#FFF" fill-opacity=".6" rx="60"/>
<g>
<mask id="e5tuzk8b4d" fill="#fff">
<use xlink:href="#u6jbltuc9c"/>
</mask>
<path fill="#42B9FE" fill-opacity=".7" d="M60 28c15.464 0 28 13.431 28 30 0 10.406-4.945 19.574-12.454 24.955C92.175 89.521 104 106.317 104 126c0 25.405-19.7 46-44 46s-44-20.595-44-46c0-19.683 11.825-36.48 28.454-43.046C36.944 77.574 32 68.406 32 58c0-16.569 12.536-30 28-30z" mask="url(#e5tuzk8b4d)"/>
</g>
</g>
</g>
</g>
</g>
<svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M-764 -45H260V588H-764V-45Z" fill="#0782C9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M-764 -120H260V30H-764V-120Z" fill="#0782C9"/>
<g filter="url(#filter0_d)">
<path d="M-115 569H235C248.807 569 260 557.807 260 544V-120H-140V544C-140 557.807 -128.807 569 -115 569Z" fill="black"/>
</g>
<path d="M-115 569H235C248.807 569 260 557.807 260 544V-120H-140V544C-140 557.807 -128.807 569 -115 569Z" fill="#0782C9"/>
<path d="M120 60C120 26.8629 93.1371 0 60 0C26.8629 0 0 26.8629 0 60C0 93.1371 26.8629 120 60 120C93.1371 120 120 93.1371 120 60Z" fill="white" fill-opacity="0.6"/>
<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="120" height="120">
<path d="M60 120C93.1371 120 120 93.1371 120 60C120 26.8629 93.1371 0 60 0C26.8629 0 0 26.8629 0 60C0 93.1371 26.8629 120 60 120Z" fill="white"/>
</mask>
<g mask="url(#mask0)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M60 28C75.464 28 88 41.431 88 58C88 68.406 83.055 77.574 75.546 82.955C92.175 89.521 104 106.317 104 126C104 151.405 84.3 172 60 172C35.7 172 16 151.405 16 126C16 106.317 27.825 89.52 44.454 82.954C36.944 77.574 32 68.406 32 58C32 41.431 44.536 28 60 28Z" fill="#42B9FE" fill-opacity="0.7"/>
</g>
</g>
<defs>
<filter id="filter0_d" x="-155" y="-135" width="430" height="719" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="7.5"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.490303 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
<clipPath id="clip0">
<rect width="120" height="120" rx="60" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

+8 -22
View File
@@ -1,23 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="45" height="45" viewBox="0 0 45 45">
<defs>
<circle id="2dw772hiwa" cx="22.5" cy="22.5" r="22.5"/>
</defs>
<g fill="none" fill-rule="evenodd">
<g>
<g>
<g transform="translate(-335 -26) translate(0 23) translate(335 3)">
<rect width="45" height="45" fill="#FFF" fill-opacity=".6" rx="22.5"/>
<g>
<mask id="xjc01mgdzb" fill="#fff">
<use xlink:href="#2dw772hiwa"/>
</mask>
<path fill="#42B9FE" fill-opacity=".7" d="M22.5 10.5c5.799 0 10.5 5.037 10.5 11.25 0 3.902-1.854 7.34-4.67 9.358C34.565 33.57 39 39.868 39 47.25c0 9.527-7.387 17.25-16.5 17.25S6 56.777 6 47.25c0-7.381 4.435-13.68 10.67-16.142C13.854 29.09 12 25.652 12 21.75c0-6.213 4.701-11.25 10.5-11.25z" mask="url(#xjc01mgdzb)"/>
</g>
<text fill="#FFF" fill-opacity=".7" font-family="Roboto-Light, Roboto" font-size="20" font-weight="300">
<tspan x="7.3" y="27">MD</tspan>
</text>
</g>
</g>
</g>
</g>
<svg width="45" height="45" viewBox="0 0 45 45" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M45 22.5C45 10.0736 34.9264 0 22.5 0C10.0736 0 0 10.0736 0 22.5C0 34.9264 10.0736 45 22.5 45C34.9264 45 45 34.9264 45 22.5Z" fill="white" fill-opacity="0.6"/>
<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="45" height="45">
<path d="M22.5 45C34.9264 45 45 34.9264 45 22.5C45 10.0736 34.9264 0 22.5 0C10.0736 0 0 10.0736 0 22.5C0 34.9264 10.0736 45 22.5 45Z" fill="white"/>
</mask>
<g mask="url(#mask0)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.5 10.5C28.299 10.5 33 15.537 33 21.75C33 25.652 31.146 29.09 28.33 31.108C34.565 33.57 39 39.868 39 47.25C39 56.777 31.613 64.5 22.5 64.5C13.387 64.5 6 56.777 6 47.25C6 39.869 10.435 33.57 16.67 31.108C13.854 29.09 12 25.652 12 21.75C12 15.537 16.701 10.5 22.5 10.5Z" fill="#42B9FE" fill-opacity="0.7"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 911 B

+1 -1
View File
@@ -4,7 +4,7 @@
export const environment = {
production: false,
apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/',
apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V5/api/',
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V4/api/',
apiChatUrl: 'https://www.tabularium.pt/api/v1/',
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
+9 -2
View File
@@ -365,8 +365,15 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
position: absolute;
top: -40px;
right: 0px;
height: 100%;
height: 90%;
max-width: 100%;
border-radius: 0 0 25px 25px;
}
@media only screen and (min-width: 1140px) {
.modal-wrapper{
max-width: 400px;
}
}
}
@@ -1082,4 +1089,4 @@ ngx-mat-datetime-content{
border-left: 3px solid transparent !important;
}
}
}
}