Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: refactor issue approval flow section (#16619)
boojackf851cad93b66
diff --git a/frontend/src/bbkit/BBAvatar.vue b/frontend/src/bbkit/BBAvatar.vueindex 97c7b2ddcb..d4c2833328 100644--- a/frontend/src/bbkit/BBAvatar.vue+++ b/frontend/src/bbkit/BBAvatar.vue@@ -43,7 +43,7 @@ const BACKGROUND_COLOR_LIST: string[] = [const sizeClassMap: Map<BBAvatarSizeType, string> = new Map([["MINI", "w-[18px] h-[18px] font-medium"],- ["TINY", "w-5 h-5 font-medium"],+ ["TINY", "w-4 h-4"],["SMALL", "w-6 h-6 font-medium"],["NORMAL", "w-8 h-8 font-medium"],["LARGE", "w-24 h-24 font-medium"],diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vuedeleted file mode 100644index b166b48735..0000000000--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vue+++ /dev/null@@ -1,42 +0,0 @@-<template>- <div :class="approver?.name === currentUser.name && 'font-bold'">- <slot name="title" :approver="approver">- <span class="truncate">- <NPerformantEllipsis>- {{ approver?.title }}- </NPerformantEllipsis>- </span>- </slot>- <span- v-if="approver?.name === currentUser.name"- class="ml-1 px-1 py-0.5 rounded-lg text-xs font-semibold bg-green-100 text-green-800"- >- {{ $t("custom-approval.issue-review.you") }}- </span>- <SystemBotTag v-if="approver?.name === SYSTEM_BOT_USER_NAME" />- </div>-</template>--<script setup lang="ts">-import { computedAsync } from "@vueuse/core";-import { NPerformantEllipsis } from "naive-ui";-import SystemBotTag from "@/components/misc/SystemBotTag.vue";-import { useCurrentUserV1, useUserStore } from "@/store";-import type { WrappedReviewStep } from "@/types";-import { SYSTEM_BOT_USER_NAME } from "@/types";--const currentUser = useCurrentUserV1();-const userStore = useUserStore();--const props = defineProps<{- step: WrappedReviewStep;-}>();--const approver = computedAsync(async () => {- if (!props.step.approver) {- return;- }- const user = await userStore.getOrFetchUserByIdentifier(props.step.approver);- return user;-});-</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vuedeleted file mode 100644index 9d6572b20b..0000000000--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue+++ /dev/null@@ -1,99 +0,0 @@-<template>- <div v-if="!isCreating" class="flex flex-col gap-y-2">- <div class="w-full flex flex-row items-center gap-2">- <NTooltip placement="bottom">- <template #trigger>- <div>- <div class="textlabel flex items-center gap-x-1">- {{ $t("issue.approval-flow.self") }}- <FeatureBadge :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />- </div>- </div>- </template>- <template #default>- <div class="max-w-[22rem]">- {{ $t("issue.approval-flow.tooltip") }}- </div>- </template>- </NTooltip>-- <RiskLevelTag />- </div>-- <div class="flex-1 min-w-[14rem]">- <div- v-if="!ready"- class="flex items-center gap-x-2 text-sm text-control-placeholder"- >- <BBSpin :size="20" />- <span>- {{ $t("custom-approval.issue-review.generating-approval-flow") }}- </span>- </div>- <div v-else-if="error" class="flex items-center gap-x-2">- <NTooltip>- <template #trigger>- <span class="text-error text-sm">{{ $t("common.error") }}</span>- </template>-- <div class="max-w-[20rem]">{{ error }}</div>- </NTooltip>- <NButton- size="tiny"- :loading="retrying"- @click="retryFindingApprovalFlow"- >- {{ $t("common.retry") }}- </NButton>- </div>- <Timeline- v-else-if="wrappedSteps.length > 0"- :steps="wrappedSteps"- class="mt-1"- />- <div- v-else- class="flex items-center text-sm text-control-placeholder gap-x-1"- >- {{ $t("custom-approval.approval-flow.skip") }}- </div>- </div>- </div>- <div v-if="isCreating" class="flex flex-col gap-y-1">- <div class="textlabel flex items-center gap-x-1">- {{ $t("issue.approval-flow.self") }}- <FeatureBadge :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />- </div>- <div class="text-control-placeholder text-xs">- {{ $t("issue.approval-flow.pre-issue-created-tips") }}- </div>- </div>-</template>--<script lang="ts" setup>-import { NButton, NTooltip } from "naive-ui";-import { ref } from "vue";-import { BBSpin } from "@/bbkit";-import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";-import { useIssueContext, useWrappedReviewStepsV1 } from "@/components/IssueV1";-import { useIssueV1Store } from "@/store";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-import RiskLevelTag from "./RiskLevelTag.vue";-import Timeline from "./Timeline.vue";--const { issue, events, isCreating, reviewContext } = useIssueContext();-const { ready, error } = reviewContext;--const wrappedSteps = useWrappedReviewStepsV1(issue, reviewContext);--const retrying = ref(false);-const retryFindingApprovalFlow = async () => {- retrying.value = true;- try {- await useIssueV1Store().regenerateReviewV1(issue.value.name);- events.emit("status-changed", { eager: true });- } finally {- retrying.value = false;- }-};-</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/RiskLevelTag.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/RiskLevelTag.vuedeleted file mode 100644index b9a7179ab4..0000000000--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/RiskLevelTag.vue+++ /dev/null@@ -1,49 +0,0 @@-<template>- <NTooltip v-if="shown" placement="bottom">- <template #trigger>- <NTag size="small" round strong>- {{ riskLevelText }}- <template #icon>- <OctagonAlertIcon class="w-4 h-auto" />- </template>- </NTag>- </template>- <template #default>- <div class="max-w-[22rem]">- {{ $t("issue.risk-level.self") }}- </div>- </template>- </NTooltip>-</template>--<script lang="ts" setup>-import { OctagonAlertIcon } from "lucide-vue-next";-import { NTooltip, NTag } from "naive-ui";-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import { useIssueContext } from "@/components/IssueV1";-import { Issue_RiskLevel } from "@/types/proto/v1/issue_service";--const { t } = useI18n();-const { issue, isCreating } = useIssueContext();--const riskLevel = computed(() => issue.value.riskLevel);--const shown = computed(() => {- return (- !isCreating.value &&- riskLevel.value !== Issue_RiskLevel.RISK_LEVEL_UNSPECIFIED- );-});--const riskLevelText = computed(() => {- if (riskLevel.value === Issue_RiskLevel.LOW) {- return t("issue.risk-level.low");- } else if (riskLevel.value === Issue_RiskLevel.MODERATE) {- return t("issue.risk-level.moderate");- } else if (riskLevel.value === Issue_RiskLevel.HIGH) {- return t("issue.risk-level.high");- }- return "";-});-</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vuedeleted file mode 100644index 34769afff6..0000000000--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vue+++ /dev/null@@ -1,118 +0,0 @@-<template>- <NTimeline :icon-size="24">- <NPopover- v-for="step in steps"- :disabled="step.status === 'APPROVED'"- :key="step.index"- placement="left"- >- <template #trigger>- <NTimelineItem>- <template #icon>- <TimelineIcon :step="step" />- </template>- <template #default>- <div class="flex flex-row gap-x-1">- <div class="flex-1 truncate">- <NPerformantEllipsis>- {{ approvalNodeText(step.step.nodes[0]) }}- </NPerformantEllipsis>- </div>- </div>- </template>- <template #footer>- <i18n-t- keypath="custom-approval.issue-review.approved-by-n"- tag="div"- class="break-words break-all"- v-if="step.status === 'APPROVED'"- >- <template #approver>- <Approver- v-if="step.status === 'APPROVED'"- :step="step"- class="inline"- >- <template- #title="{ approver }: { approver: User | undefined }"- >- <span>{{ approver?.title }}</span>- </template>- </Approver>- </template>- </i18n-t>- </template>- </NTimelineItem>- </template>-- <template #default>- <div class="flex flex-col gap-y-2 text-sm max-w-[16rem] truncate">- <ul class="w-full list-disc list-inside text-sm">- <i18n-t- keypath="custom-approval.issue-review.any-n-role-can-approve"- tag="li"- class="whitespace-pre-wrap"- >- <template #role>- <span class="textlabel">- {{ approvalNodeText(step.step.nodes[0]) }}- </span>- </template>- </i18n-t>- <li- v-if="!projectOfIssue(issue).allowSelfApproval"- class="whitespace-pre-wrap"- >- {{- $t(- "custom-approval.issue-review.issue-creators-cannot-approve-their-own-issue"- )- }}- </li>- </ul>- <hr />- <div- v-if="step.candidates.length === 0"- class="w-[14rem] text-wrap text-warning italic"- >- {{ $t("custom-approval.issue-review.no-one-matched") }}- </div>- <div- v-else- class="min-w-[8rem] max-w-[12rem] max-h-[18rem] flex flex-col text-control-light overflow-y-hidden"- >- <div class="flex-1 overflow-auto text-sm">- <Candidate- v-for="candidate in step.candidates"- :key="candidate"- :candidate="candidate"- />- </div>- </div>- </div>- </template>- </NPopover>- </NTimeline>-</template>--<script lang="ts" setup>-import {- NTimeline,- NTimelineItem,- NPopover,- NPerformantEllipsis,-} from "naive-ui";-import { useIssueContext, projectOfIssue } from "@/components/IssueV1/logic";-import type { WrappedReviewStep } from "@/types";-import { type User } from "@/types/proto/v1/user_service";-import { approvalNodeText } from "@/utils";-import Approver from "./Approver.vue";-import Candidate from "./Candidate.vue";-import TimelineIcon from "./TimelineIcon.vue";--defineProps<{- steps: WrappedReviewStep[];-}>();--const { issue } = useIssueContext();-</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vuedeleted file mode 100644index 1529d1d213..0000000000--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vue+++ /dev/null@@ -1,40 +0,0 @@-<template>- <div- class="w-6 h-6 rounded-full flex items-center justify-center text-sm shrink-0"- :class="iconClass"- >- <heroicons-outline:thumb-up- v-if="step.status === 'APPROVED'"- class="w-4 h-4 text-white"- />- <heroicons:pause-solid- v-else-if="step.status === 'REJECTED'"- class="w-4 h-4 text-white"- />- <template v-else-if="step.status === 'CURRENT'">- <heroicons-outline:user class="w-4 h-4" />- </template>- <template v-else>- {{ step.index + 1 }}- </template>- </div>-</template>--<script setup lang="ts">-import { computed } from "vue";-import type { WrappedReviewStep } from "@/types";--const props = defineProps<{- step: WrappedReviewStep;-}>();--const iconClass = computed(() => {- const { status } = props.step;- return [- status === "APPROVED" && "bg-success",- status === "REJECTED" && "bg-warning",- status === "CURRENT" && "bg-white border-[2px] border-info text-accent",- status === "PENDING" && "bg-white border-[3px] border-gray-300",- ];-});-</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/index.ts b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/index.tsdeleted file mode 100644index a4590e753c..0000000000--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import ReviewSection from "./ReviewSection.vue";--export default ReviewSection;diff --git a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vueindex 7ce96c8237..da21e8f58d 100644--- a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue@@ -2,7 +2,27 @@<div class="flex flex-col gap-y-3 py-2 px-3"><ReleaseInfo /><TaskCheckSummarySection />- <ReviewSection />++ <!-- Review section -->+ <ApprovalFlowSection+ v-if="!isCreating"+ :issue="issue"+ @issue-updated="+ events.emit('status-changed', {+ eager: true,+ })+ "+ />+ <div v-else class="flex flex-col gap-y-1">+ <div class="textlabel flex items-center gap-x-1">+ {{ $t("issue.approval-flow.self") }}+ <FeatureBadge :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />+ </div>+ <div class="text-control-placeholder text-xs">+ {{ $t("issue.approval-flow.pre-issue-created-tips") }}+ </div>+ </div>+<IssueLabels:project="project":value="issue.labels"@@ -45,18 +65,20 @@import { NTooltip } from "naive-ui";import { computed, ref } from "vue";import { useI18n } from "vue-i18n";+import { FeatureBadge } from "@/components/FeatureGuard";import { targetsForSpec } from "@/components/Plan";import { GhostSection } from "@/components/Plan/components/Configuration";import { provideGhostSettingContext } from "@/components/Plan/components/Configuration/GhostSection/context";+import { ApprovalFlowSection } from "@/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection";import { issueServiceClient } from "@/grpcweb";import { pushNotification, useCurrentProjectV1 } from "@/store";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { Issue } from "@/types/proto/v1/issue_service";import type { Plan } from "@/types/proto/v1/plan_service";import { specForTask, useIssueContext } from "../../logic";import IssueLabels from "./IssueLabels.vue";import PreBackupSection from "./PreBackupSection";import ReleaseInfo from "./ReleaseInfo.vue";-import ReviewSection from "./ReviewSection";import TaskCheckSummarySection from "./TaskCheckSummarySection";const { t } = useI18n();diff --git a/frontend/src/components/Plan/PlanDetailPage.vue b/frontend/src/components/Plan/PlanDetailPage.vueindex 20a70e0e9e..c58345bc12 100644--- a/frontend/src/components/Plan/PlanDetailPage.vue+++ b/frontend/src/components/Plan/PlanDetailPage.vue@@ -7,16 +7,12 @@tab-class="first:ml-4"@update-value="handleTabChange">- <NTabPane+ <NTabv-for="tab in availableTabs":key="tab":name="tab":tab="tabRender(tab)"- >- <Overview v-if="tab === TabKey.Overview" />- <SpecsView v-else-if="tab === TabKey.Specifications" />- <ChecksView v-else-if="tab === TabKey.Checks" />- </NTabPane>+ /><!-- Suffix slot for Specifications tab --><template v-if="tabKey === TabKey.Specifications" #suffix>@@ -25,23 +21,36 @@</div></template></NTabs>++ <div class="flex-1 flex">+ <Overview v-if="tabKey === TabKey.Overview" />+ <SpecsView v-else-if="tabKey === TabKey.Specifications" />+ <ChecksView v-else-if="tabKey === TabKey.Checks" />+ <IssueReviewView v-else-if="tabKey === TabKey.Review" />+ <div class="pt-4 mx-auto max-w-2xl" v-else>+ <p>Unknown view for {{ tabKey }}</p>+ </div>+ </div></div></template><script setup lang="tsx">import { head } from "lodash-es";-import { NTabPane, NTabs } from "naive-ui";+import { NTab, NTabs } from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";import { useRoute, useRouter } from "vue-router";import {+ PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,PROJECT_V1_ROUTE_PLAN_DETAIL,PROJECT_V1_ROUTE_PLAN_DETAIL_CHECK_RUNS,PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,} from "@/router/dashboard/projectV1";+import { extractIssueUID, extractPlanUID } from "@/utils";import { ChecksView, HeaderSection, Overview } from "./components";import CurrentSpecSelector from "./components/CurrentSpecSelector.vue";+import { IssueReviewView } from "./components/IssueReviewView";import SpecsView from "./components/SpecsView.vue";import { useSpecsValidation } from "./components/common";import { gotoSpec } from "./components/common/utils";@@ -51,14 +60,22 @@ enum TabKey {Overview = "overview",Specifications = "specifications",Checks = "checks",+ Review = "review",}const { t } = useI18n();const route = useRoute();const router = useRouter();-const { isCreating, plan, planCheckRunList } = usePlanContext();+const { isCreating, plan } = usePlanContext();const { isSpecEmpty } = useSpecsValidation(plan.value.specs);+const planCheckRunCount = computed(() =>+ Object.values(plan.value.planCheckRunStatusCount).reduce(+ (sum, count) => sum + count,+ 0+ )+);+const tabKey = computed(() => {const routeName = route.name?.toString() as string;if (@@ -70,6 +87,8 @@ const tabKey = computed(() => {return TabKey.Specifications;} else if ([PROJECT_V1_ROUTE_PLAN_DETAIL_CHECK_RUNS].includes(routeName)) {return TabKey.Checks;+ } else if (routeName === PROJECT_V1_ROUTE_ISSUE_DETAIL_V1) {+ return TabKey.Review;}return TabKey.Overview;});@@ -78,6 +97,9 @@ const availableTabs = computed<TabKey[]>(() => {const tabs: TabKey[] = [TabKey.Overview, TabKey.Specifications];if (!isCreating.value) {tabs.push(TabKey.Checks);+ if (plan.value.issue) {+ tabs.push(TabKey.Review);+ }}return tabs;});@@ -104,21 +126,34 @@ const tabRender = (tab: TabKey) => {return (<div>{t("plan.navigator.checks")}- {planCheckRunList.value.length > 0 && (- <span class="text-gray-500">({planCheckRunList.value.length})</span>+ {planCheckRunCount.value > 0 && (+ <span class="text-gray-500">({planCheckRunCount.value})</span>)}</div>);+ case TabKey.Review:+ return t("plan.navigator.review");default:- return "";+ // Fallback to raw tab name.+ return tab;}};const handleTabChange = (tab: TabKey) => {+ const params = route.params;+ if (isCreating.value) {+ params.planId = "create";+ } else {+ params.planId = extractPlanUID(plan.value.name);+ if (plan.value.issue) {+ params.issueId = extractIssueUID(plan.value.issue);+ }+ }+if (tab === TabKey.Overview) {router.push({name: PROJECT_V1_ROUTE_PLAN_DETAIL,- params: route.params,+ params: params,query: route.query,});} else if (tab === TabKey.Specifications) {@@ -129,14 +164,20 @@ const handleTabChange = (tab: TabKey) => {} else {router.push({name: PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,- params: route.params,+ params: params,query: route.query,});}} else if (tab === TabKey.Checks) {router.push({name: PROJECT_V1_ROUTE_PLAN_DETAIL_CHECK_RUNS,- params: route.params,+ params: params,+ query: route.query,+ });+ } else if (tab === TabKey.Review) {+ router.push({+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,+ params: params,query: route.query,});}diff --git a/frontend/src/components/Plan/components/ChecksView/ChecksView.vue b/frontend/src/components/Plan/components/ChecksView/ChecksView.vueindex f98ef50522..24d7be3645 100644--- a/frontend/src/components/Plan/components/ChecksView/ChecksView.vue+++ b/frontend/src/components/Plan/components/ChecksView/ChecksView.vue@@ -1,5 +1,5 @@<template>- <div class="h-full flex flex-col">+ <div class="flex-1 flex flex-col pt-2 pb-4"><!-- Header with filters --><div class="flex items-center justify-between px-4 py-2"><div class="flex items-center gap-4">diff --git a/frontend/src/components/Plan/components/IssueReviewView/IssueReviewView.vue b/frontend/src/components/Plan/components/IssueReviewView/IssueReviewView.vuenew file mode 100644index 0000000000..b966528c91--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/IssueReviewView.vue@@ -0,0 +1,16 @@+<template>+ <div class="flex-1 flex">+ <!-- Left Panel - Activity (placeholder for future implementation) -->+ <div class="flex-1">+ <!-- This will be implemented later -->+ </div>++ <div class="w-80 flex border-l">+ <Sidebar />+ </div>+ </div>+</template>++<script setup lang="ts">+import { Sidebar } from "./Sidebar";+</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidate.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalCandidate.vuesimilarity index 83%rename from frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidate.vuerename to frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalCandidate.vueindex 0fe6ed004b..a82de16eb5 100644--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidate.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalCandidate.vue@@ -4,8 +4,11 @@class="flex items-center py-1 gap-x-1":class="[candidateUser.name === currentUser.name && 'font-bold']">- <PrincipalAvatar :user="candidateUser" size="SMALL" />+ <UserAvatar :user="candidateUser" size="SMALL" /><span class="whitespace-nowrap">{{ candidateUser.title }}</span>+ <span class="whitespace-nowrap opacity-80">+ ({{ candidateUser.email }})+ </span><spanv-if="currentUser.name === candidateUser.name"class="inline-flex items-center px-1 py-0.5 rounded-lg text-xs font-semibold bg-green-100 text-green-800"@@ -15,9 +18,9 @@</div></template>-<script lang="tsx" setup>+<script setup lang="ts">import { computedAsync } from "@vueuse/core";-import PrincipalAvatar from "@/components/PrincipalAvatar.vue";+import UserAvatar from "@/components/User/UserAvatar.vue";import { useCurrentUserV1, useUserStore } from "@/store";import { State } from "@/types/proto/v1/common";import { UserType } from "@/types/proto/v1/user_service";diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vuenew file mode 100644index 0000000000..f6c42344e5--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue@@ -0,0 +1,93 @@+<template>+ <div>+ <div class="w-full flex flex-row items-center gap-2">+ <h3 class="textlabel">{{ $t("issue.approval-flow.self") }}</h3>+ <FeatureBadge :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />+ </div>++ <div class="mt-2">+ <div+ v-if="!issue.approvalFindingDone"+ class="flex items-center gap-x-2 text-sm text-control-placeholder"+ >+ <BBSpin :size="16" />+ <span>+ {{ $t("custom-approval.issue-review.generating-approval-flow") }}+ </span>+ </div>+ <div+ v-else-if="issue.approvalFindingError"+ class="flex items-center gap-x-2"+ >+ <span class="text-error text-sm">{{ issue.approvalFindingError }}</span>+ <NButton+ size="tiny"+ :loading="retrying"+ @click="retryFindingApprovalFlow"+ >+ {{ $t("common.retry") }}+ </NButton>+ </div>+ <NTimeline+ v-else-if="approvalSteps.length > 0"+ size="large"+ class="pl-1 mt-1"+ >+ <ApprovalStepItem+ v-for="(step, index) in approvalSteps"+ :key="index"+ :step="step"+ :step-index="index"+ :step-number="index + 1"+ :issue="issue"+ />+ </NTimeline>+ <div+ v-else+ class="flex items-center text-sm text-control-placeholder gap-x-1"+ >+ {{ $t("custom-approval.approval-flow.skip") }}+ </div>+ </div>+ </div>+</template>++<script setup lang="ts">+import { NTimeline, NButton } from "naive-ui";+import { computed, ref } from "vue";+import { BBSpin } from "@/bbkit";+import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";+import { useIssueV1Store } from "@/store";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";+import type { Issue } from "@/types/proto/v1/issue_service";+import ApprovalStepItem from "./ApprovalStepItem.vue";++const props = defineProps<{+ issue: Issue;+}>();++const emit = defineEmits<{+ (e: "issue-updated"): void;+}>();++const approvalTemplate = computed(() => {+ const templates = props.issue.approvalTemplates || [];+ return templates.length > 0 ? templates[0] : undefined;+});++const approvalSteps = computed(() => {+ return approvalTemplate.value?.flow?.steps || [];+});++const retrying = ref(false);++const retryFindingApprovalFlow = async () => {+ retrying.value = true;+ try {+ await useIssueV1Store().regenerateReviewV1(props.issue.name);+ emit("issue-updated");+ } finally {+ retrying.value = false;+ }+};+</script>diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vuenew file mode 100644index 0000000000..16617f85ea--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vue@@ -0,0 +1,261 @@+<template>+ <NTimelineItem :type="timelineItemType">+ <template #icon>+ <div+ class="p-1 rounded-full flex items-center justify-center z-10"+ :class="iconClass"+ >+ <template v-if="status === 'approved'">+ <ThumbsUp class="w-4 h-4 text-white" />+ </template>+ <template v-else-if="status === 'rejected'">+ <X class="w-4 h-4 text-white" />+ </template>+ <template v-else-if="status === 'current'">+ <User class="w-4 h-4 text-white" />+ </template>+ <template v-else>+ <div class="flex w-4 h-4 justify-center items-center">+ <span class="text-sm font-medium text-gray-600">{{+ stepNumber+ }}</span>+ </div>+ </template>+ </div>+ </template>+ <div>+ <div class="text-sm font-medium text-gray-900">+ {{ roleName }}+ </div>+ <div class="mt-1 text-sm text-gray-600">+ <template v-if="status === 'approved'">+ <div class="flex items-center gap-1">+ <span class="text-xs">{{+ $t("custom-approval.issue-review.approved-by")+ }}</span>+ <ApprovalUserView+ v-if="stepApprover"+ :candidate="stepApprover.principal"+ size="tiny"+ />+ </div>+ </template>+ <template v-else-if="status === 'rejected'">+ <div class="flex items-center gap-1">+ <span class="text-xs">{{+ $t("custom-approval.issue-review.rejected-by")+ }}</span>+ <ApprovalUserView+ v-if="stepApprover"+ :candidate="stepApprover.principal"+ size="tiny"+ />+ </div>+ </template>+ <template v-else-if="status === 'current'">+ <div class="flex flex-col gap-1">+ <PotentialApprovers :users="potentialApprovers" />+ <div+ v-if="showSelfApprovalTip"+ class="px-1 py-0.5 border rounded text-xs bg-yellow-50 border-yellow-600 text-yellow-600"+ >+ {{ $t("custom-approval.issue-review.self-approval-not-allowed") }}+ </div>+ </div>+ </template>+ </div>+ </div>+ </NTimelineItem>+</template>++<script setup lang="ts">+import { computedAsync } from "@vueuse/core";+import { uniq } from "lodash-es";+import { ThumbsUp, User, X } from "lucide-vue-next";+import { NTimelineItem } from "naive-ui";+import { computed } from "vue";+import { useI18n } from "vue-i18n";+import { useCurrentUserV1, useUserStore, useCurrentProjectV1 } from "@/store";+import { userNamePrefix } from "@/store/modules/v1/common";+import { SYSTEM_BOT_EMAIL } from "@/types";+import { State } from "@/types/proto/v1/common";+import type {+ ApprovalStep,+ Issue,+ Issue_Approver,+} from "@/types/proto/v1/issue_service";+import type { User as UserType } from "@/types/proto/v1/user_service";+import { memberMapToRolesInProjectIAM } from "@/utils";+import ApprovalUserView from "./ApprovalUserView.vue";+import PotentialApprovers from "./PotentialApprovers.vue";++const props = defineProps<{+ step: ApprovalStep;+ stepIndex: number;+ stepNumber: number;+ issue: Issue;+}>();++const { t } = useI18n();+const { project } = useCurrentProjectV1();+const currentUser = useCurrentUserV1();+const userStore = useUserStore();+const currentUserEmail = computed(() => currentUser.value.email);++// Get the approver for this specific step+const stepApprover = computed(+ (): Issue_Approver | undefined => props.issue.approvers[props.stepIndex]+);++const status = computed((): "approved" | "rejected" | "current" | "pending" => {+ if (stepApprover.value?.status === "APPROVED") {+ return "approved";+ }++ if (stepApprover.value?.status === "REJECTED") {+ return "rejected";+ }++ // Check if all previous steps are approved+ for (let i = 0; i < props.stepIndex; i++) {+ const prevApprover = props.issue.approvers[i];+ if (+ !prevApprover ||+ (prevApprover.status !== "APPROVED" && prevApprover.status !== "REJECTED")+ ) {+ return "pending";+ }+ // If any previous step is rejected, subsequent steps are pending+ if (prevApprover.status === "REJECTED") {+ return "pending";+ }+ }++ return "current";+});++const timelineItemType = computed(() => {+ switch (status.value) {+ case "approved":+ return "success";+ case "rejected":+ return "warning";+ case "current":+ return "info";+ default:+ return "default";+ }+});++const iconClass = computed(() => {+ switch (status.value) {+ case "approved":+ return "bg-green-500";+ case "rejected":+ return "bg-yellow-500";+ case "current":+ return "bg-blue-500";+ default:+ return "bg-gray-200";+ }+});++const roleName = computed((): string => {+ // Get role name from the first node in the step+ if (props.step.nodes?.[0]?.role) {+ const role = props.step.nodes[0].role;+ if (role === "roles/projectOwner") {+ return t("role.project-owner.self");+ } else if (role === "roles/workspaceDBA") {+ return t("role.workspace-dba.self");+ } else if (role === "roles/workspaceAdmin") {+ return t("role.workspace-admin.self");+ }+ }+ return t("custom-approval.approval-flow.node.approver");+});++// Get candidates for this approval step+const candidateEmails = computed(() => {+ const candidates: string[] = [];++ for (const node of props.step.nodes) {+ if (node.type !== "ANY_IN_GROUP") continue;++ const role = node.role;+ if (!role) continue;++ // Get users with this role from project IAM policy+ const memberMap = memberMapToRolesInProjectIAM(+ project.value.iamPolicy,+ role+ );+ candidates.push(...memberMap.keys());+ }++ // Filter and deduplicate+ return uniq(+ candidates.filter((user) => {+ // Exclude system bot+ if (user === `${userNamePrefix}${SYSTEM_BOT_EMAIL}`) return false;+ return true;+ })+ );+});++// Check if current user would be excluded due to self-approval settings+const isCurrentUserInCandidates = computed(() => {+ const currentUserPrincipal = `users/${currentUserEmail.value}`;+ return candidateEmails.value.includes(currentUserPrincipal);+});++// Filter candidates based on self-approval settings+const filteredCandidateEmails = computed(() => {+ if (+ !project.value.allowSelfApproval &&+ props.issue.creator === `users/${currentUserEmail.value}`+ ) {+ // Remove current user from candidates if self-approval is not allowed and they are the creator+ const currentUserPrincipal = `users/${currentUserEmail.value}`;+ return candidateEmails.value.filter(+ (email) => email !== currentUserPrincipal+ );+ }+ return candidateEmails.value;+});++// Show tip when self-approval is disabled and current user is in candidates but excluded+const showSelfApprovalTip = computed(() => {+ return (+ status.value === "current" &&+ !project.value.allowSelfApproval &&+ props.issue.creator === `users/${currentUserEmail.value}` &&+ isCurrentUserInCandidates.value+ );+});++// Fetch user objects for candidates+const potentialApprovers = computedAsync(async () => {+ if (+ status.value !== "current" ||+ filteredCandidateEmails.value.length === 0+ ) {+ return [];+ }++ const users: UserType[] = [];+ for (const email of filteredCandidateEmails.value) {+ const user = await userStore.getOrFetchUserByIdentifier(email);+ if (user && user.state === State.ACTIVE) {+ users.push(user);+ }+ }++ // Sort to put current user first if they're in the list+ return users.sort((a, b) => {+ if (a.email === currentUserEmail.value) return -1;+ if (b.email === currentUserEmail.value) return 1;+ return a.title.localeCompare(b.title);+ });+}, []);+</script>diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalUserView.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalUserView.vuenew file mode 100644index 0000000000..07225a78d5--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalUserView.vue@@ -0,0 +1,62 @@+<template>+ <div v-if="candidateUser" class="inline-flex items-center gap-1">+ <UserAvatar :user="candidateUser" :size="avatarSize" />+ <span class="text-xs font-medium">{{ candidateUser.title }}</span>+ <NTag+ v-if="currentUser.name === candidateUser.name"+ size="tiny"+ round+ type="success"+ >+ {{ $t("custom-approval.issue-review.you") }}+ </NTag>+ </div>+</template>++<script setup lang="ts">+import { computedAsync } from "@vueuse/core";+import { NTag } from "naive-ui";+import { computed } from "vue";+import UserAvatar from "@/components/User/UserAvatar.vue";+import { useCurrentUserV1, useUserStore } from "@/store";+import { State } from "@/types/proto/v1/common";+import { UserType } from "@/types/proto/v1/user_service";++type SizeType = "tiny" | "small" | "normal";++const props = withDefaults(+ defineProps<{+ // candidate in users/{email} format.+ candidate: string;+ size?: SizeType;+ }>(),+ {+ size: "normal",+ }+);++const currentUser = useCurrentUserV1();+const userStore = useUserStore();++const avatarSize = computed(() => {+ switch (props.size) {+ case "tiny":+ return "TINY";+ case "small":+ return "SMALL";+ default:+ return "NORMAL";+ }+});++const candidateUser = computedAsync(async () => {+ const user = await userStore.getOrFetchUserByIdentifier(props.candidate);+ if (!user) {+ return;+ }+ if (user.userType !== UserType.USER || user.state !== State.ACTIVE) {+ return;+ }+ return user;+});+</script>diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/PotentialApprovers.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/PotentialApprovers.vuenew file mode 100644index 0000000000..7e1992f945--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/PotentialApprovers.vue@@ -0,0 +1,68 @@+<template>+ <template v-if="users.length > 0">+ <!-- Show tooltip with text when there are more than 3 users -->+ <NPopover+ v-if="users.length > 3"+ placement="bottom-start"+ :show-arrow="false"+ >+ <template #trigger>+ <span class="text-xs text-gray-600 cursor-pointer hover:text-blue-600">+ {{ triggerText }}+ </span>+ </template>+ <div class="max-w-xs">+ <div class="space-y-1 max-h-64 overflow-y-auto">+ <ApprovalCandidate+ v-for="user in users"+ :key="user.email"+ :candidate="`users/${user.email}`"+ />+ </div>+ </div>+ </NPopover>+ <!-- Show user avatars when 3 or fewer users -->+ <div v-else class="flex items-center gap-1">+ <UserView+ v-for="user in users"+ :key="user.email"+ :user="user"+ size="tiny"+ />+ </div>+ </template>+</template>++<script setup lang="ts">+import { NPopover } from "naive-ui";+import { computed } from "vue";+import { useI18n } from "vue-i18n";+import UserView from "@/components/User/UserView.vue";+import type { User as UserType } from "@/types/proto/v1/user_service";+import ApprovalCandidate from "./ApprovalCandidate.vue";++const props = defineProps<{+ users: UserType[];+}>();++const { t } = useI18n();++const triggerText = computed(() => {+ if (props.users.length === 0) return "";++ const displayUsers = props.users.slice(0, 3);+ const remainingCount = props.users.length - displayUsers.length;+ const names = displayUsers+ .map((user) => user.title || user.email.split("@")[0])+ .join(", ");++ if (remainingCount === 0) {+ return names;+ } else {+ return t("custom-approval.issue-review.and-n-other-users", {+ names,+ count: remainingCount,+ });+ }+});+</script>diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/index.ts b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/index.tsnew file mode 100644index 0000000000..66b5133789--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/index.ts@@ -0,0 +1 @@+export { default as ApprovalFlowSection } from "./ApprovalFlowSection.vue";diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vuenew file mode 100644index 0000000000..121016aff4--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue@@ -0,0 +1,98 @@+<template>+ <div class="w-full flex flex-col p-4 gap-4">+ <ApprovalFlowSection :issue="issue" />++ <IssueLabels+ :project="project"+ :value="issue.labels || []"+ :disabled="!allowChange"+ @update:value="onIssueLabelsUpdate"+ />++ <!-- Description Section -->+ <div class="flex-1 overflow-hidden">+ <h3 class="textlabel mb-1">+ {{ $t("common.description") }}+ </h3>+ <NInput+ v-model:value="issue.description"+ type="textarea"+ placeholder="Add description..."+ :disabled="!allowChange"+ :autosize="false"+ :resizable="false"+ @blur="onIssueDescriptionUpdate(issue.description)"+ />+ </div>+ </div>+</template>++<script setup lang="ts">+import { NInput } from "naive-ui";+import { computed } from "vue";+import { useI18n } from "vue-i18n";+import IssueLabels from "@/components/IssueV1/components/Sidebar/IssueLabels.vue";+import { issueServiceClient } from "@/grpcweb";+import {+ extractUserId,+ pushNotification,+ useCurrentProjectV1,+ useCurrentUserV1,+} from "@/store";+import { Issue, IssueStatus } from "@/types/proto/v1/issue_service";+import { hasProjectPermissionV2 } from "@/utils";+import { usePlanContextWithIssue } from "../../../logic/context";+import ApprovalFlowSection from "./ApprovalFlowSection/ApprovalFlowSection.vue";++const { t } = useI18n();+const { issue } = usePlanContextWithIssue();+const currentUser = useCurrentUserV1();+const { project } = useCurrentProjectV1();++const allowChange = computed(() => {+ if (issue.value.status !== IssueStatus.OPEN) {+ return false;+ }++ // Allowed if current user is the creator.+ if (extractUserId(issue.value.creator) === currentUser.value.email) {+ return true;+ }++ return hasProjectPermissionV2(project.value, "bb.issues.update");+});++const onIssueLabelsUpdate = async (labels: string[]) => {+ const issuePatch = Issue.fromPartial({+ ...issue.value,+ labels,+ });+ await issueServiceClient.updateIssue({+ issue: issuePatch,+ updateMask: ["labels"],+ });+ // TODO(claude): trigger re-fetch of issue if needed.+ pushNotification({+ module: "bytebase",+ style: "SUCCESS",+ title: t("common.updated"),+ });+};++const onIssueDescriptionUpdate = async (description: string) => {+ const issuePatch = Issue.fromPartial({+ ...issue.value,+ description,+ });+ await issueServiceClient.updateIssue({+ issue: issuePatch,+ updateMask: ["description"],+ });+ // TODO(claude): trigger re-fetch of issue if needed.+ pushNotification({+ module: "bytebase",+ style: "SUCCESS",+ title: t("common.updated"),+ });+};+</script>diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/index.ts b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/index.tsnew file mode 100644index 0000000000..836295309d--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/index.ts@@ -0,0 +1 @@+export { default as Sidebar } from "./Sidebar.vue";\ No newline at end of filediff --git a/frontend/src/components/Plan/components/IssueReviewView/index.ts b/frontend/src/components/Plan/components/IssueReviewView/index.tsnew file mode 100644index 0000000000..cee1c778ae--- /dev/null+++ b/frontend/src/components/Plan/components/IssueReviewView/index.ts@@ -0,0 +1 @@+export { default as IssueReviewView } from "./IssueReviewView.vue";diff --git a/frontend/src/components/Plan/components/Overview.vue b/frontend/src/components/Plan/components/Overview.vueindex 8119ff5c70..c8a09327fd 100644--- a/frontend/src/components/Plan/components/Overview.vue+++ b/frontend/src/components/Plan/components/Overview.vue@@ -1,5 +1,5 @@<template>- <div class="w-full px-4 overflow-y-auto">+ <div class="w-full pt-2 pb-4 px-4 overflow-y-auto"><div class="max-w-4xl mx-auto space-y-4 mt-4"><!-- Plan Header --><div>@@ -19,7 +19,7 @@<p class="text-sm text-control-light">{{ $t("plan.overview.total-specs") }}</p>- <p class="text-2xl font-semibold mt-1">+ <p class="text-xl font-semibold mt-1">{{ statistics.totalSpecs }}</p></div>@@ -33,7 +33,7 @@<p class="text-sm text-control-light">{{ $t("plan.overview.total-targets") }}</p>- <p class="text-2xl font-semibold mt-1">+ <p class="text-xl font-semibold mt-1">{{ statistics.totalTargets }}</p></div>@@ -52,8 +52,8 @@v-if="statistics.checkStatus.error > 0"class="flex items-center gap-1">- <XCircleIcon class="w-5 h-5 text-error" />- <span class="text-lg font-semibold text-error">{{+ <XCircleIcon class="w-6 h-6 text-error" />+ <span class="text-xl font-semibold text-error">{{statistics.checkStatus.error}}</span></div>@@ -61,8 +61,8 @@v-if="statistics.checkStatus.warning > 0"class="flex items-center gap-1">- <AlertCircleIcon class="w-5 h-5 text-warning" />- <span class="text-lg font-semibold text-warning">{{+ <AlertCircleIcon class="w-6 h-6 text-warning" />+ <span class="text-xl font-semibold text-warning">{{statistics.checkStatus.warning}}</span></div>@@ -70,14 +70,14 @@v-if="statistics.checkStatus.success > 0"class="flex items-center gap-1">- <CheckCircleIcon class="w-5 h-5 text-success" />- <span class="text-lg font-semibold text-success">{{+ <CheckCircleIcon class="w-6 h-6 text-success" />+ <span class="text-xl font-semibold text-success">{{statistics.checkStatus.success}}</span></div><spanv-if="statistics.checkStatus.total === 0"- class="text-lg text-control"+ class="text-xl text-control">{{ $t("plan.overview.no-checks") }}</span>diff --git a/frontend/src/components/Plan/components/SpecsView.vue b/frontend/src/components/Plan/components/SpecsView.vueindex c339adca8c..7e3bafffe6 100644--- a/frontend/src/components/Plan/components/SpecsView.vue+++ b/frontend/src/components/Plan/components/SpecsView.vue@@ -1,5 +1,7 @@<template>- <SpecDetailView :key="selectedSpec.id" />+ <div class="flex-1 flex pt-2 pb-4">+ <SpecDetailView :key="selectedSpec.id" />+ </div></template><script setup lang="ts">diff --git a/frontend/src/components/User/UserView.vue b/frontend/src/components/User/UserView.vuenew file mode 100644index 0000000000..26434f39d1--- /dev/null+++ b/frontend/src/components/User/UserView.vue@@ -0,0 +1,58 @@+<template>+ <div class="inline-flex items-center gap-1">+ <UserAvatar :user="user" :size="avatarSize" />+ <span v-if="showName" :class="textClass">+ {{ displayName }}+ </span>+ </div>+</template>++<script setup lang="ts">+import { computed } from "vue";+import type { User } from "@/types/proto/v1/user_service";+import type { BBAvatarSizeType } from "@/bbkit/types";+import UserAvatar from "./UserAvatar.vue";++type SizeType = "tiny" | "small" | "normal" | "large";++const props = withDefaults(+ defineProps<{+ user: User;+ size?: SizeType;+ showName?: boolean;+ nameOnly?: boolean;+ }>(),+ {+ size: "normal",+ showName: true,+ nameOnly: false,+ }+);++const displayName = computed(() => {+ if (props.nameOnly) {+ return props.user.title || props.user.email.split("@")[0];+ }+ return props.user.title || props.user.email;+});++const avatarSize = computed((): BBAvatarSizeType => {+ const sizeMap: Record<SizeType, BBAvatarSizeType> = {+ tiny: "TINY",+ small: "SMALL",+ normal: "NORMAL",+ large: "LARGE",+ };+ return sizeMap[props.size];+});++const textClass = computed(() => {+ const sizeClasses: Record<SizeType, string> = {+ tiny: "text-xs",+ small: "text-sm",+ normal: "text-base",+ large: "text-lg",+ };+ return sizeClasses[props.size];+});+</script>\ No newline at end of filediff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 9dbc855466..6d9d708644 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -915,7 +915,6 @@},"approval-flow": {"self": "Approval flow",- "tooltip": "The approvers will review and approve the issue in the order specified in the flow. The issue can only be applied after all steps in the flow have been approved. You can configure a custom approval flow for each risk.","pre-issue-created-tips": "After an issue is created, Bytebase will automatically match the corresponding custom approval based on the type and risk level of the issue."},"risk-level": {@@ -1042,6 +1041,7 @@"navigator": {"specifications": "Specifications","checks": "Checks",+ "review": "Review","statement-empty": "Statement is empty"},"spec": {@@ -2514,10 +2514,10 @@"re-request-review-issue": "Re-request review issue?","sent-back-issue": "Sent back issue","re-requested-review": "re-requested issue review",- "no-one-matched": "No one matched",- "any-n-role-can-approve": "Any {role} can approve",- "approved-by-n": "Approved by {approver}",- "issue-creators-cannot-approve-their-own-issue": "Issue creators cannot approve their own issue"+ "approved-by": "Approved by",+ "rejected-by": "Rejected by",+ "and-n-other-users": "{names} and 1 other user | {names} and {count} other users",+ "self-approval-not-allowed": "Self-approval is not allowed in this project. So you cannot approve your own issue."}},"schema-template": {diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 084acb53fe..f74568a1f2 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -915,7 +915,6 @@},"approval-flow": {"self": "Flujo de aprobación",- "tooltip": "Los aprobadores revisarán y aprobarán el problema en el orden especificado en el flujo. \nLa emisión solo se puede aplicar después de que se hayan aprobado todos los pasos del flujo. \nPuede configurar un flujo de aprobación personalizado para cada riesgo.","pre-issue-created-tips": "Después de crear un problema, Bytebase coincidirá automáticamente con la aprobación personalizada correspondiente según el tipo y nivel de riesgo del problema."},"risk-level": {@@ -1042,6 +1041,7 @@"navigator": {"specifications": "Presupuesto","checks": "Cheques",+ "review": "Revisar","statement-empty": "La declaración está vacía"},"spec": {@@ -2514,10 +2514,10 @@"re-request-review-issue": "¿Volver a solicitar revisión?","sent-back-issue": "Problema devuelto","re-requested-review": "revisión de problema nuevamente solicitada",- "no-one-matched": "Nadie igualó",- "any-n-role-can-approve": "Cualquier {role} puede aprobar",- "approved-by-n": "Aprobado por {approver}",- "issue-creators-cannot-approve-their-own-issue": "El creador del problema no puede aprobar su propio problema."+ "approved-by": "Aprobado por",+ "rejected-by": "Rechazado por",+ "and-n-other-users": "{names} y {count} otros usuarios",+ "self-approval-not-allowed": "No se permite la autoaprobación para este proyecto. No puedes aprobarlo como creador."}},"schema-template": {diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 1c7ef276c2..37ff7e8048 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -915,7 +915,6 @@},"approval-flow": {"self": "承認の流れ",- "tooltip": "承認者は、承認フローで指定された順序でイシューを確認し、承認する必要があります。イシューは、承認フローのすべてのステップが承認された後にのみ実行できます。リスクレベルごとに承認をカスタマイズできます。","pre-issue-created-tips": "イシューが作成されると、システムはイシューのタイプとリスク レベルに基づいて、対応するカスタム承認を自動的に照合します。"},"risk-level": {@@ -1042,6 +1041,7 @@"navigator": {"specifications": "仕様","checks": "小切手",+ "review": "レビュー","statement-empty": "ステートメントが空です"},"spec": {@@ -2514,10 +2514,10 @@"re-request-review-issue": "イシューの承認を再度リクエストしますか?","sent-back-issue": "イシューを却下する","re-requested-review": "イシューの承認を再度リクエストします",- "no-one-matched": "このロールに一致するユーザーはいません。プロジェクト管理者に連絡してロールを割り当ててください。",- "any-n-role-can-approve": "任意の {role} を承認できます",- "approved-by-n": "{approver} によって承認されました",- "issue-creators-cannot-approve-their-own-issue": "イシュー作成者は自分の問題を承認できません"+ "approved-by": "承認者",+ "rejected-by": "拒否された",+ "and-n-other-users": "{names} と他の {count} 人のユーザー",+ "self-approval-not-allowed": "このプロジェクトでは自己承認は許可されていません。作成者として承認することはできません。"}},"schema-template": {diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex aa316bb478..972c74f8ee 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -915,7 +915,6 @@},"approval-flow": {"self": "Quy trình phê duyệt",- "tooltip": "Người phê duyệt sẽ xem xét và phê duyệt vấn đề theo thứ tự được chỉ định trong quy trình. Vấn đề chỉ có thể được áp dụng sau khi tất cả các bước trong quy trình đã được phê duyệt. Bạn có thể định cấu hình quy trình phê duyệt tùy chỉnh cho từng rủi ro.","pre-issue-created-tips": "Sau khi một vấn đề được tạo, Bytebase sẽ tự động khớp với phê duyệt tùy chỉnh tương ứng dựa trên loại và mức độ rủi ro của vấn đề."},"risk-level": {@@ -1042,6 +1041,7 @@"navigator": {"specifications": "Thông số kỹ thuật","checks": "Kiểm tra",+ "review": "Ôn tập","statement-empty": "Câu lệnh trống rỗng"},"spec": {@@ -2514,10 +2514,10 @@"re-request-review-issue": "Yêu cầu xem xét lại vấn đề?","sent-back-issue": "Đã gửi lại vấn đề","re-requested-review": "đã yêu cầu xem xét lại vấn đề",- "no-one-matched": "Không ai khớp",- "any-n-role-can-approve": "Bất kỳ {role} nào cũng có thể phê duyệt",- "approved-by-n": "Đã được phê duyệt bởi {approver}",- "issue-creators-cannot-approve-their-own-issue": "Người tạo vấn đề không thể phê duyệt vấn đề của chính họ"+ "approved-by": "Được chấp thuận bởi",+ "rejected-by": "Bị từ chối bởi",+ "and-n-other-users": "{names} và {count} người dùng khác",+ "self-approval-not-allowed": "Không được phép tự phê duyệt cho dự án này. Bạn không thể phê duyệt với tư cách là người sáng tạo."}},"schema-template": {diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 575afa326a..0e1f4f4ed9 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -915,7 +915,6 @@},"approval-flow": {"self": "审批流",- "tooltip": "审批人需要按审批流指定的顺序审核和审批工单。只有审批流中所有步骤都完成审批后工单才可以执行。您可以为每个风险级别自定义审批。","pre-issue-created-tips": "在工单创建后,系统将根据工单的类型和风险等级自动匹配相应的自定义审批。"},"risk-level": {@@ -1042,6 +1041,7 @@"navigator": {"specifications": "变更项","checks": "检查",+ "review": "审查","statement-empty": "变更语句为空"},"spec": {@@ -2514,10 +2514,10 @@"re-request-review-issue": "请求再次审批工单?","sent-back-issue": "退回工单","re-requested-review": "再次请求审批工单",- "no-one-matched": "没有匹配到用户",- "any-n-role-can-approve": "任意 {role} 可审批",- "approved-by-n": "已由 {approver} 批准",- "issue-creators-cannot-approve-their-own-issue": "工单创建者不能审批自己的工单"+ "approved-by": "已批准",+ "rejected-by": "被拒绝",+ "and-n-other-users": "{names} 和另外 {count} 位用户",+ "self-approval-not-allowed": "此项目不允许工单创建者审批。您无法以创建者身份批准。"}},"schema-template": {