Skip to content
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

feat: add task management languages and deletion scenarios #5217

Merged
merged 33 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f25c765
feat(ops-flow): add mention functionality and improve comment input h…
WANZARGEN Dec 10, 2024
52c9681
feat: add new props and filters for project and user dropdowns
WANZARGEN Dec 10, 2024
a48d563
feat(ops-flow): add radio group for workspace selection in PackageFor…
WANZARGEN Dec 10, 2024
3500951
feat(menu): remove workflow from MENU_ID and update translation IDs
WANZARGEN Dec 11, 2024
ac29d3d
feat(task): add user assignment functionality and update task handling
WANZARGEN Dec 11, 2024
6dc4d17
feat(task-detail-page): add conditional rendering for button container
WANZARGEN Dec 11, 2024
9324621
feat(comment-store): add default comment_type to list fetch parameters
WANZARGEN Dec 12, 2024
8224b1a
feat(associated-tasks): add board task fields for name and descriptio…
WANZARGEN Dec 12, 2024
8cb435c
feat(task): update status handling with new status_id parameter and s…
WANZARGEN Dec 12, 2024
c4e5a72
feat(icons): rename and add new service-related icons for clarity
WANZARGEN Dec 12, 2024
5324501
feat(menu): replace BOARD with TASK_BOARD in permissions and routes
WANZARGEN Dec 12, 2024
5b3efb0
feat(navigation): enhance GNB menu item conversion and initialization…
WANZARGEN Dec 12, 2024
008e0d6
feat: update required prop logic to consider readonly state in fields
WANZARGEN Dec 12, 2024
990a84b
feat(task-management): add landing data initialization and update met…
WANZARGEN Dec 12, 2024
01013e4
feat(ops-flow): update task content display and enhance template mana…
WANZARGEN Dec 12, 2024
3f0f291
feat: add TaskStatusBadge component and update task labels to PascalCase
WANZARGEN Dec 12, 2024
eff12af
feat: add internationalization support for edit and delete buttons
WANZARGEN Dec 12, 2024
246fc72
feat: enhance task management with i18n support for status and type a…
WANZARGEN Dec 12, 2024
6f030f8
feat(task-field): add delete modal and improve field management features
WANZARGEN Dec 12, 2024
0365ce6
fix(language-pack): add new translation entry for en-US language
WANZARGEN Dec 12, 2024
f231489
feat(translations): add hangul-js for Korean particle handling
WANZARGEN Dec 16, 2024
b41a1e1
feat(language-pack): add new concept nodes and translations for CATEG…
WANZARGEN Dec 16, 2024
3a583c0
feat(task): add state management and new assignee functionality
WANZARGEN Dec 16, 2024
5492fa8
feat(badge): add violet color mixin to PBadge component
WANZARGEN Dec 16, 2024
6bf2ccd
feat(badge): add violet200 style to badge display options
WANZARGEN Dec 16, 2024
2c452e4
feat: add i18n support for package management components and modals
WANZARGEN Dec 17, 2024
c65daec
feat(package-form): add confirmation modal for package updates and tr…
WANZARGEN Dec 17, 2024
cfaa68b
feat(shared-config): add shared configuration store and update relate…
WANZARGEN Dec 17, 2024
c41e6eb
feat(task-management): add success and error messages for landing pag…
WANZARGEN Dec 17, 2024
c352bef
feat: implement i18n for task management templates and messages
WANZARGEN Dec 17, 2024
30ed277
feat(task-fields-form): update readonly logic based on view mode state
WANZARGEN Dec 17, 2024
c1ec655
feat: add accessible config interface and enhance task management fea…
WANZARGEN Dec 19, 2024
0d6395b
feat(task-management): improve error handling and data retrieval logic
WANZARGEN Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"diff-match-patch": "^1.0.5",
"echarts": "^5.5.0",
"ejs": "^3.1.10",
"hangul-js": "^0.2.6",
"hashids": "^2.2.1",
"highlight.js": "^11.5.1",
"html-to-image": "^1.9.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/common/components/inputs/LabelsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const handleKeyEscape = () => {
setValue('');
};
const handleKeyEnter = (e: KeyboardEvent) => {
if (e.isComposing || !value.value || isInvalid) return;
if (e.isComposing || !value.value || isInvalid.value) return;
labelList.value.push(value.value);
setValue('');
emit('update:labels', labelList.value);
Expand Down Expand Up @@ -89,7 +89,7 @@ watch(() => props.labels, (newLabels) => {
{{ $t('DASHBOARDS.CUSTOMIZE.ADD_LABEL') }}
</span>
<div v-else
class="flex items-center justify-center w-full h-20 text-gray-300"
class="text-gray-300 text-xs"
>
{{ $t('DASHBOARDS.CUSTOMIZE.NO_LABEL') }}
</div>
Expand Down
20 changes: 14 additions & 6 deletions apps/web/src/common/modules/navigations/gnb/GNBNavigationRail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,20 @@ const handleMenuDescription = (value?: boolean) => {
const handleMinimizedGnbRail = () => {
gnbStore.createMinimizeNavRail(!gnbGetters.isMinimizeNavRail);
};
const convertGNBMenuToMenuItem = (menuList: DisplayMenu[], menuType: ContextMenuType = 'item'): GNBMenuType[] => menuList.map((menu) => ({
...menu,
name: menu.id,
type: menuType,
disabled: menuType === 'header' && menu.id.includes('cost'),
}));
const convertGNBMenuToMenuItem = (menuList: DisplayMenu[], menuType: ContextMenuType = 'item'): GNBMenuType[] => {
const results: GNBMenuType[] = [];
menuList.forEach((menu) => {
if (!menu.hideOnGNB && !menu.hideOnSiteMap) {
results.push({
...menu,
name: menu.id,
type: menuType,
disabled: menuType === 'header' && menu.id.includes('cost'),
});
}
});
return results;
};
const refinedMenuList = (list, value) => {
const index = list.findIndex((d) => d.id === value);
if (index !== -1) {
Expand Down
10 changes: 9 additions & 1 deletion apps/web/src/common/modules/project/ProjectSelectDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ interface Props {
workspaceId?: string;
isInitSelectedItem?: boolean;
block?: boolean;
styleType?: string;
appearanceType?: 'stack';
showDeleteAllButton?: boolean;
}

const props = withDefaults(defineProps<Props>(), {
Expand All @@ -64,6 +67,9 @@ const props = withDefaults(defineProps<Props>(), {
hideCreateButton: false,
workspaceId: undefined,
isInitSelectedItem: false,
styleType: undefined,
appearanceType: undefined,
showDeleteAllButton: undefined,
});

const emit = defineEmits<{(e: 'select', value: ProjectTreeNodeData[]): void;
Expand Down Expand Up @@ -303,8 +309,10 @@ watch(() => state._selectedProjectIds, (selectedProjectIds) => {
:readonly="props.readonly"
:menu-position="props.position"
disable-handler
:show-delete-all-button="props.showDeleteAllButton"
:style-type="props.styleType"
:block="props.block"
appearance-type="stack"
:appearance-type="props.appearanceType"
:is-filterable="!props.readonly"
@update:visible-menu="handleUpdateVisibleMenu"
@delete-tag="handleDeleteTag"
Expand Down
22 changes: 20 additions & 2 deletions apps/web/src/common/modules/user/UserSelectDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const props = withDefaults(defineProps<{
disabled?: boolean;
readonly?: boolean;
userPool?: string[];
selectionLabel?: string;
appearanceType?: string;
styleType?: string;
block?: boolean;
}>(), {
userId: '',
userIds: () => [],
Expand All @@ -36,6 +40,10 @@ const props = withDefaults(defineProps<{
invalid: false,
disabled: false,
userPool: undefined,
selectionLabel: undefined,
appearanceType: 'badge',
styleType: undefined,
block: undefined,
});

const emit = defineEmits<{(event: 'update:user-ids', value: string[]): void;
Expand Down Expand Up @@ -122,7 +130,8 @@ watch([loading, () => props.userId, () => props.userIds], ([_loading, newUserId,
</script>

<template>
<p-select-dropdown show-select-marker
<p-select-dropdown class="user-select-dropdown"
show-select-marker
:selected="selectedUserItems"
:handler="userMenuItemsHandler"
:page-size="10"
Expand All @@ -133,7 +142,16 @@ watch([loading, () => props.userId, () => props.userIds], ([_loading, newUserId,
:use-fixed-menu-style="useFixedMenuStyle"
show-delete-all-button
:multi-selectable="props.selectionType === 'multiple'"
appearance-type="badge"
:selection-label="props.selectionLabel"
:appearance-type="props.appearanceType"
:style-type="props.styleType"
:block="props.block"
@update:selected="handleUpdateSelectedUserItems"
/>
</template>

<style scoped lang="postcss">
.user-select-dropdown {
width: fit-content;
}
</style>
4 changes: 2 additions & 2 deletions apps/web/src/lib/access-control/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const WORKSPACE_OWNER_DEFAULT_PERMISSIONS: MenuId[] = [
MENU_ID.NOTICE,
MENU_ID.OPS_FLOW,
MENU_ID.OPS_FLOW_LANDING,
MENU_ID.BOARD,
MENU_ID.TASK_BOARD,
];
export const WORKSPACE_MEMBER_DEFAULT_PERMISSIONS: MenuId[] = [
MENU_ID.WORKSPACE_HOME,
Expand All @@ -73,7 +73,7 @@ export const WORKSPACE_MEMBER_DEFAULT_PERMISSIONS: MenuId[] = [
MENU_ID.NOTICE,
MENU_ID.OPS_FLOW,
MENU_ID.OPS_FLOW_LANDING,
MENU_ID.BOARD,
MENU_ID.TASK_BOARD,
];

// HACK: this need to be changed with new SYSTEM domain planning
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/lib/menu/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ export const MENU_ID = Object.freeze({
METRIC_EXPLORER: 'metric_explorer',
OPS_FLOW: 'ops_flow',
OPS_FLOW_LANDING: 'ops_flow_landing',
WORKFLOW: 'workflow',
BOARD: 'board',
TASK_BOARD: 'task_board',
TASK_MANAGEMENT: 'task_management',
} as const);

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/lib/menu/menu-architecture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const MENU_LIST: Menu[] = [
needPermissionByRole: true,
subMenuList: [
{ id: MENU_ID.OPS_FLOW_LANDING },
{ id: MENU_ID.BOARD },
{ id: MENU_ID.TASK_BOARD },
],
},
{
Expand Down
18 changes: 9 additions & 9 deletions apps/web/src/lib/menu/menu-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,25 +253,25 @@ export const MENU_INFO_MAP: Record<MenuId, MenuInfo> = Object.freeze({
[MENU_ID.OPS_FLOW]: {
menuId: MENU_ID.OPS_FLOW,
routeName: OPS_FLOW_ROUTE._NAME,
translationId: 'Ops Flow', // TODO: change translation id
translationId: 'MENU.OPS_FLOW',
icon: 'ic_gnb_bell', // TODO: change icon
},
[MENU_ID.OPS_FLOW_LANDING]: {
menuId: MENU_ID.OPS_FLOW_LANDING,
routeName: OPS_FLOW_ROUTE.LANDING._NAME,
translationId: 'Support Center', // TODO: change translation id
icon: 'ic_support-center',
translationId: 'OpsFlow Landing', // It will be replaced by task management template
icon: 'ic_service_service-desk',
},
[MENU_ID.BOARD]: {
menuId: MENU_ID.BOARD,
[MENU_ID.TASK_BOARD]: {
menuId: MENU_ID.TASK_BOARD,
routeName: OPS_FLOW_ROUTE.BOARD._NAME,
translationId: 'Board', // TODO: change translation id
icon: 'ic_workflow-board',
translationId: 'Board', // It will be replaced by task management template
icon: 'ic_service_board',
},
[MENU_ID.TASK_MANAGEMENT]: {
menuId: MENU_ID.TASK_MANAGEMENT,
routeName: OPS_FLOW_ROUTE.TASK_MANAGEMENT._NAME,
translationId: 'Task Management', // TODO: change translation id
icon: 'ic_service_administration',
translationId: 'MENU.TASK_MANAGEMENT',
icon: 'ic_service_task-management',
},
});
15 changes: 14 additions & 1 deletion apps/web/src/lib/site-initializer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { initDomain } from '@/lib/site-initializer/domain';
import { initDomainSettings } from '@/lib/site-initializer/domain-settings';
import { initEcharts } from '@/lib/site-initializer/echarts';
import { initErrorHandler } from '@/lib/site-initializer/error-handler';
import { initTaskManagementTemplate } from '@/lib/site-initializer/initTaskManagementTemplate';
import { initModeSetting } from '@/lib/site-initializer/mode-setting';
import { checkSsoAccessToken } from '@/lib/site-initializer/sso';
import { initUserAndAuth } from '@/lib/site-initializer/user-auth';
Expand Down Expand Up @@ -83,7 +84,19 @@ const init = async () => {
initEcharts();
initErrorHandler();
initRequestIdleCallback();
await checkSsoAccessToken();
const results = await Promise.allSettled([
checkSsoAccessToken(),
initTaskManagementTemplate(),
]);
const errors: any[] = [];
results.forEach((result) => {
if (result.status === 'rejected') {
errors.push(result.reason);
}
});
if (errors.length > 0) {
throw errors;
}
} catch (e) {
if (!isRouterInitialized) initRouter();
throw e;
Expand Down
13 changes: 13 additions & 0 deletions apps/web/src/lib/site-initializer/initTaskManagementTemplate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { pinia } from '@/store/pinia';

import {
useTaskManagementTemplateStore,
} from '@/services/ops-flow/task-management-templates/stores/use-task-management-template-store';

export const initTaskManagementTemplate = async () => {
const taskManagementTemplateStore = useTaskManagementTemplateStore(pinia);
await Promise.allSettled([
taskManagementTemplateStore.setInitialTemplateId(),
taskManagementTemplateStore.setInitialLandingData(),
]);
};
3 changes: 3 additions & 0 deletions apps/web/src/schema/config/public-config/api-verbs/create.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { ResourceGroupType } from '@/schema/_common/type';

export interface PublicConfigCreateParameters<T = Record<string, any>> {
name: string;
data: T;
resource_group: ResourceGroupType;
tags?: Record<string, any>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { Query } from '@cloudforet/core-lib/space-connector/type';

export interface PublicConfigGetAccessibleConfigsParameters {
query?: Query;
name?: string;
}
5 changes: 5 additions & 0 deletions apps/web/src/schema/config/public-config/api-verbs/get.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface PublicConfigGetParameters {
name: string;
project_id?: string;
workspace_id?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export interface TaskCategoryListParameters {
query?: Query;
category_id?: string;
name?: string;
include_deleted?: boolean;
}
2 changes: 2 additions & 0 deletions apps/web/src/schema/opsflow/task-category/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { TaskStatusOptions } from '@/schema/opsflow/task/type';
export interface TaskCategoryModel {
category_id: string;
name: string;
state: 'ACTIVE' | 'DELETED';
description: string;
status_options: TaskStatusOptions;
fields:TaskField[];
Expand All @@ -13,4 +14,5 @@ export interface TaskCategoryModel {
domain_id: string;
created_at: string;
updated_at: string;
deleted_at: string;
}
4 changes: 4 additions & 0 deletions apps/web/src/schema/opsflow/task/api-verbs/change-assignee.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface TaskChangeAssigneeParameters {
task_id: string;
assignee: string;
}
3 changes: 1 addition & 2 deletions apps/web/src/schema/opsflow/task/api-verbs/change-status.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export interface TaskChangeStatusParameters {
task_id: string;
status: string;
status_id: string;
assignee?: string;
comment?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { FileModel } from '@/schema/file-manager/model';
import type { MentionTargets } from '@/schema/opsflow/comment/type';

export interface TaskUpdateDescriptionParameters {
task_id: string;
description?: string;
files?: FileModel[];
mentions?: MentionTargets;
}
6 changes: 0 additions & 6 deletions apps/web/src/schema/opsflow/task/api-verbs/update.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import type { FileModel } from '@/schema/file-manager/model';
import type { MentionTargets } from '@/schema/opsflow/comment/type';
import type { TaskPriority } from '@/schema/opsflow/task/type';

export interface TaskUpdateParameters {
task_id: string;
name?: string;
priority?: TaskPriority;
description?: string;
files?: FileModel[];
mentions?: MentionTargets;
assignee?: string;
data?: Record<string, any>;
project_id?: string;
}
3 changes: 2 additions & 1 deletion apps/web/src/schema/opsflow/task/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ export interface TaskModel {
priority: TaskPriority;
description: string;
data: Record<string, any>;
files: FileModel[];
files?: FileModel[];
assignee: string;
task_type_id: string;
category_id: string;
project_id: string;
workspace_id: string;
domain_id: string;
created_by: string;
created_at: string;
started_at: string;
updated_at: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/services/ops-flow/OpsFlowLSB.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ const state = reactive({

<template>
<aside class="sidebar-menu">
<board-l-s-b v-if="state.selectedMenuId === MENU_ID.BOARD" />
<board-l-s-b v-if="state.selectedMenuId === MENU_ID.TASK_BOARD" />
</aside>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,32 @@ import { computed } from 'vue';
import { PFieldTitle, PDataTable } from '@cloudforet/mirinae';
import type { DataTableField } from '@cloudforet/mirinae/types/data-display/tables/data-table/type';

import { i18n } from '@/translations';

import { useTaskManagementPageStore } from '@/services/ops-flow/stores/admin/task-management-page-store';

const taskManagementPageStore = useTaskManagementPageStore();

const fields = computed<DataTableField[]>(() => [
{
name: 'name',
label: 'Name',
label: i18n.t('OPSFLOW.NAME') as string,
width: '30%',
},
{
name: 'description',
label: 'Description',
label: i18n.t('OPSFLOW.DESCRIPTION') as string,
width: '70%',
},
]);
</script>

<template>
<div>
<p-field-title class="mb-2">
Category
<p-field-title class="mb-2"
color="gray"
>
{{ $t('OPSFLOW.TARGET_LIST', {target: $t('OPSFLOW.CATEGORY')}) }}
</p-field-title>
<p-data-table :fields="fields"
:items="taskManagementPageStore.getters.associatedCategoriesToPackage"
Expand Down
Loading
Loading