feat: scope articles by brand

This commit is contained in:
2026-05-20 15:37:25 +08:00
parent 5fb9d0b0dd
commit dd082e2ed1
72 changed files with 3213 additions and 432 deletions
@@ -9,6 +9,7 @@ import {
isKolVariableValueEmpty,
normalizeKolVariableDefinition,
} from '@/lib/kol-placeholders'
import { useCompanyStore } from '@/stores/company'
import { LeftOutlined } from '@ant-design/icons-vue'
import { useMutation, useQuery, useQueryClient } from '@tanstack/vue-query'
import { message } from 'ant-design-vue'
@@ -20,6 +21,7 @@ const route = useRoute()
const router = useRouter()
const queryClient = useQueryClient()
const { t } = useI18n()
const companyStore = useCompanyStore()
const subscriptionPromptId = computed(() => String(route.params.subscriptionPromptId))
const sourcePage = computed<'workspace' | 'templates' | null>(() => {
@@ -106,6 +108,10 @@ function handleBack() {
function handleSubmit() {
const schemaValue = schemaQuery.data.value
if (!schemaValue?.schema_json?.variables) return
if (!companyStore.currentBrandId) {
message.warning(t('templates.wizard.messages.selectBrandBeforeQuestion'))
return
}
const missingLabels: string[] = []
schemaValue.schema_json.variables.forEach((v) => {