Skip to content

Feature/open advanced search with link#20

Merged
cz-lucas merged 6 commits intodevelopfrom
feature/open-advanced-search-with-link
Oct 8, 2025
Merged

Feature/open advanced search with link#20
cz-lucas merged 6 commits intodevelopfrom
feature/open-advanced-search-with-link

Conversation

@cz-lucas
Copy link
Copy Markdown
Member

@cz-lucas cz-lucas commented Oct 8, 2025

The predefined filter id can bet through the url.
http://localhost:8082/hardware?order=desc&page=1&search=&size=20&sort=created_at&predefinedFilterId=<predefinedFilterId>&predefinedFilterEditModalOpen=<true or false>

@cz-lucas cz-lucas requested a review from JonasGoseberg October 8, 2025 06:22
filterSection.classList.remove('hide');

@if(!empty($predefined_filter_edit_modal_open) && $predefined_filter_edit_modal_open == true)
sleep(200).then(() => { // I know that this is bad practice but I havn't found another way that works :-(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TODO check later if we found another way together (sleep)


// Validate if it's a valid integer
if (filter_var($predefined_filter_id, FILTER_VALIDATE_INT) === false && $predefined_filter_id != null) {
throw new InvalidArgumentException('You provided an invalid parameter for predefinedFilterId (must be an integer).');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

throw vs return 400

}

if ($predefined_filter_edit_modal_open !== 'true' && $predefined_filter_edit_modal_open !== 'false' && $predefined_filter_edit_modal_open != null) {
throw new InvalidArgumentException("You provided an invalid parameter for predefinedFilterModalOpen (must be true or false).");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

throw vs return 400

@cz-lucas cz-lucas merged commit ed7f69d into develop Oct 8, 2025
2 of 6 checks passed
@cz-lucas cz-lucas deleted the feature/open-advanced-search-with-link branch October 8, 2025 07:16
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.

2 participants