mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
+22
-22
@@ -47,7 +47,7 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
})
|
||||
|
||||
export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
|
||||
public date: any;
|
||||
public disabled = false;
|
||||
public showSpinners = true;
|
||||
@@ -94,12 +94,12 @@ export class BookMeetingModalPage implements OnInit {
|
||||
@ViewChild('fim') fim: any;
|
||||
@ViewChild('inicio') inicio: any;
|
||||
@ViewChild('picker1') picker1: any;
|
||||
|
||||
|
||||
task: any;
|
||||
|
||||
|
||||
taskParticipants: EventPerson[];
|
||||
taskParticipantsCc: EventPerson[] = [];
|
||||
|
||||
|
||||
taskDocId:string;
|
||||
loadedAttachments:any;
|
||||
documents:SearchDocument[] = [];
|
||||
@@ -146,7 +146,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||
|
||||
|
||||
this.postData.Categories = ['Reunião']
|
||||
this.postData.Categories = 'Reunião'
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -170,12 +170,12 @@ export class BookMeetingModalPage implements OnInit {
|
||||
close(){
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
this.modalController.dismiss(null);
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
@@ -208,13 +208,13 @@ export class BookMeetingModalPage implements OnInit {
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
Validators.required
|
||||
]),
|
||||
Categories: new FormControl(this.postData.Categories[0], [
|
||||
Categories: new FormControl(this.postData.Categories, [
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
async saveTask(){
|
||||
|
||||
@@ -225,8 +225,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
|
||||
|
||||
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
this.eventBody={
|
||||
@@ -249,7 +249,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
AppointmentState: 0,
|
||||
TimeZone: 'UTC',
|
||||
Organizer: null,
|
||||
Categories: ['Reunião'],
|
||||
Categories: 'Reunião',
|
||||
HasAttachments: true,
|
||||
EventRecurrence: null,
|
||||
}
|
||||
@@ -263,7 +263,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
case 'MDGPR':
|
||||
await this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise();
|
||||
break;
|
||||
|
||||
|
||||
case 'PR':
|
||||
await this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise()
|
||||
break;
|
||||
@@ -289,7 +289,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
case 'MDGPR':
|
||||
await this.calendarService.createTaskEvent(this.task.FolderId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise();
|
||||
break;
|
||||
|
||||
|
||||
case 'PR':
|
||||
await this.calendarService.createTaskEvent(this.task.FolderId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise();
|
||||
break;
|
||||
@@ -302,7 +302,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
|
||||
|
||||
if(data) {
|
||||
data = data['data'];
|
||||
|
||||
@@ -336,14 +336,14 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.setIntervenientCC(newAttendeesCC);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
this.showAttendees = true;
|
||||
}
|
||||
}
|
||||
|
||||
async addParticipantsCc() {
|
||||
|
||||
|
||||
this.adding = "CC";
|
||||
|
||||
if(window.innerWidth <= 800) {
|
||||
@@ -361,7 +361,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
|
||||
|
||||
if(data){
|
||||
data = data['data'];
|
||||
|
||||
@@ -414,7 +414,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
removeAttachment(index: number){
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
}
|
||||
|
||||
|
||||
validateFormInputs(){
|
||||
let formLocation = this.postData.Location.trim();
|
||||
if(!this.postData.Location && formLocation.length <= 0){
|
||||
@@ -434,10 +434,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
setIntervenient(data){
|
||||
this.taskParticipants = data;
|
||||
}
|
||||
|
||||
|
||||
setIntervenientCC(data){
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user