style: prettier (C11 touched files)

This commit is contained in:
Cursor Agent 2026-08-01 06:39:34 +00:00
parent f394c76432
commit 2ac6f4c8fa
No known key found for this signature in database
3 changed files with 40 additions and 37 deletions

View file

@ -149,46 +149,46 @@ export const ActivityOverviewTab = ({
<Link href={`/campanha/demandas?activity=${view.id}`}>Ver todas</Link>
</Button>
) : null}
{view.municipality ? (
<Button asChild variant="outline" className="min-h-11 shrink-0">
<Link
href={`/campanha/demandas/nova?activity=${view.id}&municipality=${view.municipality.id}`}
>
<PlusIcon data-icon="inline-start" aria-hidden="true" />
Adicionar demanda
</Link>
</Button>
) : null}
{view.municipality ? (
<Button asChild variant="outline" className="min-h-11 shrink-0">
<Link
href={`/campanha/demandas/nova?activity=${view.id}&municipality=${view.municipality.id}`}
>
<PlusIcon data-icon="inline-start" aria-hidden="true" />
Adicionar demanda
</Link>
</Button>
) : null}
</div>
</CardHeader>
<CardContent className="flex flex-col gap-4">
{view.demands.length ? (
<>
<ul role="list" className="divide-y">
{view.demands.map((demand) => (
<li
key={demand.id}
className="flex flex-col gap-2 py-3 first:pt-0 last:pb-0 sm:flex-row sm:items-center sm:justify-between"
>
<div className="min-w-0">
<Link
href={`/campanha/demandas/${demand.slug}`}
className="font-medium text-primary underline-offset-4 hover:underline"
>
{demand.title}
</Link>
<p className="text-sm text-muted-foreground">
{campaignDemandKindLabels[demand.kind]} ·{' '}
{campaignDemandStatusLabels[demand.status]}
</p>
</div>
<span className="text-sm text-muted-foreground">
{demand.cost == null
? 'Custo não registrado'
: currencyFormatter.format(demand.cost)}
</span>
</li>
))}
{view.demands.map((demand) => (
<li
key={demand.id}
className="flex flex-col gap-2 py-3 first:pt-0 last:pb-0 sm:flex-row sm:items-center sm:justify-between"
>
<div className="min-w-0">
<Link
href={`/campanha/demandas/${demand.slug}`}
className="font-medium text-primary underline-offset-4 hover:underline"
>
{demand.title}
</Link>
<p className="text-sm text-muted-foreground">
{campaignDemandKindLabels[demand.kind]} ·{' '}
{campaignDemandStatusLabels[demand.status]}
</p>
</div>
<span className="text-sm text-muted-foreground">
{demand.cost == null
? 'Custo não registrado'
: currencyFormatter.format(demand.cost)}
</span>
</li>
))}
</ul>
<CampaignListPagination
page={view.page}

View file

@ -12,9 +12,9 @@ import { NativeSelect, NativeSelectOption } from '@/components/ui/native-select'
import { Spinner } from '@/components/ui/Spinner'
import { Textarea } from '@/components/ui/textarea'
import { campaignDemandKindLabels, campaignDemandKinds } from '@/lib/schemas/campaignDemand'
import type { ActivityRelationOption } from '@/utilities/activityRelationOptions'
import type { CampaignFormActionState } from '@/utilities/campaignFormActionError'
import { fieldError } from '@/utilities/campaignFormFields'
import type { ActivityRelationOption } from '@/utilities/activityRelationOptions'
type DemandFormProps = {
municipalityOptions: RelationOption[]
@ -50,7 +50,10 @@ export const DemandForm = ({
(query: string) => searchActivities(query, parsedMunicipalityId),
[parsedMunicipalityId, searchActivities],
)
const activityQueryReady = useCallback(() => parsedMunicipalityId !== null, [parsedMunicipalityId])
const activityQueryReady = useCallback(
() => parsedMunicipalityId !== null,
[parsedMunicipalityId],
)
const activityFieldDescription = parsedMunicipalityId
? 'Opcional. Busque atividades do município selecionado.'

View file

@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest'
import { ACTIVITY_RELATION_SEARCH_LIMIT } from '@/utilities/activityRelationOptions'
import { ACTIVITY_LINKED_DEMANDS_PAGE_SIZE } from '@/utilities/activityDetailPageData'
import { ACTIVITY_RELATION_SEARCH_LIMIT } from '@/utilities/activityRelationOptions'
import { parseDemandListParams } from '@/utilities/campaignDemandData'
describe('activityRelationOptions', () => {