From 8cfda2449e751512ad464b0ce4545c8c04dc907b Mon Sep 17 00:00:00 2001 From: burakovec Date: Fri, 12 Dec 2025 14:36:26 +0300 Subject: [PATCH] Refactor row action handling in FormPiyangoOnayDurum component. Replace EditOnay with adminRowAction and update rowActions to adminRowActions based on user role, enhancing access control and functionality. --- .../components/form/FormPiyangoOnayDurum.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue b/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue index 4a83d6e..1a2f8f0 100644 --- a/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue +++ b/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue @@ -2,14 +2,14 @@ + :rowActions="adminRowActions" /> (false) @@ -214,6 +216,14 @@ } ]) + const adminRowAction = computed(() => { + return usersStore.isPanelUser ? EditOnay : undefined + }) + + const adminRowActions = computed(() => { + return usersStore.isPanelUser ? rowActions.value : [] + }) + onBeforeMount(async () => { loaded.value = true })