Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(frontend): change "Apply to other stages" to "other tasks" (#2631)
Liu Jib9c8b7cf85b5
diff --git a/frontend/src/components/Issue/IssueTaskStatementPanel.vue b/frontend/src/components/Issue/IssueTaskStatementPanel.vueindex 8a81a976d9..1626ad2efb 100644--- a/frontend/src/components/Issue/IssueTaskStatementPanel.vue+++ b/frontend/src/components/Issue/IssueTaskStatementPanel.vue@@ -12,13 +12,13 @@<span v-if="sqlHint" class="text-accent">{{ `(${sqlHint})` }}</span></div><button- v-if="allowApplyStatementToOtherStages"+ v-if="allowApplyStatementToOtherTasks":disabled="isEmpty(state.editStatement)"type="button"class="btn-small"- @click.prevent="applyStatementToOtherStages(state.editStatement)"+ @click.prevent="applyStatementToOtherTasks(state.editStatement)">- {{ $t("issue.apply-to-other-stages") }}+ {{ $t("issue.apply-to-other-tasks") }}</button></div>@@ -214,8 +214,8 @@ export default defineComponent({selectedDatabase,selectedStatement: statement,updateStatement,- allowApplyStatementToOtherStages,- applyStatementToOtherStages,+ allowApplyStatementToOtherTasks,+ applyStatementToOtherTasks,} = useIssueLogic();const uiStateStore = useUIStateStore();@@ -399,13 +399,13 @@ export default defineComponent({create,allowEditStatement,statement,- allowApplyStatementToOtherStages,+ allowApplyStatementToOtherTasks,dialect,formatOnSave,state,editorRef,updateStatement,- applyStatementToOtherStages,+ applyStatementToOtherTasks,beginEdit,saveEdit,cancelEdit,diff --git a/frontend/src/components/Issue/logic/IssueLogic.ts b/frontend/src/components/Issue/logic/IssueLogic.tsindex 97ed60c1d5..b376a84925 100644--- a/frontend/src/components/Issue/logic/IssueLogic.ts+++ b/frontend/src/components/Issue/logic/IssueLogic.ts@@ -58,8 +58,8 @@ type IssueLogic = {newStatement: string,postUpdated?: (updatedTask: Task) => void) => any;- allowApplyStatementToOtherStages: Ref<boolean>;- applyStatementToOtherStages: (statement: string) => any;+ allowApplyStatementToOtherTasks: Ref<boolean>;+ applyStatementToOtherTasks: (statement: string) => any;doCreate(): any;// eventsdiff --git a/frontend/src/components/Issue/logic/TenantModeProvider.ts b/frontend/src/components/Issue/logic/TenantModeProvider.tsindex fd54e2ff8c..7a240ff5f6 100644--- a/frontend/src/components/Issue/logic/TenantModeProvider.ts+++ b/frontend/src/components/Issue/logic/TenantModeProvider.ts@@ -84,7 +84,7 @@ export default defineComponent({};// We are never allowed to "apply statement to other stages" in tenant mode.- const allowApplyStatementToOtherStages = computed(() => false);+ const allowApplyStatementToOtherTasksOtherTasks = computed(() => false);const doCreate = () => {const issueCreate = cloneDeep(issue.value as IssueCreate);@@ -106,8 +106,8 @@ export default defineComponent({allowEditStatement,selectedStatement,updateStatement,- allowApplyStatementToOtherStages,- applyStatementToOtherStages: errorAssertion,+ allowApplyStatementToOtherTasksOtherTasks,+ applyStatementToOtherTasksOtherTasks: errorAssertion,doCreate,};provideIssueLogic(logic);diff --git a/frontend/src/components/Issue/logic/common.ts b/frontend/src/components/Issue/logic/common.tsindex ed843e6a15..aeb77264a2 100644--- a/frontend/src/components/Issue/logic/common.ts+++ b/frontend/src/components/Issue/logic/common.ts@@ -152,7 +152,7 @@ export const useCommonLogic = () => {}};- const applyStatementToOtherStages = (statement: string) => {+ const applyStatementToOtherTasks = (statement: string) => {const taskList = flattenTaskList<TaskCreate>(issue.value);for (const task of taskList) {@@ -162,17 +162,12 @@ export const useCommonLogic = () => {}};- const allowApplyStatementToOtherStages = computed(() => {+ const allowApplyStatementToOtherTasks = computed(() => {if (!create.value) {return false;}-- const stageList = issue.value.pipeline?.stageList || [];- if (stageList.length <= 1) {- // Only available for multi-stage pipeline- return false;- }const taskList = flattenTaskList<TaskCreate>(issue.value);+ // Allowed when more than one tasks need SQL statement.const count = taskList.filter((task) =>TaskTypeWithStatement.includes(task.type)).length;@@ -208,8 +203,8 @@ export const useCommonLogic = () => {allowEditStatement,selectedStatement,updateStatement,- allowApplyStatementToOtherStages,- applyStatementToOtherStages,+ allowApplyStatementToOtherTasks,+ applyStatementToOtherTasks,doCreate,};};diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 49de0cde7d..f428946a71 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -469,7 +469,7 @@"subscribe": "Subscribe","unsubscribe": "Unsubscribe","subscriber": "No subscribers | 1 subscriber | {n} subscribers",- "apply-to-other-stages": "Apply to other stages",+ "apply-to-other-tasks": "Apply to other tasks","add-sql-statement": "Add SQL statement...","optional-add-sql-statement": "(Optional) Add SQL statement...","edit-description": "Edit description",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex f516407c72..61bfce1acd 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -469,7 +469,7 @@"subscribe": "订阅","unsubscribe": "取消订阅","subscriber": "没有订阅者 | 1 个订阅者 | {n} 个订阅者",- "apply-to-other-stages": "@:{'common.apply'}到其他@:{'common.stage'}",+ "apply-to-other-tasks": "@:{'common.apply'}到其他@:{'common.task'}","add-sql-statement": "添加 SQL @:{'common.statement'}…","optional-add-sql-statement": "(可选)添加 SQL @:{'common.statement'}…","edit-description": "编辑描述",