Skip to content

Add reset options dropdown for Queue Members (all/filtered/selected) - #1478

Open
Artem-Makarchenko-Dev wants to merge 12 commits into
mainfrom
fix/WTEL-10321/reset-members-dropdown
Open

Artem-Makarchenko-Dev wants to merge 12 commits into
mainfrom
fix/WTEL-10321/reset-members-dropdown

Conversation

@Artem-Makarchenko-Dev

Copy link
Copy Markdown
Contributor

Summary

  • Reset icon on Queues > Members now opens a dropdown with three options instead of always resetting by the currently applied filters:
    • Reset all members — no filters
    • Reset all filtered members — current behavior (previous default)
    • Reset X selected members — only the checkbox-selected rows (X = actual selection count)
  • Confirmation popup text now differs per scope (per BA feedback): "Reset selected" shows a distinct, filter-agnostic question; "Reset all"/"Reset filtered" keep the existing date+count wording.
  • Affected-record count for every scope comes from the backend counts endpoint (getQuantity), never from the checkbox-selection count — so if a selection turns out to have zero eligible records, the popup correctly shows the empty state instead of a false "confirm" prompt.

Depends on

This PR requires the companion webitel-ui-sdk PR (branch fix/WTEL-10321/reset-members-dropdown) to be merged and published, and this repo's @webitel/api-services dependency bumped (npm run utils:up-libs), before or together with this PR going live.

Reason: "Reset selected" sends member ids via a new ids filter field. The currently-published mapResetMembersFilters doesn't pass that field through at all (silently dropped), which means until the ui-sdk fix is live, "Reset selected" would behave exactly like "Reset all" in production — resetting every member instead of just the selected ones. Locally this isn't visible because client is npm link'd to the local ui-sdk checkout.

Open question

ActionOptions (all/filtered/selected) currently lives locally in client (src/modules/contact-center/modules/queues/modules/members/types/ActionOptions.ts), named generically rather than reset-specific since the same 3-way scope could apply to other bulk actions (e.g. delete) later. Should this move to webitel-ui-sdk for reuse, or stay local until a second consumer actually needs it?

Test plan

  • Reset all — with and without an active date filter
  • Reset filtered — with and without an active date filter
  • Reset selected — with a partial and a full-page selection
  • Edge case: scope where the counts endpoint returns 0 eligible records
  • Confirm the popup text renders correctly in at least a couple of non-English locales

🤖 Generated with Claude Code

https://claude.ai/code/session_01XAfTfy5pzKR9Qm4qR97ah2

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAfTfy5pzKR9Qm4qR97ah2
};

const resetOptions = computed(() => {
const options = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

мені хотілось би це в окрему змінну винести)

@@ -0,0 +1,7 @@
export const ActionOptions = {
ALL: 'all',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ключи теж у CamelCase)

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