Team-Eingang: Gutschriften, Angebote, E-Mail-Speicher und Funktionen fuer alle Mitarbeiter, Kundenfilter, Zaehlroute
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a06c3bc8ef
commit
7d93ae0cd9
5 files changed
+129
-2
No files matched your search
@@ -124,7 +124,10 @@ takeoverAdminRouter.get('/', async (req, res) => {
|
||||
])
|
||||
const byId = new Map(customers.map((c) => [c.$id, c]))
|
||||
const onlyOpen = req.query.status !== 'all'
|
||||
// ?customerId= (Kunden-Reiter im Ticketsystem); openCount zaehlt weiter alle offenen Antraege
|
||||
const customerId = typeof req.query.customerId === 'string' ? req.query.customerId : ''
|
||||
const requests = docs
|
||||
.filter((d) => !customerId || d.customerId === customerId)
|
||||
.filter((d) => !onlyOpen || d.status === STATUS.open || d.status === STATUS.question)
|
||||
.map((d) => {
|
||||
const c = byId.get(d.customerId)
|
||||
|
||||
Reference in new issue
Block a user