vegaitglobal/posao-sansi-website

FE | Implement (My) Job Offer Details page

Closed this issue · 1 comments

Similar to /job-offers/{id} page, we need /my-job-offers/{id} page that can be accessed only by authenticated employer.
The page should be exactly the same as the /job-offeres/{id} page, except it should have different buttons:

  • "arhiviraj" (if the Job Offer is active) - it sends a PATCH /api/job-offers/{id}/ request with {"is_active": false} body
  • "aktiviraj" (if the Job Offer is not active) - it sends a PATCH /api/job-offers/{id}/ request with {"is_active": true} body

If any of the above-mentioned requests returns an error response, a popup with a generic message that something went wrong is displayed.
However, if the request returns a success response, a popup should inform the user about the successful action. If this happens, we should update the jobOffer object in that component (re-fetch it).

Implemented!
We didn't implement an option to change Job Offer details (by author employer).
Also, the page/form for creating a new Job Offer is not a part of this issue and is not implemented at this point.