diff --git a/frontend/src/hooks/useModal.ts b/frontend/src/hooks/useModal.ts
index 7a65b9287f..aebf73e731 100644
--- a/frontend/src/hooks/useModal.ts
+++ b/frontend/src/hooks/useModal.ts
@@ -38,14 +38,14 @@ export default function useModal() {
options.size || 'small'
} ms-usemodal-${options.type}`,
}),
- deleteModal: (options: DeleteModalOptions) =>
+ openDeleteModal: (options: DeleteModalOptions) =>
Modal.warning({
okText: t('common.confirmDelete'),
cancelText: t('common.cancel'),
hideCancel: false,
okButtonProps: { status: 'danger' },
titleAlign: 'start',
- modalClass: `ms-usemodal ms-usemodal-warning ms-usemodal-small ms-usemodal--warning`,
+ modalClass: `ms-usemodal ms-usemodal-warning ms-usemodal-small`,
...options,
}),
};
diff --git a/frontend/src/locale/en-US/common.ts b/frontend/src/locale/en-US/common.ts
index 11fb6a71c5..97efe0e286 100644
--- a/frontend/src/locale/en-US/common.ts
+++ b/frontend/src/locale/en-US/common.ts
@@ -13,6 +13,7 @@ export default {
'common.end': 'End',
'common.enable': 'Enable',
'common.close': 'Close',
+ 'common.create': 'Create',
'common.confirmEnable': 'Confirm enable',
'common.confirmClose': 'Confirm close',
'common.enableSuccess': 'Enable success',
diff --git a/frontend/src/locale/zh-CN/common.ts b/frontend/src/locale/zh-CN/common.ts
index e53ec3ab77..5d339f8ec0 100644
--- a/frontend/src/locale/zh-CN/common.ts
+++ b/frontend/src/locale/zh-CN/common.ts
@@ -13,6 +13,7 @@ export default {
'common.end': '结束',
'common.enable': '启用',
'common.close': '关闭',
+ 'common.create': '创建',
'common.confirmEnable': '确认启用',
'common.confirmClose': '确认关闭',
'common.enableSuccess': '启用成功',
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue
index 7c2ab894d3..26135fcf5d 100644
--- a/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue
+++ b/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue
@@ -2,12 +2,20 @@
- {{ t('system.organization.createOrganization') }}
+
+
+ {{ t('system.organization.updateOrganization') }}
+ ({{ props.currentOrganization?.name }})
+
+
+ {{ t('system.organization.createOrganization') }}
+
+
+
+
+ {{ t('common.cancel') }}
+
+
+ {{ isEdit ? t('common.confirm') : t('common.create') }}
+
+
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addUserModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addUserModal.vue
index 8c63277a7d..9bc63e242f 100644
--- a/frontend/src/views/setting/system/organizationAndProject/components/addUserModal.vue
+++ b/frontend/src/views/setting/system/organizationAndProject/components/addUserModal.vue
@@ -20,11 +20,11 @@
-
- {{ t('system.organization.cancel') }}
+
+ {{ t('common.cancel') }}
- {{ t('system.organization.add') }}
+ {{ t('common.add') }}
@@ -69,15 +69,14 @@
const handleAddMember = () => {
formRef.value?.validate(async (errors: undefined | Record) => {
- loading.value = true;
if (errors) {
loading.value = false;
}
const { organizationId, projectId } = props;
try {
+ loading.value = true;
await addUserToOrgOrProject({ memberIds: form.name, organizationId, projectId });
Message.success(t('system.organization.addSuccess'));
- loading.value = false;
handleCancel();
} catch (error) {
// eslint-disable-next-line no-console
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue
index 4165d400f1..216c638f21 100644
--- a/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue
+++ b/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue
@@ -86,7 +86,7 @@
const orgVisible = ref(false);
const currentOrganizationId = ref('');
const currentUpdateOrganization = ref();
- const { deleteModal, openModal } = useModal();
+ const { openDeleteModal, openModal } = useModal();
const organizationColumns: MsTableColumn = [
{
@@ -170,7 +170,7 @@
];
const handleDelete = (record: TableData) => {
- deleteModal({
+ openDeleteModal({
title: t('system.organization.deleteName', { name: record.name }),
content: t('system.organization.deleteTip'),
onOk: async () => {
diff --git a/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
index 36bd0e046a..07092bedf6 100644
--- a/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
+++ b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
@@ -50,5 +50,6 @@ export default {
'system.organization.enableContent': 'The organization after opening is displayed in the organization switching list',
'system.organization.endContent':
'The organization after closing is not displayed in the organization switching list',
+ 'system.organization.updateOrganization': 'Update organization',
'system.organization.updateOrganizationSuccess': 'Update organization success',
};
diff --git a/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
index 207b8b336f..6a336729ed 100644
--- a/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
+++ b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
@@ -46,5 +46,6 @@ export default {
'system.organization.endTitle': '关闭组织',
'system.organization.enableContent': '开启后的组织展示在组织切换列表',
'system.organization.endContent': '关闭后的组织不展示在组织切换列表',
+ 'system.organization.updateOrganization': '更新组织',
'system.organization.updateOrganizationSuccess': '更新组织成功',
};