mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
save
This commit is contained in:
@@ -135,9 +135,13 @@ const routes: Routes = [
|
|||||||
{
|
{
|
||||||
path: 'forward',
|
path: 'forward',
|
||||||
loadChildren: () => import('./modals/forward/forward.module').then( m => m.ForwardPageModule)
|
loadChildren: () => import('./modals/forward/forward.module').then( m => m.ForwardPageModule)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'edit-event-to-approve',
|
||||||
loadChildren: () => import('./shared/agenda/edit-event-to-approve/edit-event-to-approve.module').then( m => m.EditEventToApprovePageModule)
|
loadChildren: () => import('./shared/agenda/edit-event-to-approve/edit-event-to-approve.module').then( m => m.EditEventToApprovePageModule)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* {
|
/* {
|
||||||
path: 'chat',
|
path: 'chat',
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import { NewEventPageModule } from 'src/app/shared/agenda/new-event/new-event.mo
|
|||||||
import { EventsToApprovePageModule } from 'src/app/shared/gabinete-digital/events-to-approve/events-to-approve.module';
|
import { EventsToApprovePageModule } from 'src/app/shared/gabinete-digital/events-to-approve/events-to-approve.module';
|
||||||
import { EventListPageModule } from 'src/app/shared/agenda/event-list/event-list.module';
|
import { EventListPageModule } from 'src/app/shared/agenda/event-list/event-list.module';
|
||||||
import { EditEventPageModule } from 'src/app/shared/agenda/edit-event/edit-event.module';
|
import { EditEventPageModule } from 'src/app/shared/agenda/edit-event/edit-event.module';
|
||||||
|
import { EditEventToApprovePageModule } from 'src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -53,6 +54,7 @@ import { EditEventPageModule } from 'src/app/shared/agenda/edit-event/edit-event
|
|||||||
NewEventPageModule,
|
NewEventPageModule,
|
||||||
EventListPageModule,
|
EventListPageModule,
|
||||||
EditEventPageModule,
|
EditEventPageModule,
|
||||||
|
EditEventToApprovePageModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AgendaPage
|
AgendaPage
|
||||||
|
|||||||
@@ -356,7 +356,8 @@
|
|||||||
mobileComponent.showEventList == false &&
|
mobileComponent.showEventList == false &&
|
||||||
mobileComponent.showEventToApprove == false &&
|
mobileComponent.showEventToApprove == false &&
|
||||||
mobileComponent.showAttendees == false &&
|
mobileComponent.showAttendees == false &&
|
||||||
mobileComponent.showAttendeeModal == false
|
mobileComponent.showAttendeeModal == false &&
|
||||||
|
mobileComponent.showEditEventToApprove == false
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
class="text-black nothing-to-show">
|
class="text-black nothing-to-show">
|
||||||
@@ -407,7 +408,9 @@
|
|||||||
></app-view-event>
|
></app-view-event>
|
||||||
|
|
||||||
|
|
||||||
<app-event-list [class.transparent]="mobileComponent.transparentEventList" *ngIf="mobileComponent.showEventList"
|
<app-event-list
|
||||||
|
[class.transparent]="mobileComponent.transparentEventList"
|
||||||
|
*ngIf="mobileComponent.showEventList"
|
||||||
[profile]="profile"
|
[profile]="profile"
|
||||||
(approveEventDismiss) = "approveEventDismiss($event)"
|
(approveEventDismiss) = "approveEventDismiss($event)"
|
||||||
(cloneAllmobileComponent)="viewEventDetailDismiss($event)"
|
(cloneAllmobileComponent)="viewEventDetailDismiss($event)"
|
||||||
@@ -415,16 +418,33 @@
|
|||||||
</app-event-list>
|
</app-event-list>
|
||||||
|
|
||||||
|
|
||||||
<app-approve-event class="d-flex flex-column" *ngIf="mobileComponent.showEventToApprove" [class.transparent]="mobileComponent.transparentEventToApprove"
|
<app-approve-event class="d-flex flex-column"
|
||||||
|
*ngIf="mobileComponent.showEventToApprove"
|
||||||
|
[class.transparent]="mobileComponent.transparentEventToApprove"
|
||||||
[serialNumber] = "eventToaprove.serialNumber"
|
[serialNumber] = "eventToaprove.serialNumber"
|
||||||
[InstanceId] = "eventToaprove.InstanceId"
|
[InstanceId] = "eventToaprove.InstanceId"
|
||||||
(cloneAllmobileComponent)="viewEventDetailDismiss($event)"
|
(cloneAllmobileComponent)="viewEventDetailDismiss($event)"
|
||||||
(closeEventToApprove)="closeEventToApprove()"
|
(closeEventToApprove)="closeEventToApprove()"
|
||||||
(AproveEventEditEvent)="AproveEventEditEvent($event)"
|
(AproveEventEditEvent)="AproveEventEditEvent($event)"
|
||||||
|
(EditApproveEventDismiss)="EditApproveEventDismiss()"
|
||||||
[eventAttendees]="contacts"
|
[eventAttendees]="contacts"
|
||||||
>
|
>
|
||||||
</app-approve-event>
|
</app-approve-event>
|
||||||
|
|
||||||
|
<app-edit-event-to-approve
|
||||||
|
class="d-flex flex-column height-100"
|
||||||
|
*ngIf="mobileComponent.showEditEventToApprove"
|
||||||
|
[taskParticipants]="taskParticipants"
|
||||||
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
|
[serialNumber] = "eventToaprove.serialNumber"
|
||||||
|
(setContact)="setContact($event)"
|
||||||
|
(clearContact)="clearContact()"
|
||||||
|
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||||
|
(closeComponent)="closeComponentEditEventOrAdd()"
|
||||||
|
(setIntervenient)="setIntervenient($event)"
|
||||||
|
(setIntervenientCC)="setIntervenientCC($event)"
|
||||||
|
></app-edit-event-to-approve>
|
||||||
|
|
||||||
<app-attendee-modal
|
<app-attendee-modal
|
||||||
[footer]="true"
|
[footer]="true"
|
||||||
class="d-flex flex-column height-100"
|
class="d-flex flex-column height-100"
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ export class AgendaPage implements OnInit {
|
|||||||
transparentEventToApprove: false,
|
transparentEventToApprove: false,
|
||||||
showEventToApprove: false,
|
showEventToApprove: false,
|
||||||
showAttendees: false,
|
showAttendees: false,
|
||||||
showAttendeeModal: false
|
showAttendeeModal: false,
|
||||||
|
showEditEventToApprove: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
eventToaprove: any = {
|
eventToaprove: any = {
|
||||||
@@ -1209,7 +1210,7 @@ export class AgendaPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async viewEventsToApprove(){
|
async viewEventsToApprove(){
|
||||||
await this.cloneAllmobileComponent()
|
await this.cloneAllmobileComponent();
|
||||||
|
|
||||||
if( window.innerWidth <= 801){
|
if( window.innerWidth <= 801){
|
||||||
this.router.navigate(['/home/agenda/event-list']);
|
this.router.navigate(['/home/agenda/event-list']);
|
||||||
@@ -1249,6 +1250,11 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EditApproveEventDismiss(){
|
||||||
|
this.cloneAllmobileComponent();
|
||||||
|
this.mobileComponent.showEditEventToApprove = true;
|
||||||
|
}
|
||||||
|
|
||||||
async cloneAllmobileComponent(){
|
async cloneAllmobileComponent(){
|
||||||
|
|
||||||
this.mobileComponent.showAddNewEvent = false;
|
this.mobileComponent.showAddNewEvent = false;
|
||||||
@@ -1258,6 +1264,7 @@ export class AgendaPage implements OnInit {
|
|||||||
this.mobileComponent.showEventToApprove = false;
|
this.mobileComponent.showEventToApprove = false;
|
||||||
this.mobileComponent.showAttendees = false;
|
this.mobileComponent.showAttendees = false;
|
||||||
this.mobileComponent.showAttendeeModal = false;
|
this.mobileComponent.showAttendeeModal = false;
|
||||||
|
this.mobileComponent.showEditEventToApprove = false;
|
||||||
|
|
||||||
this.closeEventToApprove();
|
this.closeEventToApprove();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ export class ApproveEventPage implements OnInit {
|
|||||||
@Output() closeEventToApprove = new EventEmitter<any>();
|
@Output() closeEventToApprove = new EventEmitter<any>();
|
||||||
@Output() AproveEventEditEvent = new EventEmitter<any>();
|
@Output() AproveEventEditEvent = new EventEmitter<any>();
|
||||||
|
|
||||||
|
@Output() EditApproveEventDismiss = new EventEmitter<any>();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router:Router,
|
private router:Router,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -202,9 +204,13 @@ export class ApproveEventPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
async editar(serialNumber: string) {
|
async editar(serialNumber: string) {
|
||||||
|
if(window.innerWidth > 800){
|
||||||
|
console.log('DESTOP');
|
||||||
|
|
||||||
|
this.EditApproveEventDismiss.emit();
|
||||||
const modal = await this.modalController.create({
|
}
|
||||||
|
else{
|
||||||
|
/* const modal = await this.modalController.create({
|
||||||
component: EditEventToApproveComponent,
|
component: EditEventToApproveComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
serialNumber: serialNumber,
|
serialNumber: serialNumber,
|
||||||
@@ -213,15 +219,16 @@ export class ApproveEventPage implements OnInit {
|
|||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
// backdropDismiss: false
|
// backdropDismiss: false
|
||||||
});
|
});
|
||||||
|
|
||||||
await modal.present();
|
await modal.present();
|
||||||
|
|
||||||
modal.onDidDismiss().then(res => {
|
modal.onDidDismiss().then(res => {
|
||||||
this.getTask();
|
this.getTask();
|
||||||
this.getAttachments();
|
this.getAttachments();
|
||||||
});
|
}); */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { EditEventToApprovePage } from './edit-event-to-approve.page';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: EditEventToApprovePage
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class EditEventToApprovePageRoutingModule {}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { EditEventToApprovePageRoutingModule } from './edit-event-to-approve-routing.module';
|
||||||
|
|
||||||
|
import { EditEventToApprovePage } from './edit-event-to-approve.page';
|
||||||
|
|
||||||
|
import { MatNativeDateModule } from '@angular/material/core';
|
||||||
|
import {
|
||||||
|
NgxMatDatetimePickerModule,
|
||||||
|
NgxMatNativeDateModule,
|
||||||
|
NgxMatTimepickerModule
|
||||||
|
} 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,
|
||||||
|
EditEventToApprovePageRoutingModule,
|
||||||
|
MatDatepickerModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatNativeDateModule,
|
||||||
|
NgxMatDatetimePickerModule,
|
||||||
|
NgxMatTimepickerModule,
|
||||||
|
NgxMatNativeDateModule,
|
||||||
|
NgxMatMomentModule,
|
||||||
|
MatSelectModule,
|
||||||
|
MatButtonModule,
|
||||||
|
ReactiveFormsModule
|
||||||
|
],
|
||||||
|
declarations: [EditEventToApprovePage],
|
||||||
|
exports: [EditEventToApprovePage]
|
||||||
|
})
|
||||||
|
export class EditEventToApprovePageModule {}
|
||||||
@@ -0,0 +1,282 @@
|
|||||||
|
<ion-content>
|
||||||
|
<!-- Edit event for Inicio -->
|
||||||
|
<div class="main-content height-100 d-flex">
|
||||||
|
|
||||||
|
<div class="content d-flex flex-column width-md-100 height-100">
|
||||||
|
|
||||||
|
<div class="main-header pt-30 px-20 background-white pb-15">
|
||||||
|
<ion-header>
|
||||||
|
<div class="title-content">
|
||||||
|
<div class="middle">
|
||||||
|
<ion-label class="title">Editar evento por aprovar</ion-label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-header>
|
||||||
|
</div>
|
||||||
|
<ion-item-sliding class="overflow-y-auto">
|
||||||
|
<div class="px-20">
|
||||||
|
<div class="ion-item-container width-100">
|
||||||
|
<ion-input placeholder="Assunto*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
|
||||||
|
</div>
|
||||||
|
<div class="container-div width-100">
|
||||||
|
<div class="ion-item-class-2">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class">
|
||||||
|
<ion-input placeholder="Localização*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Location"></ion-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Error messages -->
|
||||||
|
<!-- <span class="error ion-padding" >
|
||||||
|
Campo obrigatório
|
||||||
|
</span> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div width-100">
|
||||||
|
<div class="ion-item-class-2">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class">
|
||||||
|
|
||||||
|
<ion-select disabled placeholder="Selecione agenda*"
|
||||||
|
class="d-block d-md-none"
|
||||||
|
selectedText="{{eventProcess.workflowInstanceDataFields.Agenda}}"
|
||||||
|
[(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda"
|
||||||
|
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 class="d-none d-md-block width-100" >
|
||||||
|
<mat-select placeholder="Selecione agenda" [(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda" >
|
||||||
|
<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 width-100">
|
||||||
|
<div class="ion-item-class-2 width-100">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class width-100">
|
||||||
|
<ion-datetime
|
||||||
|
class="d-block d-md-none"
|
||||||
|
placeholder="Início"
|
||||||
|
[(ngModel)]="dateControlEnd"
|
||||||
|
displayFormat="D MMM YYYY H:mm"
|
||||||
|
minuteValues="0,15,30,45"
|
||||||
|
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||||
|
min="2018"
|
||||||
|
max="2022"
|
||||||
|
>
|
||||||
|
</ion-datetime>
|
||||||
|
|
||||||
|
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
|
placeholder="Choose a date"
|
||||||
|
[formControl]="dateControlStart"
|
||||||
|
[min]="minDate" [max]="maxDate"
|
||||||
|
[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 width-100">
|
||||||
|
<div class="ion-item-class-2">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class">
|
||||||
|
<ion-datetime
|
||||||
|
class="d-none d-md-none"
|
||||||
|
placeholder="Fim"
|
||||||
|
[(ngModel)]="eventProcess.workflowInstanceDataFields.EndDate"
|
||||||
|
displayFormat="D MMM YYYY H:mm"
|
||||||
|
minuteValues="0,15,30,45"
|
||||||
|
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||||
|
min="2018"
|
||||||
|
max="2022"
|
||||||
|
>
|
||||||
|
</ion-datetime>
|
||||||
|
|
||||||
|
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
|
placeholder="Choose a date"
|
||||||
|
[formControl]="dateControlEnd"
|
||||||
|
[min]="minDate" [max]="maxDate"
|
||||||
|
[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 width-100">
|
||||||
|
<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
|
||||||
|
placeholder="Selecione repetição"
|
||||||
|
class="d-block d-md-none"
|
||||||
|
[(ngModel)]="eventProcess.workflowInstanceDataFields.IsRecurring"
|
||||||
|
selectedText="{{isRecurring}}"
|
||||||
|
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>
|
||||||
|
|
||||||
|
<mat-form-field
|
||||||
|
class="width-100 d-none d-md-block"
|
||||||
|
placeholder="Selecione repetição"
|
||||||
|
value="false"
|
||||||
|
interface="action-sheet"
|
||||||
|
required
|
||||||
|
>
|
||||||
|
<mat-select [(value)]="eventProcess.workflowInstanceDataFields.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 width-100">
|
||||||
|
<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 d-flex">
|
||||||
|
<div class="list-people flex-grow-1">
|
||||||
|
<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 cursor-pointer" (click)="addParticipants()">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div width-100">
|
||||||
|
<div class="ion-item-class-2">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class-no-height d-flex">
|
||||||
|
<div class="list-people flex-grow-1">
|
||||||
|
<ion-item lines="none">
|
||||||
|
<ion-list>
|
||||||
|
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||||
|
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||||
|
</ion-list>
|
||||||
|
</ion-item>
|
||||||
|
</div>
|
||||||
|
<div class="add-people cursor-pointer" (click)="addParticipantsCC()">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div (click)="getDoc()" class="cursor-pointer d-flex container-div width-100 ion-item-container-no-border" >
|
||||||
|
<ion-label>
|
||||||
|
<div class="attach-icon">
|
||||||
|
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="attach-document">
|
||||||
|
<ion-label>Adicionar documentos</ion-label>
|
||||||
|
</div>
|
||||||
|
</ion-label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex container-div width-100" >
|
||||||
|
<ion-list class="width-100 ">
|
||||||
|
<ion-item class="width-100" *ngFor="let document of loadedAttachments; let i = index">
|
||||||
|
<ion-label class="width-100 d-block list" *ngIf="document.action != 'delete' ">
|
||||||
|
<p class="d-flex ion-justify-content-between">
|
||||||
|
<span class="attach-title-item">{{document.SourceName}}</span>
|
||||||
|
<span class="app-name" *ngIf="document.ApplicationId == 8"> Correspondencia </span>
|
||||||
|
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
|
||||||
|
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
|
||||||
|
<span class="close-button text-black cursor-pointer" (click)="deleteAttachment(document, i)" >
|
||||||
|
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate | date: 'dd-MM-yy'}} </span></p>
|
||||||
|
</ion-label>
|
||||||
|
</ion-item>
|
||||||
|
</ion-list>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div d-flex width-100">
|
||||||
|
<div class="ion-item-class-2 d-flex width-100">
|
||||||
|
<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 flex-grow-1">
|
||||||
|
<ion-textarea [(ngModel)]="eventProcess.workflowInstanceDataFields.Body" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ion-item-sliding>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
<ion-footer class="background-whit">
|
||||||
|
<div class="buttons">
|
||||||
|
<button class="btn-cancel cursor-pointer" shape="round" (click)="close()">Cancelar</button>
|
||||||
|
<button class="btn-ok cursor-pointer" shape="round" (click)="save()">Gravar</button>
|
||||||
|
</div>
|
||||||
|
</ion-footer>
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
|
||||||
|
|
||||||
|
.title-content::after, .header-md::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin: 0;
|
||||||
|
float: left;
|
||||||
|
border-right: 1px solid #d8d8d8 !important;
|
||||||
|
}
|
||||||
|
.main-header{
|
||||||
|
font-family: Roboto;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
overflow:hidden;
|
||||||
|
transform: translate3d(0, 1px, 0);
|
||||||
|
|
||||||
|
.title-content{
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 0 !important;
|
||||||
|
background: #fff;
|
||||||
|
.middle{
|
||||||
|
padding: 0!important;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title{
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.ion-item-container{
|
||||||
|
margin: 15px auto;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.ion-item-container-no-border{
|
||||||
|
width: 100%;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.container-div{
|
||||||
|
margin-bottom: 15px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.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{
|
||||||
|
width: calc(100% - 45px);
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.list-people{
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
.add-people{
|
||||||
|
width: 45px;
|
||||||
|
float: right;
|
||||||
|
overflow: auto;
|
||||||
|
font-size: 25px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.list-people-title{
|
||||||
|
/* font-size: 13px; */
|
||||||
|
color: #797979;
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.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 { EditEventToApprovePage } from './edit-event-to-approve.page';
|
||||||
|
|
||||||
|
describe('EditEventToApprovePage', () => {
|
||||||
|
let component: EditEventToApprovePage;
|
||||||
|
let fixture: ComponentFixture<EditEventToApprovePage>;
|
||||||
|
|
||||||
|
beforeEach(waitForAsync(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EditEventToApprovePage ],
|
||||||
|
imports: [IonicModule.forRoot()]
|
||||||
|
}).compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(EditEventToApprovePage);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,426 @@
|
|||||||
|
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||||
|
import { FormControl } from '@angular/forms';
|
||||||
|
import { AlertController, AnimationController, ModalController } from '@ionic/angular';
|
||||||
|
import * as moment from 'moment';
|
||||||
|
import { Attachment } from 'src/app/models/attachment.model';
|
||||||
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
|
import { SearchDocument } from 'src/app/models/search-document';
|
||||||
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
|
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||||
|
import { EventsService } from 'src/app/services/events.service';
|
||||||
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
|
import { Event } from '../../../models/event.model';
|
||||||
|
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
|
|
||||||
|
|
||||||
|
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-edit-event-to-approve',
|
||||||
|
templateUrl: './edit-event-to-approve.page.html',
|
||||||
|
styleUrls: ['./edit-event-to-approve.page.scss'],
|
||||||
|
})
|
||||||
|
export class EditEventToApprovePage implements OnInit {
|
||||||
|
public date: any;
|
||||||
|
public disabled = false;
|
||||||
|
public showSpinners = true;
|
||||||
|
public showSeconds = false;
|
||||||
|
public touchUi = false;
|
||||||
|
public enableMeridian = false;
|
||||||
|
public minDate: any;
|
||||||
|
public maxDate: any;
|
||||||
|
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"));
|
||||||
|
|
||||||
|
showLoader = false
|
||||||
|
|
||||||
|
get dateStart () {
|
||||||
|
return this.dateControlStart.value
|
||||||
|
}
|
||||||
|
|
||||||
|
get dateEnd () {
|
||||||
|
return this.dateControlEnd.value
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewChild('picker') picker: any;
|
||||||
|
@ViewChild('fim') fim: any;
|
||||||
|
@ViewChild('inicio') inicio: any;
|
||||||
|
@ViewChild('picker1') picker1: any;
|
||||||
|
|
||||||
|
@Input() serialNumber: string
|
||||||
|
|
||||||
|
|
||||||
|
loadedAttachments: Attachment[]= []
|
||||||
|
|
||||||
|
eventProcess = {
|
||||||
|
serialNumber: "",
|
||||||
|
taskStartDate: "",
|
||||||
|
workflowInstanceDataFields:{
|
||||||
|
Body: "",
|
||||||
|
IsRecurring: false,
|
||||||
|
ParticipantsList: [],
|
||||||
|
Agenda: '',
|
||||||
|
EndDate: '',
|
||||||
|
Location: '',
|
||||||
|
Subject: '',
|
||||||
|
InstanceId: '',
|
||||||
|
EventType: '',
|
||||||
|
StartDate: '',
|
||||||
|
MDEmail: '',
|
||||||
|
MDName: '',
|
||||||
|
IsAllDayEvent: '',
|
||||||
|
Message: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
show = false
|
||||||
|
|
||||||
|
postEvent: Event;
|
||||||
|
isRecurring:string;
|
||||||
|
isEventEdited: boolean;
|
||||||
|
segment:string = "true";
|
||||||
|
profile:string;
|
||||||
|
eventAttendees: EventPerson[];
|
||||||
|
|
||||||
|
loadedEventAttachments: Attachment[];
|
||||||
|
taskParticipants: any = [];
|
||||||
|
taskParticipantsCc: any = [];
|
||||||
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
|
Location = ''
|
||||||
|
|
||||||
|
showAttendees = false;
|
||||||
|
|
||||||
|
InstanceId: string
|
||||||
|
|
||||||
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
|
@Output() clearContact = new EventEmitter<any>();
|
||||||
|
@Output() setIntervenient = new EventEmitter<any>();
|
||||||
|
@Output() setIntervenientCC = new EventEmitter<any>();
|
||||||
|
@Output() closeComponent = new EventEmitter<any>();
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private modalController: ModalController,
|
||||||
|
private eventsService: EventsService,
|
||||||
|
public alertController: AlertController,
|
||||||
|
private attachmentsService: AttachmentsService,
|
||||||
|
private processes:ProcessesService,
|
||||||
|
private animationController: AnimationController,
|
||||||
|
private toastService: ToastService,
|
||||||
|
) {
|
||||||
|
|
||||||
|
/* this.serialNumber = this.navParams.get('serialNumber'); */
|
||||||
|
|
||||||
|
this.isEventEdited = false;
|
||||||
|
this.dateControlStart = new FormControl(moment(new Date()));
|
||||||
|
this.dateControlEnd = new FormControl(moment(new Date()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.getTask();
|
||||||
|
console.log(this.serialNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
async getTask() {
|
||||||
|
console.log('this.eventProcess', this.eventProcess);
|
||||||
|
|
||||||
|
const result = await this.processes.GetTask(this.serialNumber).subscribe( result =>{
|
||||||
|
this.eventProcess = result
|
||||||
|
|
||||||
|
this.restoreDatepickerData()
|
||||||
|
|
||||||
|
console.log(this.eventProcess.workflowInstanceDataFields.Subject)
|
||||||
|
|
||||||
|
// description
|
||||||
|
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||||
|
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||||
|
this.Location = this.eventProcess.workflowInstanceDataFields.Location
|
||||||
|
|
||||||
|
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||||
|
this.getAttachments()
|
||||||
|
|
||||||
|
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
|
||||||
|
this.isRecurring = "Não se repete";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.isRecurring = "Repete";
|
||||||
|
}
|
||||||
|
|
||||||
|
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
|
||||||
|
if(e.IsRequired) {
|
||||||
|
this.taskParticipants.push(e);
|
||||||
|
} else {
|
||||||
|
this.taskParticipantsCc.push(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
close() {
|
||||||
|
console.log('CLOSE');
|
||||||
|
|
||||||
|
this.closeComponent.emit();
|
||||||
|
/* this.setIntervenient.emit([]);
|
||||||
|
this.setIntervenientCC.emit([]);
|
||||||
|
this.clearContact.emit(); */
|
||||||
|
|
||||||
|
//this.deleteTemporaryData();
|
||||||
|
}
|
||||||
|
|
||||||
|
save() {
|
||||||
|
// set dates to eventProcess object
|
||||||
|
this.getDatepickerData()
|
||||||
|
|
||||||
|
this.taskParticipantsCc.forEach(e=>{
|
||||||
|
e.IsRequired = false
|
||||||
|
})
|
||||||
|
|
||||||
|
this.eventProcess.workflowInstanceDataFields.ParticipantsList = this.taskParticipants.concat(this.taskParticipantsCc)
|
||||||
|
|
||||||
|
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e=>{
|
||||||
|
|
||||||
|
if(e.hasOwnProperty('$type')) {
|
||||||
|
delete e.$type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const event: any = {
|
||||||
|
Agenda: this.eventProcess.workflowInstanceDataFields.Agenda,
|
||||||
|
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||||
|
EndDate: this.eventProcess.workflowInstanceDataFields.EndDate,
|
||||||
|
EventType: this.eventProcess.workflowInstanceDataFields.EventType,
|
||||||
|
IsAllDayEvent: this.eventProcess.workflowInstanceDataFields.IsAllDayEvent,
|
||||||
|
IsRecurring: this.eventProcess.workflowInstanceDataFields.IsRecurring,
|
||||||
|
Location: this.eventProcess.workflowInstanceDataFields.Location,
|
||||||
|
Subject: this.eventProcess.workflowInstanceDataFields.Subject,
|
||||||
|
serialNumber: this.eventProcess.serialNumber,
|
||||||
|
StartDate: this.eventProcess.workflowInstanceDataFields.StartDate,
|
||||||
|
MDEmail: this.eventProcess.workflowInstanceDataFields.MDEmail,
|
||||||
|
MDName: this.eventProcess.workflowInstanceDataFields.MDName,
|
||||||
|
Message: this.eventProcess.workflowInstanceDataFields.Message,
|
||||||
|
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
|
||||||
|
Private: false,
|
||||||
|
ReviewUserComment: ''
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(event);
|
||||||
|
|
||||||
|
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||||
|
this.toastService.successMessage('Evento editado');
|
||||||
|
}, error =>{
|
||||||
|
this.toastService.badRequest('Evento não editado');
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
this.loadedAttachments.forEach((document:any)=>{
|
||||||
|
if(document['action'] == 'add') {
|
||||||
|
delete document.action
|
||||||
|
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
||||||
|
this.toastService.successMessage();
|
||||||
|
}, error =>{
|
||||||
|
this.toastService.badRequest();
|
||||||
|
});
|
||||||
|
} else if(document['action'] == 'delete') {
|
||||||
|
delete document.action
|
||||||
|
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
||||||
|
this.toastService.successMessage()
|
||||||
|
}, error =>{
|
||||||
|
this.toastService.badRequest()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
this.modalController.dismiss();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* async openAttendees() {
|
||||||
|
|
||||||
|
if(window.innerWidth <= 1024) {
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: AttendeesPageModal,
|
||||||
|
componentProps: {
|
||||||
|
adding: this.adding,
|
||||||
|
taskParticipants: this.taskParticipants,
|
||||||
|
taskParticipantsCc: this.taskParticipantsCc
|
||||||
|
},
|
||||||
|
cssClass: 'attendee 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setIntervenient(data){
|
||||||
|
this.taskParticipants = data;
|
||||||
|
this.postEvent.Attendees = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
setIntervenientCC(data) {
|
||||||
|
this.taskParticipantsCc = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
addParticipants(){
|
||||||
|
this.adding = 'intervenient'
|
||||||
|
|
||||||
|
this.openAttendees();
|
||||||
|
}
|
||||||
|
|
||||||
|
addParticipantsCC(){
|
||||||
|
|
||||||
|
this.adding = 'CC'
|
||||||
|
this.openAttendees();
|
||||||
|
}
|
||||||
|
|
||||||
|
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){
|
||||||
|
this.taskParticipants = taskParticipants;
|
||||||
|
this.taskParticipantsCc = taskParticipantsCc;
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
async addParticipants() {
|
||||||
|
|
||||||
|
//this.saveTemporaryData();
|
||||||
|
|
||||||
|
this.openAttendeesComponent.emit({
|
||||||
|
type: "intervenient"
|
||||||
|
});
|
||||||
|
|
||||||
|
this.clearContact.emit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async addParticipantsCC() {
|
||||||
|
|
||||||
|
//this.saveTemporaryData();
|
||||||
|
|
||||||
|
this.openAttendeesComponent.emit({
|
||||||
|
type: "CC"
|
||||||
|
});
|
||||||
|
|
||||||
|
this.clearContact.emit();
|
||||||
|
}
|
||||||
|
|
||||||
|
saveTemporaryData() {
|
||||||
|
|
||||||
|
this.getDatepickerData()
|
||||||
|
|
||||||
|
window['temp.path:/home/agenda/edit-event-to-approve.page.ts'] = {
|
||||||
|
postEvent: this.postEvent,
|
||||||
|
segment: this.segment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async getAttachments() {
|
||||||
|
|
||||||
|
let result: any = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
|
||||||
|
|
||||||
|
result.forEach((e)=>{
|
||||||
|
e.action = false
|
||||||
|
})
|
||||||
|
|
||||||
|
this.loadedAttachments = result
|
||||||
|
|
||||||
|
console.log('this.loadedAttachments', this.loadedAttachments, result)
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteAttachment(attachment: Attachment, index) {
|
||||||
|
|
||||||
|
this.loadedAttachments[index]['action'] = 'delete'
|
||||||
|
}
|
||||||
|
|
||||||
|
async getDoc() {
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: SearchPage,
|
||||||
|
cssClass: 'modal-width-100-width-background modal',
|
||||||
|
componentProps: {
|
||||||
|
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||||
|
showSearchInput: true,
|
||||||
|
select: true,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await modal.present();
|
||||||
|
modal.onDidDismiss().then( async (res)=>{
|
||||||
|
if(res){
|
||||||
|
|
||||||
|
const data: SearchDocument = res.data.selected;
|
||||||
|
|
||||||
|
const DocumentToSave: any = {
|
||||||
|
SourceTitle: data.Assunto,
|
||||||
|
ParentId: this.InstanceId,
|
||||||
|
Source: '1',
|
||||||
|
SourceId: data.Id,
|
||||||
|
ApplicationId: data.ApplicationType.toString(),
|
||||||
|
Id: '',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: '',
|
||||||
|
action: 'add',
|
||||||
|
CreateDate: data.Data,
|
||||||
|
Data: data.Data,
|
||||||
|
Description: data.DocTypeDesc,
|
||||||
|
SourceName: data.Assunto,
|
||||||
|
Stakeholders: data.EntidadeOrganicaNome,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.loadedAttachments.push(DocumentToSave)
|
||||||
|
console.log('push', DocumentToSave)
|
||||||
|
|
||||||
|
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
|
||||||
|
// this.getAttachments();
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
restoreDatepickerData() {
|
||||||
|
|
||||||
|
this.dateControlStart = new FormControl(moment(new Date(this.eventProcess.workflowInstanceDataFields.StartDate)));
|
||||||
|
this.dateControlEnd = new FormControl(moment(new Date(this.eventProcess.workflowInstanceDataFields.EndDate)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getDatepickerData() {
|
||||||
|
|
||||||
|
this.eventProcess.workflowInstanceDataFields.StartDate = this.dateStart
|
||||||
|
this.eventProcess.workflowInstanceDataFields.EndDate = this.dateEnd
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -117,7 +117,6 @@ export class ViewEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async editEvent() {
|
async editEvent() {
|
||||||
|
|
||||||
this.viewEventDetailDismiss.emit({
|
this.viewEventDetailDismiss.emit({
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
event: this.loadedEvent
|
event: this.loadedEvent
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<ion-refresher-content>
|
<ion-refresher-content>
|
||||||
</ion-refresher-content>
|
</ion-refresher-content>
|
||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
<div class="main-content overflow-y-auto height-100" [ngSwitch]="segment" *ngIf="eventsMDGPRList.length >= 1">
|
<div class="main-content overflow-y-auto height-100" [ngSwitch]="segment" *ngIf="eventsMDGPRList">
|
||||||
<!-- <div class="header-content width-100"> -->
|
<!-- <div class="header-content width-100"> -->
|
||||||
|
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|||||||
Reference in New Issue
Block a user