fix: Correct button visibility logic
- Mitarbeiter: sees buttons only for OWN pending assignment - Chef/Disponent: sees buttons for ALL assignments
This commit is contained in:
@@ -258,8 +258,8 @@ const spotsRemaining = computed(() => {
|
||||
{{ getStatusLabel(assignment.status) }}
|
||||
</span>
|
||||
|
||||
<!-- Confirm/Decline buttons - for assigned user OR management -->
|
||||
<template v-if="assignment.status === 'pending' || authStore.canManageOrders">
|
||||
<!-- Confirm/Decline buttons - for assigned user (own assignment) OR management (any) -->
|
||||
<template v-if="(assignment.user_id === authStore.user?.id && assignment.status === 'pending') || authStore.canManageOrders">
|
||||
<button
|
||||
class="btn btn-success text-sm"
|
||||
:class="{ 'opacity-50': assignment.status === 'confirmed' }"
|
||||
|
||||
Reference in New Issue
Block a user