Skip to content

feat: add custom filter component for square meters and integrate int… #227

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

Merged
merged 2 commits into from
Jul 3, 2025

Conversation

NoOne7135
Copy link
Contributor

…o resource selection

@NoOne7135 NoOne7135 requested a review from ivictbor June 16, 2025 11:04
Copy link
Contributor

@ivictbor ivictbor left a comment

Choose a reason for hiding this comment

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

Overall good but I think we should sportify example

break;
case 'medium':
emit('update:modelValue', [
Copy link
Contributor

Choose a reason for hiding this comment

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

@NoOne7135 is ti possible to use Filters.AND here?

switch (size) {
case 'small':
emit('update:modelValue', [{ operator: 'lt', value: 25 }]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to use Filters.LT here?

<p class="font-medium mb-1 dark:text-white">{{ $t('Square meters filter') }}</p>
<div class="flex gap-2">
<button
Copy link
Contributor

Choose a reason for hiding this comment

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

@NoOne7135 could u use v-for to render 3 buttons? after this change, please use next classes:

class="flex gap-1 items-center py-1 px-3 text-sm font-medium rounded-default border focus:outline-none focus:z-10 focus:ring-4"
:class="{
'text-white bg-blue-500 border-blue-500 hover:bg-blue-600 focus:ring-blue-200 dark:focus:ring-blue-800': active,
'text-gray-900 bg-white border-gray-300 hover:bg-gray-100 hover:text-blue-500 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700': !active
}


if (ops.includes('lt:25')) selected.value = 'small';
else if (ops.includes('gte:25') && ops.includes('lte:90')) selected.value = 'medium';
Copy link
Contributor

Choose a reason for hiding this comment

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

I think u can store the selected state directly and generate ops from it?

@ivictbor ivictbor merged commit fb5855a into next Jul 3, 2025
1 check passed
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