feat: group actions (edit-meeting-schedule) (#1054)

Fixes: #1053
This commit is contained in:
Karan Takalkar
2020-07-10 13:10:14 +05:30
committed by GitHub
parent 633c03fffc
commit 24c9e04c09
11 changed files with 200 additions and 7 deletions
@@ -1,3 +1,10 @@
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end">
<button mat-raised-button color="primary" (click)="editSchedule()">
<fa-icon icon="edit"></fa-icon>&nbsp;&nbsp;
Edit Schedule
</button>
</div>
<div class="container">
<mat-card>
@@ -23,7 +23,7 @@ export class EditGroupMeetingComponent implements OnInit {
maxDate = new Date();
/** Group Meeting form. */
groupEditMeetingForm: FormGroup;
/** Calnedar Template Data */
/** Calendar Template Data */
calendarTemplate: any;
/** Group Id */
groupId: any;
@@ -87,6 +87,7 @@ export class EditGroupMeetingComponent implements OnInit {
case 2: // Weekly
this.repetitionIntervals = ['1', '2', '3'];
this.groupEditMeetingForm.addControl('repeatsOnDay', new FormControl('', Validators.required));
this.groupEditMeetingForm.get('repeatsOnDay').patchValue(this.calendarTemplate.repeatsOnDay.id);
break;
case 3: // Monthly
this.repetitionIntervals = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'];
@@ -99,10 +100,18 @@ export class EditGroupMeetingComponent implements OnInit {
this.groupEditMeetingForm.patchValue({
'startDate': this.calendarTemplate.startDate && new Date(this.calendarTemplate.startDate),
'frequency': this.calendarTemplate.frequency.id,
'interval': this.calendarTemplate.interval
'interval': `${this.calendarTemplate.interval}`
});
}
/**
* Navigate to edit meeting schedule form.
*/
editSchedule() {
const queryParams: any = { calendarId: this.calendarId };
this.router.navigate([`../Edit Meeting Schedule`], { relativeTo: this.route, queryParams: queryParams });
}
/**
* Submits the form and updates the meeting.
*/