feat: scope articles by brand
This commit is contained in:
@@ -19,10 +19,12 @@ import { useArticleRegenerateAction } from '@/lib/article-regenerate-action'
|
||||
import { getGenerateStatusMeta, getPublishStatusMeta } from '@/lib/display'
|
||||
import { formatError } from '@/lib/errors'
|
||||
import { formatPublishPlatformList } from '@/lib/publish-platforms'
|
||||
import { useCompanyStore } from '@/stores/company'
|
||||
|
||||
const queryClient = useQueryClient()
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
const companyStore = useCompanyStore()
|
||||
|
||||
const page = ref(1)
|
||||
const pageSize = ref(20)
|
||||
@@ -93,7 +95,14 @@ const articleParams = computed<ArticleListParams>(() => {
|
||||
})
|
||||
|
||||
const listQuery = useQuery({
|
||||
queryKey: computed(() => ['articles', 'list', 'custom_generation', articleParams.value]),
|
||||
queryKey: computed(() => [
|
||||
'articles',
|
||||
'list',
|
||||
companyStore.currentBrandId,
|
||||
'custom_generation',
|
||||
articleParams.value,
|
||||
]),
|
||||
enabled: computed(() => Boolean(companyStore.currentBrandId)),
|
||||
queryFn: () => articlesApi.list(articleParams.value),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user