Preheat the oven to 180°C (gas mark 4).
Peel the potatoes and slice them into 5 mm-thick rounds.
Peel the onion and thinly slice it.
Thinly slice the garlic cloves and, if using, cut the red pepper into thin strips.
Heat a splash of extra virgin olive oil in a large ovenproof frying pan over medium heat.
Add the potatoes, onion, garlic and red pepper (if using), then season with salt and freshly ground black pepper.
Cook gently over medium–low heat for 15–20 minutes, stirring occasionally, until the potatoes are just tender but haven’t coloured.
Make small wells in the vegetables and place the cod loins in them, skin-side up.
Pour the dry white wine (or fish stock) and water around the edges of the pan.
Transfer the pan to the oven and bake for 15–20 minutes, until the cod is opaque and flakes easily with a fork.
Remove from the oven and scatter over freshly chopped parsley.
Serve immediately.