Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Job Proposals Functionality #39

Open
9 tasks
AhmedFatthy1040 opened this issue Oct 8, 2024 · 0 comments
Open
9 tasks

Implement Job Proposals Functionality #39

AhmedFatthy1040 opened this issue Oct 8, 2024 · 0 comments
Assignees

Comments

@AhmedFatthy1040
Copy link
Collaborator

Issue Title: Implement Job Proposals Functionality

Issue Description:

As a freelancer, I want to submit proposals for job listings posted by clients so that I can express my interest and qualifications for available projects. This functionality should allow freelancers to submit proposals for jobs and enable clients to review those proposals.

Tasks:

  1. Submit Proposal:

    • Create an endpoint in the ProposalController for freelancers to submit proposals for specific jobs.
    • Collect necessary details for the proposal, including:
      • job_id: The ID of the job being applied for.
      • freelancer_id: The ID of the freelancer (automatically derived from the authenticated user's context).
      • cover_letter: A cover letter detailing the freelancer's qualifications and interest in the job.
      • proposed_rate: The rate proposed by the freelancer for the job.
      • status: Default to "Pending".
  2. Get Proposals for a Job:

    • Create an endpoint to retrieve all proposals submitted for a specific job, accessible by the client who posted the job.
  3. Get Proposal Status:

    • Create an endpoint for freelancers to check the status of their proposals for specific jobs.
  4. Update Proposal Status:

    • Create an endpoint for clients to update the status of proposals (e.g., Accepted, Rejected).

Acceptance Criteria:

  • Submit Proposal:

    • Freelancers should be able to make a POST request to /proposals to submit a proposal.
    • Return 201 Created if the proposal is submitted successfully.
    • Return 400 Bad Request if any required fields are missing or invalid.
  • Get Proposals for a Job:

    • Clients should be able to make a GET request to /jobs/{jobId}/proposals to retrieve proposals for their job.
    • Return 200 OK with a list of proposals or 204 No Content if no proposals are found.
  • Get Proposal Status:

    • Freelancers should be able to make a GET request to /proposals/{proposalId} to check their proposal status.
    • Return 200 OK with proposal details or 404 Not Found if the proposal does not exist.
  • Update Proposal Status:

    • Clients should be able to make a PUT request to /proposals/{proposalId}/status to update the proposal status.
    • Return 200 OK if the update is successful or 404 Not Found if the proposal does not exist.

Endpoint Specifications:

  • Submit Proposal:

    • Method: POST
    • URL: /proposals
    • Request Body Example:
      {
        "job_id": 12345,
        "cover_letter": "I am very interested in this job...",
        "proposed_rate": 50.00
      }
  • Get Proposals for a Job:

    • Method: GET
    • URL: /jobs/{jobId}/proposals
  • Get Proposal Status:

    • Method: GET
    • URL: /proposals/{proposalId}
  • Update Proposal Status:

    • Method: PUT
    • URL: /proposals/{proposalId}/status
    • Request Body Example:
      {
        "status": "Accepted"
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants