From 94bb96d2081724f3da426c003cec7caba5dcadd9 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sun, 10 Jul 2022 20:50:33 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B6=80=EB=8C=80=EC=9E=A5=20=EB=B0=9C?= =?UTF-8?q?=EB=A0=B9=20=EC=8B=9C=20=EB=B6=80=EB=8C=80=EC=9E=A5=20=EB=8C=80?= =?UTF-8?q?=EC=8B=A0=20=EB=B6=80=EB=8C=80=20=EC=9D=B4=EB=A6=84=20=ED=91=9C?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../API/NationCommand/GetReservedCommand.php | 17 ++++++-- hwe/ts/PageChiefCenter.vue | 18 +++++++- hwe/ts/components/ChiefReservedCommand.vue | 43 +++++++++++++++++-- hwe/ts/defs/API/NationCommand.ts | 1 + 4 files changed, 69 insertions(+), 10 deletions(-) diff --git a/hwe/sammo/API/NationCommand/GetReservedCommand.php b/hwe/sammo/API/NationCommand/GetReservedCommand.php index c6cbab42..585e8e79 100644 --- a/hwe/sammo/API/NationCommand/GetReservedCommand.php +++ b/hwe/sammo/API/NationCommand/GetReservedCommand.php @@ -63,9 +63,9 @@ class GetReservedCommand extends \sammo\BaseAPI $nationTurnList = []; foreach ($db->queryAllLists( - 'SELECT officer_level, turn_idx, action, arg, brief FROM nation_turn WHERE nation_id = %i ORDER BY officer_level DESC, turn_idx ASC', - $me['nation'] - ) as [$officer_level, $turn_idx, $action, $arg, $brief]) { + 'SELECT officer_level, turn_idx, action, arg, brief FROM nation_turn WHERE nation_id = %i ORDER BY officer_level DESC, turn_idx ASC', + $me['nation'] + ) as [$officer_level, $turn_idx, $action, $arg, $brief]) { if (!key_exists($officer_level, $nationTurnList)) { $nationTurnList[$officer_level] = []; } @@ -76,6 +76,14 @@ class GetReservedCommand extends \sammo\BaseAPI ]; } + $troopList = []; + foreach ($db->queryAllLists( + 'SELECT troop_leader, `name` FROM troop WHERE `nation` = %i', + $nationID + ) as [$troopID, $troopName]) { + $troopList[$troopID] = $troopName; + } + $nationChiefList = []; foreach ($nationTurnList as $officer_level => $turnBrief) { @@ -111,7 +119,8 @@ class GetReservedCommand extends \sammo\BaseAPI 'turnTerm' => $turnTerm, 'date' => TimeUtil::now(true), 'chiefList' => $nationChiefList, - 'isChief'=>($me['officer_level'] > 4), + 'troopList' => $troopList, + 'isChief' => ($me['officer_level'] > 4), 'autorun_limit' => $generalObj->getAuxVar('autorun_limit'), 'officerLevel' => $me['officer_level'], 'commandList' => getChiefCommandTable($generalObj), diff --git a/hwe/ts/PageChiefCenter.vue b/hwe/ts/PageChiefCenter.vue index 87032991..923a4efa 100644 --- a/hwe/ts/PageChiefCenter.vue +++ b/hwe/ts/PageChiefCenter.vue @@ -2,7 +2,7 @@
-
+