Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverage search for user #1863

Merged
merged 4 commits into from
Oct 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {Row, SelectUserInput} from '../../../UI/Form';
import {EditorFieldNewsCoverageStatus} from '../NewsCoverageStatus';
import * as config from 'appConfig';
import {getLanguagesForTreeSelectInput} from '../../../../selectors/vocabs';
import {SelectUser} from 'superdesk-core/scripts/core/ui/components/SelectUser';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be ideal not to directly import anything from superdesk-core, instead we can import components from the SuperdeskAPI (see: https://github.com/superdesk/superdesk-client-core/blob/develop/scripts/core/superdesk-api.d.ts#L1810).


const appConfig = config.appConfig as IPlanningConfig;

Expand Down Expand Up @@ -172,13 +173,16 @@ export class EmbeddedCoverageFormComponent extends React.PureComponent<IProps> {
testId="user"
noPadding={true}
>
<SelectUserInput
field="user"
placeholder={gettext('Search users')}
value={coverage.user}
onChange={this.onUserChange}
users={coverage.filteredUsers}
/>
<Row style={{padding: '2rem 0'}}>
<SelectUser
onSelect={(user) => {
this.onUserChange(null, user);
}}
autoFocus={false}
horizontalSpacing={true}
clearable={true}
/>
</Row>
</Row>
</List.Row>
<List.Row>
Expand Down
Loading