Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

semmelei statistics: Admin endpoint for order positions

クローズ
#352 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #365 @omikron-agent による — マージ済み

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
api, backend, databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
0
フォーク
1
平均マージ
9時間 39分
マージ済み PR(30日)
144

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

myOmikron/code のほかの issue

myOmikron/code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。