From 2e3b721585cf34ab621af3284cafaea4dfdb5748 Mon Sep 17 00:00:00 2001 From: AmirReza Jamali Date: Wed, 15 Apr 2026 15:25:47 +0330 Subject: [PATCH] refactor(forms): enhance grid layout and responsiveness across multiple components - Updated grid classes in CreateAdmin, CreateCompany, CreateCompanyCategory, CreateCustomer, and CreateNotification components to improve responsiveness. - Adjusted FormFooter and ListHeader components for better layout handling on different screen sizes. --- src/components/forms/admins/CreateAdmin.tsx | 6 ++++-- src/components/forms/companies/CreateCompany.tsx | 2 +- .../company-categories/CreateCompanyCategory.tsx | 10 ++++++---- src/components/forms/customers/CreateCustomer.tsx | 6 ++++-- .../forms/notifications/CreateNotification.tsx | 8 +++++--- src/components/ui/FormFooter.tsx | 2 +- src/components/ui/ListHeader.tsx | 4 ++-- 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/components/forms/admins/CreateAdmin.tsx b/src/components/forms/admins/CreateAdmin.tsx index bf6392e..c17326e 100644 --- a/src/components/forms/admins/CreateAdmin.tsx +++ b/src/components/forms/admins/CreateAdmin.tsx @@ -30,7 +30,7 @@ const CreateAdminForm: FC = ({ defaultValues, editMode, id }) => {
= ({ defaultValues, editMode, id }) => { )}
- +
+ +
diff --git a/src/components/forms/companies/CreateCompany.tsx b/src/components/forms/companies/CreateCompany.tsx index e069acf..2da9202 100644 --- a/src/components/forms/companies/CreateCompany.tsx +++ b/src/components/forms/companies/CreateCompany.tsx @@ -34,7 +34,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => { }); return (
diff --git a/src/components/forms/companies/company-categories/CreateCompanyCategory.tsx b/src/components/forms/companies/company-categories/CreateCompanyCategory.tsx index 6cd7c5d..86f9148 100644 --- a/src/components/forms/companies/company-categories/CreateCompanyCategory.tsx +++ b/src/components/forms/companies/company-categories/CreateCompanyCategory.tsx @@ -20,9 +20,9 @@ const CreateCompanyCategoryForm = ({ defaultValues, editMode, id }: IProps) => { -
+
{

{errors.name.message}

)}
-
+
{

)}
- +
+ +
); diff --git a/src/components/forms/customers/CreateCustomer.tsx b/src/components/forms/customers/CreateCustomer.tsx index e2ebb6b..e54ed6e 100644 --- a/src/components/forms/customers/CreateCustomer.tsx +++ b/src/components/forms/customers/CreateCustomer.tsx @@ -35,7 +35,7 @@ const CreateCustomer = ({ defaultValues, editMode, id }: IProps) => {
{ )}
- +
+ +
); diff --git a/src/components/forms/notifications/CreateNotification.tsx b/src/components/forms/notifications/CreateNotification.tsx index 37c9ff2..14a819d 100644 --- a/src/components/forms/notifications/CreateNotification.tsx +++ b/src/components/forms/notifications/CreateNotification.tsx @@ -28,7 +28,7 @@ const CreateNotificationForm = () => {
{

{errors.type.message}

)}
-
+
{ placeholder="Enter description" />
- +
+ +
); diff --git a/src/components/ui/FormFooter.tsx b/src/components/ui/FormFooter.tsx index 9fb12c2..49cb6b9 100644 --- a/src/components/ui/FormFooter.tsx +++ b/src/components/ui/FormFooter.tsx @@ -10,7 +10,7 @@ const FormFooter = ({ onCancel }: IProps) => { const isMutating = useIsMutating(); const router = useRouter(); return ( -
+