Рейтинг: ввод деталей партии и предупреждения в формах

Форма завершения и правка результатов (MatchDetailPage): у каждого игрока
в PlaceEditor поля «цели» и «миры» на конец партии (у выбывшего миры
заблокированы нулём), общий блок «Итог партии» — причина победы и раунд
окончания из max_rounds партии. Всё новое уходит в общий черновик.
Причина «последний выживший» ставится сама при одном невыбывшем, выбор
заблокирован; вернули второго — причина сбрасывается и её нужно выбрать.
То же в админской правке партии.

Предупреждения (domain/finishWarnings.ts, отправку не блокируют): тип победы
и цели/миры лидеров не согласуются, досрочный конец без N целей у победителя,
у соперника целей больше, чем у победителя. Настройки группы: переключатель
«9 раундов при 5–6 игроках» через PATCH /groups/{id}. schema.d.ts
перегенерирован. #23

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqSoRj99iwVEH5U5fnZgsd
This commit is contained in:
2026-09-14 22:45:25 +03:00
co-authored by Claude Opus 5
parent 6ea4a67672
commit cc64bb4644
10 changed files with 683 additions and 130 deletions
+70 -15
View File
@@ -377,8 +377,11 @@ export interface paths {
delete?: never;
options?: never;
head?: never;
/** Rename Group */
patch: operations["rename_group_api_groups__group_id__patch"];
/**
* Update Group
* @description Название и домашние правила группы; меняются только переданные поля.
*/
patch: operations["update_group_api_groups__group_id__patch"];
trace?: never;
};
"/api/groups/{group_id}/expansions": {
@@ -1307,7 +1310,7 @@ export interface components {
/** Duration Minutes */
duration_minutes?: number | null;
/** Win Reason */
win_reason?: ("objectives" | "worlds" | "plastic" | "resources") | null;
win_reason?: ("objectives" | "worlds" | "plastic" | "resources" | "last_standing") | null;
/** Player Count */
player_count: number;
/** Created By */
@@ -1576,6 +1579,11 @@ export interface components {
* @default []
*/
expansion_ids: number[];
/**
* Nine Rounds Rule
* @default false
*/
nine_rounds_rule: boolean;
};
/** GroupExpansionsUpdate */
GroupExpansionsUpdate: {
@@ -1585,11 +1593,6 @@ export interface components {
*/
expansion_ids: number[];
};
/** GroupRename */
GroupRename: {
/** Name */
name: string;
};
/** GroupStats */
GroupStats: {
/** Group Id */
@@ -1621,6 +1624,13 @@ export interface components {
/** Min Games */
min_games: number;
};
/** GroupUpdate */
GroupUpdate: {
/** Name */
name?: string | null;
/** Nine Rounds Rule */
nine_rounds_rule?: boolean | null;
};
/** HTTPValidationError */
HTTPValidationError: {
/** Detail */
@@ -1730,7 +1740,9 @@ export interface components {
* Win Reason
* @enum {string}
*/
win_reason: "objectives" | "worlds" | "plastic" | "resources";
win_reason: "objectives" | "worlds" | "plastic" | "resources" | "last_standing";
/** End Round */
end_round?: number | null;
/** Overall Comment */
overall_comment?: string | null;
/** Expected Version */
@@ -1761,9 +1773,25 @@ export interface components {
[key: string]: string;
};
/** Win Reason */
win_reason?: ("objectives" | "worlds" | "plastic" | "resources") | null;
win_reason?: ("objectives" | "worlds" | "plastic" | "resources" | "last_standing") | null;
/** Overall Comment */
overall_comment?: string | null;
/** End Round */
end_round?: number | null;
/**
* Objectives
* @default {}
*/
objectives: {
[key: string]: number;
};
/**
* Worlds
* @default {}
*/
worlds: {
[key: string]: number;
};
};
/** MatchFinishDraftRead */
MatchFinishDraftRead: {
@@ -1790,6 +1818,10 @@ export interface components {
comment?: string | null;
/** Faction Id */
faction_id?: number | null;
/** Objectives */
objectives?: number | null;
/** Worlds */
worlds?: number | null;
};
/**
* MatchHistory
@@ -1844,7 +1876,7 @@ export interface components {
/** Duration Minutes */
duration_minutes?: number | null;
/** Win Reason */
win_reason?: ("objectives" | "worlds" | "plastic" | "resources") | null;
win_reason?: ("objectives" | "worlds" | "plastic" | "resources" | "last_standing") | null;
/** Player Count */
player_count: number;
/** Overall Comment */
@@ -1878,6 +1910,10 @@ export interface components {
was_random: boolean;
/** Comment */
comment?: string | null;
/** Objectives */
objectives?: number | null;
/** Worlds */
worlds?: number | null;
};
/** MatchParticipantRead */
MatchParticipantRead: {
@@ -1900,6 +1936,10 @@ export interface components {
was_random: boolean;
/** Comment */
comment?: string | null;
/** Objectives */
objectives?: number | null;
/** Worlds */
worlds?: number | null;
/** Avatar Url */
avatar_url?: string | null;
};
@@ -1923,7 +1963,16 @@ export interface components {
/** Duration Minutes */
duration_minutes?: number | null;
/** Win Reason */
win_reason?: ("objectives" | "worlds" | "plastic" | "resources") | null;
win_reason?: ("objectives" | "worlds" | "plastic" | "resources" | "last_standing") | null;
/** End Round */
end_round?: number | null;
/**
* Nine Rounds Rule
* @default false
*/
nine_rounds_rule: boolean;
/** Max Rounds */
max_rounds: number;
/** Player Count */
player_count: number;
/** Overall Comment */
@@ -1956,7 +2005,9 @@ export interface components {
/** Overall Comment */
overall_comment?: string | null;
/** Win Reason */
win_reason?: ("objectives" | "worlds" | "plastic" | "resources") | null;
win_reason?: ("objectives" | "worlds" | "plastic" | "resources" | "last_standing") | null;
/** End Round */
end_round?: number | null;
/** Participants */
participants?: components["schemas"]["ParticipantInput"][] | null;
/** Expected Version */
@@ -2104,6 +2155,10 @@ export interface components {
was_random: boolean;
/** Comment */
comment?: string | null;
/** Objectives */
objectives?: number | null;
/** Worlds */
worlds?: number | null;
};
/** PasswordChange */
PasswordChange: {
@@ -2987,7 +3042,7 @@ export interface operations {
};
};
};
rename_group_api_groups__group_id__patch: {
update_group_api_groups__group_id__patch: {
parameters: {
query?: never;
header?: never;
@@ -2998,7 +3053,7 @@ export interface operations {
};
requestBody: {
content: {
"application/json": components["schemas"]["GroupRename"];
"application/json": components["schemas"]["GroupUpdate"];
};
};
responses: {