feat: Leads-Aktionsbuttons icon-only + WOID des Akquise-Tickets
- Maps/Website/Repo nur noch Icon (title/aria-label bleiben) - WOID je Lead als klickbarer Chip -> /tickets?woid= (Lead->Kunde->Akquise-Ticket, live in useLeads gejoint) - useWorkorders: woid server-seitig filterbar (macht den bisher wirkungslosen WOID-Filter nutzbar) - TicketsPage: ?woid= Deep-Link liest Param, filtert ueber alle Status Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c305fcd46
commit
fe3e39bd04
4 files changed
+93
-9
No files matched your search
+21
-7
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import {
|
||||
FaSpinner,
|
||||
FaStar,
|
||||
@@ -16,6 +17,7 @@ import {
|
||||
FaArrowsRotate,
|
||||
FaCheck,
|
||||
FaCopy,
|
||||
FaHashtag,
|
||||
FaTriangleExclamation,
|
||||
} from 'react-icons/fa6'
|
||||
import { useLeads, useLeadSettings, useLeadCycle } from '../hooks/useLeads'
|
||||
@@ -410,20 +412,32 @@ function LeadCard({ lead, pipeline, onUpdate }) {
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex gap-2 wrap">
|
||||
<div className="flex gap-2 wrap" style={{ alignItems: 'center' }}>
|
||||
{lead.googleMapsLink && (
|
||||
<Button size="sm" as="a" href={lead.googleMapsLink} target="_blank" rel="noreferrer" title="Google Maps">
|
||||
<FaMapLocationDot /> Maps
|
||||
<Button size="sm" as="a" href={lead.googleMapsLink} target="_blank" rel="noreferrer" title="Google Maps" aria-label="Google Maps">
|
||||
<FaMapLocationDot />
|
||||
</Button>
|
||||
)}
|
||||
{websiteUrl && (
|
||||
<Button size="sm" as="a" href={websiteUrl} target="_blank" rel="noreferrer" title="Website">
|
||||
<FaGlobe /> Website
|
||||
<Button size="sm" as="a" href={websiteUrl} target="_blank" rel="noreferrer" title="Bestehende Website" aria-label="Bestehende Website">
|
||||
<FaGlobe />
|
||||
</Button>
|
||||
)}
|
||||
{lead.repoUrl && (
|
||||
<Button size="sm" as="a" href={lead.repoUrl} target="_blank" rel="noreferrer" title="Preview-Repo">
|
||||
<FaGitAlt /> Repo
|
||||
<Button size="sm" as="a" href={lead.repoUrl} target="_blank" rel="noreferrer" title="Preview-Repo (Gitea)" aria-label="Preview-Repo">
|
||||
<FaGitAlt />
|
||||
</Button>
|
||||
)}
|
||||
{lead.woid && (
|
||||
<Button
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
as={Link}
|
||||
to={`/tickets?woid=${lead.woid}`}
|
||||
title={`Akquise-Ticket WOID ${lead.woid} öffnen`}
|
||||
aria-label={`Ticket WOID ${lead.woid}`}
|
||||
>
|
||||
<FaHashtag />{lead.woid}
|
||||
</Button>
|
||||
)}
|
||||
<select
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useSearchParams } from 'react-router-dom'
|
||||
import { FaAngleDown, FaSpinner, FaPlus, FaList, FaSliders } from 'react-icons/fa6'
|
||||
import { useWorkorders } from '../hooks/useWorkorders'
|
||||
import { useCustomers } from '../hooks/useCustomers'
|
||||
@@ -35,6 +36,18 @@ export default function TicketsPage() {
|
||||
const [showCreateModal, setShowCreateModal] = useState(false)
|
||||
const [showOverviewModal, setShowOverviewModal] = useState(false)
|
||||
const [showAdvanced, setShowAdvanced] = useState(false)
|
||||
const [searchParams] = useSearchParams()
|
||||
|
||||
// Deep-Link aus den Leads: /tickets?woid=123 -> Filter vorbelegen + anwenden
|
||||
// (ueber ALLE Status, damit das Ticket unabhaengig vom Status gefunden wird)
|
||||
useEffect(() => {
|
||||
const w = searchParams.get('woid')
|
||||
if (!w) return
|
||||
setLocalFilters((p) => ({ ...p, woid: w }))
|
||||
setShowAdvanced(true)
|
||||
setStatusSel(ALL_STATUSES)
|
||||
setFilters((prev) => ({ ...prev, status: ALL_STATUSES, woid: w }))
|
||||
}, [searchParams])
|
||||
|
||||
const applyFilters = () => {
|
||||
setFilters((prev) => ({
|
||||
|
||||
Reference in new issue
Block a user