diff --git a/src/components/QuickOverviewModal.jsx b/src/components/QuickOverviewModal.jsx
deleted file mode 100644
index c9df13e..0000000
--- a/src/components/QuickOverviewModal.jsx
+++ /dev/null
@@ -1,87 +0,0 @@
-import { FaTimes } from 'react-icons/fa'
-import { format } from 'date-fns'
-
-const STATUS_CLASSES = {
- 'Open': 'bg-red',
- 'Occupied': 'bg-blue-grey',
- 'Assigned': 'bg-teal',
- 'Awaiting': 'bg-amber',
- 'Closed': 'bg-grey'
-}
-
-const PRIORITY_CLASSES = {
- 0: 'bg-blue',
- 1: 'bg-green',
- 2: 'bg-amber',
- 3: 'bg-orange',
- 4: 'bg-red'
-}
-
-const PRIORITY_LABELS = {
- 0: 'NONE',
- 1: 'LOW',
- 2: 'MEDIUM',
- 3: 'HIGH',
- 4: 'CRITICAL'
-}
-
-export default function QuickOverviewModal({ isOpen, onClose, workorders = [] }) {
- if (!isOpen) return null
-
- return (
-
-
-
-
-
-
WOMS Ticket Quick Overview
-
-
-
-
- | WOID |
- Created |
- Type |
- CID & CLO |
- Requested by |
- Topic |
- Priority |
- Status |
- Editor |
-
-
-
- {workorders.map(wo => (
-
- |
- {wo.woid || wo.$id?.slice(-5)}
- |
-
- {format(new Date(wo.$createdAt || wo.createdAt), 'dd.MM.yyyy, HH:mm')}h
- |
- {wo.type} |
- {wo.customerCode} {wo.customerLocation} |
- {wo.requestedBy} |
- {wo.topic} |
-
- {PRIORITY_LABELS[wo.priority]}
- |
-
- {wo.status?.toUpperCase()}
- |
-
- {wo.assignedTo || '-'}
- |
-
- ))}
-
-
-
-
- Summary: Listed a total of {workorders.length} Workorders!
-
EOL =)
-
-
-
- )
-}
diff --git a/src/components/StatusHistoryModal.jsx b/src/components/StatusHistoryModal.jsx
deleted file mode 100644
index 313674a..0000000
--- a/src/components/StatusHistoryModal.jsx
+++ /dev/null
@@ -1,143 +0,0 @@
-import { FaTimes } from 'react-icons/fa'
-import { format } from 'date-fns'
-
-export default function StatusHistoryModal({ isOpen, onClose, worksheets, ticket }) {
- if (!isOpen) return null
-
- // Extrahiere Status-Änderungen aus Worksheets
- const statusHistory = worksheets
- .filter(ws => ws.oldStatus && ws.newStatus && ws.oldStatus !== ws.newStatus)
- .map(ws => ({
- date: ws.startDate,
- time: ws.startTime,
- from: ws.oldStatus,
- to: ws.newStatus,
- employee: ws.employeeName || ws.employeeShort || 'Unknown',
- details: ws.details,
- wsid: ws.wsid
- }))
- .sort((a, b) => {
- // Sortiere nach Datum und Zeit (älteste zuerst)
- const dateA = `${a.date} ${a.time || '0000'}`
- const dateB = `${b.date} ${b.time || '0000'}`
- return dateA.localeCompare(dateB)
- })
-
- // Füge aktuellen Status hinzu
- const currentStatus = ticket?.status || 'Open'
-
- return (
-
-
-
-
-
-
Status History - WOID {ticket?.woid || ticket?.$id}
-
-
-
- Current Status:
-
- {currentStatus}
-
-
-
-
- {statusHistory.length === 0 ? (
-
- No status changes recorded yet.
-
- ) : (
-
- {statusHistory.map((entry, index) => (
-
-
-
-
- {entry.date} {entry.time ? `${entry.time.substring(0, 2)}:${entry.time.substring(2, 4)}` : ''}
-
-
-
- {entry.from}
-
- →
-
- {entry.to}
-
-
-
-
-
by
-
{entry.employee}
- {entry.wsid && (
-
- WSID: {entry.wsid}
-
- )}
-
-
- {entry.details && (
-
- {entry.details}
-
- )}
-
- ))}
-
- )}
-
-
- )
-}
-
-
-
diff --git a/src/components/TicketCard.jsx b/src/components/TicketCard.jsx
index a686ffb..1fc4b1d 100644
--- a/src/components/TicketCard.jsx
+++ b/src/components/TicketCard.jsx
@@ -1,12 +1,11 @@
import { useState } from 'react'
-import { FaChevronDown, FaPlay, FaStop, FaPlus, FaClockRotateLeft, FaPen } from 'react-icons/fa6'
+import { FaChevronDown, FaPlay, FaStop, FaPlus, FaPen } from 'react-icons/fa6'
import { formatDistanceToNow, format } from 'date-fns'
import { de } from 'date-fns/locale'
import StatusDropdown from './StatusDropdown'
import PriorityDropdown from './PriorityDropdown'
import EditorDropdown from './EditorDropdown'
import CreateWorksheetModal from './CreateWorksheetModal'
-import StatusHistoryModal from './StatusHistoryModal'
import WorksheetList from './WorksheetList'
import WorksheetTimesModal from './WorksheetTimesModal'
import WorksheetStats from './WorksheetStats'
@@ -38,7 +37,6 @@ export default function TicketCard({ ticket, onUpdate }) {
const [activeTab, setActiveTab] = useState('details')
const [showCreateWorksheet, setShowCreateWorksheet] = useState(false)
const [editTimesWorksheet, setEditTimesWorksheet] = useState(null)
- const [showHistoryModal, setShowHistoryModal] = useState(false)
const [showProjectsModal, setShowProjectsModal] = useState(false)
const [projectsRefreshKey, setProjectsRefreshKey] = useState(0)
@@ -137,7 +135,6 @@ export default function TicketCard({ ticket, onUpdate }) {
Arbeitsblatt hinzufuegen
-
{worksheets.length > 0 && (
@@ -177,7 +174,6 @@ export default function TicketCard({ ticket, onUpdate }) {
onSave={(ws, times) => updateWorksheetTimes(ws, times, user, employee)}
/>
)}
- setShowHistoryModal(false)} worksheets={worksheets} ticket={ticket} />
setShowProjectsModal(false)} ticket={ticket} onUpdated={() => setProjectsRefreshKey((k) => k + 1)} />
)
diff --git a/src/hooks/useWorksheets.js b/src/hooks/useWorksheets.js
index 3777d9a..ac0bbe8 100644
--- a/src/hooks/useWorksheets.js
+++ b/src/hooks/useWorksheets.js
@@ -462,24 +462,6 @@ export function useWorksheets(woid = null) {
}, {})
}, [worksheets])
- /**
- * Gibt die Status-Historie zurück (chronologisch)
- */
- const getStatusHistory = useCallback(() => {
- return worksheets
- .filter(ws => ws.oldStatus && ws.newStatus)
- .map(ws => ({
- wsid: ws.wsid,
- date: ws.startDate,
- time: ws.startTime,
- employee: ws.employeeName,
- from: ws.oldStatus,
- to: ws.newStatus,
- details: ws.details
- }))
- .reverse() // Älteste zuerst
- }, [worksheets])
-
return {
worksheets,
loading,
@@ -491,7 +473,6 @@ export function useWorksheets(woid = null) {
refresh: fetchWorksheets,
getTotalTime,
getWorksheetsByEmployee,
- getStatusHistory,
calculateTime
}
}
diff --git a/src/pages/TicketsPage.jsx b/src/pages/TicketsPage.jsx
index 09b1233..4859b2a 100644
--- a/src/pages/TicketsPage.jsx
+++ b/src/pages/TicketsPage.jsx
@@ -1,11 +1,10 @@
import { useEffect, useState } from 'react'
import { useSearchParams } from 'react-router-dom'
-import { FaAngleDown, FaSpinner, FaPlus, FaList, FaSliders } from 'react-icons/fa6'
+import { FaAngleDown, FaSpinner, FaPlus, FaSliders } from 'react-icons/fa6'
import { useWorkorders } from '../hooks/useWorkorders'
import { useCustomers } from '../hooks/useCustomers'
import TicketCard from '../components/TicketCard'
import CreateTicketModal from '../components/CreateTicketModal'
-import QuickOverviewModal from '../components/QuickOverviewModal'
import { PageHeader, Card, Button, EmptyState } from '../components/ui'
// Alle Ticket-Status; "Closed" gilt als archiviert und ist standardmaessig ausgeblendet
@@ -34,7 +33,6 @@ export default function TicketsPage() {
const { customers } = useCustomers()
const [showCreateModal, setShowCreateModal] = useState(false)
- const [showOverviewModal, setShowOverviewModal] = useState(false)
const [showAdvanced, setShowAdvanced] = useState(false)
const [searchParams] = useSearchParams()
@@ -82,7 +80,6 @@ export default function TicketsPage() {
subtitle="Alle Arbeitsauftraege auf einen Blick"
actions={
<>
-
>
@@ -160,7 +157,6 @@ export default function TicketsPage() {
)}
setShowCreateModal(false)} onCreate={handleCreate} customers={customers} />
- setShowOverviewModal(false)} workorders={workorders} />
)
}