Obviously no cable connection between the shifters and derailleurs, both front and rear.
- The cable housings may have come out of a frame stop
- The cables may have been snapped, or the ends detached from the shifters or derailleurs
- Cable may have been pulled through derailleur pinch bolts
- There is a possibility that one or both shifting mechanisms in the levers were broken
First follow the shift cable housing from shifter to derailleur and check the housing is firmly inserted into the frame stops. Both front and rear should have stops on the down tube near the head tube, and run though a guide under the bottom bracket shell. The rear cable will have stops on the drive side chain stay.
Check the rear derailleur cable is actually attached to the rear derailleur. (The alloy end cap that fell off just stops the cable fraying, and is easily replaced.)
Pull the cables to tension them and work the shifters to see if they are pulling or paying out cable at all. If not you'll have to inspect the shifter mechanism and see if the cable has snapped in the shifter.
If the shifters do actually pull and pay out cable, I think you may just need to detach the cables from the derailleurs and re-set-up the cable and derailleurs.
Park Tool has good step by step guides: https://www.parktool.com/blog/repair-help/rear-derailleur-adjustment, https://www.parktool.com/blog/repair-help/front-derailleur-adjustment/.