From da1d152ad94e87b2b2c4d6a2f3b5fe4f59d21069 Mon Sep 17 00:00:00 2001
From: nayeongkim
Date: Fri, 3 Jan 2025 15:12:48 +0900
Subject: [PATCH] feat: apply user select dropdown at opsFlow
Signed-off-by: NaYeong,Kim
---
.../modules/user/UserSelectDropdown.vue | 38 ++++++++++++-------
.../ops-flow/components/BoardTaskFilters.vue | 12 ++++--
.../ops-flow/components/TaskTypeForm.vue | 6 ++-
.../field-templates/UserTaskField.vue | 6 ++-
4 files changed, 41 insertions(+), 21 deletions(-)
diff --git a/apps/web/src/common/modules/user/UserSelectDropdown.vue b/apps/web/src/common/modules/user/UserSelectDropdown.vue
index 75d508a833..352691532d 100644
--- a/apps/web/src/common/modules/user/UserSelectDropdown.vue
+++ b/apps/web/src/common/modules/user/UserSelectDropdown.vue
@@ -37,13 +37,16 @@ const props = withDefaults(defineProps<{
selectedId?: string;
selectedIds?: string[];
selectionType?: 'single'|'multiple';
+ appearanceType?: 'badge'|'stack';
+ styleType?: string;
+ block?: boolean;
useFixedMenuStyle?: boolean;
+ selectionLabel?: string;
invalid?: boolean;
disabled?: boolean;
readonly?: boolean;
userPool?: string[];
userGroupPool?: string[];
- appearanceType?: 'badge'|'stack';
showUserList?: boolean;
showUserGroupList?: boolean;
showCategoryTitle?: boolean;
@@ -53,12 +56,16 @@ const props = withDefaults(defineProps<{
selectedId: undefined,
selectedIds: undefined,
selectionType: 'single',
+ appearanceType: 'stack',
+ styleType: undefined,
+ block: undefined,
useFixedMenuStyle: false,
+ selectionLabel: undefined,
invalid: false,
disabled: false,
+ readonly: false,
userPool: undefined,
userGroupPool: undefined,
- appearanceType: 'badge',
showUserList: true,
showUserGroupList: true,
showCategoryTitle: true,
@@ -134,7 +141,7 @@ const state = reactive({
const checkUserGroup = (id: string): boolean => state.allUserGroupItems.some((i) => i.name === id);
const menuItemsHandler = (): AutocompleteHandler => async (keyword: string, pageStart = 1, pageLimit = 10, filters, resultIndex) => {
- const _totalCount = pageStart - 1 + pageLimit;
+ const _totalCount = Number((pageStart - 1 || 0) + pageLimit);
const filterItems = (items: SelectDropdownMenuItem[]) => items.filter((item) => getTextHighlightRegex(keyword).test(item.name)).slice(pageStart - 1, _totalCount);
if (resultIndex === undefined) {
@@ -149,7 +156,7 @@ const menuItemsHandler = (): AutocompleteHandler => async (keyword: string, page
}
return {
results: _slicedItems,
- more: _totalCount < items.length,
+ more: pageLimit <= _slicedItems.length - 1 && _totalCount < items.length,
};
});
}
@@ -160,7 +167,7 @@ const menuItemsHandler = (): AutocompleteHandler => async (keyword: string, page
if (i !== resultIndex) return { results: [], title: c.title };
return {
results: _slicedItems,
- more: _totalCount < items.length,
+ more: pageLimit <= _slicedItems.length - 1 && _totalCount < items.length,
};
});
};
@@ -248,20 +255,23 @@ watch([() => props.selectedId, () => props.selectedIds], ([newUserId, newUserIds
-
props.selectedId, () => props.selectedIds], ([newUserId, newUserIds
size="xs"
/>
- {{ item.label }}
-
+
+ {{ item.label }}
+
+
({{ item?.members || 0 }} {{ $t('ALERT_MANAGER.ALERTS.MEMBERS') }})
({{ item?.userName }})
-
+
diff --git a/apps/web/src/services/ops-flow/components/BoardTaskFilters.vue b/apps/web/src/services/ops-flow/components/BoardTaskFilters.vue
index d007da654d..56b2a9cbbb 100644
--- a/apps/web/src/services/ops-flow/components/BoardTaskFilters.vue
+++ b/apps/web/src/services/ops-flow/components/BoardTaskFilters.vue
@@ -130,22 +130,26 @@ watch(taskFilters, (newValue, oldValue) => {
/>
diff --git a/apps/web/src/services/ops-flow/components/TaskTypeForm.vue b/apps/web/src/services/ops-flow/components/TaskTypeForm.vue
index 90bf0bad1f..2b29fc7c80 100644
--- a/apps/web/src/services/ops-flow/components/TaskTypeForm.vue
+++ b/apps/web/src/services/ops-flow/components/TaskTypeForm.vue
@@ -255,10 +255,12 @@ watch([() => taskCategoryPageState.visibleTaskTypeForm, () => taskCategoryPageGe
-
diff --git a/apps/web/src/services/ops-flow/task-fields-form/field-templates/UserTaskField.vue b/apps/web/src/services/ops-flow/task-fields-form/field-templates/UserTaskField.vue
index f12bd8a3bc..f4594a440b 100644
--- a/apps/web/src/services/ops-flow/task-fields-form/field-templates/UserTaskField.vue
+++ b/apps/web/src/services/ops-flow/task-fields-form/field-templates/UserTaskField.vue
@@ -31,11 +31,13 @@ const {
no-spacing
>