feat: group actions (edit-meeting) (#1052)

Fixes: #1051
This commit is contained in:
Karan Takalkar
2020-07-10 11:11:13 +05:30
committed by GitHub
parent 9f9bbc775a
commit 633c03fffc
11 changed files with 281 additions and 5 deletions
@@ -53,6 +53,10 @@ export class GroupsViewComponent {
case 'Manage Members':
this.router.navigate([`actions/${name}`], { relativeTo: this.route });
break;
case 'Edit Meeting':
const queryParams: any = { calendarId: this.groupViewData.collectionMeetingCalendar.id };
this.router.navigate([`actions/${name}`], { relativeTo: this.route, queryParams: queryParams });
break;
case 'Edit':
this.router.navigate(['edit'], { relativeTo: this.route });
break;
@@ -65,6 +69,19 @@ export class GroupsViewComponent {
}
}
/**
* Checks if meeting is editable.
*/
get editMeeting() {
if (this.groupViewData.collectionMeetingCalendar) {
const entityType = this.groupViewData.collectionMeetingCalendar.entityType.value;
if (entityType === 'GROUPS' && this.groupViewData.hierarchy === '.' + this.groupViewData.id + '.' ) {
return true;
}
}
return false;
}
/**
* Refetches data for the component
* TODO: Replace by a custom reload component instead of hard-coded back-routing.