If you'd like to prepare the dish in advance, I would recommend assembling it, then storing it in the fridge for a day or so, until you're ready to cook it. Alternatively, you can cook the dish in its entirety, then reheat later.