feat: add reserved turns management for generals and nations; enhance command selection UI
This commit is contained in:
@@ -108,6 +108,11 @@ export const loadGeneralTurns = async (db: DatabaseClient, generalId: number): P
|
||||
return buildTurnListFromRows(rows, MAX_GENERAL_TURNS);
|
||||
};
|
||||
|
||||
export const listGeneralTurns = async (db: DatabaseClient, generalId: number): Promise<ReservedTurnView[]> => {
|
||||
const turns = await loadGeneralTurns(db, generalId);
|
||||
return serializeTurnList(turns);
|
||||
};
|
||||
|
||||
export const loadNationTurns = async (
|
||||
db: DatabaseClient,
|
||||
nationId: number,
|
||||
@@ -120,6 +125,15 @@ export const loadNationTurns = async (
|
||||
return buildTurnListFromRows(rows, MAX_NATION_TURNS);
|
||||
};
|
||||
|
||||
export const listNationTurns = async (
|
||||
db: DatabaseClient,
|
||||
nationId: number,
|
||||
officerLevel: number
|
||||
): Promise<ReservedTurnView[]> => {
|
||||
const turns = await loadNationTurns(db, nationId, officerLevel);
|
||||
return serializeTurnList(turns);
|
||||
};
|
||||
|
||||
export const setGeneralTurn = async (
|
||||
db: DatabaseClient,
|
||||
generalId: number,
|
||||
|
||||
Reference in New Issue
Block a user