mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add intervenientes
This commit is contained in:
@@ -334,6 +334,7 @@
|
|||||||
<app-new-event *ngIf="mobileComponent.showAddNewEvent"
|
<app-new-event *ngIf="mobileComponent.showAddNewEvent"
|
||||||
[profile]="profile"
|
[profile]="profile"
|
||||||
[selectedSegment]=segment
|
[selectedSegment]=segment
|
||||||
|
[taskParticipants]="taskParticipants"
|
||||||
[selectedDate]="eventSelectedDate"
|
[selectedDate]="eventSelectedDate"
|
||||||
(onAddEvent)="openAddEventDismiss($event)"
|
(onAddEvent)="openAddEventDismiss($event)"
|
||||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||||
@@ -385,6 +386,11 @@
|
|||||||
[eventAttendees]="contacts"
|
[eventAttendees]="contacts"
|
||||||
(closeComponent)="GoBackEditOrAdd()"
|
(closeComponent)="GoBackEditOrAdd()"
|
||||||
(setContact)="setContact($event)"
|
(setContact)="setContact($event)"
|
||||||
|
[adding]="adding"
|
||||||
|
[taskParticipants]="taskParticipants"
|
||||||
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
|
(setIntervenient)="setIntervenient($event)"
|
||||||
|
(setIntervenientCC)="setIntervenientCC($event)"
|
||||||
>
|
>
|
||||||
</app-attendee-modal>
|
</app-attendee-modal>
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ export class AgendaPage implements OnInit {
|
|||||||
selectedEventId: string | number;
|
selectedEventId: string | number;
|
||||||
postEvent: any;
|
postEvent: any;
|
||||||
|
|
||||||
|
|
||||||
|
taskParticipants: any = [];
|
||||||
|
taskParticipantsCc: any = [];
|
||||||
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||||
|
|
||||||
segment: "Combinado" | "Pessoal" | "Oficial";
|
segment: "Combinado" | "Pessoal" | "Oficial";
|
||||||
@@ -259,14 +264,14 @@ export class AgendaPage implements OnInit {
|
|||||||
onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => {
|
onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => {
|
||||||
console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0));
|
console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0));
|
||||||
this.eventSelectedDate2 = ev.selectedTime;
|
this.eventSelectedDate2 = ev.selectedTime;
|
||||||
};
|
}
|
||||||
|
|
||||||
onRangeChanged (ev: { startTime: Date, endTime: Date }) {
|
onRangeChanged (ev: { startTime: Date, endTime: Date }) {
|
||||||
this.rangeStartDate = ev.startTime;
|
this.rangeStartDate = ev.startTime;
|
||||||
this.rangeEndDate = ev.endTime;
|
this.rangeEndDate = ev.endTime;
|
||||||
|
|
||||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||||
};
|
}
|
||||||
|
|
||||||
async openCalModal() {
|
async openCalModal() {
|
||||||
const modal = await this.modalCtrl.create({
|
const modal = await this.modalCtrl.create({
|
||||||
@@ -912,10 +917,6 @@ export class AgendaPage implements OnInit {
|
|||||||
this.selectedEvent = data.event;
|
this.selectedEvent = data.event;
|
||||||
this.postEvent = data.event;
|
this.postEvent = data.event;
|
||||||
|
|
||||||
console.log(this.selectedEvent);
|
|
||||||
|
|
||||||
console.log(this.postEvent);
|
|
||||||
|
|
||||||
this.mobileComponent.showEditEvent = true;
|
this.mobileComponent.showEditEvent = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -946,8 +947,6 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
approveEventDismiss({saveData, serialNumber, action}){
|
approveEventDismiss({saveData, serialNumber, action}){
|
||||||
|
|
||||||
console.log(saveData);
|
|
||||||
|
|
||||||
if(action == 'Aprovar'){
|
if(action == 'Aprovar'){
|
||||||
this.eventToaprove = {
|
this.eventToaprove = {
|
||||||
back: true,
|
back: true,
|
||||||
@@ -996,7 +995,6 @@ export class AgendaPage implements OnInit {
|
|||||||
// open component
|
// open component
|
||||||
async openAttendeesComponent(data){
|
async openAttendeesComponent(data){
|
||||||
|
|
||||||
|
|
||||||
if(Array.isArray(data)){
|
if(Array.isArray(data)){
|
||||||
if(data.length >= 1){
|
if(data.length >= 1){
|
||||||
|
|
||||||
@@ -1027,7 +1025,6 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
async GoBackEditOrAdd(){
|
async GoBackEditOrAdd(){
|
||||||
|
|
||||||
|
|
||||||
if(this.showEventEditOrOpen == "edit"){
|
if(this.showEventEditOrOpen == "edit"){
|
||||||
this.cloneAllmobileComponent();
|
this.cloneAllmobileComponent();
|
||||||
|
|
||||||
@@ -1042,7 +1039,6 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
async closeComponentEditEventOrAdd(){
|
async closeComponentEditEventOrAdd(){
|
||||||
|
|
||||||
if(this.IsEvent ='edit') {
|
if(this.IsEvent ='edit') {
|
||||||
@@ -1053,4 +1049,14 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async setIntervenient(data){
|
||||||
|
this.taskParticipants = data;
|
||||||
|
|
||||||
|
this.postEvent
|
||||||
|
}
|
||||||
|
|
||||||
|
async setIntervenientCC(data){
|
||||||
|
this.taskParticipantsCc = data;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<ion-content class="height-100">
|
<ion-content class="height-100">
|
||||||
<div class="main-content d-flex height-100">
|
<div class="main-content d-flex height-100">
|
||||||
<div class="content d-flex flex-column width-100">
|
<div class="content d-flex flex-column width-100">
|
||||||
|
|
||||||
<div class="main-header">
|
<div class="main-header">
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
@@ -8,6 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ion-item-container width-100">
|
<div class="ion-item-container width-100">
|
||||||
<ion-input placeholder="Assunto" [(ngModel)]="postEvent.Subject"></ion-input>
|
<ion-input placeholder="Assunto" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
.title-content{
|
.title-content{
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
overflow: auto;
|
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
.middle{
|
.middle{
|
||||||
@@ -38,12 +37,10 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
.container-div{
|
.container-div{
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
float: left;
|
float: left;
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
.ion-item-class-2{
|
.ion-item-class-2{
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
@@ -71,10 +68,8 @@
|
|||||||
.ion-input-class-no-height{
|
.ion-input-class-no-height{
|
||||||
border: 1px solid #ebebeb;
|
border: 1px solid #ebebeb;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
.list-people{
|
.list-people{
|
||||||
//width: 256px;
|
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { EventsService } from 'src/app/services/events.service';
|
|||||||
import { Event } from '../../../models/event.model';
|
import { Event } from '../../../models/event.model';
|
||||||
import { EditEventPage } from '../edit-event/edit-event.page';
|
import { EditEventPage } from '../edit-event/edit-event.page';
|
||||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||||
|
import { EventEditPage } from '../../events/edit-event/edit-event.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-view-event',
|
selector: 'app-view-event',
|
||||||
@@ -102,6 +103,26 @@ export class ViewEventPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async editEventDetail() {
|
||||||
|
|
||||||
|
let classs;
|
||||||
|
if( window.innerWidth <= 800){
|
||||||
|
classs = 'modal'
|
||||||
|
} else {
|
||||||
|
classs = 'modal modal-desktop'
|
||||||
|
}
|
||||||
|
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: EventEditPage,
|
||||||
|
componentProps: {
|
||||||
|
eventId: this.loadedEvent.EventId,
|
||||||
|
profile: this.profile,
|
||||||
|
},
|
||||||
|
cssClass: classs,
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
async editEvent() {
|
async editEvent() {
|
||||||
|
|
||||||
let classs;
|
let classs;
|
||||||
|
|||||||
+5
@@ -118,7 +118,12 @@
|
|||||||
<app-attendee-modal
|
<app-attendee-modal
|
||||||
class="aside-right d-flex flex-column height-100"
|
class="aside-right d-flex flex-column height-100"
|
||||||
[eventAttendees]="contacts"
|
[eventAttendees]="contacts"
|
||||||
|
[adding]="adding"
|
||||||
|
[taskParticipants]="taskParticipants"
|
||||||
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
(closeComponent)="closeComponent()"
|
(closeComponent)="closeComponent()"
|
||||||
|
(setIntervenient)="setIntervenient($event)"
|
||||||
|
(setIntervenientCC)="setIntervenientCC($event)"
|
||||||
(setContact)="setContact($event)"
|
(setContact)="setContact($event)"
|
||||||
></app-attendee-modal>
|
></app-attendee-modal>
|
||||||
|
|
||||||
|
|||||||
-1
@@ -16,7 +16,6 @@
|
|||||||
}
|
}
|
||||||
.container-div{
|
.container-div{
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
.ion-item-container{
|
.ion-item-container{
|
||||||
//width: 360px;
|
//width: 360px;
|
||||||
|
|||||||
+17
-6
@@ -27,8 +27,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
];
|
];
|
||||||
taskType:string;
|
taskType:string;
|
||||||
task: any;
|
task: any;
|
||||||
taskParticipants: any;
|
|
||||||
taskParticipantsCc: any;
|
taskParticipants: any = [];
|
||||||
|
taskParticipantsCc: any = [];
|
||||||
|
|
||||||
taskDate: Date;
|
taskDate: Date;
|
||||||
taskDescription: string;
|
taskDescription: string;
|
||||||
user: string;
|
user: string;
|
||||||
@@ -43,7 +45,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
// trigger hide and show for attendee component
|
// trigger hide and show for attendee component
|
||||||
showAttendees= false;
|
showAttendees= false;
|
||||||
|
|
||||||
adding: "intervenient" | "CC"
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -76,6 +78,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject;
|
this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async setAdding(type: "intervenient" | "CC"){
|
||||||
|
this.adding = type;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.taskDate = new Date(this.task.taskStartDate);
|
this.taskDate = new Date(this.task.taskStartDate);
|
||||||
|
|
||||||
@@ -244,17 +250,22 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
async setContact(data:EventPerson[]){
|
async setContact(data:EventPerson[]){
|
||||||
|
|
||||||
if(this.adding == "intervenient"){
|
if(this.adding == "intervenient"){
|
||||||
console.log('intervenient')
|
|
||||||
this.contacts = data;
|
|
||||||
this.taskParticipants = data;
|
this.taskParticipants = data;
|
||||||
} else if (this.adding == "CC") {
|
} else if (this.adding == "CC") {
|
||||||
|
|
||||||
console.log('CCCC')
|
|
||||||
this.taskParticipantsCc = data;
|
this.taskParticipantsCc = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async setIntervenient(data){
|
||||||
|
this.taskParticipants = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
async setIntervenientCC(data){
|
||||||
|
this.taskParticipantsCc = data;
|
||||||
|
}
|
||||||
|
|
||||||
async closeComponent(){
|
async closeComponent(){
|
||||||
this.showAttendees = false;
|
this.showAttendees = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,8 +134,8 @@
|
|||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label *ngIf="eventAttendees.length ==0" class="list-people-title">Adicionar intervenientes</ion-label>
|
<ion-label *ngIf="taskParticipants.length ==0" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||||
<ion-label *ngFor="let participant of eventAttendees">{{participant.Name}}</ion-label>
|
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export class NewEventPage implements OnInit {
|
|||||||
@Input() profile:string;
|
@Input() profile:string;
|
||||||
@Input() selectedSegment: string;
|
@Input() selectedSegment: string;
|
||||||
@Input() selectedDate: Date;
|
@Input() selectedDate: Date;
|
||||||
@Input() eventAttendees: EventPerson[];
|
@Input() taskParticipants: EventPerson[];
|
||||||
|
|
||||||
@Output() onAddEvent = new EventEmitter<any>();
|
@Output() onAddEvent = new EventEmitter<any>();
|
||||||
@Output() openAttendeesComponent = new EventEmitter<any>();
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
@@ -109,7 +109,7 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
save(){
|
save(){
|
||||||
|
|
||||||
this.postEvent.Attendees = this.eventAttendees;
|
this.postEvent.Attendees = this.taskParticipants;
|
||||||
|
|
||||||
if(this.profile=='mdgpr'){
|
if(this.profile=='mdgpr'){
|
||||||
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
|
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
|
||||||
@@ -145,7 +145,6 @@ export class NewEventPage implements OnInit {
|
|||||||
const restoredData = window['temp.path:/home/agenda/new-event.component.ts']
|
const restoredData = window['temp.path:/home/agenda/new-event.component.ts']
|
||||||
|
|
||||||
if(JSON.stringify(restoredData) != "{}" && undefined != restoredData){
|
if(JSON.stringify(restoredData) != "{}" && undefined != restoredData){
|
||||||
console.log('restore1111', restoredData)
|
|
||||||
this.postEvent = restoredData.postEvent
|
this.postEvent = restoredData.postEvent
|
||||||
this.eventBody = restoredData.eventBody
|
this.eventBody = restoredData.eventBody
|
||||||
this.segment = restoredData.segment
|
this.segment = restoredData.segment
|
||||||
|
|||||||
Reference in New Issue
Block a user