| Conditions | 5 | 
| Paths | 5 | 
| Total Lines | 22 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | var deptData = null;  | 
            ||
| 3 | function getDepartmentDone(jqXHR)  | 
            ||
| 4 | { | 
            ||
| 5 | if(jqXHR.status !== 200 || jqXHR.responseJSON === undefined)  | 
            ||
| 6 |     { | 
            ||
| 7 |         alert('Unable to obtain department!'); | 
            ||
| 8 | return;  | 
            ||
| 9 | }  | 
            ||
| 10 | var data = jqXHR.responseJSON;  | 
            ||
| 11 | deptData = data;  | 
            ||
| 12 |     $('#departmentNameRO').append(data.departmentName); | 
            ||
| 13 |     $('#departmentName').val(data.departmentName); | 
            ||
| 14 | if(data.description !== undefined)  | 
            ||
| 15 |     { | 
            ||
| 16 |         $('#description').val(data.description); | 
            ||
| 17 | }  | 
            ||
| 18 | if(data.public)  | 
            ||
| 19 |     { | 
            ||
| 20 |         $('#public').prop('checked', true); | 
            ||
| 21 |         $('#privateDept').hide(); | 
            ||
| 22 | }  | 
            ||
| 23 | console.log(data);  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 24 | }  | 
            ||
| 25 | |||
| 66 |