Although infinitezero gave a correct answer, I want to provide some further information on the order of German sentences:
When you want to decide on the order of a German (just like in an English) sentence, you can ask yourself:
To what question would this be the answer?
To make this more clear, let us look at the second part of your sentence (I replaced gemacht with gefeiert):
Sie hat eine Party mit ihren Freunden gefeiert.
I will provide some examples of questions and aswers, with the cursive word being the emphasized one:
Wer hat eine Party mit ihren Freunden gefeiert?
Sie hat eine Party mit ihren Freunden gefeiert.
Mit wem hat sie eine Party gefeiert?
Mit ihren Freunden hat sie eine Party gefeiert.
Was hat sie mit ihren Freunden gefeiert?
Eine Party hat sie mit ihren Freunden gefeiert.
Was hat sie mit der Party mit ihren Freunden gemacht?
Gefeiert hat sie die Party mit ihren Freunden.
Note that the last example is a bit dumb, no one would ask this, obviously.
If we generalize this to more 'complex' sentences like yours above, the questions might get more complex (and confusing) as well:
Wann hat sie was mit ihren Freunden gemacht?
Als sie eine neue Stelle bekommen hat, hat sie eine Party mit ihren Freunden gefeiert.
Wann hat sie mit wem eine Party gefeiert?
Als sie eine neue Stelle bekommen hat, hat sie mit ihren Freunden eine Party gefeiert.
Mit wem hat wer was wann gemacht?
Mit ihren Freunden hat sie eine Party gefeiert, als sie eine neue Stelle bekam.
The questions are not uniquely identified. There might be various questions asked that require the same answer. The examples were only given to visualize my point.
If this went a bit too deep, you don't need to find the exact question to every sentence. What you should take from my answer is that the order of words in a German sentence is very flexible, just like it is in English. There are few combinations for which you can't find a proper question like I did above.
So if you are writing a sentence just quickly think about what should be emphasized in the sentence, what is the most important point. Then add the rest of information in order of importance.
I hope this didn't get too confusing, please come back at me if you have questions regarding my answer.