She bungled the job and ruined it.

Literal

She [topic-は] blunder [object-を] doing that work [object-を] ended-up-ruining.

へまをする ('to make a blunder, mess up') is a casual idiom — へま is a colloquial noun for a clumsy mistake or screw-up. ~てしまう (and its colloquial contraction ~ちゃう) carries a nuance of 'completion with regret' or 'ended up doing': the action got done, and that's a bad thing. だめにする ('ruin, render useless') uses the な-adjective だめ ('no good') with にする ('make it'). The whole sentence has a rueful, hindsight tone — 'she went and blew it.'