Notice of non-renewal of contract

My employer informed me in writing not to renew my employment contract. But, my contract expired on October 10, 2020, while I received the letter of non-renewal on October 21, 2020. In addition, I was not informed about the decision in advance. Moreover, I did not have a valid justification from him. In the letter, my employer asked me to leave the company on January 21, 2021. Knowing that my family visa expired on the same day of the expiry of my contract, that is October 10, 2020, I found myself and my family in an illegal situation by staying without visas. I wonder if this is an arbitrary dismissal? Should my employer renew my family visa until January 21, 2021?
Thanks

You can seek advice with the Ministry of Manpower. https://www.manpower.gov.om/
I wish you all the best.