Commit Graph

256 Commits

Author SHA1 Message Date
AmirReza Jamali eab516c7f3 feat(tests, components): enhance Cypress commands and UI elements for improved testing and accessibility
- Added new Cypress commands for mocking admin-related API interactions, including list, create, update, delete, and change status functionalities.
- Introduced data-cy attributes across various components (e.g., Breadcrumbs, Forms, Tables) to improve testability and accessibility.
- Updated existing components to support new data-cy attributes for better integration with Cypress tests.
2026-04-25 13:25:23 +03:30
AmirReza Jamali 2a4f3e7e4b refactor(loading, auth, status): enhance UI components for improved aesthetics and functionality
- Redesigned Loading component to feature a full-screen loader with animated elements for a modern look.
- Updated SigninWithPassword component to include error handling and improved password visibility toggle.
- Refactored Status component to utilize a tone-based styling system for better visual feedback based on status types.
2026-04-25 12:35:03 +03:30
AmirReza Jamali f195bba03d refactor(auth, layouts): enhance UI components for improved aesthetics and usability
- Updated SignIn and Profile components with new background styles and layout adjustments for a more modern look.
- Refined button styles in GoogleSigninButton and SigninWithPassword for better user interaction feedback.
- Enhanced InputGroup and Select components with improved styling and error handling for a more consistent user experience.
- Adjusted Sidebar and Header components for better responsiveness and visual appeal.
- Implemented spotlight effect in UserInfo dropdown for a more engaging user interface.
2026-04-23 20:53:23 +03:30
AmirReza Jamali bb1af8b31c feat(package): add Cypress for end-to-end testing and enhance scripts
- Added Cypress as a dependency for end-to-end testing.
- Introduced new npm scripts for running Cypress tests and starting the development server for testing.
- Updated package-lock.json to reflect the new dependencies and their versions.
2026-04-21 15:59:20 +03:30
AmirReza Jamali dae564b859 refactor(forms): update placeholders for improved clarity and user guidance
- Made the placeholder in InputGroup optional for better flexibility.
- Updated various form components (CreateCompany, CreateCustomer, CreateNotification, CreateCompanyCategory) to provide more descriptive placeholders, enhancing user understanding of expected input.
- Ensured consistency in placeholder text across different fields to improve overall user experience.
2026-04-19 18:12:23 +03:30
AmirReza Jamali 57e9d90eb1 refactor(Breadcrumbs, InputGroup, Layouts, Tables): enhance styling and structure for improved responsiveness
- Adjusted Breadcrumb component styles for better spacing and font size.
- Made placeholder in InputGroup optional and refined input styles for consistency.
- Updated MainLayout and Header components for improved padding and layout.
- Enhanced table components by importing necessary elements and optimizing rendering logic.
- Refactored CompanyCategoriesTable to utilize optimistic updates for better user experience.
2026-04-19 16:14:51 +03:30
AmirReza Jamali 69e75eb9b8 refactor(steps): simplify step presenters by removing unnecessary useImperativeHandle calls
- Removed useImperativeHandle and getValues from BenefitsStep, ChallengesStep, ChartStep, ContactsStep, FeaturesStep, FooterStep, and HeroStep components.
- Updated step presenters to directly use refs for improved data handling and validation.
- Enhanced code readability and maintainability by streamlining the presenter functions.
2026-04-18 12:41:48 +03:30
AmirReza Jamali c1b6b4ccf1 feat(Tables): implement pagination and loading state handling across multiple tables
- Added `getPaginatedRowNumber` utility function to calculate the correct row number based on pagination.
- Integrated `isLoading` prop in `EmptyListWrapper` to conditionally render loading state.
- Updated various table components (Admins, CMS, Companies, Inquiries, etc.) to utilize the new pagination logic and loading state handling.
- Wrapped pagination components in `IsVisible` to conditionally display based on data availability.
2026-04-15 15:57:36 +03:30
AmirReza Jamali 2e3b721585 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.
2026-04-15 15:25:47 +03:30
AmirReza Jamali 42ebbf98e2 fix(useCompaniesQueries): update redirect path for company categories
- Changed the redirect path from "/companies/categories" to "/company-categories" in the useUpdateCompanyCategories hook to ensure correct navigation.
2026-04-15 13:52:52 +03:30
AmirReza Jamali deb8b85d45 refactor(PaymentsOverviewChart): enhance chart responsiveness and layout
- Updated the PaymentsOverviewChart component to improve responsiveness by enabling redraw on parent and window resize.
- Adjusted chart options for better label handling and grid padding.
- Modified the container div to ensure full width and height for the chart display.
2026-04-15 13:19:50 +03:30
AmirReza Jamali e45b96a506 refactor(ChatsCard): enhance layout and styling for better responsiveness
- Updated the ChatsCard component to improve layout and styling, ensuring better responsiveness.
- Adjusted class names for flex properties and truncation to enhance visual presentation of chat details.
- Ensured proper handling of unread message indicators and improved the rendering of last message timestamps.
2026-04-15 13:06:44 +03:30
AmirReza Jamali 5a96dd2341 refactor(Notification, Sidebar): enhance styling and responsiveness
- Updated the Notification component's dropdown styling for improved responsiveness and visual consistency.
- Adjusted the Sidebar component's z-index handling based on mobile state to ensure proper layering during interactions.
2026-04-15 13:02:17 +03:30
AmirReza Jamali 2f28ae8625 feat(CreateCustomer): add password visibility toggle and enhance form handling
- Integrated EyeIcon for password visibility toggle in the CreateCustomer component.
- Updated useCreateCustomerPresenter to manage password visibility state.
- Improved form handling by adding showPassword and setShowPassword to the presenter.
2026-04-15 12:31:43 +03:30
AmirReza Jamali fb3301169e fix(FormFooter, useCreateCustomerPresenter): disable submit button during mutation
- Added a disabled state to the submit button in FormFooter to prevent multiple submissions while a mutation is in progress.
- Included a blank line in useCreateCustomerPresenter for improved code readability.
2026-04-13 19:33:11 +03:30
AmirReza Jamali c93a1ffe8d refactor(Select, AssignToCompanyModalContent): enhance select placeholder and integrate company query
- Updated the Select component to disable the placeholder option for better user experience.
- Refactored AssignToCompanyModalContent to accept a companiesQuery prop, improving data handling.
- Adjusted the useCustomerListPresenter hook to include the company query, ensuring it is only enabled when the assign company modal is open.
- Enhanced the CustomersTable component to pass the company query to the modal content.
2026-04-13 19:27:22 +03:30
AmirReza Jamali 8e86b8f894 fix(NotFoundPage): correct HTML entity for apostrophe in not found message 2026-04-13 11:10:56 +03:30
AmirReza Jamali 87eb48cc72 fixed build issue caused by lint 2026-04-13 10:36:25 +03:30
AmirReza Jamali f3dcc090a2 refactor(SignIn): update layout and styling for sign-in page
- Modified the layout of the SignIn component to improve responsiveness and visual appeal.
- Adjusted the container classes for better alignment and spacing across different screen sizes.
2026-04-13 09:50:35 +03:30
AmirReza Jamali 6a5986d6eb refactor(TenderDetails): improve country flag validation and rendering logic
- Enhanced the validation of country codes in the TenderDetails component using a new utility function.
- Updated the useGetFlagQuery hook to include an options parameter for conditional fetching based on country code validity.
- Refined the rendering logic to ensure country flags are displayed only when valid data is available.
2026-04-13 08:46:33 +03:30
AmirReza Jamali 76cb29d31e refactor(TenderDetails): enhance country flag handling and validation
- Updated the TenderDetails component to validate country codes using a new utility function, isValidAlpha2CountryCode.
- Modified the useGetFlagQuery hook to accept an options parameter for conditional fetching based on the validity of the country code.
- Improved the rendering logic for the country flag to ensure it only displays when valid flag data is available.
2026-04-13 08:16:21 +03:30
AmirReza Jamali 50db71843b refactor(Loading): update Loading component import paths
- Changed import paths for the Loading component from "@/app/loading" to "@/components/loading" across multiple files to maintain consistency and improve modularity.
- Removed the Loading component definition from loading.tsx, simplifying the file structure.
2026-04-13 08:07:43 +03:30
AmirReza Jamali 44c87e094d Remove unused images and background configurations from the project
- Deleted multiple unused SVG and PNG images from the public/images directory, including brand and country assets.
- Removed background image and content configurations from the Tailwind CSS configuration file to streamline the project.
2026-04-13 07:52:52 +03:30
hadi barzegar 598e723752 feat(Docker): update Dockerfile for production build and add upload script for remote deployment 2026-04-12 20:33:47 +03:30
AmirReza Jamali 93140b3cb6 refactor(Layouts): optimize imports and enhance UserInfo component
- Moved the useIsMobile hook import to the correct position in conditional-layout.tsx.
- Added type="button" to the ThemeToggleSwitch button for better accessibility.
- Introduced truncateString utility in UserInfo component to limit email display length.
- Set Image component in UserInfo to unoptimized for performance improvement.
2026-04-11 12:18:55 +03:30
AmirReza Jamali 677e457dc1 Redesign Login page, Add Theme toggle button and logo in login card 2026-03-09 13:00:42 +03:30
AmirReza Jamali d4a74182e4 Add Tab title in whole application 2026-03-09 10:31:01 +03:30
AmirReza Jamali 26c092db4a fix(MultiSelect): enhance item handling and improve empty state display
- Update MultiSelect component to allow items to be optional or null, improving flexibility.
- Implement safe handling of items to prevent errors when items are not provided.
- Add a message to display when no items are available, enhancing user experience.
- Refactor rendering logic for selected items to maintain consistent styling.
2026-03-07 10:53:12 +03:30
AmirReza Jamali 992debb603 feat(api): update API configuration and add proxy rewrites
- Remove the NEXT_PUBLIC_API_URL from the production environment file.
- Change axios base URL to use a local proxy endpoint.
- Add rewrites in next.config.mjs to route API requests through the proxy.
2026-02-25 11:07:46 +03:30
AmirReza Jamali f491a4047d fix(auth): disable submit button during login process
- Add loading state to the submit button in SigninWithPassword component to prevent multiple submissions.
- Use utility function to conditionally apply styles based on the loading state, enhancing user experience.
2026-02-14 10:20:20 +03:30
AmirReza Jamali da82399d07 feat(tables): integrate EmptyListWrapper component for improved empty state handling
- Add EmptyListWrapper to various tables (Admins, Companies, Customers, Feedback, Notification History, Tenders) to provide a consistent empty state message when no data is available.
- Update phone number and status display logic in the Profile page to handle null values gracefully.
- Introduce worktree setup configuration in worktrees.json for easier project setup.
2026-02-10 18:19:49 +03:30
AmirReza Jamali 7755384d51 fix(auth): enhance user login response handling and update User schema
- Log the response data on successful login for debugging purposes
- Improve error handling in user service by using safeParse for login response validation
- Update User schema to allow null values for optional fields, enhancing flexibility in user data handling
2026-02-10 16:49:19 +03:30
AmirReza Jamali cb6a48a6e6 Added docker ignore, change next.js config, update next js version 2026-02-08 13:10:48 +03:30
AmirReza Jamali cafd7568e0 feat(auth): implement global logout callback for API interceptors
- Add global logout callback registration and retrieval functions in User context
- Integrate logout callback in response interceptor to handle 401 errors on token refresh
- Ensure fallback logout mechanism if callback is not registered, clearing cookies and redirecting to sign-in
2026-01-25 14:52:04 +03:30
AmirReza Jamali 3080a5fe6d fix(api): update ASSIGN_COMPANY_TO_CUSTOMER endpoint to remove redundant 'assign' path segment 2025-12-14 10:19:00 +03:30
AmirReza Jamali 4cc7684b1f refactor(layouts): extract MainLayout component and improve sidebar mobile UX
- Extract MainLayout component from ConditionalLayout to reduce nesting and improve code organization
- Add useIsMobile hook to MainLayout for responsive behavior and prevent layout reflow on mobile
- Implement collapsed sidebar state for mobile devices showing only icons (70px width)
- Add MenuExpandIcon component to sidebar icons for collapsed state UI
- Update sidebar to display favicon instead of full logo when collapsed on mobile
- Remove menu toggle button and logo from header, consolidate in sidebar for better UX
- Improve sidebar styling with conditional padding and alignment for collapsed state
- Update sidebar navigation items to hide text labels when collapsed, showing only icons
- Refactor header component to remove mobile-specific logic now handled in MainLayout
- Enhance mobile navigation by maintaining sidebar space reservation to avoid layout reflow
2025-12-08 17:07:54 +03:30
AmirReza Jamali 13d736e9f0 chore(deps): upgrade Next.js to 15.1.9
- Upgrade next package from 15.1.6 to 15.1.9
- Upgrade eslint-config-next from 15.1.6 to 15.1.9
- Sort axios imports alphabetically in response-interceptor
- Skip token refresh for login endpoint to prevent infinite redirect loops
- Add check to prevent automatic token refresh when login request fails
2025-12-08 16:35:42 +03:30
AmirReza Jamali 918c562cfc feat(customers): update required validations in CreateCustomer form
- Add `required` to username, email, role, and type fields
- Make companies selection optional (remove validation)
- Require password only in create mode (`!editMode`)
2025-11-30 09:56:09 +03:30
AmirReza Jamali fa6ffc59aa feat(marketing): replace language input with Select; update Countries to ISO-3
- Switch language field from text `InputGroup` to `Select` with `Languages` options,
  `GlobeIcon`, clearable support, and conditional disable/require for companies
