Buzxxx / ehe_next

Welcome to our real estate frontend website repository! Here, you'll find the codebase for our dynamic and user-friendly frontend application tailored for the real estate industry. Our website provides a seamless experience for users to browse listings, search for properties, and connect with real estate agents.
https://ehe-next.vercel.app
0 stars 0 forks source link

Lead - Lead Bulk Import with CSV Upload and Data Preview #32

Open Buzxxx opened 2 months ago

Buzxxx commented 2 months ago

I want to upload a CSV file containing multiple leads So that I can preview the data before importing it into the system and avoid errors.

Acceptance Criteria: Given I am on the lead import page, When I click the "Upload CSV" button, Then I should be able to select a CSV file from my system.

Given the file is uploaded successfully, When the system processes the CSV file, Then I should see a preview of the leads with columns like name, email, phone number, and status.

Given that the preview is shown, When I notice any errors or discrepancies, Then I should be able to remove the CSV and upload a new one.

Given the preview is correct, When I click the "Submit" button, Then the data should be sent to the backend for processing and stored as new leads.

Given the backend processes the leads successfully, When the import is complete, Then I should receive a success message with a link to the lead management listing page.

Technical Notes: The CSV upload form should accept .csv files and validate the format (e.g., correct headers: Name, Email, Phone). The data preview should display the first 10-20 rows for review. Add a "Cancel" button to allow users to discard the upload before submission. Create an API route to handle the CSV upload. Use fetch in your component to upload the CSV. Use useState to manage and display the CSV preview data. The backend will validate the data and return any errors (e.g., missing fields, invalid data). - this is dependent step.

Buzxxx commented 1 month ago

Image

Buzxxx commented 1 month ago

Image

Buzxxx commented 1 month ago

Image

subrathk commented 1 month ago

CSV file import is working fine in both desktop and mobile view. Image

Image

Image

Image

Image