@niccole2011 In general I think you handled fine. The other dad didn't really have his act together it seems. The dad behaving like this is also a sign that this might not be the first time.
However, did you ask the boy or your girl WHY he slapped your child?
There might not have been any reasonable answer, but if yes, then this would be relevant. Even if no one should hit, especially someone younger and weaker. However, also no one should say mean things for example, so if you don't know the background you might have missed an educational opportunity.
To be clear, I am not accusing your daughter anything. However, I was teased a lot in kindergarden and school and I experienced that parents and teachers often value peace more than fairness. They don't have the energy and time to dig into each conflict, but imo when there is an opportunity it should be clarified what the conflict was about.
If I was the dad in question I would have made sure my son gets the message from me as well that it's not OK to hit. However I would have also asked him why he did it. And if it turned out that your daughter said something mean or hurtful to him I would have had some words with you as well.
That said: I think there probably wasn't anything hurtful that your daughter has said and the other kid was just an asshole. The dad's reaction is a giveaway, because he just asserts that your daughter "has earned it" without honestly trying to investigate. If that was the case and the father is unwilling to properly discipline his kid then I would try to distance myself and my child from them and if it happens again I would escalate it.