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

feat: improve on table listings (HL-1325) #3119

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

feat: improve on table listings (HL-1325) #3119

wants to merge 11 commits into from

Conversation

sirtawast
Copy link
Collaborator

@sirtawast sirtawast commented Jun 25, 2024

Description ✨

Various small fixes and improvements to help handler on their daily duties. Also fixes some of the issues with listing applicants in new vs. old ahjo mode.

@terovirtanen
Copy link
Contributor

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr3119.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr3119.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr3119.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-pr3119.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-handler-pr3119.dev.hel.ninja 😆🎉🎉🎉

Copy link

sonarcloud bot commented Jun 26, 2024

@terovirtanen
Copy link
Contributor

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr3119.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr3119.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr3119.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-pr3119.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-handler-pr3119.dev.hel.ninja 😆🎉🎉🎉

Copy link

sonarcloud bot commented Jun 26, 2024

Copy link

sonarcloud bot commented Jun 26, 2024

Copy link

sonarcloud bot commented Jun 26, 2024

Quality Gate Failed Quality Gate failed for 'yjdh'

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Comment on lines +48 to +51
const dateForAdditionalInformationNeededBy = (
dateString: string | Date
): string => ` ${String(dateString).replace(/\d{4}$/, '')}`;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if, regardless of ApplicationListTableTransform's typing, there's any situation where a Date object can end up here. But assuming there is, I don't think you can avoid the convertToUIDateFormat call here, as String(new Date()).replace(/\d{4}$/, '') is locale dependant and for example on UK English locale this returns the painfully long 'Wed Jun 26 2024 16:44:57 GMT+0300 (Eastern European Summer Time)'.

Comment on lines +80 to +92
([
APPLICATION_STATUSES.HANDLING,
APPLICATION_STATUSES.INFO_REQUIRED,
].includes(application.status) &&
isNewAhjoMode &&
application.handledByAhjoAutomation) ||
([
APPLICATION_STATUSES.ACCEPTED,
APPLICATION_STATUSES.REJECTED,
].includes(application.status) &&
isNewAhjoMode &&
application.handledByAhjoAutomation) ||
([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two can be combined together at least to make this huge effective one-liner a bit less wieldy. Could consider just abandoning the idea of combining this all into one statement and using a function with actual if-else structure, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants