如果是团队赛且 赛项直接晋级不进入记分页面
This commit is contained in:
@@ -127,6 +127,7 @@ class EventRegistrationItem {
|
|||||||
required this.itemName,
|
required this.itemName,
|
||||||
required this.groupName,
|
required this.groupName,
|
||||||
required this.matchPlace,
|
required this.matchPlace,
|
||||||
|
required this.allowByeMatch,
|
||||||
|
|
||||||
this.matchStartTime = '',
|
this.matchStartTime = '',
|
||||||
this.matchEndTime = '',
|
this.matchEndTime = '',
|
||||||
@@ -154,6 +155,7 @@ class EventRegistrationItem {
|
|||||||
final String opponentName;
|
final String opponentName;
|
||||||
final List<EventTeamMember> teamMembers;
|
final List<EventTeamMember> teamMembers;
|
||||||
final String playerNo;
|
final String playerNo;
|
||||||
|
final int allowByeMatch;
|
||||||
|
|
||||||
/// 来自报名列表父级,不在 item JSON 内
|
/// 来自报名列表父级,不在 item JSON 内
|
||||||
final String userId;
|
final String userId;
|
||||||
@@ -202,6 +204,7 @@ class EventRegistrationItem {
|
|||||||
userId: userId,
|
userId: userId,
|
||||||
playerName: playerName,
|
playerName: playerName,
|
||||||
playerNo: _readString(map, const ['playerNo']),
|
playerNo: _readString(map, const ['playerNo']),
|
||||||
|
allowByeMatch: _readInt(map, const ['allowByeMatch']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ class _EventInfoPageState extends ConsumerState<EventInfoPage> {
|
|||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
CompetitionTeamDetail? detail;
|
CompetitionTeamDetail? detail;
|
||||||
if (item.opponentId.isNotEmpty && item.opponentId != '0') {
|
if (item.opponentId.isNotEmpty && item.opponentId != '0') {
|
||||||
|
// allowByeMatch = 0 (直接晋级)
|
||||||
|
// allowByeMatch = 1 (和败方对战)
|
||||||
|
// allowByeMatch = -1 (个人赛不适用此配置,所以 = -1)
|
||||||
|
if (item.allowByeMatch == 0) {
|
||||||
|
AppToast.show('本场比赛允许轮空');
|
||||||
|
return;
|
||||||
|
}
|
||||||
detail = await ref
|
detail = await ref
|
||||||
.read(competitionTeamsServerProvider)
|
.read(competitionTeamsServerProvider)
|
||||||
.fetchTeamDetail(
|
.fetchTeamDetail(
|
||||||
@@ -51,6 +58,14 @@ class _EventInfoPageState extends ConsumerState<EventInfoPage> {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
await ref
|
||||||
|
.read(competitionTeamsServerProvider)
|
||||||
|
.fetchTeamDetail(
|
||||||
|
itemId: item.itemId,
|
||||||
|
eventId: item.eventId,
|
||||||
|
scheduleId: item.scheduleId,
|
||||||
|
opponentId: item.opponentId,
|
||||||
|
);
|
||||||
|
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user