Updated Leaves Management function by Dang Duc Hung