Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h2 class="text-lg font-semibold text-gray-900">Meetings</h2>
size="small"
[class]="isCalendarView() ? 'md:ml-auto' : ''"
[routerLink]="['/meetings', 'create']"
[queryParams]="{ committee_uid: committee().uid }"
[queryParams]="createMeetingQueryParams()"
data-testid="committee-meetings-create-btn"></lfx-button>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export class CommitteeMeetingsComponent {
public isListView = computed(() => this.viewMode() === 'list');
public isCalendarView = computed(() => this.viewMode() === 'calendar');

// Query params for the create-meeting route. Includes project slug so writerGuard
// can resolve write access — without it the guard redirects to the lens overview.
public createMeetingQueryParams: Signal<Record<string, string>> = this.initCreateMeetingQueryParams();

// Form for search + filter controls (bound in template)
public searchForm = new FormGroup({
search: new FormControl(''),
Expand Down Expand Up @@ -171,6 +175,17 @@ export class CommitteeMeetingsComponent {

// Private initializer functions

private initCreateMeetingQueryParams(): Signal<Record<string, string>> {
return computed(() => {
const committee = this.committee();
const params: Record<string, string> = { committee_uid: committee.uid };
if (committee.project_slug) {
params['project'] = committee.project_slug;
}
return params;
});
}

private initUpcomingMeetings(): Signal<Meeting[]> {
return toSignal(
toObservable(this.committee).pipe(
Expand Down
Loading