@Maitu, as an employer i kind of feel you did not take your work seriously, i think you should have redone the temporary one until things are sorted, plus in one of your updates you say you decided to go home since you had other matters to attend to. am sure this was against your employers wishes, i think you need to think through this carefully and make correct judgement as per what i see here is rudeness from an employee, this should never be tolerated in work place, i suspect they must have used you to be an example to other employees who might think they are indispensable. i have a feeling you will loose this case in court with/out good lawyer.
I suggest you run your business and see how it is hard to employ humans, you will soon understand why they fired you. rgds