refactor: remove recipients from campaign data structure
This commit is contained in:
@@ -285,7 +285,6 @@ export class ProjectService {
|
|||||||
return wrapRedis(Keys.Project.campaigns(id), async () => {
|
return wrapRedis(Keys.Project.campaigns(id), async () => {
|
||||||
return prisma.project.findUnique({ where: { id } }).campaigns({
|
return prisma.project.findUnique({ where: { id } }).campaigns({
|
||||||
include: {
|
include: {
|
||||||
recipients: { select: { id: true } },
|
|
||||||
emails: { select: { id: true, status: true } },
|
emails: { select: { id: true, status: true } },
|
||||||
tasks: { select: { id: true } },
|
tasks: { select: { id: true } },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,9 +25,6 @@ export function useCampaigns() {
|
|||||||
tasks: {
|
tasks: {
|
||||||
id: string;
|
id: string;
|
||||||
}[];
|
}[];
|
||||||
recipients: {
|
|
||||||
id: string;
|
|
||||||
}[];
|
|
||||||
})[]
|
})[]
|
||||||
>(activeProject ? `/projects/id/${activeProject.id}/campaigns` : null);
|
>(activeProject ? `/projects/id/${activeProject.id}/campaigns` : null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,11 +89,6 @@ export default function Index() {
|
|||||||
<div className={"my-4"}>
|
<div className={"my-4"}>
|
||||||
<h2 className={"col-span-2 truncate font-semibold text-neutral-700"}>Properties</h2>
|
<h2 className={"col-span-2 truncate font-semibold text-neutral-700"}>Properties</h2>
|
||||||
<div className={"grid grid-cols-2 gap-3"}>
|
<div className={"grid grid-cols-2 gap-3"}>
|
||||||
<div>
|
|
||||||
<label className={"text-xs font-medium text-neutral-500"}>Recipients</label>
|
|
||||||
<p className="mt-1 truncate text-sm text-neutral-500">{c.recipients.length}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className={"text-xs font-medium text-neutral-500"}>Status</label>
|
<label className={"text-xs font-medium text-neutral-500"}>Status</label>
|
||||||
<p className="mt-1 truncate text-sm text-neutral-500">
|
<p className="mt-1 truncate text-sm text-neutral-500">
|
||||||
|
|||||||
Reference in New Issue
Block a user