liberu-real-estate / real-estate-laravel

Real Estate / Estate Agent, solution for your Property Agency. Application written in Laravel 11 / PHP 8.3 using Filament 3
https://www.facebook.com/liberusoftware
35 stars 18 forks source link

Import properties #17

Closed curtisdelicata closed 2 months ago

curtisdelicata commented 1 year ago

Here's a detailed description of a GitHub issue for importing properties into a Filament 3/Laravel 11 real estate project:


Title: Implement Property Import Functionality in Filament 3/Laravel 11 Real Estate Project

Description:

We need to add functionality to our Filament 3 and Laravel 11-based real estate project to allow importing property data from external sources. This functionality should include the ability to upload CSV files and map the columns to our database fields.

Requirements:

  1. File Upload Interface:

    • Create an interface in the admin panel using Filament 3 for uploading CSV files.
    • Provide validation to ensure only CSV files are uploaded.
  2. CSV Parsing:

    • Use a library like league/csv to parse the uploaded CSV files.
    • Read and display the CSV headers for mapping purposes.
  3. Column Mapping Interface:

    • After uploading, present a column mapping interface where users can map CSV columns to the database fields for properties (e.g., title, description, price, address, etc.).
    • Save the mapping configuration for future imports.
  4. Data Validation:

    • Implement data validation rules to ensure the data conforms to our database schema.
    • Provide feedback on any rows that fail validation, allowing users to correct and re-upload them.
  5. Database Insertion:

    • Insert the validated data into the properties table.
    • Ensure that duplicate entries are identified and handled appropriately (e.g., by skipping or updating existing entries).
  6. Progress Indication:

    • Display a progress bar or similar indication during the import process to inform users of the status.
  7. Error Handling:

    • Implement robust error handling to manage issues like file read errors, data validation failures, and database insertion errors.
    • Log errors for troubleshooting and provide user-friendly error messages.

Additional Information:

Acceptance Criteria:

References:

Labels:


Feel free to ask if you need further details or modifications.