diff --git a/static/js/components/commandLog.js b/static/js/components/commandLog.js index 04bf466..18a5ae9 100644 --- a/static/js/components/commandLog.js +++ b/static/js/components/commandLog.js @@ -11,9 +11,14 @@ window.renderLog = function(cmds) { const rows = cmds.map(cmd => { const p = typeof cmd.payload === 'string' ? JSON.parse(cmd.payload) : cmd.payload; - const desc = cmd.type === 'build' - ? `Build: ${p.building_id}` - : `Recruit: ${p.amount}x ${p.unit_id}`; + let desc = ''; + if (cmd.type === 'build') { + desc = `Build: ${p.building_id}`; + } else if (cmd.type === 'recruit') { + desc = `Recruit: ${p.amount}x ${p.unit_id}`; + } else if (cmd.type === 'market_offer') { + desc = `Market: ${p.offer} ${p.offer_type} ➞ ${p.demand} ${p.demand_type}`; + } const statusClass = `status-${cmd.status}`; const cancelBtn = ``;