mNo edit summary
 
No edit summary
 
Line 1: Line 1:
local p = {}
{{Person/Commendation
local cargo = mw.ext.cargo
|Date=2021/02/12
 
|Recipient=Lucia Dufaux (500459)
local x =
|Commendation=Veteran's Ribbon
{
|Submitted_by=Command
    { "", "", "Hero of the Federation", "", "" },
|Details=Awarded to Spc L. Dufaux following the successful completion of her 2-year tour of duty while posted to 2nd Battalion, Bravo Company, 3rd Platoon "Orgylla's Onis"
    { "MIPOD", "Medic", "Trooper", "Engineer", "Aviator" },
|Approved=Yes
    { "Corporal", "Sergeant", "Commanding Officer", "Marauder", "Pathfinder" },
|Awarded=Yes
    { "M.I. Bronze Star", "M.I. Cross", "Medal of Valour", "Legion of Merit", "M.I. Silver Star" },
}}
    { "Superior Command Commendation", "Distinguished Service Commendation", "Veterans Commendation", "Prisoner of War Commendation", "Emergency First Aid Commendation" },
    { "Professional Development Commendation", "Meritorious Service Commendation", "Good Conduct Commendation", "Humanitarian Aid Commendation", "M.I. Reconnaissance Commendation" },
    { "Combat Commendation", "PsyOps Accomplishment Commendation", "Medical Accomplishment Commendation", "Engineering Accomplishment Commendation", "Purple Heart" },
    { "", "", "Veteran's Ribbon", "", "" },
    { "Operation Big K Pin", "", "", "", "" }
}
 
function p.Main( frame )
    local t = {}
    local tables = 'Commendations'
    local fields = 'Commendation, COUNT(*)'
 
    local args = {
        groupBy = 'Commendation',
        where = 'Recipient = "' .. frame.args[1] .. '" AND Approved = true'
    }
 
    local results = cargo.query( tables, fields, args )
    local groups = {}
   
    for r = 1, #results do
        local r = results[r]
        groups[r.Commendation] = r["COUNT(*)"]
    end
   
    table.insert(t, "<table class='citations-table'>")
    for k, r in pairs(x) do
 
        if k == 1 then
            table.insert(t, "<tr class='first'>")
        else
            table.insert(t, "<tr>")
        end
 
        for k2, v in pairs(r) do
            local g = groups[v]
            table.insert(t, "<td>")
            if v ~= "" then
                table.insert(t,
                                frame:expandTemplate({title = "Commendation", args = { v, v .. ".png", (g or 0) } })
                )
            end
            table.insert(t, "</td>")
        end
        table.insert(t, "</tr>")
    end
    table.insert(t, "</table>")
    return table.concat(t, '')
end
 
return p

Revision as of 11:42, 9 January 2023



< Lucia Dufaux (500459)/C3

Date 2021/02/12
Recipient Lucia Dufaux (500459)
Commendation Veteran's Ribbon
Submitted By Command
Approved Yes
Awarded Yes
Details Awarded to Spc L. Dufaux following the successful completion of her 2-year tour of duty while posted to 2nd Battalion, Bravo Company, 3rd Platoon "Orgylla's Onis"


Categories: