The first generation Nissan Leaf was released in 2010. This is ZE0. I will not consider this version. Let me just mention that the charging module was located behind the rear seats.
There was a big redesign in 2013, and since then it has been a completely different Leaf - AZE0, at least from an electrical point of view. AZE0 can be distinguished from the older ZE0 version by the absence of an electronic brake between the driver and passenger seats (the place where the handbrake is usually located). In the AZE0 it's substituted by a separate parking brake pedal (third pedal).
If you are buying an old Nissan Leaf, then it is better to take the AZE0 - the electrical part is upgraded (You will have 6.6 kW onboard charger instead of 3.3 kW and the charger is more reliable). Also, it is easier to upgrade the battery for AZE0.
Where are the charging unit and inverter located?
For the AZE0 and ZE1 generation, everything is located under the hood and is attached to the engine and gearbox block. What at first glance looks like a large monolithic motor is actually three blocks: a motor with a gearbox, a charging unit, and an inverter (converts direct current into a frequency signal supplied to the motor).
There is a very good video of engine disassembly of a Nissan Leaf, which shows where everything is located.