diff --git a/src/components/Departments/DepartmentDetailComponent.jsx b/src/components/Departments/DepartmentDetailComponent.jsx index 198f940c..4efd1f72 100644 --- a/src/components/Departments/DepartmentDetailComponent.jsx +++ b/src/components/Departments/DepartmentDetailComponent.jsx @@ -19,7 +19,7 @@ export class DepartmentDetailComponent extends React.Component { assetsAssigned = (assets) => { - if (isEmpty(assets.assets_assigned)) { + if (isEmpty(assets.assets_assigned.result)) { return ( @@ -38,6 +38,8 @@ export class DepartmentDetailComponent extends React.Component { render() { const { isLoading, details } = this.props; + // eslint-disable-next-line camelcase + const { name, assets_assigned } = details; if (isLoading) { return ( @@ -67,10 +69,10 @@ export class DepartmentDetailComponent extends React.Component {
- Department Name: {details.name || 'Not Provided'} + Department Name: {name || 'Not Provided'}
- Total Assets Assigned: {details.assets_assigned.length} + Total Assets Assigned: {assets_assigned.results.length}
{this.assetsAssigned(details)}