Dishwasher problem

The cover on my detergent dispensor would not close. I tried to force it to close and the lever to close it broke. does anyone know what the problem would be–what the parts I would need to fix? Thanks