Added toggle logic for edit and generate report buttons