When a consumer views the bidders for their project, the profile of each bidder should be displayed with their basic details. Clicking on a maker's name should redirect the consumer to the maker's full profile page.
Requirements
Display Bidder Profiles:
On the project details page, display a list of all bidders for the project.
For each bidder, display their basic details such as name, profile picture, and a brief bio.
Clickable Maker Name:
Each bidder's name should be a clickable link.
Clicking on a bidder's name should redirect the consumer to the bidder's full profile page.
Acceptance Criteria
A list of bidders is displayed on the project details page.
Each bidder's profile includes their name, profile picture, and brief bio.
Clicking on a bidder's name redirects to their full profile page.
Additional Information
Ensure the component is responsive and accessible.
Provide clear error messages for any issues in displaying the bidder profiles or navigating to the full profile page.
Mockups / Examples
Provide any mockups or examples of the desired component if available.
Technical Requirements
Ensure compatibility with the existing tech stack of the project.
Utilize efficient algorithms to fetch and display bidder profiles without significant performance degradation.
Mongoose Schema for Reference
const mongoose = require('mongoose');
const projectSchema = mongoose.Schema({
"title": String,
"description": String,
"requirements": String,
"budget": Number,
"deadline": Date,
"consumerId": String, // Reference to the user who posted the project
"category": String,
"images": [
{
"url": String, // URL of the image stored in an external service
"description": String, // Optional description of the image
"uploadedAt": Date // Timestamp when the image was uploaded
}
],
"selectedBidder": String, // Reference to the selected bidder (if any)
"status": String, // "open", "closed", "in progress", "completed"
"createdAt": Date,
"updatedAt": Date
});
projectSchema.virtual('id').get(function () {
return this._id.toHexString();
});
projectSchema.set('toJSON', {
virtuals: true,
});
module.exports = mongoose.model('project', projectSchema);
const bidSchema = mongoose.Schema({
"project_id": { type: mongoose.Schema.Types.ObjectId, ref: 'project' },
"maker_id": { type: mongoose.Schema.Types.ObjectId, ref: 'user' },
"bid_amount": Number,
"proposal_text": String,
"status": { type: String, enum: ['Pending', 'Accepted', 'Rejected'], default: 'Pending' },
"created_at": { type: Date, default: Date.now },
"updated_at": { type: Date, default: Date.now }
});
bidSchema.virtual('id').get(function () {
return this._id.toHexString();
});
bidSchema.set('toJSON', {
virtuals: true,
});
module.exports = mongoose.model('bid', bidSchema);
Steps to Implement
Update Backend Endpoint:
Create an endpoint to fetch the basic details of all bidders for a given project.
Description
When a consumer views the bidders for their project, the profile of each bidder should be displayed with their basic details. Clicking on a maker's name should redirect the consumer to the maker's full profile page.
Requirements
Display Bidder Profiles:
Clickable Maker Name:
Acceptance Criteria
Additional Information
Mockups / Examples
Provide any mockups or examples of the desired component if available.
Technical Requirements
Mongoose Schema for Reference
Steps to Implement
Update Backend Endpoint:
Update Frontend Component:
Integrate and Test:
Tasks