Integrate Proposal Page Functionality with Database #2

Open
opened 2025-05-21 07:34:02 +00:00 by MahmoudEmad · 4 comments
Member

Description:

This issue covers the full integration of the proposal page with the database, ensuring all related backend features work as expected with the actual data model. The goal is to connect the UI with real-time data from the proposals model and related views. The following tasks should be completed:

Tasks:

  1. Integrate backend with the database

    • Ensure all proposal-related operations are connected to the database layer.
  2. Implement missing functionality for the Proposal model (if needed)

    • Add or update fields, methods, or serializers required for proposal-related views.
  3. Integrate "Create New Proposal" functionality

    • Enable creation of new proposals from the UI and persist them to the database.
  4. Integrate "List All Proposals" functionality

    • Fetch and display all proposals stored in the database.
  5. Integrate "My Votes" view

    • Implement the logic to fetch and display proposals that the current user has voted on.
  6. Integrate dashboard functionality

    • Display aggregated or user-specific proposal/vote data pulled from the database.
  7. Add a script or endpoint to push dummy proposal data for mock UI testing

    • Should generate realistic records and insert them directly into the database for development/testing purposes.
    • This dummy data must reflect actual schema and logic used in the production DB.
### **Description:** This issue covers the full integration of the proposal page with the database, ensuring all related backend features work as expected with the actual data model. The goal is to connect the UI with real-time data from the proposals model and related views. The following tasks should be completed: #### ✅ Tasks: 1. **Integrate backend with the database** * Ensure all proposal-related operations are connected to the database layer. 2. **Implement missing functionality for the `Proposal` model (if needed)** * Add or update fields, methods, or serializers required for proposal-related views. 3. **Integrate "Create New Proposal" functionality** * Enable creation of new proposals from the UI and persist them to the database. 4. **Integrate "List All Proposals" functionality** * Fetch and display all proposals stored in the database. 5. **Integrate "My Votes" view** * Implement the logic to fetch and display proposals that the current user has voted on. 6. **Integrate dashboard functionality** * Display aggregated or user-specific proposal/vote data pulled from the database. 7. **Add a script or endpoint to push dummy proposal data for mock UI testing** * Should generate realistic records and insert them directly into the database for development/testing purposes. * This dummy data must reflect actual schema and logic used in the production DB.
MahmoudEmad added reference development_backend 2025-05-21 07:34:28 +00:00
MahmoudEmad self-assigned this 2025-05-21 07:34:46 +00:00
MahmoudEmad added this to the Freezone project 2025-05-21 07:35:35 +00:00
MahmoudEmad added this to the 1.0.0 milestone 2025-05-21 07:38:15 +00:00
Author
Member

Issue Update: Proposal Page Database Integration

Implemented:

  • Created a database example for listing all proposals (for mock UI usage with real data)
  • Integrated the database connection for proposal-related features
  • Updated the Proposal model in heromodels to support required fields
  • Integrated the Create New Proposal view with the database
  • Integrated the List All Proposals view with the database

Work in Progress:

  • Fixing the proposal status to load dynamically from the form instead of being hard-coded
  • Refining the proposal list view to display only the required and relevant data as per frontend expectations
### Issue Update: Proposal Page Database Integration #### Implemented: * Created a database example for listing all proposals (for mock UI usage with real data) * Integrated the database connection for proposal-related features * Updated the `Proposal` model in `heromodels` to support required fields * Integrated the Create New Proposal view with the database * Integrated the List All Proposals view with the database #### Work in Progress: * Fixing the proposal status to load dynamically from the form instead of being hard-coded * Refining the proposal list view to display only the required and relevant data as per frontend expectations
Author
Member

Issue Update: Activity Models and Database Refactor

Implemented:

  • Identified that AI-related activity data was being saved to a JSON file instead of the ourdb database
  • Started updating the data saving mechanism to use the proper database (ourdb) for consistency and persistence
  • Began refactoring by moving backend-related models to the db repo for better separation of concerns and clearer project structure

Work in Progress:

  • Finalizing the migration of activity models from backend to db repo
  • Updating all references to ensure compatibility with the new data storage approach using ourdb
### Issue Update: Activity Models and Database Refactor #### Implemented: * Identified that AI-related activity data was being saved to a JSON file instead of the `ourdb` database * Started updating the data saving mechanism to use the proper database (`ourdb`) for consistency and persistence * Began refactoring by moving backend-related models to the `db` repo for better separation of concerns and clearer project structure #### Work in Progress: * Finalizing the migration of activity models from backend to `db` repo * Updating all references to ensure compatibility with the new data storage approach using `ourdb`
Author
Member

Issue Update

Completed the implementation of the proposal functionality. The following features are now fully functional and tested.

Changes

  • Implemented creation of new proposals
  • Added listing of all proposals
  • Enabled fetching a proposal by ID
  • Added search and filter capabilities based on proposal status
  • Enabled submitting a vote on a proposal
  • Added listing of all user votes
  • Supported vote submission with an optional comment
  • Implemented a dashboard view with basic statistics
  • Added listing of all activities
  • Enabled fetching the most recent activities
### Issue Update Completed the implementation of the proposal functionality. The following features are now fully functional and tested. ### Changes * Implemented creation of new proposals * Added listing of all proposals * Enabled fetching a proposal by ID * Added search and filter capabilities based on proposal status * Enabled submitting a vote on a proposal * Added listing of all user votes * Supported vote submission with an optional comment * Implemented a dashboard view with basic statistics * Added listing of all activities * Enabled fetching the most recent activities
Author
Member
No description provided.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: herocode/hostbasket#2
No description provided.