Commit Graph

43 Commits

Author SHA1 Message Date
AmirReza Jamali a238edc563 feat(dashboard): refactor home page to utilize TenderDashboard component
- Replaced the previous home page structure with a simplified TenderDashboard component for improved clarity and maintainability.
- Updated the .gitignore file to include IDE-specific files, ensuring a cleaner repository.
- Enhanced the useTenderListPresenter to support new parsing logic for cpv_codes in search parameters.
- Introduced a new utility function, buildQueryString, for better handling of query parameters in API requests.
2026-05-18 10:59:16 +03:30
AmirReza Jamali f4a425a6e5 feat(pagination): implement hybrid pagination across multiple components
- Introduced a new `useHybridPagination` hook to manage pagination logic, enhancing data fetching and navigation.
- Updated various components including `useAdminsPresenter`, `useCompanyListPresenter`, `useCustomerListPresenter`, and others to utilize the new pagination hook, improving code consistency and reducing duplication.
- Refactored pagination handling in each component to streamline state management and improve user experience during data navigation.
- Enhanced search functionality to reset pagination state when new search parameters are applied, ensuring accurate data display.
2026-05-17 17:01:28 +03:30
AmirReza Jamali d9a945904a feat(phone-input): integrate phone number input component and validation
- Added `libphonenumber-js` dependency for improved phone number handling.
- Refactored `CreateAdmin` form to utilize a new `PhoneNumberInput` component with validation rules.
- Updated `useCreateAdminPresenter` to normalize phone number input before submission.
- Enhanced error messages for phone validation in `Texts` constant.
- Modified `User` schema to validate phone numbers using E.164 format.
2026-05-16 10:28:03 +03:30
AmirReza Jamali 37e2744420 feat(tender-details): add lots section and enhance tender details functionality
- Introduced a new "Lots" section in the tender details page to display lot-specific information, improving data organization and visibility.
- Updated the tender navigation to conditionally include the "Lots" section based on its availability.
- Enhanced the tender display utilities with functions to determine the visibility of various sections, including lots, description, and translation.
- Refactored components to utilize the new utilities for better conditional rendering and improved user experience.
- Improved type definitions for tender details to ensure better type safety and clarity.
2026-05-13 09:44:43 +03:30
AmirReza Jamali 9e2e7c1ceb feat(tender-procurement): enhance tender procurement section with additional details
- Added functionality to trim and filter related TED notice publication IDs for better display.
- Introduced new fields for notice type code and main classification in the tender details.
- Updated the procurement section to conditionally render additional information, improving user experience and data visibility.
2026-05-12 12:37:45 +03:30
AmirReza Jamali 2477215fce feat(tender-details): add documents section and enhance document handling
- Introduced a new documents section in the tender details page for better organization of related documents.
- Updated the API service to support downloading individual and bulk documents.
- Enhanced the TenderDetailsContent component to manage document data and loading states effectively.
- Refactored tender navigation items to include the new documents section.
- Improved type definitions for better clarity and type safety in document handling.
2026-05-11 17:41:38 +03:30
AmirReza Jamali 88bc939956 feat(contact-us & feedback tables): implement pagination and loading states
- Added pagination functionality to ContactUsTable and FeedbackTable components, enhancing user navigation through large datasets.
- Integrated loading states to provide visual feedback during data fetching.
- Updated data fetching hooks to accept parameters for improved query handling.
- Refactored table row rendering to include pagination metadata for accurate row numbering.
- Enhanced overall user experience by conditionally rendering pagination controls based on data availability.
2026-05-11 17:30:34 +03:30
AmirReza Jamali f397158a29 refactor(tender-details): enhance translation page tests and layout
- Updated Cypress tests for the tender translation page to improve visibility checks and streamline assertions.
- Refactored test structure to utilize a dedicated function for fetching the visible title heading.
- Adjusted test cases to ensure accurate language switching and URL handling for tender details.
- Improved layout consistency in the translation page by refining element visibility checks and ensuring proper section rendering.
2026-05-11 16:11:09 +03:30
AmirReza Jamali f01632e38d refactor(tender-details): enhance translation and summary features
- Integrated language selection and translation functionality in TenderDetails, allowing users to choose display language and translate tender metadata.
- Added AI summary section to display overall summary of the tender.
- Updated API service to support translation requests and handle responses effectively.
- Improved pagination handling in AdminsTable for better user experience.
- Refactored various components to ensure consistent data flow and state management.
2026-05-10 08:44:03 +03:30
AmirReza Jamali 88f9605748 feat(tenders-table): add submission and tender deadlines to tender list
- Enhanced TendersTable to display submission deadline, tender deadline, and created at date using unixToDate for better clarity.
- Updated useTenderListPresenter to include new columns for submission and tender deadlines.
- Modified TenderSchema to make created_at optional, aligning with data structure requirements.
2026-05-02 13:01:11 +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 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 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 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 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 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 410ca5a737 feat(cms): Add filtering functionality to CMS list table
- Create CmsListFilters component with search and key filter fields
- Add filter modal to CMS table with open/close functionality
- Implement useForm hook integration for filter form management
- Update useCmsTablePresenter to handle filter state and search logic
- Modify useGetCmsList query hook to accept and pass filter parameters
- Update cms-service.getCms method to support query parameters
- Add URL-based query string management for filter persistence
- Integrate filter button in ListHeader component
- Add isMutating state tracking for loading indicator during search
2025-11-23 10:51:55 +03:30
AmirReza Jamali bd79b7ed14 refactor(marketing): Standardize marketing wizard steps with initial data support
- Add support for initial data in all marketing wizard step components
- Update step presenters to accept and handle initial data
- Modify forwardRef implementations to include initialData prop
- Add TypeScript interfaces for step component props
- Improve type safety and data handling across marketing wizard steps
- Prepare components for edit and create workflows with consistent data management
2025-11-11 10:43:32 +03:30
AmirReza Jamali b444f6a08f feat(cms): Add CMS table with delete and edit functionality
- Implement CMS table with row listing and pagination
- Add delete functionality for CMS entries with confirmation modal
- Introduce edit button to navigate to edit page for specific CMS entry
- Update page type form to include new 'key' field for CMS entries
- Modify CMS service and types to support new data structure
- Enhance table presenter with additional actions and state management
Resolves data management and user interaction improvements for CMS module
2025-11-11 10:12:21 +03:30
AmirReza Jamali 5640febf40 feat(cms): Add CMS details page and update related components
- Implement new edit marketing page with dynamic routing
- Update CMS and contact us table components with placeholder content
- Add new query hook for fetching CMS details by ID
- Modify CMS service to support fetching individual CMS details
- Update type definitions for CMS-related data structures
- Add initial breadcrumb navigation for edit marketing page
- Prepare infrastructure for future CMS editing functionality
2025-11-10 09:53:22 +03:30
AmirReza Jamali 4f7b258533 refactor(marketing): Standardize step components and data structure
- Rename field names across step components for consistency
- Update chart step to use more generic data structure
- Modify input field names to follow consistent naming convention
- Refactor chart step to use key-value pairs instead of x-y coordinates
- Update form field names in multiple marketing wizard steps
- Improve type consistency and naming across marketing wizard components
2025-11-09 16:04:52 +03:30
AmirReza Jamali cdc8cde6a4 feat(marketing): Refactor marketing wizard steps and add data collection methods
- Moved all marketing wizard step components to `create/_components` directory
- Added `collectData` static method to each step component for data retrieval
- Reorganized file structure to improve component modularity
- Prepared steps for dynamic data collection in wizard workflow
- Added VSCode settings file for project configuration
- Introduced new CMS-related components and services
- Updated API endpoints and added new query hooks
2025-11-09 14:53:36 +03:30
AmirReza Jamali 2d664795ad feat(sidebar): add calls section to navigation menu
This commit introduces a new "Calls" section to the main sidebar navigation to provide users with access to call logs.

