refactor: zentralisiere Konfiguration in src/config/constants.ts
- RATING_OPTIONS, INST_COLORS, AI_CONFIG, RATING_NUM_MAP aus Komponenten extrahiert - #0070AD als @theme-Farbe 'brand' in Tailwind v4 (index.css) - Alle ~70 hardcoded #0070AD-Vorkommen in Pages durch 'brand' ersetzt - BRAND_COLOR als JS-Konstante für style-Props (App.tsx)
This commit is contained in:
1 parent
ece111c0a7
commit
97e3eeb8a6
14 files changed
+139
-116
No files matched your search
@@ -150,17 +150,17 @@ export default function AssignmentDetail() {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<button onClick={() => navigate('/')} className="text-sm text-[#0070AD] mb-2 block">← Zurück</button>
|
||||
<button onClick={() => navigate('/')} className="text-sm text-brand mb-2 block">← Zurück</button>
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<div>
|
||||
{assignment.assignmentNumber && (
|
||||
<div className="text-xs font-semibold text-[#0070AD] uppercase tracking-wide">{assignment.assignmentNumber}</div>
|
||||
<div className="text-xs font-semibold text-brand uppercase tracking-wide">{assignment.assignmentNumber}</div>
|
||||
)}
|
||||
<h1 className="text-xl font-bold text-gray-800 leading-tight">{assignment.title}</h1>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => navigate(`/assignment/${assignmentId}/edit`)}
|
||||
className="flex-shrink-0 text-xs px-3 py-1.5 border border-gray-200 rounded-lg text-gray-500 hover:border-[#0070AD] hover:text-[#0070AD] transition">
|
||||
className="flex-shrink-0 text-xs px-3 py-1.5 border border-gray-200 rounded-lg text-gray-500 hover:border-brand hover:text-brand transition">
|
||||
✏️ Bearbeiten
|
||||
</button>
|
||||
</div>
|
||||
@@ -175,7 +175,7 @@ export default function AssignmentDetail() {
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-sm font-semibold text-gray-700">Ad-hoc Meeting starten</span>
|
||||
<button onClick={() => setShowAdHoc(p => !p)}
|
||||
className="text-xs bg-[#0070AD] text-white px-3 py-1.5 rounded-lg font-medium">
|
||||
className="text-xs bg-brand text-white px-3 py-1.5 rounded-lg font-medium">
|
||||
{showAdHoc ? 'Abbrechen' : '+ Ad-hoc'}
|
||||
</button>
|
||||
</div>
|
||||
@@ -187,7 +187,7 @@ export default function AssignmentDetail() {
|
||||
const count = phaseRows.find(r => r.template.id === t.id)?.instances.length ?? 0
|
||||
startMeeting(t.id!, count)
|
||||
}}
|
||||
className="py-2.5 px-3 text-left rounded-lg border border-gray-200 hover:border-[#0070AD] hover:bg-blue-50 transition">
|
||||
className="py-2.5 px-3 text-left rounded-lg border border-gray-200 hover:border-brand hover:bg-blue-50 transition">
|
||||
<div className="text-sm font-medium text-gray-700">{t.label}</div>
|
||||
<div className={`text-xs mt-0.5 ${t.withWhom === 'client' ? 'text-blue-500' : 'text-purple-500'}`}>
|
||||
{t.withWhom === 'client' ? 'Kundentermin' : 'Lead-intern'}
|
||||
@@ -237,7 +237,7 @@ export default function AssignmentDetail() {
|
||||
<button
|
||||
onClick={() => canStart && startMeeting(template.id!, instances.length)}
|
||||
className={`ml-2 flex-shrink-0 text-xs px-3 py-1.5 rounded-lg font-medium ${
|
||||
canStart ? 'bg-[#0070AD] text-white' : 'bg-gray-100 text-gray-400 cursor-not-allowed'
|
||||
canStart ? 'bg-brand text-white' : 'bg-gray-100 text-gray-400 cursor-not-allowed'
|
||||
}`}
|
||||
disabled={!canStart}>
|
||||
{instances.length === 0 ? 'Starten' : template.isRepeatable ? '+ Wiederholen' : 'Erledigt'}
|
||||
|
||||
Reference in new issue
Block a user