Skip to content

Conversation

gaspergrom
Copy link
Contributor

@gaspergrom gaspergrom commented May 22, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 102635b

Added support for custom filter attributes on the member list page. Updated the filter components to use a consistent filter value interface and to display the filter name and selection in the title. Removed unused label properties from filter options. Added a new string filter component and a corresponding API filter renderer.

🤖 Generated by Copilot at 102635b

label property
gone from many filter types
code is cleaner now

Why

How

🤖 Generated by Copilot at 102635b

  • Removed the label property from various filter options, as it was redundant and not used in the UI (link, link, link, link, link, link, link, link)
  • Added the customAttributes state to the member store, to store the filter configs for the custom attributes fetched from the backend (link, link)
  • Added the getMemberCustomAttributes action to the member store, to call the MemberService and the customAttributesService and update the customAttributes state (link)
  • Added the custom-config prop to the cr-filter component, to pass the custom attributes filter configs from the parent component (link)
  • Added the configuration computed property to the cr-filter component, to merge the props.config and the props.customConfig into a single object of filter configs (link)
  • Added the open event to the cr-filter-dropdown component, to emit the key of the selected filter option to the parent component (link, link)
  • Refactored the cr-filter-dropdown component, to use computed properties for filtering the options and custom options based on the search query, and to simplify the template (link, link, link)
  • Updated the Boolean, Date, MultiSelect, Number, and Select filter components, to display more descriptive titles and to use include instead of exclude in the default form values (link, link, link, link, link, link, link, link)
  • Added the String filter component, to display a title, receive the model value and the filter options, emit an update event, use a computed property for the form value, use Vuelidate for validation, and initialize the form value on mounted (link)
  • Added the stringApiFilterRenderer function, to render the API filter query for the string filter type (link)
  • Invoked the getMemberCustomAttributes action on the mounted hook of the member list page component, to fetch the custom attributes from the backend (link)
  • Imported the getMemberCustomAttributes action and the customAttributes state from the member store and used them as reactive references in the member list page component (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@gaspergrom gaspergrom added the Feature Created by Linear-GitHub Sync label May 22, 2023
@gaspergrom gaspergrom requested a review from joanagmaia May 22, 2023 10:02
@gaspergrom gaspergrom self-assigned this May 22, 2023
@gaspergrom gaspergrom merged commit 36e39d2 into feature/filters May 22, 2023
@gaspergrom gaspergrom deleted the feature/custom-attributes branch May 22, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants