Enhance department management: add department name display in cache cards, update navigation to include selected department, and improve department selection in map screen.

This commit is contained in:
bobbert committed 2026-04-09 12:49:05 +01:00
1 parent dd5dd83737
commit 43c8bb2bff
5 files changed
+121 -9

No files matched your search

+11 -2
View File
@@ -43,7 +43,9 @@ const useGameHook = () => {
// Look up a group by its Organisation Join Code
const getGroupByOrgCode = async (code) => {
const response = await API.get(`${groupsEndpoint}?OrgJoinCode=${code}`);
const normalizedCode = String(code || '').trim().toUpperCase();
if (!normalizedCode) return null;
const response = await API.get(`${groupsEndpoint}?OrgJoinCode=${encodeURIComponent(normalizedCode)}`);
if (response.isSuccess && response.result.length > 0) return response.result[0];
return null;
};
@@ -76,7 +78,14 @@ const useGameHook = () => {
// Subgroup members
const joinPrivateGame = async (payload) => {
const response = await API.post(subgroupMembersEndpoint, payload);
const data = {
JoinCode: payload.JoinCode,
Uid: payload.Uid,
};
if (payload.ExpectedGid !== undefined && payload.ExpectedGid !== null) {
data.ExpectedGid = payload.ExpectedGid;
}
const response = await API.post(subgroupMembersEndpoint, data);
return response.isSuccess ? response.result : null;
};