Fix LOS (closes #6035)
This commit is contained in:
parent
d030925e14
commit
75bd3c50e5
@ -141,7 +141,7 @@
|
|||||||
*ngIf="speaker.point_of_order"
|
*ngIf="speaker.point_of_order"
|
||||||
>warning</mat-icon
|
>warning</mat-icon
|
||||||
>
|
>
|
||||||
<i *ngIf="showSpeakersOrderNote" class="red-warning-text">
|
<i class="red-warning-text">
|
||||||
{{ speaker.note }}
|
{{ speaker.note }}
|
||||||
</i>
|
</i>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -87,10 +87,6 @@ export class ListOfSpeakersContentComponent extends BaseViewComponentDirective i
|
|||||||
return !this.config.instant('agenda_present_speakers_only') || this.operator.user.is_present;
|
return !this.config.instant('agenda_present_speakers_only') || this.operator.user.is_present;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get showSpeakersOrderNote(): boolean {
|
|
||||||
return this.noteForAll || this.opCanManage;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public set speakers(los: ViewListOfSpeakers) {
|
public set speakers(los: ViewListOfSpeakers) {
|
||||||
this.setListOfSpeakers(los);
|
this.setListOfSpeakers(los);
|
||||||
|
@ -574,6 +574,11 @@ class SpeakerViewSet(UpdateModelMixin, GenericViewSet):
|
|||||||
):
|
):
|
||||||
raise ValidationError({"detail": "pro/contra speech is not enabled"})
|
raise ValidationError({"detail": "pro/contra speech is not enabled"})
|
||||||
|
|
||||||
|
if "pro_speech" in request.data and "marked" in request.data:
|
||||||
|
raise ValidationError(
|
||||||
|
{"detail": "pro_speech and marked cannot be given together"}
|
||||||
|
)
|
||||||
|
|
||||||
if not has_perm(request.user, "agenda.can_manage_list_of_speakers"):
|
if not has_perm(request.user, "agenda.can_manage_list_of_speakers"):
|
||||||
# if no manage perms, only the speaker user itself can update the speaker.
|
# if no manage perms, only the speaker user itself can update the speaker.
|
||||||
speaker = self.get_object()
|
speaker = self.get_object()
|
||||||
@ -590,4 +595,10 @@ class SpeakerViewSet(UpdateModelMixin, GenericViewSet):
|
|||||||
{"detail": f"You are not allowed to set {key}"}
|
{"detail": f"You are not allowed to set {key}"}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# toggle marked/pro_speech: If one is given, reset the other one
|
||||||
|
if request.data.get("pro_speech") in (True, False):
|
||||||
|
request.data["marked"] = False
|
||||||
|
if request.data.get("marked"):
|
||||||
|
request.data["pro_speech"] = None
|
||||||
|
|
||||||
return super().update(request, *args, **kwargs)
|
return super().update(request, *args, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user