- Adds a new collapsible "Calls" menu item to the sidebar configuration.
- Includes sub-links for "All Calls", "Incoming", "Outgoing", and "Missed" calls.
- Creates new custom icons (GlobeSearch, CallIncome, CallMade, CallMissed, CallReceived) to support the new menu items.
- Updates `apexcharts` and `react-apexcharts` dependencies to newer versions.
2025-11-04 14:12:20 +03:30
AmirReza Jamali 387747b9b0 feat(settings): implement user profile page and notification handler
This commit introduces a new user settings page and enhances push notification functionality.

The new settings page, located at `/pages/settings`, allows users to view and update their personal profile information. It fetches the current user's data and provides a form to edit fields such as name, email, phone number, position, and role. The form is built using `react-hook-form` for state management and validation, and it leverages custom hooks (`useProfileQuery`, `useUpdateProfileQuery`) to interact with the API.

Additionally, a `notificationclick` event listener has been added to the Firebase messaging service worker. This handler improves the user experience for push notifications by focusing on an existing tab with the relevant URL or opening a new one if none exists when a notification is clicked.
2025-10-11 16:41:26 +03:30
AmirReza Jamali b58ea368ec feat(firebase): Add Firebase SDK and initialize Analytics
This commit integrates the Firebase SDK into the application to enable Firebase services, starting with Google Analytics.

