feat(slot blocking): add buttons to sidebar
All checks were successful
container-scan / Container Scan (pull_request) Successful in 2m34s
docker-build / docker (pull_request) Successful in 3m57s
tests / Tests (pull_request) Successful in 3m30s

This commit is contained in:
Dominik 2025-06-30 20:45:29 +02:00
parent 016b4371c2
commit 3d07ca077f
Signed by: dominik
GPG key ID: 06A4003FC5049644
8 changed files with 32 additions and 21 deletions

View file

@ -71,7 +71,7 @@ export default function BlockedSlotForm({
const { mutateAsync: deleteBlockedSlot } = useDeleteApiBlockedSlotsSlotID({
mutation: {
onSuccess: () => {
router.push('/blocked_slots');
router.push('/blocker');
},
},
});
@ -80,7 +80,7 @@ export default function BlockedSlotForm({
mutation: {
onSuccess: () => {
resetCreate();
router.push('/blocked_slots');
router.push('/blocker');
},
},
});
@ -155,9 +155,7 @@ export default function BlockedSlotForm({
</div>
<div className='items-center ml-auto mr-auto max-sm:mb-6 max-sm:w-full max-sm:flex max-sm:justify-center'>
<h1 className='text-center'>
{existingBlockedSlotId
? 'Update Blocked Slot'
: 'Create Blocked Slot'}
{existingBlockedSlotId ? 'Update Blocker' : 'Create Blocker'}
</h1>
</div>
<div className='w-0 sm:w-[100px]'></div>
@ -216,9 +214,7 @@ export default function BlockedSlotForm({
formStateCreate.isSubmitting || formStateUpdate.isSubmitting
}
>
{existingBlockedSlotId
? 'Update Blocked Slot'
: 'Create Blocked Slot'}
{existingBlockedSlotId ? 'Update Blocker' : 'Create Blocker'}
</Button>
{existingBlockedSlotId && (
<Button
@ -226,7 +222,7 @@ export default function BlockedSlotForm({
variant='destructive'
onClick={onDeleteSubmit}
>
Delete Blocked Slot
Delete Blocker
</Button>
)}
</div>