fix: fixup leads
ci-api / test (push) Has been cancelled
ci-web / test (push) Has been cancelled

This commit is contained in:
Nuxgrid
2026-07-28 16:40:38 +02:00
parent dfe0e5c5a5
commit b7043e113f
5 changed files with 14 additions and 13 deletions
+3 -4
View File
@@ -46,9 +46,8 @@ export type Role = 'admin' | 'client'
export interface Lead {
id: string
company: string
email: string
message: string
Telegram: string
message?: string
status: string
created_at: string
}
@@ -124,7 +123,7 @@ export const api = {
expired_at: string
}>('GET', '/auth/me'), logout: () => request<{ status: string }>('POST', '/auth/logout'),
createLead: (telegram: string, message: string) =>
createLead: (telegram: string, message?: string) =>
request<Lead>('POST', '/leads', { telegram, message }),
listLeads: () => request<{ items: Lead[] }>('GET', '/leads'),
setLeadStatus: (id: string, status: string) =>
-3
View File
@@ -314,9 +314,6 @@ export function Demos() {
<Text color="gray.500">Aucune donnée.</Text>
)}
</ModalBody>
<ModalFooter>
<Button onClick={closeDetails}>Fermer</Button>
</ModalFooter>
</ModalContent>
</Modal>
</>
+1 -2
View File
@@ -81,8 +81,7 @@ export function Leads() {
<Tbody>
{leads.map((l) => (
<Tr key={l.id}>
<Td fontWeight="medium">{l.company}</Td>
<Td>{l.email}</Td>
<Td fontWeight="medium">{l.Telegram}</Td>
<Td>
<Badge>{l.status}</Badge>
</Td>