Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

semmelei statistics: Admin endpoint for order positions

Abierto
#352 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Read the specification in #351, especially “Implementation Decisions,” then inspect the existing semmelei admin routes and models; the issue names procurement and items HTTP tests as prior art. Implement the endpoint and test its authorization, period-union, and response cases through the semmelei test harness, then run just gen-api semmelei and commit the generated API output.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

ready-for-agent

Part of #351 (spec). Read the spec first; this ticket covers its backend part.

What to build

An Admin-only endpoint that returns the order positions for a period, as described in #351 "Implementation Decisions".

Contract (frontend tickets build against this)

GET an admin statistics route (e.g. /admin/statistics/positions), query from and to: dates, inclusive, meant as Europe/Berlin calendar days.

A position is returned when its order was placed within [from 00:00, to+1 00:00) Europe/Berlin or its pickup day's effective pickup date lies within [from, to].

Response { positions: StatisticsPosition[] }, snake_case like the other admin schemas:

field type meaning
order uuid the order, to count orders
ordered_at datetime point in time the order was placed
status OrderStatus the order's status
pickup_date date effective pickup date of the pickup day
deadline datetime the pickup day's Deadline
dispatched bool pickup day has been Dispatched
called_off bool pickup day is Called Off
item uuid or null Item reference, null when the Item was deleted
item_name string or null the Item's current name, null when deleted
category { uuid, name } or null the Item's current category
name string name snapshot at order time
quantity int units ordered
price_cents int price snapshot in euro cents

No schema change: everything is derived from existing models.

Acceptance criteria

  • Verkauf and anonymous requests are rejected; Admins get the data
  • Period union: placed in period, picked up in period, both, neither (excluded)
  • Cancelled orders are returned with their status; orders of Called Off days carry called_off
  • Deleted Items: item and item_name null, name keeps the snapshot
  • Renamed Items: item_name is the current name, name the snapshot
  • Moved pickup days report the effective pickup_date
  • dispatched reflects the Dispatch
  • HTTP tests through the semmelei test harness (prior art: procurement and items tests)
  • just gen-api semmelei regenerated and committed with the endpoint
Lenguaje dominante
TypeScript
Estrellas
0
Forks
1
Merge medio
9 h 53 min
PR fusionados (30 d)
136

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de myOmikron/code

Todos los issues de myOmikron/code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.