-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate CompanyOverview page to use React Router
- Loading branch information
Showing
27 changed files
with
117 additions
and
153 deletions.
There are no files selected for viewing
76 changes: 0 additions & 76 deletions
76
src/apps/companies/apps/company-overview/client/CompanyOverview.jsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/apps/companies/apps/company-overview/views/client-container.njk
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
src/client/modules/Companies/CompanyOverview/CompanyOverview.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import React from 'react' | ||
import { GridCol, GridRow } from 'govuk-react' | ||
import styled from 'styled-components' | ||
import { useParams } from 'react-router-dom' | ||
|
||
import { | ||
AccountManagementCard, | ||
ActiveInvestmentProjectsCard, | ||
ActivityCard, | ||
BusinessDetailsCard, | ||
ExportStatusCard, | ||
InvestmentStatusCard, | ||
} from './TableCards' | ||
import { FILTER_FEED_TYPE } from '../../../../apps/companies/apps/activity-feed/constants' | ||
import { CompanyResource } from '../../../components/Resource/index' | ||
import CompanyLayoutNew from '../../../components/Layout/CompanyLayoutNew' | ||
|
||
const CardContainer = styled('div')` | ||
border: 1px solid #b1b4b6; | ||
padding: 20px; | ||
margin-bottom: 20px; | ||
` | ||
|
||
const CompanyOverview = () => { | ||
const { companyId } = useParams() | ||
return ( | ||
<CompanyResource id={companyId}> | ||
{(company) => ( | ||
<CompanyLayoutNew | ||
company={company} | ||
breadcrumbs={[{ text: 'Overview' }]} | ||
pageTitle="Overview" | ||
> | ||
<GridRow> | ||
<GridCol columnOneHalf={true}> | ||
<CardContainer> | ||
<BusinessDetailsCard company={company} /> | ||
</CardContainer> | ||
<CardContainer> | ||
<AccountManagementCard company={company} /> | ||
</CardContainer> | ||
<CardContainer> | ||
<ExportStatusCard company={company} /> | ||
</CardContainer> | ||
<CardContainer> | ||
<InvestmentStatusCard companyId={company.id} /> | ||
</CardContainer> | ||
</GridCol> | ||
<GridCol columnOneHalf={true}> | ||
<CardContainer> | ||
<ActivityCard | ||
company={company} | ||
numberOfItems={3} | ||
feedType={FILTER_FEED_TYPE.RECENT} | ||
/> | ||
</CardContainer> | ||
<CardContainer> | ||
<ActivityCard | ||
company={company} | ||
numberOfItems={2} | ||
feedType={FILTER_FEED_TYPE.UPCOMING} | ||
/> | ||
</CardContainer> | ||
<CardContainer> | ||
<ActiveInvestmentProjectsCard companyId={companyId} /> | ||
</CardContainer> | ||
</GridCol> | ||
</GridRow> | ||
</CompanyLayoutNew> | ||
)} | ||
</CompanyResource> | ||
) | ||
} | ||
|
||
export default CompanyOverview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...erview-table-cards/exportStatusReducer.js → ...verview/TableCards/exportStatusReducer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...-overview/overview-table-cards/reducer.js → ...ies/CompanyOverview/TableCards/reducer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ny-overview/overview-table-cards/state.js → ...anies/CompanyOverview/TableCards/state.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ny-overview/overview-table-cards/tasks.js → ...anies/CompanyOverview/TableCards/tasks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.