Add Brand column to campaigns list table
Display the brandGuidelines field as a sortable, filterable "Brand" column between Owning Agency and Last Modified. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a25c7a9d31
commit
766b95f54c
1 changed files with 5 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ import apiService from '../services/apiService';
|
|||
import { usePdfPages } from '../hooks/usePdfPages';
|
||||
import { useUser } from '../contexts/UserContext';
|
||||
|
||||
type SortKey = 'name' | 'proofs' | 'status' | 'agencyLead' | 'agency' | 'lastModified';
|
||||
type SortKey = 'name' | 'proofs' | 'status' | 'agencyLead' | 'agency' | 'brandGuidelines' | 'lastModified';
|
||||
type SortDirection = 'asc' | 'desc';
|
||||
|
||||
const formatDate = (isoDateString: string): string => {
|
||||
|
|
@ -298,6 +298,7 @@ const CampaignList: React.FC<{
|
|||
status: '',
|
||||
agencyLead: '',
|
||||
agency: '',
|
||||
brandGuidelines: '',
|
||||
lastModified: '',
|
||||
});
|
||||
|
||||
|
|
@ -543,6 +544,7 @@ const CampaignList: React.FC<{
|
|||
['status', 'Status'],
|
||||
['agencyLead', 'Created By'],
|
||||
['agency', 'Owning Agency'],
|
||||
['brandGuidelines', 'Brand'],
|
||||
['lastModified', 'Last Modified'],
|
||||
] as [SortKey, string][]).map(([key, label]) => (
|
||||
<th
|
||||
|
|
@ -563,7 +565,7 @@ const CampaignList: React.FC<{
|
|||
</tr>
|
||||
<tr className="bg-grey-100">
|
||||
{!readOnly && <td className="px-4 py-1"></td>}
|
||||
{(['name', 'proofs', 'status', 'agencyLead', 'agency', 'lastModified'] as SortKey[]).map((key) => (
|
||||
{(['name', 'proofs', 'status', 'agencyLead', 'agency', 'brandGuidelines', 'lastModified'] as SortKey[]).map((key) => (
|
||||
<td key={key} className="px-6 py-1">
|
||||
<input
|
||||
type="text"
|
||||
|
|
@ -619,6 +621,7 @@ const CampaignList: React.FC<{
|
|||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-primary-blue">{campaign.agencyLead}</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-primary-blue">{campaign.agency}</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-primary-blue">{campaign.brandGuidelines}</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-primary-blue">{formatDate(campaign.lastModified)}</td>
|
||||
{!readOnly && (
|
||||
<td className="px-4 py-4 whitespace-nowrap text-sm text-right">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue