semmelei statistics: Admin endpoint for order positions
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #365 @omikron-agent による — マージ済み
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
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 の本文から書いたものです。
説明
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:
itemanditem_namenull,namekeeps the snapshot - Renamed Items:
item_nameis the current name,namethe snapshot - Moved pickup days report the effective
pickup_date -
dispatchedreflects the Dispatch - HTTP tests through the semmelei test harness (prior art: procurement and items tests)
-
just gen-api semmeleiregenerated and committed with the endpoint
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 1
- 平均マージ
- 9時間 39分
- マージ済み PR(30日)
- 144
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
myOmikron/code のほかの issue
-
wayfinder:task
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
wayfinder:task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
myOmikron/code#102 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 4/5 3〜5日 初心者へのやさしさ 39/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
components-web-app/docs#307 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
localstack/localstack-mcp-server#112 ·
メンテナーはふだん 1 日以内に返信
-
area:frontend kind:bug priority:p1 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
PhyberApex/kuroshiro#1687 ·
メンテナーはふだん 1 日以内に返信
-
Performance (Web Vitals) collector: LCP/FCP from background tabs are not discarded, inflating p75オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
umami-software/umami#4720 ·
メンテナーはふだん 3 日以内に返信