Preparation was barely done.

Literal

Preparation [subject-が] almost do-done was-not.

ほとんど + negative ('almost not / barely') is a high-frequency frequency-adverb-plus-negative pattern. 出来ていなかった is 出来る ('be ready / be done') + ~ていた (past state) + negative, forming 'had not been done / was not ready.'