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