move ledger row functionality into directive