There's nothing grammatically wrong with "have a nice rest." We typically say "have a good night" or "hope you have a good weekend" depending on when we'll be seeing or talking to that person again. "talk to you later" is also used but i would say that is a lot more informal.