This happened to me. I managed to get it covered by insurance but I had to send it to Apple to be repaired. Cost about 400 euros I think. I tried soldering it first and it worked for a while. I think if you open the laptop and do a good job of soldering the loose part back to the board it will be fine. Be careful though
Dave.