feat: scope articles by brand
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user