Closed tomaspalma closed 5 months ago
Attention: Patch coverage is 91.17647%
with 6 lines
in your changes are missing coverage. Please review.
Project coverage is 89.18%. Comparing base (
afc9b67
) to head (cb8f75d
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closes #305
What was done
Show collapsable with fields that are supposed to be quick edited (for now it's just the publish end date)
It already updates the publish end date upon selection of date and clicking on the submit button
It already updates the row value of the publish end date
The only thing different than in the video is the fact that now instead of the text saying there is an error or "sucessfully updated", there is a snackbar.
Desktop View
https://user-images.githubusercontent.com/59887569/235507613-c4ccad5d-8fc1-436f-a3cc-485b36a00fd7.mp4
Mobile View
https://github.com/NIAEFEUP/nijobs-fe/assets/59887569/4b3a7a65-0114-43b1-97bc-87f9ea6008b3
Explanations
There was a lot of difficulty on establishing a direct relationship between the offer row and the collapsed quick edit because of the way the code is structured.
How is the offer publish end date being updated?
The
CompanyOffersManagementWidget
component has a local state calledoffers
.That state and its setter are passed to the newly created
CollapsedQuickOfferEdit
component.When the publish end date is altered in the
CollapsedQuickOfferEdit
, this component changes the offer object pointing to the respective id of the offer, changes the value of the publishEndDate and it re-renders the component.