@@ -1371,12 +1371,12 @@ public async Task<IActionResult> CallExportEx(string query)
13711371 var model = new CallExportView ( ) ;
13721372 model . Call = await _callsService . PopulateCallData ( call , true , true , true , true , true , true , true , true , true ) ;
13731373 model . CallLogs = await _workLogsService . GetCallLogsForCallAsync ( call . CallId ) ;
1374- model . Department = await _departmentsService . GetDepartmentByIdAsync ( model . Call . DepartmentId , false ) ;
1375- model . UnitStates = ( await _unitsService . GetUnitStatesForCallAsync ( model . Call . DepartmentId , call . CallId ) ) . OrderBy ( x => x . UnitId ) . OrderBy ( y => y . Timestamp ) . ToList ( ) ;
1376- model . ActionLogs = ( await _actionLogsService . GetActionLogsForCallAsync ( model . Call . DepartmentId , call . CallId ) ) . OrderBy ( x => x . UserId ) . OrderBy ( y => y . Timestamp ) . ToList ( ) ;
1377- model . Groups = await _departmentGroupsService . GetAllGroupsForDepartmentAsync ( model . Call . DepartmentId ) ;
1378- model . Units = await _unitsService . GetUnitsForDepartmentAsync ( DepartmentId ) ;
1379- model . Names = await _departmentsService . GetAllPersonnelNamesForDepartmentAsync ( DepartmentId ) ;
1374+ model . Department = await _departmentsService . GetDepartmentByIdAsync ( call . DepartmentId , false ) ;
1375+ model . UnitStates = ( await _unitsService . GetUnitStatesForCallAsync ( call . DepartmentId , call . CallId ) ) . OrderBy ( x => x . UnitId ) . OrderBy ( y => y . Timestamp ) . ToList ( ) ;
1376+ model . ActionLogs = ( await _actionLogsService . GetActionLogsForCallAsync ( call . DepartmentId , call . CallId ) ) . OrderBy ( x => x . UserId ) . OrderBy ( y => y . Timestamp ) . ToList ( ) ;
1377+ model . Groups = await _departmentGroupsService . GetAllGroupsForDepartmentAsync ( call . DepartmentId ) ;
1378+ model . Units = await _unitsService . GetUnitsForDepartmentAsync ( call . DepartmentId ) ;
1379+ model . Names = await _departmentsService . GetAllPersonnelNamesForDepartmentAsync ( call . DepartmentId ) ;
13801380 model . ChildCalls = await _callsService . GetChildCallsForCallAsync ( call . CallId ) ;
13811381 model . Contacts = await _contactsService . GetAllContactsForDepartmentAsync ( DepartmentId ) ;
13821382
@@ -1400,11 +1400,14 @@ public async Task<IActionResult> CallExportEx(string query)
14001400 var model = new CallExportView ( ) ;
14011401 model . Call = await _callsService . PopulateCallData ( call , true , true , true , true , true , true , true , true , true ) ;
14021402 model . CallLogs = await _workLogsService . GetCallLogsForCallAsync ( call . CallId ) ;
1403- model . Department = await _departmentsService . GetDepartmentByIdAsync ( model . Call . DepartmentId , false ) ;
1404- model . UnitStates = ( await _unitsService . GetUnitStatesForCallAsync ( model . Call . DepartmentId , call . CallId ) ) . OrderBy ( x => x . UnitId ) . OrderBy ( y => y . Timestamp ) . ToList ( ) ;
1405- model . ActionLogs = ( await _actionLogsService . GetActionLogsForCallAsync ( model . Call . DepartmentId , call . CallId ) ) . OrderBy ( x => x . UserId ) . OrderBy ( y => y . Timestamp ) . ToList ( ) ;
1406- model . Groups = await _departmentGroupsService . GetAllGroupsForDepartmentAsync ( model . Call . DepartmentId ) ;
1407- model . Units = await _unitsService . GetUnitsForDepartmentAsync ( model . Call . DepartmentId ) ;
1403+ model . Department = await _departmentsService . GetDepartmentByIdAsync ( call . DepartmentId , false ) ;
1404+ model . UnitStates = ( await _unitsService . GetUnitStatesForCallAsync ( call . DepartmentId , call . CallId ) ) . OrderBy ( x => x . UnitId ) . OrderBy ( y => y . Timestamp ) . ToList ( ) ;
1405+ model . ActionLogs = ( await _actionLogsService . GetActionLogsForCallAsync ( call . DepartmentId , call . CallId ) ) . OrderBy ( x => x . UserId ) . OrderBy ( y => y . Timestamp ) . ToList ( ) ;
1406+ model . Groups = await _departmentGroupsService . GetAllGroupsForDepartmentAsync ( call . DepartmentId ) ;
1407+ model . Units = await _unitsService . GetUnitsForDepartmentAsync ( call . DepartmentId ) ;
1408+ model . Names = await _departmentsService . GetAllPersonnelNamesForDepartmentAsync ( call . DepartmentId ) ;
1409+ model . ChildCalls = await _callsService . GetChildCallsForCallAsync ( call . CallId ) ;
1410+ model . Contacts = await _contactsService . GetAllContactsForDepartmentAsync ( DepartmentId ) ;
14081411
14091412 if ( ! String . IsNullOrWhiteSpace ( items [ 2 ] ) && items [ 2 ] != "0" )
14101413 {
0 commit comments