-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * - Added scopes on useHotkeys - Use new EditableCellV2 - Implemented Recoil Scoped State with specific context - Implemented soft focus position - Factorized open/close editable cell - Removed editable relation old components - Broke down entity table into multiple components - Added Recoil Scope by CellContext - Added Recoil Scope by RowContext * First working version * Use a new EditableCellSoftFocusMode * Fixes * wip * wip * wip * Use company filters * Refactored FilterDropdown into multiple components * Refactored entity search select in dropdown * Renamed states * Fixed people filters * Removed unused code * Cleaned states * Cleaned state * Better naming * fixed rebase * Fix * Fixed stories and mocked data and displayName bug * Fixed cancel sort * Fixed naming * Fixed dropdown height * Fix * Fixed lint
- Loading branch information
1 parent
580e602
commit 820ef18
Showing
78 changed files
with
1,633 additions
and
1,231 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,8 @@ export const VERIFY = gql` | |
id | ||
displayName | ||
firstName | ||
lastName | ||
workspaceMember { | ||
id | ||
workspace { | ||
|
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
43 changes: 43 additions & 0 deletions
43
front/src/modules/companies/components/FilterDropdownCompanySearchSelect.tsx
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,43 @@ | ||
import { filterDropdownSearchInputScopedState } from '@/filters-and-sorts/states/filterDropdownSearchInputScopedState'; | ||
import { filterDropdownSelectedEntityIdScopedState } from '@/filters-and-sorts/states/filterDropdownSelectedEntityIdScopedState'; | ||
import { useRecoilScopedState } from '@/recoil-scope/hooks/useRecoilScopedState'; | ||
import { useRecoilScopedValue } from '@/recoil-scope/hooks/useRecoilScopedValue'; | ||
import { useFilteredSearchEntityQuery } from '@/relation-picker/hooks/useFilteredSearchEntityQuery'; | ||
import { Entity } from '@/relation-picker/types/EntityTypeForSelect'; | ||
import { FilterDropdownEntitySearchSelect } from '@/ui/components/table/table-header/FilterDropdownEntitySearchSelect'; | ||
import { TableContext } from '@/ui/tables/states/TableContext'; | ||
import { getLogoUrlFromDomainName } from '@/utils/utils'; | ||
import { useSearchCompanyQuery } from '~/generated/graphql'; | ||
|
||
export function FilterDropdownCompanySearchSelect() { | ||
const filterDropdownSearchInput = useRecoilScopedValue( | ||
filterDropdownSearchInputScopedState, | ||
TableContext, | ||
); | ||
|
||
const [filterDropdownSelectedEntityId] = useRecoilScopedState( | ||
filterDropdownSelectedEntityIdScopedState, | ||
TableContext, | ||
); | ||
|
||
const usersForSelect = useFilteredSearchEntityQuery({ | ||
queryHook: useSearchCompanyQuery, | ||
searchOnFields: ['name'], | ||
orderByField: 'name', | ||
selectedIds: filterDropdownSelectedEntityId | ||
? [filterDropdownSelectedEntityId] | ||
: [], | ||
mappingFunction: (company) => ({ | ||
id: company.id, | ||
entityType: Entity.User, | ||
name: `${company.name}`, | ||
avatarType: 'squared', | ||
avatarUrl: getLogoUrlFromDomainName(company.domainName), | ||
}), | ||
searchFilter: filterDropdownSearchInput, | ||
}); | ||
|
||
return ( | ||
<FilterDropdownEntitySearchSelect entitiesForSelect={usersForSelect} /> | ||
); | ||
} |
Oops, something went wrong.