diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-03-16 16:24:04 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-03-22 12:37:48 +0100 |
commit | fe9a68f2ccd3a1a90b619f3fe0e2fae4f4d20c36 (patch) | |
tree | 2dcebf80d8a84442fc1adb18b2486b1b5ac3bb56 /server/sonar-web/src/main/js/apps/projectsManagement/App.tsx | |
parent | af09abd297eee6694b088437f7f33bea210b82f0 (diff) | |
download | sonarqube-fe9a68f2ccd3a1a90b619f3fe0e2fae4f4d20c36.tar.gz sonarqube-fe9a68f2ccd3a1a90b619f3fe0e2fae4f4d20c36.zip |
SONAR-9338 Make all date pickers consistent (#3157)
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) => { |