chore: add missing multi-level editor for approval workflow, rename projects to campaings.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import { useContentItemDetailStore } from '@/features/content/stores/contentItemDetailStore.js';
|
||||
import { useContentItemsStore } from '@/features/content/stores/contentItemsStore.js';
|
||||
import { useFeedbackSubmissionStore } from '@/features/feedback/stores/feedbackSubmissionStore.js';
|
||||
import { useProjectsStore } from '@/features/projects/stores/projectsStore.js';
|
||||
import { useCampaignsStore } from '@/features/campaigns/stores/campaignsStore.js';
|
||||
import { useWorkspaceStore } from '@/features/workspaces/stores/workspaceStore.js';
|
||||
import {
|
||||
mdiArrowTopRight,
|
||||
@@ -33,7 +33,7 @@
|
||||
const contentItemsStore = useContentItemsStore();
|
||||
const contentItemDetailStore = useContentItemDetailStore();
|
||||
const feedbackStore = useFeedbackSubmissionStore();
|
||||
const projectsStore = useProjectsStore();
|
||||
const campaignsStore = useCampaignsStore();
|
||||
const workspaceStore = useWorkspaceStore();
|
||||
|
||||
const form = reactive({
|
||||
@@ -83,16 +83,16 @@
|
||||
? contentItemDetailStore.item
|
||||
: contentItemsStore.items.find(item => item.id === routeId) ?? null;
|
||||
});
|
||||
const currentProject = computed(() => {
|
||||
const projectId = route.params.projectId ?? currentContentItem.value?.projectId;
|
||||
if (!projectId) {
|
||||
const currentCampaign = computed(() => {
|
||||
const campaignId = route.params.campaignId ?? currentContentItem.value?.campaignId;
|
||||
if (!campaignId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return projectsStore.projects.find(project => project.id === projectId) ?? null;
|
||||
return campaignsStore.campaigns.find(campaign => campaign.id === campaignId) ?? null;
|
||||
});
|
||||
const currentClient = computed(() => {
|
||||
const clientId = route.query.clientId ?? currentProject.value?.clientId ?? currentContentItem.value?.clientId;
|
||||
const clientId = route.query.clientId ?? currentCampaign.value?.clientId ?? currentContentItem.value?.clientId;
|
||||
if (!clientId) {
|
||||
return clientsStore.operationalClient ?? null;
|
||||
}
|
||||
@@ -447,8 +447,8 @@
|
||||
workspaceName: workspaceStore.activeWorkspace?.name ?? null,
|
||||
clientId: currentClient.value?.id ?? null,
|
||||
clientName: currentClient.value?.name ?? null,
|
||||
projectId: currentProject.value?.id ?? null,
|
||||
projectName: currentProject.value?.name ?? null,
|
||||
campaignId: currentCampaign.value?.id ?? null,
|
||||
campaignName: currentCampaign.value?.name ?? null,
|
||||
contentItemId: currentContentItem.value?.id ?? null,
|
||||
contentItemTitle: currentContentItem.value?.title ?? null,
|
||||
};
|
||||
|
||||
@@ -82,7 +82,7 @@ export const useDeveloperFeedbackStore = defineStore('developer-feedback', () =>
|
||||
report.metadata?.submittedPath,
|
||||
report.context?.workspaceName,
|
||||
report.context?.clientName,
|
||||
report.context?.projectName,
|
||||
report.context?.campaignName,
|
||||
report.context?.contentItemTitle,
|
||||
...(report.tags ?? []),
|
||||
]
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
return [
|
||||
[t('feedback.review.detail.context.workspace'), context?.workspaceName ?? context?.workspaceId],
|
||||
[t('feedback.review.detail.context.client'), context?.clientName ?? context?.clientId],
|
||||
[t('feedback.review.detail.context.project'), context?.projectName ?? context?.projectId],
|
||||
[t('feedback.review.detail.context.campaign'), context?.campaignName ?? context?.campaignId],
|
||||
[t('feedback.review.detail.context.contentItem'), context?.contentItemTitle ?? context?.contentItemId],
|
||||
];
|
||||
});
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
return [
|
||||
report.context?.workspaceName,
|
||||
report.context?.clientName,
|
||||
report.context?.projectName,
|
||||
report.context?.campaignName,
|
||||
report.context?.contentItemTitle,
|
||||
]
|
||||
.filter(Boolean)
|
||||
|
||||
Reference in New Issue
Block a user