-
Notifications
You must be signed in to change notification settings - Fork 0
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
FFT-187 Adding notes api for payroll #624
base: main
Are you sure you want to change the base?
Conversation
DenisDDBT
commented
Feb 18, 2025
- JIRA ticket referenced in title
- Title is clear and concise
- Description gives any relevant detail
- Tests are up to date
- Documentation is up to date
78470e9
to
6016fe8
Compare
adding service function fixing sort order adding error handleing fixing error handler adding basic tests
6016fe8
to
3105eeb
Compare
c9cf14b
to
d441dab
Compare
@@ -83,32 +83,64 @@ export async function getData(url) { | |||
*/ | |||
export async function postData(url = "", data = {}, headers = {}) { | |||
const csrftoken = window.CSRF_TOKEN; | |||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i feel uneasy about some of the changes made here. i need to spend more time here.
max-width: 100%; | ||
width: 200px; | ||
display: inline-block; | ||
transform: translateY(6px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feels a bit magic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is, Paul has asked for ellipsis which is not active if your element is inline, and if I convert it to inline-block, line heights etc are getting different to the next link element. I could use flex or grid but they also come with different caveats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idea: could we handle it in javascript and truncate the string there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a rule of thumb, I try to avoid css task to be outsourced to js. Having said that, if you are keen to do it in js, sure, I can add some function to truncate the text and add ... if content is more thatn 20 chars
payroll/api.py
Outdated
return JsonResponse({}, status=204) | ||
except json.JSONDecodeError: | ||
return JsonResponse({"error": "Invalid JSON format"}, status=400) | ||
except ValidationError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can't see anything that would return a validation error?
the service function raises value error, did you mean that?
@@ -19,6 +19,16 @@ | |||
EditPayrollApiView.as_view(), | |||
name="api", | |||
), | |||
path( | |||
"api/<str:cost_centre_code>/<int:financial_year>/vacancies/notes", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to implement this for vacancies as well
do you want to do this as part of this ticket or a separate one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was my point I raised yesterday, is there any need to add it if logic and params are the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your API endpoint will need to handle both vacancies and employees which it currently doesn't