We have already explained the ruling on taking part in building resorts which include free mixing, wanton display (tabarruj), immorality and alcohol, and we have stated that this is not permissible because it involves cooperating in sin and transgression. See the answer to question no. 47513.
This is the basic principle on which such matters are based. Everything which involves cooperating in sin and transgression is haraam, and it is not permissible to work in the finishing or construction of a disco or place for drinking alcohol, or a gambling hall, or a dance hall. Taking part in such things is taking part in sin and transgression. Similarly it is not permissible to sell or rent out places that will be used for sinful purposes.
It seems that there is a difference between hotels that are built in cities and those which are built in resorts. Hotels in cities are usually used as places to live or to stay in and rest; they are not intended for sinful purposes in most cases, unlike the hotels that are built in resorts, where it seems that those who travel to them do so for the sake of the immorality and deviation that exists therein.
Similarly, if the apartment includes a room that is to be used for haraam purposes, such as drinking alcohol, then it is not permissible to help with building or finishing this room, but it is permissible with regard to the rest of it.
You should note that there are many means of earning a halaal provision, and whoever gives up something for the sake of Allaah, Allaah will compensate him with something better than it. So be certain of that, and seek to please Allaah in all that you do, and beware of doubtful matters so that your religious commitment and honour will be safe.
And Allaah knows best.