Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Admin-UI management bugs #1588

Merged
merged 39 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
994d876
Fix multiselect buttons with rounded corners
SamuelWei Nov 19, 2024
3f4a34e
Fix frontend user view / edit permissions
SamuelWei Nov 19, 2024
9fa0a66
Fix missing permissions for user index list
SamuelWei Nov 19, 2024
85b3160
Fix error handling
SamuelWei Nov 20, 2024
ff1b818
Close multiselect dropdown on selection
SamuelWei Nov 20, 2024
1785da1
Disable role select during loading
SamuelWei Nov 20, 2024
77c5832
Bugfix overlay reload buttons
SamuelWei Nov 20, 2024
ce0497b
Fix overlays not shown after loading error
Sabr1n4W Dec 12, 2024
55c44c5
Fix search not disabled during loading (index pages)
Sabr1n4W Dec 12, 2024
7de6e89
Fix dialog buttons not disabled correctly during actions on admin pages
Sabr1n4W Dec 16, 2024
fa6a61c
Fix add server pool button visibility/permission
Sabr1n4W Dec 16, 2024
7cae7f3
Fix AdminServerPoolsView server multiselect not disabled while loading
Sabr1n4W Dec 18, 2024
87fca1a
Fix AdminServerPoolsView server form error message
Sabr1n4W Dec 18, 2024
64fd362
Fix AdminServerPoolsView handleStaleError
Sabr1n4W Dec 18, 2024
1ba9546
Fix error message (AdminRoomTypesView)
Sabr1n4W Jan 2, 2025
4621996
Add missing loading retry button (AdminRoomTypesIndex)
Sabr1n4W Jan 2, 2025
869bcbf
Merge branch 'develop' of github.com:THM-Health/PILOS into fix-admin-…
Sabr1n4W Jan 2, 2025
5fff2ae
Merge branch 'develop' of github.com:THM-Health/PILOS into fix-admin-…
Sabr1n4W Jan 9, 2025
84fec0a
Add reload button for replacement room type (RoomTypesDeleteButton)
Sabr1n4W Jan 9, 2025
677c4c6
Fix bbb logo image url input
Sabr1n4W Jan 9, 2025
1cc9866
Adjust backend tests
Sabr1n4W Jan 9, 2025
aef6a1d
Merge branch 'develop' of github.com:THM-Health/PILOS into fix-admin-…
Sabr1n4W Jan 10, 2025
f3ef87e
Merge branch 'develop' of github.com:THM-Health/PILOS into fix-admin-…
Sabr1n4W Jan 13, 2025
612dbbf
Fix error message (AdminSettings)
Sabr1n4W Jan 13, 2025
f3f90de
Merge branch 'develop' of github.com:THM-Health/PILOS into fix-admin-…
Sabr1n4W Jan 15, 2025
8764660
Fix 404 handling
SamuelWei Jan 22, 2025
bd2f05b
Fix access superuser attribute
SamuelWei Jan 27, 2025
b15d9a7
Fix accessing multiselect ref
SamuelWei Jan 27, 2025
1530eed
Merge branch 'develop' of github.com:THM-Health/PILOS into fix-admin-…
SamuelWei Jan 27, 2025
e400f6d
Update changelog
Sabr1n4W Jan 29, 2025
2468a7a
Fix access id attribute
SamuelWei Jan 29, 2025
26e7535
Change permissions loading behaviour (AdminRolesView)
Sabr1n4W Jan 29, 2025
49be3d1
Update changelog
Sabr1n4W Jan 29, 2025
04e4e16
Merge branch 'develop' into fix-admin-ui-user-management
Sabr1n4W Jan 29, 2025
1a12917
Fix changelog spelling
SamuelWei Jan 29, 2025
4c87b7b
Improve changelog readability
SamuelWei Jan 29, 2025
3d4c230
Prevent dialogs from being closable during loading
SamuelWei Jan 29, 2025
d48de63
Update CHANGELOG.md
SamuelWei Jan 29, 2025
ce68db2
Improve accessibility on reload buttons
SamuelWei Jan 29, 2025
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
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Missing loading retry button on room types overview page ([#1588])
- Reload button for replacement room type in delete dialog on room types overview page ([#1588])
- Permission restrictions to prevent non-superusers from editing and deleting superusers ([#1651])
- Permission restrictions to prevent non-superusers from assigning the superuser role ([#1651])
- Environment variable for configuring restricted permissions that cannot be assigned to non-superuser roles ([#1651])
Expand All @@ -21,11 +23,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Real-time input validation on create superuser command ([#1651])
- Error handling in room statistics ([#1535], [#1600])
- Error handling in room attendance ([#1535], [#1600])
- Close multiselect dropdowns on selection ([#1588])
- Permissions loading behaviour on view/edit page of roles ([#1588])
- Improve frontend tests for login page ([#1794])
- Access code input type on room settings section to hide browser arrow buttons ([#1827], [#1829])

### Fixed

- Search not disabled during loading on the overview pages for roles, room types, servers and server pools ([#1675], [#1588])
- Overlays not shown after loading error on view/edit pages of servers and server pools ([#1677], [#1588])
- Dialog buttons not disabled correctly during actions on the overview/view/edit pages for roles, room types, servers and server pools ([#1711], [#1588])
- Dialogs being closable during loading on the overview/view/edit pages for roles, room types, servers and server pools ([#1588])
- Form validation error messages on view/edit pages room types, server pools and application settings ([#1588])
- Error handling on the overview page of users ([#1588])
- Stale error handling on the view/edit page of sever pools ([#1588])
- 404 error handling on the room types delete dialog ([#1588])
- Set empty BBB logo image url ([#1751], [#1588])
- 401 error handling on view/edit/create page of users ([#1588])
- Overlay reload buttons on view/edit/create page of roles, room types, servers and server pools ([#1588])
- Wrong error message shown for 422 errors when verifying email ([#1744], [#1758])
- Broken banner link style 'warning' ([#1759], [#1760])
- Inconsistent select/multiselect loading states ([#1772])
Expand Down Expand Up @@ -331,6 +346,7 @@ You can find the changelog for older versions there [here](https://github.com/TH
[#1559]: https://github.com/THM-Health/PILOS/issues/1559
[#1561]: https://github.com/THM-Health/PILOS/pull/1561
[#1565]: https://github.com/THM-Health/PILOS/pull/1565
[#1588]: https://github.com/THM-Health/PILOS/pull/1588
[#1569]: https://github.com/THM-Health/PILOS/pull/1569
[#1595]: https://github.com/THM-Health/PILOS/pull/1595
[#1600]: https://github.com/THM-Health/PILOS/pull/1600
Expand All @@ -342,13 +358,17 @@ You can find the changelog for older versions there [here](https://github.com/TH
[#1618]: https://github.com/THM-Health/PILOS/pull/1618
[#1636]: https://github.com/THM-Health/PILOS/issues/1636
[#1651]: https://github.com/THM-Health/PILOS/issues/1651
[#1675]: https://github.com/THM-Health/PILOS/issues/1675
[#1677]: https://github.com/THM-Health/PILOS/issues/1677
[#1678]: https://github.com/THM-Health/PILOS/pull/1678
[#1679]: https://github.com/THM-Health/PILOS/issues/1679
[#1702]: https://github.com/THM-Health/PILOS/pull/1702
[#1704]: https://github.com/THM-Health/PILOS/pull/1704
[#1711]: https://github.com/THM-Health/PILOS/issues/1711
[#1721]: https://github.com/THM-Health/PILOS/issues/1721
[#1724]: https://github.com/THM-Health/PILOS/pull/1724
[#1744]: https://github.com/THM-Health/PILOS/issues/1744
[#1751]: https://github.com/THM-Health/PILOS/issues/1751
[#1758]: https://github.com/THM-Health/PILOS/pull/1758
[#1759]: https://github.com/THM-Health/PILOS/issues/1759
[#1760]: https://github.com/THM-Health/PILOS/pull/1760
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/UpdateSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function rules()
'recording_attendance_retention_period' => ['required', 'numeric', Rule::enum(TimePeriod::class)],
'recording_recording_retention_period' => ['required', 'numeric', Rule::enum(TimePeriod::class)->except($disabledRecordingRetentionPeriods)],

'bbb_logo' => ['string', 'max:255'],
'bbb_logo' => ['nullable', 'string', 'max:255'],
'bbb_logo_file' => ['image', 'max:500'],
'bbb_style' => ['nullable', 'file', 'max:500'],
'bbb_default_presentation' => ['nullable', 'file', 'max:'.(config('bigbluebutton.max_filesize') * 1000), 'mimes:'.config('bigbluebutton.allowed_file_mimes')],
Expand Down
7 changes: 4 additions & 3 deletions resources/js/components/RoleSelect.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<InputGroup>
<multiselect
ref="rolesMultiselectRef"
ref="roles-multiselect"
:aria-labelledby="ariaLabelledby"
data-test="role-dropdown"
:placeholder="$t('admin.roles.select_roles')"
Expand Down Expand Up @@ -87,14 +87,15 @@
severity="secondary"
outlined
icon="fa-solid fa-sync"
:aria-label="$t('app.reload')"
data-test="roles-reload-button"
@click="loadRoles(currentPage)"
/>
</InputGroup>
</template>

<script setup>
import { onBeforeMount, ref, watch } from "vue";
import { onBeforeMount, ref, useTemplateRef, watch } from "vue";
import { useApi } from "../composables/useApi.js";
import { Multiselect } from "vue-multiselect";

Expand Down Expand Up @@ -139,7 +140,7 @@ const loading = ref(false);
const loadingError = ref(false);
const currentPage = ref(1);
const hasNextPage = ref(false);
const rolesMultiselectRef = ref(null);
const rolesMultiselectRef = useTemplateRef("roles-multiselect");

watch(
() => props.modelValue,
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/SettingsRolesDeleteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:breakpoints="{ '575px': '90vw' }"
:close-on-escape="!isBusy"
:dismissable-mask="!isBusy"
:closeable="!isBusy"
:closable="!isBusy"
:draggable="false"
>
<span>
Expand All @@ -25,6 +25,7 @@
<template #footer>
<Button
:label="$t('app.no')"
:disabled="isBusy"
severity="secondary"
@click="modalVisible = false"
/>
Expand Down
87 changes: 52 additions & 35 deletions resources/js/components/SettingsRoomTypesDeleteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:breakpoints="{ '575px': '90vw' }"
:close-on-escape="!isBusy"
:dismissable-mask="!isBusy"
:closeable="!isBusy"
:closable="!isBusy"
:draggable="false"
data-test="room-types-delete-dialog"
>
Expand All @@ -29,39 +29,52 @@
<label for="replacement-room-type">{{
$t("admin.room_types.delete.replacement")
}}</label>
<Select
id="replacement-room-type"
v-model.number="replacement"
data-test="replacement-room-type-dropdown"
autofocus
:disabled="isBusy || loadingRoomTypes"
:loading="loadingRoomTypes"
:class="{
'p-invalid': formErrors.fieldInvalid('replacement_room_type'),
}"
:options="replacementRoomTypes"
:placeholder="$t('admin.room_types.delete.no_replacement')"
option-value="value"
option-label="text"
aria-describedby="replacement-help"
show-clear
:pt="{
listContainer: {
'data-test': 'replacement-room-type-dropdown-items',
},
option: {
'data-test': 'replacement-room-type-dropdown-option',
},
}"
>
<template #clearicon="{ clearCallback }">
<i
class="fa-solid fa-times p-icon p-select-clear-icon"
role="button"
@click.stop="clearCallback"
/>
</template>
</Select>
<InputGroup>
<Select
id="replacement-room-type"
v-model.number="replacement"
data-test="replacement-room-type-dropdown"
autofocus
:disabled="
isBusy || loadingRoomTypes || replacementRoomTypesLoadingError
"
:loading="loadingRoomTypes"
:class="{
'p-invalid': formErrors.fieldInvalid('replacement_room_type'),
}"
:options="replacementRoomTypes"
:placeholder="$t('admin.room_types.delete.no_replacement')"
option-value="value"
option-label="text"
aria-describedby="replacement-help"
show-clear
:pt="{
listContainer: {
'data-test': 'replacement-room-type-dropdown-items',
},
option: {
'data-test': 'replacement-room-type-dropdown-option',
},
}"
>
<template #clearicon="{ clearCallback }">
<i
class="fa-solid fa-times p-icon p-select-clear-icon"
role="button"
@click.stop="clearCallback"
/>
</template>
</Select>
<Button
v-if="replacementRoomTypesLoadingError"
:disabled="isBusy"
outlined
severity="secondary"
icon="fa-solid fa-sync"
:aria-label="$t('app.reload')"
@click="loadReplacementRoomTypes()"
/>
</InputGroup>
<FormError :errors="formErrors.fieldError('replacement_room_type')" />
<small id="replacement-help">{{
$t("admin.room_types.delete.replacement_info")
Expand All @@ -70,6 +83,7 @@
<template #footer>
<Button
:label="$t('app.no')"
:disabled="isBusy"
severity="secondary"
@click="modalVisible = false"
/>
Expand Down Expand Up @@ -110,6 +124,7 @@ const isBusy = ref(false);
const replacement = ref(null);
const replacementRoomTypes = ref([]);
const loadingRoomTypes = ref(false);
const replacementRoomTypesLoadingError = ref(false);

/**
* Shows the delete modal
Expand All @@ -124,6 +139,8 @@ function showModal() {

function loadReplacementRoomTypes() {
loadingRoomTypes.value = true;
replacementRoomTypesLoadingError.value = false;

api
.call("roomTypes")
.then((response) => {
Expand All @@ -139,6 +156,7 @@ function loadReplacementRoomTypes() {
});
})
.catch((error) => {
replacementRoomTypesLoadingError.value = true;
api.error(error);
})
.finally(() => {
Expand Down Expand Up @@ -174,7 +192,6 @@ function deleteRoomType() {
if (error.response && error.response.status === env.HTTP_NOT_FOUND) {
modalVisible.value = false;
emit("notFound");
return;
}
api.error(error);
})
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/SettingsServerPoolsDeleteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
v-model:visible="modalVisible"
:breakpoints="{ '575px': '90vw' }"
:close-on-escape="!isBusy"
:closeable="!isBusy"
:closable="!isBusy"
:dismissable-mask="!isBusy"
:draggable="false"
:header="$t('admin.server_pools.delete.title')"
Expand Down Expand Up @@ -42,6 +42,7 @@
<template v-if="deleteFailedRoomTypes == null" #footer>
<Button
:label="$t('app.no')"
:disabled="isBusy"
severity="secondary"
@click="modalVisible = false"
/>
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/SettingsServersDeleteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:breakpoints="{ '575px': '90vw' }"
modal
:close-on-escape="!isBusy"
:closeable="!isBusy"
:closable="!isBusy"
:dismissable-mask="!isBusy"
:draggable="false"
>
Expand All @@ -23,6 +23,7 @@
<template #footer>
<Button
:label="$t('app.no')"
:disabled="isBusy"
severity="secondary"
@click="modalVisible = false"
/>
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/SettingsUsersDeleteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
:breakpoints="{ '575px': '90vw' }"
:close-on-escape="!isBusy"
:dismissable-mask="!isBusy"
:closeable="!isBusy"
:closable="!isBusy"
:draggable="false"
>
<span>
Expand All @@ -39,6 +39,7 @@
<template #footer>
<Button
:label="$t('app.no')"
:disabled="isBusy"
severity="secondary"
@click="modalVisible = false"
/>
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/SettingsUsersResetPasswordButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
:breakpoints="{ '575px': '90vw' }"
:close-on-escape="!isBusy"
:dismissable-mask="!isBusy"
:closeable="!isBusy"
:closable="!isBusy"
:draggable="false"
>
<span>
Expand All @@ -42,6 +42,7 @@
<Button
:label="$t('app.no')"
severity="secondary"
:disabled="isBusy"
@click="modalVisible = false"
/>
<Button
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/TimezoneSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
outlined
severity="secondary"
icon="fa-solid fa-sync"
:aria-label="$t('app.reload')"
data-test="timezone-reload-button"
@click="loadTimezones()"
/>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/UserTabEmail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const isBusy = ref(false);
const validationRequiredEmail = ref(null);

const isOwnUser = computed(() => {
return authStore.currentUser.id === props.user.id;
return authStore.currentUser?.id === props.user.id;
});

onBeforeMount(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
isBusy || viewOnly || !userPermissions.can('editUserRole', model)
"
:automatic-roles="automaticRoles"
:disable-superuser="!authStore.currentUser.superuser"
:disable-superuser="!authStore.currentUser?.superuser"
@loading-error="(value) => (rolesLoadingError = value)"
@busy="(value) => (rolesLoading = value)"
/>
Expand Down
2 changes: 2 additions & 0 deletions resources/js/views/AdminRolesIndex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<InputGroup>
<InputText
v-model="filter"
:disabled="isBusy"
:placeholder="$t('app.search')"
@keyup.enter="loadData(1)"
/>
<Button
v-tooltip="$t('app.search')"
:disabled="isBusy"
:aria-label="$t('app.search')"
severity="primary"
icon="fa-solid fa-magnifying-glass"
Expand Down
Loading
Loading