add ajax on deptartment and type