Key changes include:
- Added the `firebase` package as a dependency.
- Included Firebase project configuration variables in the production environment file.
- Created a new `firebase.ts` utility to centralize Firebase app initialization.
- Integrated the `FirebaseAnalytics` component into the root layout to enable analytics tracking across the entire application.
2025-10-04 09:28:40 +03:30
AmirReza Jamali ae89c45a7e feat(notifications): Implement notification details page and card
This commit introduces a dedicated page for viewing the full details of a notification and refactors the related UI components for better modularity and user experience.

Key changes include:
- Created a new reusable `NotificationDetailsCard` component to display notification details, decoupling the presentation logic from the page.
- Refactored the notification details page (`/notification-history/[id]`) to use the new card component, resulting in cleaner code.
- Made notification items in the header dropdown clickable, linking each to its respective details page.
- Added a dedicated "Mark as Read" button to each notification item in the dropdown for improved usability.
- Updated the application's global title metadata for branding consistency.
- Added a specific page title for the Tenders page to improve SEO and navigation.
2025-09-30 12:43:41 +03:30
AmirReza Jamali 021ee7d11e feat(notifications): Implement functional header notification dropdown
This commit replaces the static notification dropdown in the header with a fully functional component that fetches live data from the API.

Key features include:
- Fetches and displays the latest notifications.
- Shows a badge with the count of unseen notifications.
- Opens a modal with notification details upon clicking an item.
- Marks notifications as seen when they are viewed.

Additionally, this commit includes several related improvements:
- refactor: Replaced the global loading component with a custom Tailwind CSS spinner for a consistent look and feel.
- feat: Enhanced the DatePicker component to optionally include a time picker.
- style: Improved the layout of the notification details page by moving the message to a dedicated section and capitalizing the 'priority' and 'type' fields for better readability.
2025-09-29 15:28:16 +03:30
AmirReza Jamali dde2fc5a05 fix: Prevent edit page crash and correct date formatting
On the company edit page, added optional chaining to the `defaultValues` prop. This prevents a potential runtime error if the company data is undefined when the page loads.

Additionally, this commit corrects the `unixToDate` utility function. The previous logic could incorrectly include 'false' in the format string when time was not required. It now uses a ternary operator to conditionally add the time format, ensuring correct output.

Minor code formatting adjustments are also included.
2025-09-28 23:19:12 +03:30
AmirReza Jamali bb56e1013a feat(companies): Enhance company forms with additional fields
This commit expands the company profile by adding several new fields to the create and edit forms. This allows for the collection of more detailed and comprehensive company information.

Key changes include:
- Added new fields: Establishment Date, Company Type, Business Nature, Industry, Country, State, and City.
- Introduced a new reusable `DatePicker` component, utilizing `react-datepicker`, for date input.
- Created a new `CalendarIcon` for use in the date picker.
- Updated the company Zod schema, API services, and data types to support the new fields.

Additionally, this commit includes a refactor to standardize the `MultiSelect` component by renaming the `text` prop to `label` for better consistency across form elements. Form labels are now capitalized for a uniform UI.
2025-09-27 16:33:13 +03:30
AmirReza Jamali 85d95530a8 feat(notifications): add notification history page and API
This commit introduces the notification history feature, allowing users to view a log of their past notifications.

Key changes include:
- Added a "Notifications" link to the sidebar with a new icon.
- Defined API endpoints for fetching notification history and details.
- Added a "sent" status variant for displaying notification status.

Additionally, this commit includes related UI improvements:
- The user's full name is now dynamically displayed in the header, replacing the hardcoded placeholder.
- Table headers are now styled in uppercase for improved readability and consistency.
2025-09-25 17:09:42 +03:30
AmirReza Jamali 1d944739bc feat(feedback): add feedback button to tenders table
This commit introduces the ability for users to navigate to a feedback page directly from the tenders list.

