He wants to seek compensation from his workplace which dismissed him unfairly, resulting in harm for him
Question

I was working in an Islamic bank, and I was dismissed unfairly, but this dismissal took place when they were having some financial troubles in one of their branches, as a result of which a number of employees were dismissed wrongfully, I was not aware of the problem, but they included my name on the list of those who were to be dismissed, then the problem was solved and the matter was settled. This led to my reputation being damaged. I sent them messages more than once, asking about the reason for my dismissal, but I received no response. So I filed a case against them. The lawyer confirmed to me that according to the labour laws, I could get compensation for two years to start with, and I could also seek financial compensation for damage to my reputation and standing. Is this permissible?
Praise be to Allah.Firstly:
With regard to financial compensation for intangible harm and undermining of one’s standing to which a person is subjected, nothing about it has been narrated from the early scholars, which may indicate that they thought that it is not permissible to accept financial compensation for that.
It says in al-Mawsoo‘ah al-Fiqhiyyah (13/40): Compensation for intangible harm:
We could not find anyone among the fuqaha’ who discussed this issue; rather this is a novel issue. We could not find in the books of fiqh a report of any of the fuqaha’ speaking about financial compensation for any kind of intangible harm or damage to one’s standing. End quote. Based on that, it is not permissible to seek financial compensation for damage to one’s standing, even if it is supported by the labour laws.
The ruler or whoever is in a position of authority and acts on behalf of the ruler should penalize the transgressor and impose a discretionary punishment, as he deems appropriate to serve the interest and restore the standing of the one who has been wronged.
Secondly:
With regard to your saying that you were dismissed unfairly and that your name was included in the list of those who were to be dismissed wrongfully, this is not an issue for which you should seek a religious ruling; rather you should examine this dismissal and these procedures in accordance with the clauses of the contract between you and the company, and within the framework of labour laws and regulations that are not contrary to Islamic teachings. This requires listening to both parties and judging between them.
If we assume that you were dismissed wrongfully and that the company had no right to dismiss you from your job, then you have the right to receive payment for what remained of your contract.
So if your contract with the company was for two years, for example, and one year had passed with one year remaining, then you are entitled to take the salary of a full year, which is the outstanding period. That is because the employment contract is a binding contract which it is not permissible for either of the two parties to cancel except for a reason that makes doing so permissible. If there is no such reason, then the contract is binding; it must be completed and adhered to.
And Allah knows best.