Skip to content

Commit

Permalink
Build in point of order restriction on closed (#2553)
Browse files Browse the repository at this point in the history
* Build in point of order restriction on closed

* Change setting name
  • Loading branch information
luisa-beerboom authored Jul 26, 2023
1 parent 02454ac commit 24e8988
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions client/src/app/domain/models/meetings/meeting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export class Settings {
public list_of_speakers_enable_pro_contra_speech!: boolean;
public list_of_speakers_can_set_contribution_self!: boolean;
public list_of_speakers_speaker_note_for_everyone!: boolean;
public list_of_speakers_closing_disables_point_of_order!: boolean;

// Motions
public motions_default_workflow_id!: Id; // workflow/default_workflow_meeting_id;
Expand Down Expand Up @@ -348,6 +349,7 @@ export class Meeting extends BaseModel<Meeting> {
`list_of_speakers_enable_point_of_order_categories`,
`list_of_speakers_enable_pro_contra_speech`,
`list_of_speakers_can_set_contribution_self`,
`list_of_speakers_closing_disables_point_of_order`,
`list_of_speakers_speaker_note_for_everyone`,
`list_of_speakers_initially_closed`,
`motions_default_workflow_id`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@
mat-stroked-button
color="warn"
(click)="addPointOfOrder()"
*ngIf="showPointOfOrders && !isOpInWaitlist(true)"
*ngIf="
showPointOfOrders && !isOpInWaitlist(true) && !(restrictPointOfOrderActions && listOfSpeakers.closed)
"
>
<mat-icon>warning</mat-icon>
&nbsp;
Expand All @@ -273,7 +275,7 @@
mat-stroked-button
color="warn"
(click)="removePointOfOrder()"
*ngIf="showPointOfOrders && isOpInWaitlist(true)"
*ngIf="showPointOfOrders && isOpInWaitlist(true) && !(restrictPointOfOrderActions && listOfSpeakers.closed)"
>
<mat-icon>remove</mat-icon>
<span translate>Withdraw point of order</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ export class ListOfSpeakersContentComponent extends BaseMeetingComponent impleme

public pointOfOrderCategoriesEnabled: boolean = false;

public restrictPointOfOrderActions: boolean = false;

@Output()
private isListOfSpeakersEmptyEvent = new EventEmitter<boolean>();

Expand Down Expand Up @@ -159,7 +161,10 @@ export class ListOfSpeakersContentComponent extends BaseMeetingComponent impleme
this.subscriptions.push(
this.meetingSettingsService
.get(`list_of_speakers_enable_point_of_order_categories`)
.subscribe(enabled => (this.pointOfOrderCategoriesEnabled = enabled))
.subscribe(enabled => (this.pointOfOrderCategoriesEnabled = enabled)),
this.meetingSettingsService
.get(`list_of_speakers_closing_disables_point_of_order`)
.subscribe(enabled => (this.restrictPointOfOrderActions = enabled))
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ export const meetingSettings: SettingsGroup[] = fillInSettingsDefaults([
label: _(`Enable point of order`),
type: `boolean`
},
{
key: `list_of_speakers_closing_disables_point_of_order`,
label: _(`Restrict point of order actions to open lists of speakers`),
type: `boolean`
},
{
key: `list_of_speakers_enable_point_of_order_categories`,
label: _(`Enable specifications and ranking for possible motions`),
Expand Down

0 comments on commit 24e8988

Please sign in to comment.