I'm having problem translating this sentence
正直な人が損をするようなことは、あってはいけない.
and more importantly I want to know what ”ような” means exactly in this context, please give me a short example of ”ような” if possible. I'm also curious what "あって" means too.
Sorry to bother and thanks in advance.