From 61af16d0b594685ad17b25a629b077bbc91c2607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Tue, 19 Aug 2025 22:53:07 +0300 Subject: [PATCH] =?UTF-8?q?Single=20Form=20i=C3=A7in=20Button=20Navigate?= =?UTF-8?q?=20hatalar=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/form/FormButtons.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/views/form/FormButtons.tsx b/ui/src/views/form/FormButtons.tsx index 0ab8d622..c92bded6 100644 --- a/ui/src/views/form/FormButtons.tsx +++ b/ui/src/views/form/FormButtons.tsx @@ -10,6 +10,7 @@ import { useToolbar } from '../list/useToolbar' import { PermissionResults, RowMode } from './types' import { GridDto } from '@/proxy/form/models' import React from 'react' +import { ROUTES_ENUM } from '@/routes/route.constant' const FormButtons = (props: { mode: RowMode @@ -74,7 +75,7 @@ const FormButtons = (props: { if (props.onActionNew) { props.onActionNew() } else { - navigate(`/form/${listFormCode}`) + navigate(ROUTES_ENUM.protected.admin.formNew.replace(':formCode', listFormCode)) } toast.push( @@ -182,7 +183,7 @@ const FormButtons = (props: { if (onActionNew) { onActionNew() } else { - navigate(`/form/${listFormCode}`) + navigate(ROUTES_ENUM.protected.admin.formNew.replace(':listFormCode', listFormCode)) } }} {...(permissions.c ? {} : { disabled: true })} @@ -199,7 +200,7 @@ const FormButtons = (props: { if (onActionEdit) { onActionEdit() } else { - navigate(`edit`) + navigate(ROUTES_ENUM.protected.admin.formEdit.replace(':listFormCode', listFormCode).replace(':id', id!)) } }} {...(permissions.u ? {} : { disabled: true })} @@ -216,7 +217,7 @@ const FormButtons = (props: { if (onActionView) { onActionView() } else { - navigate(`/form/${listFormCode}/${id}`) + navigate(ROUTES_ENUM.protected.admin.formView.replace(':listFormCode', listFormCode).replace(':id', id!)) } }} {...(permissions.r ? {} : { disabled: true })}