feat: Add monthly activity fetching and improve activity listing
- Introduced a new query parameter for the activity listing endpoint to fetch entries by calendar month (format: YYYY-MM), excluding days and offset. - Implemented backend validation for the month parameter to ensure correct format and range. - Enhanced the frontend to support month selection, allowing users to load activities for specific months and dynamically update the displayed entries. - Improved the user interface to show the selected month and the range of loaded months, enhancing user experience.
This commit is contained in:
1 parent
9fdb02ff8b
commit
f718785145
3 files changed
+156
-43
No files matched your search
@@ -141,11 +141,12 @@ export const api = {
|
||||
/**
|
||||
* @param {number} [limit=200]
|
||||
* @param {number} [days] nur Einträge ab HEUTE−days (Kalendertage), backend-filtert
|
||||
* @param {{ offset?: number, skipQualityFilter?: boolean }} [opts]
|
||||
* @param {{ offset?: number, skipQualityFilter?: boolean, month?: string }} [opts] month = YYYY-MM (schließt days/offset aus)
|
||||
*/
|
||||
listActivity: (limit=200, days, opts={})=> {
|
||||
const q = new URLSearchParams({ limit: String(limit) })
|
||||
if (days != null && days !== '') q.set('days', String(days))
|
||||
if (opts.month) q.set('month', String(opts.month))
|
||||
if (opts.offset != null && opts.offset > 0) q.set('offset', String(opts.offset))
|
||||
if (opts.skipQualityFilter) q.set('skip_quality_filter', 'true')
|
||||
return req(`/activity?${q}`)
|
||||
|
||||
Reference in new issue
Block a user