@@ -50,6 +50,19 @@ export class CentersViewComponent implements OnInit {
|
||||
} else { this.meetingData = false; }
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if meeting is editable.
|
||||
*/
|
||||
get editMeeting() {
|
||||
if (this.centerViewData.collectionMeetingCalendar) {
|
||||
const entityType = this.centerViewData.collectionMeetingCalendar.entityType.value;
|
||||
if (entityType === 'CENTERS' && this.centerViewData.hierarchy === '.' + this.centerViewData.id + '.' ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs action button/option action.
|
||||
* @param {string} name action name.
|
||||
@@ -63,6 +76,10 @@ export class CentersViewComponent implements OnInit {
|
||||
case 'Attach Meeting':
|
||||
this.router.navigate([`actions/${name}`], { relativeTo: this.route });
|
||||
break;
|
||||
case 'Edit Meeting':
|
||||
const queryParams: any = { calendarId: this.centerViewData.collectionMeetingCalendar.id };
|
||||
this.router.navigate([`actions/${name}`], { relativeTo: this.route, queryParams: queryParams });
|
||||
break;
|
||||
case 'Unassign Staff':
|
||||
this.centersUnassignStaff();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user