diff --git a/apps/web/src/common/components/inputs/LabelsInput.vue b/apps/web/src/common/components/inputs/LabelsInput.vue new file mode 100644 index 0000000000..a2f3c87856 --- /dev/null +++ b/apps/web/src/common/components/inputs/LabelsInput.vue @@ -0,0 +1,118 @@ + + + diff --git a/apps/web/src/common/modules/user/UserSelectDropdown.vue b/apps/web/src/common/modules/user/UserSelectDropdown.vue new file mode 100644 index 0000000000..f4beefb5ee --- /dev/null +++ b/apps/web/src/common/modules/user/UserSelectDropdown.vue @@ -0,0 +1,136 @@ + + + diff --git a/apps/web/src/schema/opsflow/_types/task-field-type.ts b/apps/web/src/schema/opsflow/_types/task-field-type.ts index dd2d74ed59..3ae1865769 100644 --- a/apps/web/src/schema/opsflow/_types/task-field-type.ts +++ b/apps/web/src/schema/opsflow/_types/task-field-type.ts @@ -10,10 +10,10 @@ export type TaskFieldEnum = { name: string; }; interface TextTaskFieldOptions { - example: string; + example?: string; } export interface ParagraphTaskFieldOptions { - example: string; + example?: string; } export interface DropdownTaskFieldOptions { enums: TaskFieldEnum[]; @@ -33,20 +33,19 @@ interface BaseTaskField { is_required?: boolean; is_primary?: boolean; // whether to display field during task creation } -interface TextTaskField extends BaseTaskField { +export interface TextTaskField extends BaseTaskField { field_type: 'TEXT'; - options: TextTaskFieldOptions; + options?: TextTaskFieldOptions; } -interface ParagraphTaskField extends BaseTaskField { +export interface ParagraphTaskField extends BaseTaskField { field_type: 'PARAGRAPH'; - options: ParagraphTaskFieldOptions; + options?: ParagraphTaskFieldOptions; } -interface DropdownTaskField extends BaseTaskField { +export interface DropdownTaskField extends BaseTaskField { field_type: 'DROPDOWN'; - options: DropdownTaskFieldOptions; + options?: DropdownTaskFieldOptions; } -interface OtherTaskField extends BaseTaskField { +export interface OtherTaskField extends BaseTaskField { field_type: Exclude; - options: object; } export type TaskField = TextTaskField | ParagraphTaskField | DropdownTaskField | OtherTaskField; diff --git a/apps/web/src/schema/opsflow/task-category/api-verbs/create.ts b/apps/web/src/schema/opsflow/task-category/api-verbs/create.ts index 9f8cbf9cdc..9c0ae46e28 100644 --- a/apps/web/src/schema/opsflow/task-category/api-verbs/create.ts +++ b/apps/web/src/schema/opsflow/task-category/api-verbs/create.ts @@ -1,10 +1,7 @@ import type { Tags } from '@/schema/_common/model'; import type { TaskField } from '@/schema/opsflow/_types/task-field-type'; -import type { TaskStatusOption, TaskStatusType } from '@/schema/opsflow/task/type'; +import type { TaskStatusType, TaskStatusOptionWithOptionalId } from '@/schema/opsflow/task/type'; -interface TaskStatusOptionWithOptionalId extends Omit { - status_id?: string; -} export interface TaskCategoryCreateParameters { name: string; diff --git a/apps/web/src/schema/opsflow/task-category/api-verbs/update.ts b/apps/web/src/schema/opsflow/task-category/api-verbs/update.ts index 3416088623..d5c28948af 100644 --- a/apps/web/src/schema/opsflow/task-category/api-verbs/update.ts +++ b/apps/web/src/schema/opsflow/task-category/api-verbs/update.ts @@ -1,12 +1,12 @@ import type { Tags } from '@/schema/_common/model'; import type { TaskField } from '@/schema/opsflow/_types/task-field-type'; -import type { TaskStatusOptions } from '@/schema/opsflow/task/type'; +import type { TaskStatusOptions, TaskStatusOptionWithOptionalId, TaskStatusType } from '@/schema/opsflow/task/type'; export interface TaskCategoryUpdateParameters { category_id: string; name?: string; description?: string; - status_options?: TaskStatusOptions; + status_options?: TaskStatusOptions|Record; fields?: TaskField[]; force?: boolean; tags?: Tags; diff --git a/apps/web/src/schema/opsflow/task-type/api-verbs/update-fields.ts b/apps/web/src/schema/opsflow/task-type/api-verbs/update-fields.ts new file mode 100644 index 0000000000..94054bc262 --- /dev/null +++ b/apps/web/src/schema/opsflow/task-type/api-verbs/update-fields.ts @@ -0,0 +1,8 @@ +import type { TaskField } from '@/schema/opsflow/_types/task-field-type'; + +export interface TaskTypeUpdateFieldsParameters { + task_type_id: string; + fields: TaskField[]; + category_id: string; + force: boolean; +} diff --git a/apps/web/src/schema/opsflow/task-type/api-verbs/update.ts b/apps/web/src/schema/opsflow/task-type/api-verbs/update.ts index 73a4a8e376..d66eb5f469 100644 --- a/apps/web/src/schema/opsflow/task-type/api-verbs/update.ts +++ b/apps/web/src/schema/opsflow/task-type/api-verbs/update.ts @@ -1,11 +1,9 @@ import type { Tags } from '@/schema/_common/model'; -import type { TaskField } from '@/schema/opsflow/_types/task-field-type'; export interface TaskTypeUpdateParameters { task_type_id: string; name?: string; description?: string; - fields?: TaskField[]; assignee_pool?: string[]; tags?: Tags; category_id?: string; diff --git a/apps/web/src/schema/opsflow/task/api-verbs/create.ts b/apps/web/src/schema/opsflow/task/api-verbs/create.ts index f249744361..1c9f6b4beb 100644 --- a/apps/web/src/schema/opsflow/task/api-verbs/create.ts +++ b/apps/web/src/schema/opsflow/task/api-verbs/create.ts @@ -5,7 +5,7 @@ import type { TaskPriority } from '@/schema/opsflow/task/type'; export interface TaskCreateParameters { task_type_id: string; name: string; - status: string; + status_id: string; priority?: TaskPriority; description?: string; files?: FileModel[]; diff --git a/apps/web/src/schema/opsflow/task/model.ts b/apps/web/src/schema/opsflow/task/model.ts index a8571c581b..b5d0cc1654 100644 --- a/apps/web/src/schema/opsflow/task/model.ts +++ b/apps/web/src/schema/opsflow/task/model.ts @@ -10,6 +10,7 @@ export interface TaskModel { description: string; data: Record; files: FileModel[]; + assignee: string; task_type_id: string; category_id: string; project_id: string; diff --git a/apps/web/src/schema/opsflow/task/type.ts b/apps/web/src/schema/opsflow/task/type.ts index aac84ca6fc..9fdbe2cb88 100644 --- a/apps/web/src/schema/opsflow/task/type.ts +++ b/apps/web/src/schema/opsflow/task/type.ts @@ -1,7 +1,7 @@ import type { TASK_STATUS_COLOR_NAMES } from '@/schema/opsflow/task/constant'; export type TaskStatusType = 'TODO'|'IN_PROGRESS'|'COMPLETED'; -type TaskStatusColorName = typeof TASK_STATUS_COLOR_NAMES[number]; +export type TaskStatusColorName = typeof TASK_STATUS_COLOR_NAMES[number]; export interface TaskStatusOption { status_id: string; name: string; @@ -9,4 +9,7 @@ export interface TaskStatusOption { is_default?: boolean; } export type TaskStatusOptions = Record; +export interface TaskStatusOptionWithOptionalId extends Omit { + status_id?: string; +} export type TaskPriority = 'LOW'|'MEDIUM'|'HIGH'; diff --git a/apps/web/src/services/asset-inventory/pages/CollectorCreatePage.vue b/apps/web/src/services/asset-inventory/pages/CollectorCreatePage.vue index 70e7ddcbd8..13ab7322fb 100644 --- a/apps/web/src/services/asset-inventory/pages/CollectorCreatePage.vue +++ b/apps/web/src/services/asset-inventory/pages/CollectorCreatePage.vue @@ -47,6 +47,15 @@ export default defineComponent({ instance.setPathFrom(from); }); }, + beforeRouteLeave(to, from, next) { + next((vm) => { + const instance = vm as unknown as IInstance; + if (!instance.isConfirmBackModalVisible.value) { + instance.isConfirmBackModalVisible.value = true; + instance.nextRoute.value = to; + } + }); + }, }); diff --git a/apps/web/src/services/ops-flow/OpsFlowContainer.vue b/apps/web/src/services/ops-flow/OpsFlowContainer.vue index f7b8aefea2..e03f8b84d3 100644 --- a/apps/web/src/services/ops-flow/OpsFlowContainer.vue +++ b/apps/web/src/services/ops-flow/OpsFlowContainer.vue @@ -1,26 +1,28 @@ - diff --git a/apps/web/src/services/ops-flow/OpsFlowLSB.vue b/apps/web/src/services/ops-flow/OpsFlowLSB.vue new file mode 100644 index 0000000000..fe730ddeec --- /dev/null +++ b/apps/web/src/services/ops-flow/OpsFlowLSB.vue @@ -0,0 +1,30 @@ + + + diff --git a/apps/web/src/services/ops-flow/components/BoardLSB.vue b/apps/web/src/services/ops-flow/components/BoardLSB.vue new file mode 100644 index 0000000000..81753e4ec1 --- /dev/null +++ b/apps/web/src/services/ops-flow/components/BoardLSB.vue @@ -0,0 +1,47 @@ + + + diff --git a/apps/web/src/services/ops-flow/components/BoardTaskComment.vue b/apps/web/src/services/ops-flow/components/BoardTaskComment.vue new file mode 100644 index 0000000000..97bab07269 --- /dev/null +++ b/apps/web/src/services/ops-flow/components/BoardTaskComment.vue @@ -0,0 +1,78 @@ + + + diff --git a/apps/web/src/services/ops-flow/components/BoardTaskTable.vue b/apps/web/src/services/ops-flow/components/BoardTaskTable.vue new file mode 100644 index 0000000000..9512eb2534 --- /dev/null +++ b/apps/web/src/services/ops-flow/components/BoardTaskTable.vue @@ -0,0 +1,135 @@ + + + diff --git a/apps/web/src/services/ops-flow/components/PackageDeleteModal.vue b/apps/web/src/services/ops-flow/components/PackageDeleteModal.vue index 767ecae4fe..da0b2b345d 100644 --- a/apps/web/src/services/ops-flow/components/PackageDeleteModal.vue +++ b/apps/web/src/services/ops-flow/components/PackageDeleteModal.vue @@ -9,10 +9,11 @@ import ErrorHandler from '@/common/composables/error/errorHandler'; import AssociatedCategories from '@/services/ops-flow/components/AssociatedCategories.vue'; import AssociatedWorkspaces from '@/services/ops-flow/components/AssociatedWorkspaces.vue'; +import { usePackageStore } from '@/services/ops-flow/stores/admin/package-store'; import { useTaskManagementPageStore } from '@/services/ops-flow/stores/admin/task-management-page-store'; const taskManagementPageStore = useTaskManagementPageStore(); -const packageStore = taskManagementPageStore.packageStore; +const packageStore = usePackageStore(); const deletable = computed(() => !taskManagementPageStore.getters.associatedCategoriesToPackage.length && !taskManagementPageStore.getters.associatedWorkspacesToPackage.length); @@ -35,6 +36,9 @@ const handleConfirm = async () => { const handleCloseOrCancel = () => { taskManagementPageStore.closeDeletePackageModal(); }; +const handleClosed = () => { + taskManagementPageStore.resetTargetPackageId(); +};