A new feedback icon and a corresponding button have been added to the actions column of the tenders table. Clicking this button redirects the user to the feedback page associated with that specific tender.

To support this feature, the following changes were made:
- Added a new `FeedbackIcon` SVG component.
- Defined API endpoints and created query hooks for the feedback module.
- Fixed a query key inconsistency for company details to ensure data is correctly refetched after updates.
2025-09-23 11:16:02 +03:30
AmirReza Jamali 1d78b2b65d feat(admins): implement admin status management
This commit introduces the functionality for super admins to change the status of other admin users to either 'Active' or 'Inactive'. This provides better control over admin account access.

Key changes include:
- A 'Status' column with a visual badge has been added to the admins table.
- A new 'Change Status' action button, using a new `UserSettingIcon`, opens a modal for status updates.
- The backend service and frontend mutation for updating an admin's status are implemented.
- The `IUser` type and a new `AdminStatus` enum have been added to support this feature.

Additionally, the confirmation modal implementation has been simplified across the admin and customer tables by removing the `modalConfig` state.
2025-09-21 13:18:53 +03:30
AmirReza Jamali b8175e3b63 fix(auth, customers): Refresh page on logout and rename form field
This commit introduces two main improvements: ensuring a clean state after user logout and enhancing the clarity of the customer creation form.

The logout function in the `UserContext` now calls `router.refresh()`. This forces a page reload, preventing the user from seeing stale, authenticated data after logging out.

Additionally, the form field for assigning companies to a customer has been renamed from `company_ids` to `companies` in both the form component and the Zod validation schema. This refactoring improves code clarity and consistency. A related `console.log` statement was also removed.
2025-09-21 09:58:27 +03:30
AmirReza Jamali 2f1229202a remove customer mobile field 2025-09-20 19:43:33 +03:30
AmirReza Jamali 4a7a1c66f7 Add: shared skeleton, dark toggle bg, fixed: multi select patching issue 2025-09-20 19:35:58 +03:30
AmirReza Jamali 0ea2ff635b refactor(forms): Enhance MultiSelect with controlled state and styling
This commit overhauls the `MultiSelect` component to improve its functionality, flexibility, and integration with form libraries.

The component is now a controlled component, accepting a `value` prop and using the `onChange` handler to propagate updates. This allows for seamless integration with libraries like React Hook Form.

Key changes include:
- Added `value`, `disabled`, `active`, and `height` props for more granular control over the component's state and appearance.
- Refactored styling logic to use the `cn` utility for cleaner conditional class management.
- Simplified the internal JSX structure and SVGs for better readability and maintenance.
- Updated the component's state management to correctly reflect the incoming `value` prop.
2025-09-20 18:28:53 +03:30
AmirReza Jamali e6493f5d83 feat(form): add loading state and replace custom switch component
This commit introduces a loading state for form submissions and replaces the custom switch component with a third-party library for improved user experience and maintainability.

- Adds `react-switch` as a dependency to replace the custom-built switch component, providing a more robust and feature-rich solution.
- Implements a loading indicator on form submission buttons and in the confirmation modal by utilizing the `useIsMutating` hook from TanStack Query. This provides clear visual feedback to the user during asynchronous operations.
- Creates a reusable `FormFooter` component to encapsulate the submit and cancel buttons, centralizing the form submission logic and loading state.
- Refactors the company create/edit forms to use the new `FormFooter` and `react-switch` components.
- Moves the `BreadcrumbItem` type to a shared types file for better code organization.
2025-09-20 16:13:04 +03:30
AmirReza Jamali e1898bf259 feat(submissions): Implement submissions page with paginated table
This commit introduces a new page for users to view their submissions in a structured and paginated table. This allows users to easily track their submission history and access key details.

The main changes include:
- A new page at `/submissions` to display the submissions list.
- A `SubmissionsTable` component to render submission data, including title, country, status, and a link to the submission URL.
- Integration of `react-paginate` to handle navigation through large sets of data.
- A new `useSubmissions` custom hook using TanStack Query for efficient, paginated data fetching from the API.
- Addition of the `currency-symbol-map` dependency to display prices with the correct currency symbol.
2025-09-18 16:52:46 +03:30
AmirReza Jamali 83bd4394fc Fixed build issues 2025-09-09 13:32:58 +03:30
AmirReza Jamali 1d4ccb3575 Initial commit for new panel 2025-09-09 11:20:26 +03:30