feat: /objednani – skupinové objednávky s QR platbou
CI / Generate TypeScript types (push) Successful in 18s
CI / Generate TypeScript types (pull_request) Successful in 9s
CI / Server unit tests (push) Successful in 21s
CI / Build client (push) Successful in 40s
CI / Server unit tests (pull_request) Successful in 21s
CI / Build server (pull_request) Successful in 24s
CI / Build server (push) Has been cancelled
CI / Playwright E2E tests (push) Has been cancelled
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled
CI / Build client (pull_request) Has been cancelled
CI / Playwright E2E tests (pull_request) Has been cancelled
CI / Build and push Docker image (pull_request) Has been cancelled
CI / Notify (pull_request) Has been cancelled
CI / Generate TypeScript types (push) Successful in 18s
CI / Generate TypeScript types (pull_request) Successful in 9s
CI / Server unit tests (push) Successful in 21s
CI / Build client (push) Successful in 40s
CI / Server unit tests (pull_request) Successful in 21s
CI / Build server (pull_request) Successful in 24s
CI / Build server (push) Has been cancelled
CI / Playwright E2E tests (push) Has been cancelled
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled
CI / Build client (pull_request) Has been cancelled
CI / Playwright E2E tests (pull_request) Has been cancelled
CI / Build and push Docker image (pull_request) Has been cancelled
CI / Notify (pull_request) Has been cancelled
Nahrazuje /vecere novou stránkou /objednani. Místo jednoho OBJEDNAVAM bucketu umožňuje vytvářet více skupin, kde každá objednává z jiného obchodu. - Skupiny mají stavový automat: open → locked → ordered - Obchody spravuje admin heslem (ADMIN_PASSWORD env var) přes modal „Správa obchodů" - Při stavu ordered zakladatel generuje QR kódy platby (nový PayForGroupModal – volné částky bez menu) - PayForAllModal (oběd) upraven: plátce nyní vidí svůj vlastní díl jako informační řádek - Nové testy: stores.test.ts + groups.test.ts (36 testů)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
post:
|
||||
operationId: addGroupMember
|
||||
summary: Přidá uživatele do skupiny (sebe, nebo jiného jako zakladatel).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: ID skupiny
|
||||
type: string
|
||||
login:
|
||||
description: Login uživatele (volitelné — pokud není zadán, přidá přihlášeného uživatele)
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
$ref: "../../api.yml#/components/responses/ClientDataResponse"
|
||||
@@ -0,0 +1,18 @@
|
||||
post:
|
||||
operationId: createGroup
|
||||
summary: Vytvoří novou skupinu objednávky pro aktuální den.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
description: Název obchodu/restaurace (musí být v seznamu povolených obchodů)
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
$ref: "../../api.yml#/components/responses/ClientDataResponse"
|
||||
@@ -0,0 +1,18 @@
|
||||
post:
|
||||
operationId: deleteGroup
|
||||
summary: Smaže skupinu objednávky (pouze zakladatel).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: ID skupiny
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
$ref: "../../api.yml#/components/responses/ClientDataResponse"
|
||||
@@ -0,0 +1,22 @@
|
||||
post:
|
||||
operationId: removeGroupMember
|
||||
summary: Odebere uživatele ze skupiny (sebe, nebo jiného jako zakladatel).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- login
|
||||
properties:
|
||||
id:
|
||||
description: ID skupiny
|
||||
type: string
|
||||
login:
|
||||
description: Login uživatele k odebrání
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
$ref: "../../api.yml#/components/responses/ClientDataResponse"
|
||||
@@ -0,0 +1,21 @@
|
||||
post:
|
||||
operationId: setGroupState
|
||||
summary: Změní stav skupiny (pouze zakladatel).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- state
|
||||
properties:
|
||||
id:
|
||||
description: ID skupiny
|
||||
type: string
|
||||
state:
|
||||
$ref: "../../schemas/_index.yml#/GroupState"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "../../api.yml#/components/responses/ClientDataResponse"
|
||||
@@ -0,0 +1,34 @@
|
||||
post:
|
||||
operationId: updateGroupMember
|
||||
summary: Aktualizuje data člena skupiny (částka, poznámka, příplatek).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- login
|
||||
properties:
|
||||
id:
|
||||
description: ID skupiny
|
||||
type: string
|
||||
login:
|
||||
description: Login člena ke změně
|
||||
type: string
|
||||
amount:
|
||||
description: Částka k úhradě v Kč
|
||||
type: number
|
||||
note:
|
||||
description: Poznámka
|
||||
type: string
|
||||
surchargeText:
|
||||
description: Popis příplatku
|
||||
type: string
|
||||
surchargeAmount:
|
||||
description: Výše příplatku v Kč
|
||||
type: number
|
||||
responses:
|
||||
"200":
|
||||
$ref: "../../api.yml#/components/responses/ClientDataResponse"
|
||||
Reference in New Issue
Block a user