Skip to content

Conversation

@fcv-iteratorIt
Copy link
Contributor

No description provided.

Copy link
Contributor

@augusthjerrild augusthjerrild left a comment

Choose a reason for hiding this comment

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

Minor suggestions

(query.orderOn == "id" ||
query.orderOn == "name" ||
query.orderOn == "updatedAt")
(query.orderOn == "id" || query.orderOn == "name" || query.orderOn == "updatedAt")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make these === instead of == ? Even though I know it's not your code..

Copy link
Contributor Author

@fcv-iteratorIt fcv-iteratorIt Dec 4, 2023

Choose a reason for hiding this comment

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

Done (left != null checks as this also checks for undefined)

}
const order: "DESC" | "ASC" =
query?.sort?.toLocaleUpperCase() == "DESC" ? "DESC" : "ASC";
const order: "DESC" | "ASC" = query?.sort?.toLocaleUpperCase() == "DESC" ? "DESC" : "ASC";
Copy link
Contributor

Choose a reason for hiding this comment

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

Same (it's pretty general in this file, sadly..)

private getSortingForApplications(query: ListAllEntitiesDto): Record<string, string | number> {
const sorting: Record<string, string | number> = {};
if (
// TODO: Make this nicer
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be removed or is it for the future? :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Future, a bit more research for a nice way of doing it if it is possible

Base automatically changed from feature/IOT-1304-Validation-on-iot-device-type-for-backend to stage December 4, 2023 10:30
@fcv-iteratorIt fcv-iteratorIt merged commit b1ce226 into stage Dec 4, 2023
@fcv-iteratorIt fcv-iteratorIt deleted the feature/IOT-1403-Column-options-on-application-table branch December 4, 2023 10:40
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.

3 participants