diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectsManagement/App.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectsManagement/App.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx index 71376df4a74..24b422552fe 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx @@ -28,6 +28,7 @@ import { PAGE_SIZE, Project } from './utils'; import ListFooter from '../../components/controls/ListFooter'; import { getComponents } from '../../api/components'; import { Organization } from '../../app/types'; +import { toNotSoISOString } from '../../helpers/dates'; import { translate } from '../../helpers/l10n'; export interface Props { @@ -39,7 +40,7 @@ export interface Props { } interface State { - analyzedBefore?: string; + analyzedBefore?: Date; createProjectForm: boolean; page: number; projects: Project[]; @@ -80,8 +81,9 @@ export default class App extends React.PureComponent<Props, State> { } requestProjects = () => { + const { analyzedBefore } = this.state; const parameters = { - analyzedBefore: this.state.analyzedBefore, + analyzedBefore: analyzedBefore && toNotSoISOString(analyzedBefore), onProvisionedOnly: this.state.provisioned || undefined, organization: this.props.organization.key, p: this.state.page !== 1 ? this.state.page : undefined, @@ -129,7 +131,7 @@ export default class App extends React.PureComponent<Props, State> { ); }; - handleDateChanged = (analyzedBefore?: string) => + handleDateChanged = (analyzedBefore: Date | undefined) => this.setState({ ready: false, page: 1, analyzedBefore }, this.requestProjects); onProjectSelected = (project: string) => { |