- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.