- Remove manual length validation as Select ensures valid predefined values
- Update `Countries` values from ISO-2 to ISO-3 codes for consistency
2025-11-29 15:19:20 +03:30
a.jamali f38498229d Update .env.production 2025-11-29 11:10:13 +03:30
AmirReza Jamali 05e4346b1b refactor(inquiries): Remove unused isSubmitting state from status change
- Remove isSubmitting prop from ChangeStatusForm component interface
- Remove isSubmitting parameter from ChangeStatusForm component destructuring
- Remove isChangingStatus variable from useChangeInquiryStatus hook
- Remove isSubmitting prop passed to ChangeStatusForm in InquiriesTable
- Remove isChangingStatus from presenter return object
- Simplify status change form by eliminating unused loading state management
2025-11-25 15:47:40 +03:30
AmirReza Jamali 864c588f8a feat(inquiries): Replace custom EditIcon with PencilSquareIcon component
- Remove custom EditIcon SVG component definition from inquiries table
- Import PencilSquareIcon from assets/icons instead of custom implementation
- Update change status button to use PencilSquareIcon component
- Improve code maintainability by using centralized icon library
- Format ListHeader component props for better readability
2025-11-25 15:06:18 +03:30
AmirReza Jamali 2ec752df0c feat(inquiries): Add change status functionality to inquiries
- Create ChangeStatusForm component with status, reason, and description fields
- Add change status modal to inquiries table with form integration
- Implement useChangeInquiryStatus hook integration in presenter
- Add edit icon button to trigger status change modal for each inquiry
- Update Status component to accept status prop for proper styling
- Update FormFooter component to support form submission handling
- Add isChangeStatusModalOpen state management to presenter
- Update TInquiries type definitions to include change status credentials
- Enhance inquiries list with status change workflow alongside existing delete functionality
2025-11-25 14:53:16 +03:30
AmirReza Jamali 6da653cb15 feat(inquiries): Add status change functionality to inquiries
- Add useChangeInquiryStatus hook for managing inquiry status mutations
- Add STATUS endpoint to inquiries API endpoints configuration
- Add changeInquiryStatus method to inquiries service with error handling
- Add TChangeInquiryStatusCredentials type with validation schema
- Include description, reason, and status fields in status change credentials
- Invalidate inquiries query cache on successful status update
- Display success toast notification after status change completes
2025-11-25 14:11:00 +03:30
AmirReza Jamali 8b795bb428 feat(inquiries): Add pagination functionality to inquiries list table
- Import and integrate Pagination component into inquiries table
- Add allInquiries data exposure to access pagination metadata
- Expose setParams function to allow dynamic pagination updates
- Initialize default offset and limit parameters (10 items per page)
- Reset offset to 0 when applying new filters for consistent pagination
- Implement page change handler to update offset based on selected page
- Maintain filter state while navigating between pages
2025-11-25 13:54:40 +03:30
AmirReza Jamali a77bb6cccc feat(inquiries): Add filtering functionality to inquiries list table
- Create new InquiriesListFilters component with search and status filter fields
- Integrate filter modal into inquiries table with form handling
- Add INQUIRY_STATUS enum with pending, reviewed, approved, and rejected statuses
- Implement URL-based query parameter management for filter persistence
- Add form state management using react-hook-form with watch and setValue utilities
- Connect filter search to useGetInquiries hook to fetch filtered results
- Support clearing individual filter fields and closing filter modal
2025-11-25 12:40:30 +03:30
AmirReza Jamali 6d4016af5e feat(inquiries): add sidebar nav item, icon, and API endpoint
- Add "Inquiries" nav item to sidebar data with `/inquiries` URL and BriefcaseTimer icon
- Implement BriefcaseTimer SVG icon component
- Add `INQUIRIES` base endpoint to API_ENDPOINTS
- Cleanup: remove commented details button in CmsTable, reorder imports
2025-11-25 12:03:12 +03:30
AmirReza Jamali 2389ad1bbf feat(contact-us): Add delete functionality to contact us table
- Add delete button with trash icon to contact us table rows
- Implement confirmation modal for delete action
- Create useDeleteContactUs mutation hook with success callback
- Add deleteContactUs method to contact-us service
- Update API endpoints to support BASE() function for dynamic ID routing
- Add state management for modal open/close and current contact selection
- Integrate toast notifications for delete success feedback
- Add tooltip component to delete button for better UX
- Update query key to use BASE() endpoint for consistency
2025-11-23 13:33:07 +03:30
AmirReza Jamali a8d95d5f92 feat(contact-us): Add filtering functionality to contact us list table
- Enable Contact Us navigation menu item in sidebar with visible flag set to true
- Create TContacts type schema with Zod validation for API responses
- Add type safety to contactUsService.getAllContactUs() with return type annotation
- Implement contact list table rendering with proper data mapping
- Display contact information columns: full name, email, status, phone, created date
- Add date formatting using unixToDate utility for created_at timestamps
- Update useContactUsListPresenter to return properly structured contacts data
- Refactor table columns array to include all contact detail fields
- Follows established pattern from recent filtering feature implementations
2025-11-23 13:17:00 +03:30
AmirReza Jamali cf3a931cef fix(customers): improve type safety in assign to company modal
- Add ChangeEvent import for proper TypeScript typing
- Remove unused register function from useForm hook
- Refactor onChange handler with explicit ChangeEvent<HTMLSelectElement> type annotation
- Extract target value into variable for improved readability
- Ensure consistent form field updates between setValue and setCompanies calls
- Improve type safety and reduce potential runtime errors in form handling
2025-11-23 11:40:40 +03:30