delete job after job details template is destroyed