diff options
author | philippe-perrin-sonarsource <philippe.perrin@sonarsource.com> | 2022-01-27 11:06:59 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-01-27 20:03:05 +0000 |
commit | dca8354af94e9feb46ea2312857e000aaa232372 (patch) | |
tree | 336b645749ab1fb1b1abdac19a69c70257e98b68 /server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx | |
parent | 85f744be340d8f404978341186dd77cc05584f31 (diff) | |
download | sonarqube-dca8354af94e9feb46ea2312857e000aaa232372.tar.gz sonarqube-dca8354af94e9feb46ea2312857e000aaa232372.zip |
SONAR-15945 Get rid of T namespace in sonar-web
Diffstat (limited to 'server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx index a865e508377..05450518584 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx @@ -21,6 +21,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import * as api from '../../../api/permissions'; import { translate } from '../../../helpers/l10n'; +import { PermissionGroup, PermissionTemplate, PermissionUser } from '../../../types/types'; import HoldersList from '../../permissions/shared/components/HoldersList'; import SearchForm from '../../permissions/shared/components/SearchForm'; import { @@ -32,17 +33,17 @@ import TemplateHeader from './TemplateHeader'; interface Props { refresh: () => void; - template: T.PermissionTemplate; + template: PermissionTemplate; topQualifiers: string[]; } interface State { filter: string; - groups: T.PermissionGroup[]; + groups: PermissionGroup[]; loading: boolean; query: string; selectedPermission?: string; - users: T.PermissionUser[]; + users: PermissionUser[]; } export default class Template extends React.PureComponent<Props, State> { @@ -95,7 +96,7 @@ export default class Template extends React.PureComponent<Props, State> { }); }; - handleToggleUser = (user: T.PermissionUser, permission: string) => { + handleToggleUser = (user: PermissionUser, permission: string) => { if (user.login === '<creator>') { return this.handleToggleProjectCreator(user, permission); } @@ -113,7 +114,7 @@ export default class Template extends React.PureComponent<Props, State> { return request.then(() => this.requestHolders()).then(this.props.refresh); }; - handleToggleProjectCreator = (user: T.PermissionUser, permission: string) => { + handleToggleProjectCreator = (user: PermissionUser, permission: string) => { const { template } = this.props; const hasPermission = user.permissions.includes(permission); const request = hasPermission @@ -122,7 +123,7 @@ export default class Template extends React.PureComponent<Props, State> { return request.then(() => this.requestHolders()).then(this.props.refresh); }; - handleToggleGroup = (group: T.PermissionGroup, permission: string) => { + handleToggleGroup = (group: PermissionGroup, permission: string) => { const { template } = this.props; const hasPermission = group.permissions.includes(permission); const data = { |