taskContentFormState.currentCategoryId, () => taskContentFormState.
class="base-form-top-wrapper"
>
diff --git a/apps/web/src/services/ops-flow/components/TaskDeleteModal.vue b/apps/web/src/services/ops-flow/components/TaskDeleteModal.vue
index 900e0c1000..f001541498 100644
--- a/apps/web/src/services/ops-flow/components/TaskDeleteModal.vue
+++ b/apps/web/src/services/ops-flow/components/TaskDeleteModal.vue
@@ -1,6 +1,8 @@
- {
const taskCategoryStore = useTaskCategoryStore();
- const taskStatusValidator = useFieldValidator(
+ const taskStatusValidator = useFieldValidator(
[],
isRequired ? (val) => {
- if (val.length === 0) return 'Please select a status';
+ if (val.length === 0) {
+ return i18n.t('OPSFLOW.VALIDATION.REQUIRED', {
+ topic: i18n.t('OPSFLOW.STATUS'),
+ particle: getParticle(i18n.t('OPSFLOW.STATUS') as string, 'topic'),
+ });
+ }
return true;
} : undefined,
);
const selectedStatusItems = taskStatusValidator.value;
const selectedStatusId = computed(() => selectedStatusItems.value[0]?.name);
- const setSelectedStatusItems = (selected: SelectDropdownMenuItem[]) => {
+ const setSelectedStatusItems = (selected: StatusItem[]) => {
taskStatusValidator.setValue(selected);
};
- const allStatusItems = ref([]);
+ const allStatusItems = ref([]);
const getStatusOptions = async (): Promise => {
if (!categoryId.value) return EMPTY_STATUS_OPTIONS;
const category = await taskCategoryStore.get(categoryId.value);
@@ -46,21 +56,21 @@ export const useTaskStatusField = ({
};
const loadAllStatusItems = async () => {
const statusOptions = await getStatusOptions();
- const items: SelectDropdownMenuItem[] = [];
- items.push({ type: 'header', label: 'To do', name: 'todo' });
+ const items: StatusItem[] = [];
+ items.push({ type: 'header', label: 'To-do', name: 'to-do' });
items.push({ type: 'divider', name: 'todo-div' });
statusOptions.TODO.forEach((status) => {
- items.push({ name: status.status_id, label: status.name });
+ items.push({ name: status.status_id, label: status.name, color: status.color });
});
- items.push({ type: 'header', label: 'In progress', name: 'in-porgress' });
+ items.push({ type: 'header', label: 'In progress', name: 'in-progress' });
items.push({ type: 'divider', name: 'in-progress-div' });
statusOptions.IN_PROGRESS.forEach((status) => {
- items.push({ name: status.status_id, label: status.name });
+ items.push({ name: status.status_id, label: status.name, color: status.color });
});
items.push({ type: 'header', label: 'Completed', name: 'completed' });
items.push({ type: 'divider', name: 'completed-div' });
statusOptions.COMPLETED.forEach((status) => {
- items.push({ name: status.status_id, label: status.name });
+ items.push({ name: status.status_id, label: status.name, color: status.color });
});
return items;
};
@@ -77,6 +87,7 @@ export const useTaskStatusField = ({
setSelectedStatusItems([{
name: status.status_id,
label: status.name,
+ color: status.color,
}]);
}
};
diff --git a/apps/web/src/services/ops-flow/composables/use-task-type-field.ts b/apps/web/src/services/ops-flow/composables/use-task-type-field.ts
index 191ea4fee1..63a6214549 100644
--- a/apps/web/src/services/ops-flow/composables/use-task-type-field.ts
+++ b/apps/web/src/services/ops-flow/composables/use-task-type-field.ts
@@ -5,10 +5,14 @@ import { getTextHighlightRegex } from '@cloudforet/mirinae';
import type { AutocompleteHandler, SelectDropdownMenuItem } from '@cloudforet/mirinae/types/controls/dropdown/select-dropdown/type';
import type { TaskTypeModel } from '@/schema/opsflow/task-type/model';
+import { getParticle, i18n } from '@/translations';
import { useFieldValidator } from '@/common/composables/form-validator';
import { useTaskTypeStore } from '@/services/ops-flow/stores/task-type-store';
+import {
+ useTaskManagementTemplateStore,
+} from '@/services/ops-flow/task-management-templates/stores/use-task-management-template-store';
export const useTaskTypeField = ({
isRequired, categoryId,
@@ -17,11 +21,17 @@ export const useTaskTypeField = ({
isRequired?: boolean;
}) => {
const taskTypeStore = useTaskTypeStore();
+ const taskManagementTemplateStore = useTaskManagementTemplateStore();
const taskTypeValidator = useFieldValidator(
[],
isRequired ? (val) => {
- if (val.length === 0) return 'Please select a task type';
+ if (val.length === 0) {
+ return i18n.t('OPSFLOW.VALIDATION.REQUIRED', {
+ topic: taskManagementTemplateStore.templates.taskType,
+ particle: getParticle(taskManagementTemplateStore.templates.taskType as string, 'topic'),
+ });
+ }
return true;
} : undefined,
);
diff --git a/apps/web/src/services/ops-flow/pages/OpsFlowLandingPage.vue b/apps/web/src/services/ops-flow/pages/OpsFlowLandingPage.vue
index 52eb7905c0..3c7ab8fc92 100644
--- a/apps/web/src/services/ops-flow/pages/OpsFlowLandingPage.vue
+++ b/apps/web/src/services/ops-flow/pages/OpsFlowLandingPage.vue
@@ -5,7 +5,7 @@ import { useRouter } from 'vue-router/composables';
import { QueryHelper } from '@cloudforet/core-lib/query';
import type { Query } from '@cloudforet/core-lib/space-connector/type';
import {
- PFieldTitle, PButton, PDivider, PSelectCard, PPaneLayout, PEmpty, PRadioGroup, PRadio, PDataLoader,
+ PButton, PDivider, PSelectCard, PEmpty, PRadioGroup, PRadio, PDataLoader,
} from '@cloudforet/mirinae';
import type { TaskCategoryModel } from '@/schema/opsflow/task-category/model';
@@ -20,6 +20,9 @@ import { OPS_FLOW_ROUTE } from '@/services/ops-flow/routes/route-constant';
import { useTaskCategoryStore } from '@/services/ops-flow/stores/admin/task-category-store';
import { useTaskStore } from '@/services/ops-flow/stores/task-store';
import { useTaskTypeStore } from '@/services/ops-flow/stores/task-type-store';
+import {
+ useTaskManagementTemplateStore,
+} from '@/services/ops-flow/task-management-templates/stores/use-task-management-template-store';
import type { TaskCreatePageQuery } from '@/services/ops-flow/types/task-create-page-type';
@@ -30,6 +33,7 @@ const taskTypeStore = useTaskTypeStore();
const taskTypeState = taskTypeStore.state;
const taskStore = useTaskStore();
const userStore = useUserStore();
+const taskManagementTemplateStore = useTaskManagementTemplateStore();
const { getProperRouteLocation } = useProperRouteLocation();
@@ -87,7 +91,7 @@ onMounted(async () => {
- Service Desk
+ {{ taskManagementTemplateStore.templates.TemplateName }}
{
class="min-h-72"
>
-
-
+
+
- View All Tickets
+ {{ $t('OPSFLOW.TASK_BOARD.VIEW_ALL_TASKS', {tasks: taskManagementTemplateStore.templates.tasks}) }}
-
-
-
- No Active Tickets
-
-
+
+
+
+
+
+
- Category
+ {{ taskManagementTemplateStore.templates.TaskCategory }}
@@ -139,7 +144,7 @@ onMounted(async () => {
- Topic
+ {{ taskManagementTemplateStore.templates.TaskType }}
{
:disabled="!isAllValid"
@click="goToTaskCreatePage"
>
- Next
+ {{ $t('COMMON.BUTTONS.NEXT') }}
@@ -166,7 +171,7 @@ onMounted(async () => {
- No Available Category
+ {{ $t('OPSFLOW.NO_AVAILABLE_TARGET', {target: taskManagementTemplateStore.templates.TaskCategory }) }}
diff --git a/apps/web/src/services/ops-flow/pages/TaskCreatePage.vue b/apps/web/src/services/ops-flow/pages/TaskCreatePage.vue
index 89cba91e38..6383c75df0 100644
--- a/apps/web/src/services/ops-flow/pages/TaskCreatePage.vue
+++ b/apps/web/src/services/ops-flow/pages/TaskCreatePage.vue
@@ -29,6 +29,8 @@ import {
PHeadingLayout, PHeading, PButton, PPaneLayout, PSkeleton,
} from '@cloudforet/mirinae';
+import { i18n as _i18n } from '@/translations';
+
import { queryStringToString } from '@/lib/router-query-string';
import ConfirmBackModal from '@/common/components/modals/ConfirmBackModal.vue';
@@ -40,6 +42,9 @@ import TaskContentBaseForm from '@/services/ops-flow/components/TaskContentBaseF
import { OPS_FLOW_ROUTE } from '@/services/ops-flow/routes/route-constant';
import { useTaskContentFormStore } from '@/services/ops-flow/stores/task-content-form-store';
import TaskFieldsForm from '@/services/ops-flow/task-fields-form/TaskFieldsForm.vue';
+import {
+ useTaskManagementTemplateStore,
+} from '@/services/ops-flow/task-management-templates/stores/use-task-management-template-store';
import type { BoardPageQuery } from '@/services/ops-flow/types/board-page-type';
import type { TaskCreatePageQueryValue } from '@/services/ops-flow/types/task-create-page-type';
@@ -48,6 +53,7 @@ import type { TaskCreatePageQueryValue } from '@/services/ops-flow/types/task-cr
const taskContentFormStore = useTaskContentFormStore();
const taskContentFormState = taskContentFormStore.state;
const taskContentFormGetters = taskContentFormStore.getters;
+const taskManagementTemplateStore = useTaskManagementTemplateStore();
/* route and query */
const route = useRoute();
@@ -57,7 +63,7 @@ const taskTypeId = computed
(() => queryS
/* header and back button */
const loading = false; // computed(() => taskCategoryStore.getters.loading);
-const headerTitle = 'Create Ticket'; // computed(() => taskCategoryPageStore.getters.currentCategory?.name ?? 'No Category');
+const headerTitle = computed(() => _i18n.t('OPSFLOW.CREATE_TARGET', { target: taskManagementTemplateStore.templates.Task }));
const {
setPathFrom,
goBack,
@@ -119,7 +125,7 @@ defineExpose({ setPathFrom });
@@ -131,13 +137,13 @@ defineExpose({ setPathFrom });
- Cancel
+ {{ $t('COMMON.BUTTONS.CANCEL') }}
- Confirm
+ {{ $t('COMMON.BUTTONS.CONFIRM') }}
diff --git a/apps/web/src/services/ops-flow/pages/TaskDetailPage.vue b/apps/web/src/services/ops-flow/pages/TaskDetailPage.vue
index 3a8933cbcb..e4094f7e8c 100644
--- a/apps/web/src/services/ops-flow/pages/TaskDetailPage.vue
+++ b/apps/web/src/services/ops-flow/pages/TaskDetailPage.vue
@@ -35,6 +35,8 @@ import type { TabItem } from '@cloudforet/mirinae/types/hooks/use-tab/type';
import type { TaskModel } from '@/schema/opsflow/task/model';
import { i18n as _i18n } from '@/translations';
+import { useUserStore } from '@/store/user/user-store';
+
import { queryStringToString } from '@/lib/router-query-string';
import ConfirmBackModal from '@/common/components/modals/ConfirmBackModal.vue';
@@ -71,6 +73,7 @@ const taskContentFormState = taskContentFormStore.state;
const taskContentFormGetters = taskContentFormStore.getters;
const taskStore = useTaskStore();
const taskManagementTemplateStore = useTaskManagementTemplateStore();
+const userStore = useUserStore();
/* task */
const task = ref();
@@ -104,7 +107,7 @@ const checkTaskExist = async () => {
/* header and back button */
const loading = ref(true);
-const headerTitle = computed(() => task?.value?.name ?? 'Inquiry Service Request'); // TODO: i18n
+const headerTitle = computed(() => task?.value?.name ?? '');
/* confirm leave modal */
@@ -123,7 +126,7 @@ onBeforeRouteLeave(handleBeforeRouteLeave);
const tabs = computed[]>(() => [
{
name: 'content',
- label: 'Content', // TODO: i18n
+ label: _i18n.t('OPSFLOW.TASK_BOARD.TASK_CONTENT') as string,
keepAlive: true,
},
{
@@ -158,7 +161,7 @@ watch(task, (t) => {
if (route.hash === '#progress') {
activeTab.value = 'progress';
}
- taskContentFormStore.setMode('view'); // TODO: differentiate by user permission
+ taskContentFormStore.setMode('view');
if (task.value) taskContentFormStore.setCurrentTask(task.value);
});
@@ -183,10 +186,11 @@ defineExpose({ setPathFrom, checkTaskExist });
-
- Delete
+ {{ $t('COMMON.BUTTONS.DELETE') }}
@@ -204,19 +208,19 @@ defineExpose({ setPathFrom, checkTaskExist });
-
- Cancel
+ {{ $t('COMMON.BUTTONS.CANCEL') }}
- Confirm
+ {{ $t('COMMON.BUTTONS.CONFIRM') }}
diff --git a/apps/web/src/services/ops-flow/stores/admin/package-store.ts b/apps/web/src/services/ops-flow/stores/admin/package-store.ts
index fcedaedd8f..9e69e0bef3 100644
--- a/apps/web/src/services/ops-flow/stores/admin/package-store.ts
+++ b/apps/web/src/services/ops-flow/stores/admin/package-store.ts
@@ -89,8 +89,8 @@ export const usePackageStore = defineStore('package', () => {
store.$dispose();
};
const appContextStore = useAppContextStore();
- watch(() => appContextStore.getters.isAdminMode, () => {
- disposeSelf();
+ watch(() => appContextStore.getters.globalGrantLoading, (globalGrantLoading) => {
+ if (globalGrantLoading) disposeSelf();
});
return {
getters,
diff --git a/apps/web/src/services/ops-flow/stores/admin/task-category-store.ts b/apps/web/src/services/ops-flow/stores/admin/task-category-store.ts
index 4076731195..f6ad0ef4a0 100644
--- a/apps/web/src/services/ops-flow/stores/admin/task-category-store.ts
+++ b/apps/web/src/services/ops-flow/stores/admin/task-category-store.ts
@@ -120,8 +120,8 @@ export const useTaskCategoryStore = defineStore('task-category', () => {
store.$dispose();
};
const appContextStore = useAppContextStore();
- watch([() => appContextStore.getters.isAdminMode, () => appContextStore.getters.workspaceId], () => {
- disposeSelf();
+ watch(() => appContextStore.getters.globalGrantLoading, (globalGrantLoading) => {
+ if (globalGrantLoading) disposeSelf();
});
return {
state,
diff --git a/apps/web/src/services/ops-flow/stores/comment-store.ts b/apps/web/src/services/ops-flow/stores/comment-store.ts
index 4e64d5bfe8..95fea0bd31 100644
--- a/apps/web/src/services/ops-flow/stores/comment-store.ts
+++ b/apps/web/src/services/ops-flow/stores/comment-store.ts
@@ -116,8 +116,8 @@ export const useCommentStore = defineStore('comment', () => {
store.$dispose();
};
const appContextStore = useAppContextStore();
- watch([() => appContextStore.getters.isAdminMode, () => appContextStore.getters.workspaceId], () => {
- disposeSelf();
+ watch(() => appContextStore.getters.globalGrantLoading, (globalGrantLoading) => {
+ if (globalGrantLoading) disposeSelf();
});
return {
state,
diff --git a/apps/web/src/services/ops-flow/stores/task-content-form-store.ts b/apps/web/src/services/ops-flow/stores/task-content-form-store.ts
index 0a55aa492c..aad2a67e7c 100644
--- a/apps/web/src/services/ops-flow/stores/task-content-form-store.ts
+++ b/apps/web/src/services/ops-flow/stores/task-content-form-store.ts
@@ -8,6 +8,9 @@ import type { TaskField } from '@/schema/opsflow/_types/task-field-type';
import type { TaskCategoryModel } from '@/schema/opsflow/task-category/model';
import type { TaskTypeModel } from '@/schema/opsflow/task-type/model';
import type { TaskModel } from '@/schema/opsflow/task/model';
+import { i18n } from '@/translations';
+
+import { useUserStore } from '@/store/user/user-store';
import { showSuccessMessage } from '@/lib/helper/notice-alert-helper';
@@ -21,6 +24,9 @@ import {
useTaskFieldMetadataStore,
} from '@/services/ops-flow/task-fields-configuration/stores/use-task-field-metadata-store';
import type { DefaultTaskFieldId } from '@/services/ops-flow/task-fields-configuration/types/task-field-type-metadata-type';
+import {
+ useTaskManagementTemplateStore,
+} from '@/services/ops-flow/task-management-templates/stores/use-task-management-template-store';
interface UseTaskContentFormStoreState {
originTask?: TaskModel;
@@ -48,12 +54,15 @@ interface UseTaskContentFormStoreGetters {
isDefaultFieldValid: boolean;
isFieldValid: boolean;
isAllValid: boolean;
+ isEditable: boolean;
}
export const useTaskContentFormStore = defineStore('task-content-form', () => {
const taskCategoryStore = useTaskCategoryStore();
const taskTypeStore = useTaskTypeStore();
const taskStore = useTaskStore();
const taskFieldMetadataStore = useTaskFieldMetadataStore();
+ const taskManagementTemplateStore = useTaskManagementTemplateStore();
+ const userStore = useUserStore();
const state = reactive
({
originTask: undefined,
@@ -95,6 +104,13 @@ export const useTaskContentFormStore = defineStore('task-content-form', () => {
if (state.mode === 'view') return getters.isDefaultFieldValid;
return state.isBaseFormValid && getters.isDefaultFieldValid && getters.isFieldValid;
}),
+ isEditable: computed(() => {
+ if (state.mode === 'create') return true;
+ if (!state.originTask) return true;
+ if (userStore.getters.isDomainAdmin) return true;
+ if (state.originTask.created_by === userStore.state.userId) return true;
+ return false;
+ }),
} as unknown as UseTaskContentFormStoreGetters; // HACK: to avoid type error
const actions = {
async setCurrentCategoryId(categoryId?: string) {
@@ -188,11 +204,11 @@ export const useTaskContentFormStore = defineStore('task-content-form', () => {
files: state.files.map((f) => f.file_id),
project_id: state.defaultData.project?.[0],
});
- showSuccessMessage('Task created successfully', '');
+ showSuccessMessage(i18n.t('OPSFLOW.ALT_S_CREATE_TARGET', { target: taskManagementTemplateStore.templates.task }), '');
state.createTaskLoading = false;
return true;
} catch (e) {
- ErrorHandler.handleRequestError(e, 'Failed to create task');
+ ErrorHandler.handleRequestError(e, i18n.t('OPSFLOW.ALT_E_CREATE_TARGET', { target: taskManagementTemplateStore.templates.task }));
state.createTaskLoading = false;
return false;
}
@@ -204,10 +220,10 @@ export const useTaskContentFormStore = defineStore('task-content-form', () => {
task_id: state.originTask.task_id,
name: state.defaultData.title,
});
- showSuccessMessage('Task updated successfully', '');
+ showSuccessMessage(i18n.t('OPSFLOW.ALT_S_UPDATE_TARGET', { target: taskManagementTemplateStore.templates.task }), '');
return true;
} catch (e) {
- ErrorHandler.handleRequestError(e, 'Failed to update task');
+ ErrorHandler.handleRequestError(e, i18n.t('OPSFLOW.ALT_E_UPDATE_TARGET', { target: taskManagementTemplateStore.templates.task }));
return false;
}
},
diff --git a/apps/web/src/services/ops-flow/stores/task-store.ts b/apps/web/src/services/ops-flow/stores/task-store.ts
index 05896baacd..5cbdeecb52 100644
--- a/apps/web/src/services/ops-flow/stores/task-store.ts
+++ b/apps/web/src/services/ops-flow/stores/task-store.ts
@@ -90,8 +90,8 @@ export const useTaskStore = defineStore('task', () => {
store.$dispose();
};
const appContextStore = useAppContextStore();
- watch([() => appContextStore.getters.isAdminMode, () => appContextStore.getters.workspaceId], () => {
- disposeSelf();
+ watch(() => appContextStore.getters.globalGrantLoading, (globalGrantLoading) => {
+ if (globalGrantLoading) disposeSelf();
});
return {
state,
diff --git a/apps/web/src/services/ops-flow/stores/task-type-store.ts b/apps/web/src/services/ops-flow/stores/task-type-store.ts
index 30ecb5b18a..f5643d9064 100644
--- a/apps/web/src/services/ops-flow/stores/task-type-store.ts
+++ b/apps/web/src/services/ops-flow/stores/task-type-store.ts
@@ -189,8 +189,8 @@ export const useTaskTypeStore = defineStore('task-type', () => {
store.$dispose();
};
const appContextStore = useAppContextStore();
- watch([() => appContextStore.getters.isAdminMode, () => appContextStore.getters.workspaceId], () => {
- disposeSelf();
+ watch(() => appContextStore.getters.globalGrantLoading, (globalGrantLoading) => {
+ if (globalGrantLoading) disposeSelf();
});
return {
state,
diff --git a/apps/web/src/services/ops-flow/task-fields-form/TaskFieldsForm.vue b/apps/web/src/services/ops-flow/task-fields-form/TaskFieldsForm.vue
index 95786278a0..79a23f7d90 100644
--- a/apps/web/src/services/ops-flow/task-fields-form/TaskFieldsForm.vue
+++ b/apps/web/src/services/ops-flow/task-fields-form/TaskFieldsForm.vue
@@ -30,6 +30,7 @@ const taskContentFormState = taskContentFormStore.state;
const taskContentFormGetters = taskContentFormStore.getters;
const taskFieldMetadataStore = useTaskFieldMetadataStore();
+const isEditableFieldInViewMode = (fieldId: string) => fieldId === DEFAULT_FIELD_ID_MAP.title;
onUnmounted(() => {
taskContentFormStore.resetFieldsForm();
});
@@ -43,7 +44,7 @@ onUnmounted(() => {
:key="field.field_id"
:field="field"
:value="taskContentFormState.defaultData[field.field_id]"
- :readonly="taskContentFormState.mode === 'view' && field.field_id !== DEFAULT_FIELD_ID_MAP.title"
+ :readonly="!(taskContentFormGetters.isEditable && isEditableFieldInViewMode(field.field_id))"
:files="taskContentFormState.files"
@update:value="taskContentFormStore.setDefaultFieldData(field.field_id, $event)"
@update:files="taskContentFormStore.setFiles"
diff --git a/apps/web/src/services/ops-flow/task-fields-form/composables/use-task-field-validation.ts b/apps/web/src/services/ops-flow/task-fields-form/composables/use-task-field-validation.ts
index c99243fb92..72409248ce 100644
--- a/apps/web/src/services/ops-flow/task-fields-form/composables/use-task-field-validation.ts
+++ b/apps/web/src/services/ops-flow/task-fields-form/composables/use-task-field-validation.ts
@@ -4,6 +4,7 @@ import { watch } from 'vue';
import { isEqual } from 'lodash';
import type { TaskField, TaskFieldType } from '@/schema/opsflow/_types/task-field-type';
+import { i18n } from '@/translations';
import ErrorHandler from '@/common/composables/error/errorHandler';
import type { ValidatorFn } from '@/common/composables/form-validator';
@@ -24,15 +25,15 @@ export const useTaskFieldValidation = (
const stringValidator: ValidatorFn = (val): string|boolean => {
if (val === undefined || val === null) {
if (props.field.is_required) {
- return 'This field is required';
+ return i18n.t('OPSFLOW.VALIDATION.FIELD_REQUIRED');
}
return true;
}
if (typeof val !== 'string') {
- return 'Value must be a string';
+ return i18n.t('OPSFLOW.VALIDATION.VALUE_STRING');
}
if (props.field.is_required && val.trim() === '') {
- return 'This field is required';
+ return i18n.t('OPSFLOW.VALIDATION.FIELD_REQUIRED');
}
return true;
};
@@ -40,26 +41,26 @@ export const useTaskFieldValidation = (
const stringArrayValidator: ValidatorFn = (val): string|boolean => {
if (val === undefined || val === null) {
if (props.field.is_required) {
- return 'This field is required';
+ return i18n.t('OPSFLOW.VALIDATION.FIELD_REQUIRED');
}
return true;
}
if (!Array.isArray(val)) {
- return 'Value must be an array';
+ return i18n.t('OPSFLOW.VALIDATION.VALUE_ARRAY');
}
// SINGLE case
if (!props.field.selection_type || props.field.selection_type === 'SINGLE') {
if (val.length > 1) {
- return 'Only one value is allowed';
+ return i18n.t('OPSFLOW.VALIDATION.VALUE_ONLY_ONE');
}
if (props.field.is_required && val.length === 0) {
- return 'This field is required';
+ return i18n.t('OPSFLOW.VALIDATION.FIELD_REQUIRED');
}
return true;
}
// MULTI case
if (props.field.is_required && val.length === 0) {
- return 'This field is required';
+ return i18n.t('OPSFLOW.VALIDATION.FIELD_REQUIRED');
}
return true;
};
@@ -77,7 +78,7 @@ export const useTaskFieldValidation = (
return stringArrayValidator(val);
}
ErrorHandler.handleError(new Error(`Unsupported field type: ${props.field.field_type}`));
- return 'Unsupported field type';
+ return i18n.t('OPSFLOW.VALIDATION.UNSUPPORTED_FIELD_TYPE');
});
const updateFieldValue = (val: TValue) => {
diff --git a/apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts b/apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts
index 96c1bd6192..e73ce875f8 100644
--- a/apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts
+++ b/apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts
@@ -29,6 +29,7 @@ interface TaskManagementTemplate {
TaskBoard: string;
TaskCategory: string;
taskTypes: string;
+ taskType: string;
task: string;
tasks: string;
}
diff --git a/packages/language-pack/console-translation-2.8.babel b/packages/language-pack/console-translation-2.8.babel
index f131f8b8a0..111b1bd5a8 100644
--- a/packages/language-pack/console-translation-2.8.babel
+++ b/packages/language-pack/console-translation-2.8.babel
@@ -12998,6 +12998,27 @@
+
+ NEXT
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
PDF_DOWNLOAD_BUTTON
@@ -76224,6 +76245,27 @@
+
+ ALL_CATEGORIES
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
ALT_E_ADD_TARGET
false
@@ -76245,6 +76287,27 @@
+
+ ALT_E_ASSIGN
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
ALT_E_CHANGE_DEFAULT_TARGET
false
@@ -76266,6 +76329,27 @@
+
+ ALT_E_CREATE_TARGET
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
ALT_E_DELETE_TARGET
false
@@ -76308,6 +76392,27 @@
+
+ ALT_E_UPDATE_TARGET
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
ALT_S_ADD_TARGET
false
@@ -76329,6 +76434,27 @@
+
+ ALT_S_ASSIGN
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
ALT_S_CHANGE_DEFAULT_TARGET
false
@@ -76350,6 +76476,27 @@
+
+ ALT_S_CREATE_TARGET
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
ALT_S_DELETE_TARGET
false
@@ -76392,6 +76539,27 @@
+
+ ALT_S_UPDATE_TARGET
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
ASSIGNEE
false
@@ -76497,6 +76665,27 @@
+
+ CREATE_TARGET
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
DEFAULT
false
@@ -77174,6 +77363,27 @@
+
+ NO_AVAILABLE_TARGET
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
PACKAGE
false
@@ -77195,6 +77405,27 @@
+
+ PROJECT
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
SET_AS_DEFAULT
false
@@ -77345,6 +77576,90 @@
TASK_BOARD
+
+ ASSIGN
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
+
+ ASSIGN_TO
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
+
+ COMMENT
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
+
+ TASK_CONTENT
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
TASK_PROGRESS
false
@@ -77366,6 +77681,48 @@
+
+ TYPE_INFO
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
+
+ VIEW_ALL_TASKS
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
@@ -78026,6 +78383,27 @@
+
+ FIELD_REQUIRED
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
LENGTH_MAX
false
@@ -78068,6 +78446,90 @@
+
+ UNSUPPORTED_FIELD_TYPE
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
+
+ VALUE_ARRAY
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
+
+ VALUE_ONLY_ONE
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
+
+ VALUE_STRING
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ ja-JP
+ false
+
+
+ ko-KR
+ false
+
+
+
diff --git a/packages/language-pack/en.json b/packages/language-pack/en.json
index 0feb29a52e..6aba952295 100644
--- a/packages/language-pack/en.json
+++ b/packages/language-pack/en.json
@@ -707,6 +707,7 @@
"DONE": "Done",
"DOWNLOAD": "Download",
"EDIT": "Edit",
+ "NEXT": "Next",
"PDF_DOWNLOAD_BUTTON": {
"DESKTOP": "desktop",
"SUPPORT_PDF_HELP_TEXT": "This feature is not supported on your browser or device. Try again with {chrome} or {edge} browser on {desktop}."
@@ -4175,19 +4176,27 @@
},
"OPSFLOW": {
"ADD_TARGET": "Add {target}",
+ "ALL_CATEGORIES": "All Categories",
"ALT_E_ADD_TARGET": "Failed to add {target}",
+ "ALT_E_ASSIGN": "Failed to assign member",
"ALT_E_CHANGE_DEFAULT_TARGET": "Failed to update {target} as default",
+ "ALT_E_CREATE_TARGET": "Failed to create {target}",
"ALT_E_DELETE_TARGET": "Failed to delete {target}",
"ALT_E_EDIT_TARGET": "Failed to edit {target}",
+ "ALT_E_UPDATE_TARGET": "Failed to update {target}",
"ALT_S_ADD_TARGET": "{target} successfully added",
+ "ALT_S_ASSIGN": "Successfully assigned",
"ALT_S_CHANGE_DEFAULT_TARGET": "{target} successfully updated as default",
+ "ALT_S_CREATE_TARGET": "{target} successfully created",
"ALT_S_DELETE_TARGET": "{target} successfully deleted",
"ALT_S_EDIT_TARGET": "{target} successfully edited",
+ "ALT_S_UPDATE_TARGET": "{target} successfully updated",
"ASSIGNEE": "Assignee",
"ASSIGNEE_POOL": "Assignee Pool",
"CATEGORY": "Category",
"CREATED_AT": "Created At",
"CREATED_BY": "Created By",
+ "CREATE_TARGET": "Create {target}",
"DEFAULT": "Default",
"DELETE_TARGET": "Delete {target}",
"DELETE_TARGET_CONFIRMATION": "Are you sure you want to delete this {object}?",
@@ -4222,7 +4231,9 @@
"FIELD_NAME": "{field} Name",
"KEY": "Key",
"NAME": "Name",
+ "NO_AVAILABLE_TARGET": "No Available {target}",
"PACKAGE": "Package",
+ "PROJECT": "Project",
"SET_AS_DEFAULT": "Set as Default",
"STATUS": "Status",
"STATUS_COMPLETED": "Completed",
@@ -4231,7 +4242,13 @@
"SUPPORT_PACKAGE": "Support Package",
"TARGET_LIST": "{target} List",
"TASK_BOARD": {
- "TASK_PROGRESS": "{task} Progress"
+ "ASSIGN": "Assign",
+ "ASSIGN_TO": "Assign to",
+ "COMMENT": "Comment",
+ "TASK_CONTENT": "Content",
+ "TASK_PROGRESS": "{task} Progress",
+ "TYPE_INFO": "{type} Information",
+ "VIEW_ALL_TASKS": "View All {tasks}"
},
"TASK_MANAGEMENT": {
"ALT_E_DISABLE_LANDING": "Failed to disable landing page",
@@ -4274,8 +4291,13 @@
"TITLE": "Title",
"VALIDATION": {
"DUPLICATED": "{topic} already exists",
+ "FIELD_REQUIRED": "This field is required",
"LENGTH_MAX": "{topic} should be less than {length} characters",
- "REQUIRED": "{topic} is required"
+ "REQUIRED": "{topic} is required",
+ "UNSUPPORTED_FIELD_TYPE": "Unsupported field type",
+ "VALUE_ARRAY": "Value must be an array",
+ "VALUE_ONLY_ONE": "Only one value is allowed",
+ "VALUE_STRING": "Value must be a string"
},
"WORKSPACE": "Workspace"
},
diff --git a/packages/language-pack/ja.json b/packages/language-pack/ja.json
index 1f22c5a246..ac283777e4 100644
--- a/packages/language-pack/ja.json
+++ b/packages/language-pack/ja.json
@@ -707,6 +707,7 @@
"DONE": "完了",
"DOWNLOAD": "ダウンロード",
"EDIT": "",
+ "NEXT": "",
"PDF_DOWNLOAD_BUTTON": {
"DESKTOP": "デスクトップ",
"SUPPORT_PDF_HELP_TEXT": "この機能は、ご使用のブラウザまたはデバイスではサポートされていません。 {desktop}で{chrome}または{edge}ブラウザを使用して再試行してください。"
@@ -4175,19 +4176,27 @@
},
"OPSFLOW": {
"ADD_TARGET": "",
+ "ALL_CATEGORIES": "",
"ALT_E_ADD_TARGET": "",
+ "ALT_E_ASSIGN": "",
"ALT_E_CHANGE_DEFAULT_TARGET": "",
+ "ALT_E_CREATE_TARGET": "",
"ALT_E_DELETE_TARGET": "",
"ALT_E_EDIT_TARGET": "",
+ "ALT_E_UPDATE_TARGET": "",
"ALT_S_ADD_TARGET": "",
+ "ALT_S_ASSIGN": "",
"ALT_S_CHANGE_DEFAULT_TARGET": "",
+ "ALT_S_CREATE_TARGET": "",
"ALT_S_DELETE_TARGET": "",
"ALT_S_EDIT_TARGET": "",
+ "ALT_S_UPDATE_TARGET": "",
"ASSIGNEE": "",
"ASSIGNEE_POOL": "",
"CATEGORY": "",
"CREATED_AT": "",
"CREATED_BY": "",
+ "CREATE_TARGET": "",
"DEFAULT": "",
"DELETE_TARGET": "",
"DELETE_TARGET_CONFIRMATION": "",
@@ -4222,7 +4231,9 @@
"FIELD_NAME": "",
"KEY": "",
"NAME": "",
+ "NO_AVAILABLE_TARGET": "",
"PACKAGE": "",
+ "PROJECT": "",
"SET_AS_DEFAULT": "",
"STATUS": "",
"STATUS_COMPLETED": "",
@@ -4231,7 +4242,13 @@
"SUPPORT_PACKAGE": "",
"TARGET_LIST": "",
"TASK_BOARD": {
- "TASK_PROGRESS": ""
+ "ASSIGN": "",
+ "ASSIGN_TO": "",
+ "COMMENT": "",
+ "TASK_CONTENT": "",
+ "TASK_PROGRESS": "",
+ "TYPE_INFO": "",
+ "VIEW_ALL_TASKS": ""
},
"TASK_MANAGEMENT": {
"ALT_E_DISABLE_LANDING": "",
@@ -4274,8 +4291,13 @@
"TITLE": "",
"VALIDATION": {
"DUPLICATED": "",
+ "FIELD_REQUIRED": "",
"LENGTH_MAX": "",
- "REQUIRED": ""
+ "REQUIRED": "",
+ "UNSUPPORTED_FIELD_TYPE": "",
+ "VALUE_ARRAY": "",
+ "VALUE_ONLY_ONE": "",
+ "VALUE_STRING": ""
},
"WORKSPACE": ""
},
diff --git a/packages/language-pack/ko.json b/packages/language-pack/ko.json
index b80dae7748..fc41ecc5d3 100644
--- a/packages/language-pack/ko.json
+++ b/packages/language-pack/ko.json
@@ -707,6 +707,7 @@
"DONE": "완료",
"DOWNLOAD": "다운로드",
"EDIT": "수정",
+ "NEXT": "다음",
"PDF_DOWNLOAD_BUTTON": {
"DESKTOP": "데스크탑",
"SUPPORT_PDF_HELP_TEXT": "해당 기능을 지원하지 않는 브라우저 또는 디바이스입니다. {desktop} 환경의 {chrome} 또는 {edge} 브라우저에서 이용해주세요."
@@ -4175,19 +4176,27 @@
},
"OPSFLOW": {
"ADD_TARGET": "{target} 추가",
+ "ALL_CATEGORIES": "모든 카테고리",
"ALT_E_ADD_TARGET": "{target} 추가 실패",
+ "ALT_E_ASSIGN": "담당자 할당 실패",
"ALT_E_CHANGE_DEFAULT_TARGET": "{target} 기본값 변경 실패",
+ "ALT_E_CREATE_TARGET": "{target} 생성 실패",
"ALT_E_DELETE_TARGET": "{target} 삭제 실패",
"ALT_E_EDIT_TARGET": "{target} 변경 실패",
+ "ALT_E_UPDATE_TARGET": "{target} 변경 실패",
"ALT_S_ADD_TARGET": "{target} 추가 완료",
+ "ALT_S_ASSIGN": "담당자 할당 완료",
"ALT_S_CHANGE_DEFAULT_TARGET": "{target} 기본값 변경 완료",
+ "ALT_S_CREATE_TARGET": "{target} 생성 완료",
"ALT_S_DELETE_TARGET": "{target} 삭제 완료",
"ALT_S_EDIT_TARGET": "{target} 변경 완료",
+ "ALT_S_UPDATE_TARGET": "{target} 변경 완료",
"ASSIGNEE": "담당자",
"ASSIGNEE_POOL": "담당자 풀",
"CATEGORY": "카테고리",
"CREATED_AT": "생성일",
"CREATED_BY": "생성자",
+ "CREATE_TARGET": "{target} 생성",
"DEFAULT": "기본",
"DELETE_TARGET": "{target} 삭제",
"DELETE_TARGET_CONFIRMATION": "정말 이 {object}{particle} 삭제하시겠습니까?",
@@ -4222,7 +4231,9 @@
"FIELD_NAME": "{field} 이름",
"KEY": "키",
"NAME": "이름",
+ "NO_AVAILABLE_TARGET": "사용 가능한 {target} 없음",
"PACKAGE": "패키지",
+ "PROJECT": "프로젝트",
"SET_AS_DEFAULT": "기본으로 설정",
"STATUS": "상태",
"STATUS_COMPLETED": "완료됨",
@@ -4231,7 +4242,13 @@
"SUPPORT_PACKAGE": "지원 패키지",
"TARGET_LIST": "{target} 목록",
"TASK_BOARD": {
- "TASK_PROGRESS": "태스크 진행상황"
+ "ASSIGN": "할당하기",
+ "ASSIGN_TO": "담당자 할당",
+ "COMMENT": "댓글",
+ "TASK_CONTENT": "내용",
+ "TASK_PROGRESS": "태스크 진행상황",
+ "TYPE_INFO": "{type} 정보",
+ "VIEW_ALL_TASKS": "모든 {tasks} 보기"
},
"TASK_MANAGEMENT": {
"ALT_E_DISABLE_LANDING": "랜딩 페이지 비활성화 실패",
@@ -4274,8 +4291,13 @@
"TITLE": "제목",
"VALIDATION": {
"DUPLICATED": "이미 존재하는 {field}입니다",
+ "FIELD_REQUIRED": "이 필드는 필수입니다",
"LENGTH_MAX": "{topic}{particle} {length}자 미만이어야 합니다",
- "REQUIRED": "{topic}{particle} 필수입니다"
+ "REQUIRED": "{topic}{particle} 필수입니다",
+ "UNSUPPORTED_FIELD_TYPE": "지원되지 않는 필드 타입입니다",
+ "VALUE_ARRAY": "값은 배열이어야 합니다",
+ "VALUE_ONLY_ONE": "값은 하나여야 합니다",
+ "VALUE_STRING": "값은 문자열이어야 합니다"
},
"WORKSPACE": "워크스페이스"
},