fix dashboard show test campaigns

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2026-02-04 22:07:05 +01:00
parent 2a2ffb898b
commit d0fe755b8a
2 changed files with 28 additions and 21 deletions

View File

@@ -60,6 +60,7 @@ const appendQuery = (query) => {
const sortBy = query.sortBy || '';
const sortOrder = query.sortOrder || '';
const search = query.search || '';
const includeTest = query.includeTest;
const offset = getOffset(currentPage, perPage);
@@ -77,6 +78,9 @@ const appendQuery = (query) => {
if (search) {
urlQuery += `&search=${search}`;
}
if (includeTest) {
urlQuery += `&includeTest=true`;
}
return urlQuery;
};

View File

@@ -520,13 +520,14 @@
{#each activeCampaigns as campaign}
<TableRow>
<TableCell>
<span class="inline-flex items-center gap-1 py-1">
{#if campaign.isTest}
<TestLabel />
{/if}
<a href={`/campaign/${campaign.id}`}>
{campaign.name}
</a>
</span>
</TableCell>
<TableCell value={campaign.company?.name} />
<TableCell value={campaign.sendStartAt} isDate isRelative />
@@ -560,13 +561,14 @@
{#each scheduledCampaigns as campaign}
<TableRow>
<TableCell>
<span class="inline-flex items-center gap-1 py-1">
{#if campaign.isTest}
<TestLabel />
{/if}
<a href={`/campaign/${campaign.id}`}>
{campaign.name}
</a>
</span>
</TableCell>
<TableCell value={campaign.company?.name} />
<TableCell value={campaign.sendStartAt} isDate isRelative />
@@ -599,13 +601,14 @@
{#each completedCampaigns as campaign}
<TableRow>
<TableCell>
<span class="inline-flex items-center gap-1 py-1">
{#if campaign.isTest}
<TestLabel />
{/if}
<a href={`/campaign/${campaign.id}`}>
{campaign.name}
</a>
</span>
</TableCell>
<TableCell value={campaign.company?.name} />
<TableCell value={campaign.sendStartAt} isDate isRelative />