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