Commit Graph

99 Commits

Author SHA1 Message Date
406e1dc02e Enable Date edition on People view (#105)
* Enable Date edition on People view

* Fix linter
2023-05-05 18:52:04 +02:00
b8cd842633 Sammy/t 194 aau when i set sort back and forth the (#103)
* bugfix: use original row id in cells to make sure it rerenders

* feature: implement multiple sorts

* bugfix: recreate new array to make sure component rerenders

* feature: orderBy is an array to keep orders

* test: snapshot the searchTemplate methods

* feature: remove the console log and return undefined

* feature: use orderByTemplate instead of hardcoded orderBy

* refactor: move sort and where filters helpers out of service

* refactor: rename file helper

* refactor: move assert function in test
2023-05-05 16:22:47 +02:00
f022bf8335 Sammy/t 190 aau i see other filters city on people (#101)
* feature: add email filter

* feature: add city filter

* test: fix company search tests

* test: use the right value in test

* refactor: test all the filters in a loop
2023-05-05 12:16:25 +02:00
55eff2b7a2 Create Editable chip to edit cells containing chips (#102)
* Create Editable chip to edit cells containing chips

* Fix icons vertical alignment

* Fix linter

* Fix coverage
2023-05-05 12:15:41 +02:00
9cd57083f1 Sammy/t 192 aau whan i select does not include it is (#99)
* feature: add operand list to filters

* feature: implement not include

* feature: add operand on filters

* feature: use filters operand instead of defaults

* test: adapt test with new operands

* refactor: remove useless %% in gql where

* test: test fullname filter

* test: add test for where rendering of filters
2023-05-05 10:25:06 +02:00
89dc5b4d60 Make full name editable on People page (#100)
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-04 18:38:29 +02:00
f6b691945c Make phone editable on people's page (#98)
* Make phone editable on people's page

* Make City editable

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-04 17:27:27 +02:00
e65fd3d6a5 Update Edit Inplace behavior and style (#97)
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-04 16:03:13 +02:00
6a8a8f0728 Add Filters on Table views (#95)
* Add filter search logic

WIP Filter search

Implement filters

test: fix sorts tests

test: fix filter test

feature: search person and display firstname in results

feature: fix test for filter component

test: mock search filters

refactor: create a useSearch hook

refactor: move debounce in useSearch and reset status of filter selection

feature: debounce set filters

refactor: remove useless setSorts

feature: add where variable to people query

feature: strongly type Filters

feature: update WhereTemplate method

feature: implement filtering on full name

feature: type the useSearch hook

feature: use where reducer

refactor: create a type for readability

feature: use query and mapper from filters

feature: implement filter by company

feature: search filter results on filter select

feature: add loading and results to search results in filters

refactor: move render search results in a function

feature: display a LOADING when it loads

feature: split search input and search filter for different debounce

refactor: remove some warnings

refactor: remove some warnings

* Write test 1

* Write test 2

* test: useSearch is tested

* test: update names of default people data

* test: add a filter search

* Test 3

* Fix tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-04 13:54:46 +02:00
27d5edc031 Fetch workspace and user from database (#94)
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-04 11:09:06 +02:00
9bc3aa1fb9 Replace Fontawesome Pro by React-Icons/FA (#93)
* Fontawesome -> ReactIcons cleanup

* No need for npmrc anymore

* Complete migration

* Fix tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-03 17:24:07 +02:00
27070b374e In place edit company info (#90)
* Add update company functionality

* Fix padding in cells with chips

* Add icons to table headers
2023-04-28 06:50:04 +00:00
d5c1bd6365 Handle missing account owner (#89) 2023-04-28 07:40:40 +02:00
d4b1b2f661 Companies table (#79)
* Add columns to companies:
* account_owner_id
* employees
* address

Add foreign key constraint companies_account_owner_id_fkey
to auth.users.id

* Add select permissions to:
* account_owner_id
* employees
* address

Add relationship between companies and auth.users.

* Update Companies interface to include:
* account_owner_id
* employees
* address

Opportunity is expected to be replace by actual opportunity in a separate PR.

* Add GetCompanies query

* Add initial companies table

* Update test to use mock apollo provider

* Update to match changed company column names

* Add company interface mapping tests

* Test entire object

* Add test for companies being rendered in table.

* Add test for sorting reduce.

* Fix prettier errors
2023-04-27 12:46:43 +02:00
cabe6d4c36 Add empty opportunity page (#83)
* Add empty opportunity page

* Fix coverage

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-04-26 18:00:06 +02:00
04051e737f Fix long table scroll 2023-04-26 17:29:00 +02:00
6c7eb53333 Add seeds and move to uuid (#80)
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-04-26 16:42:01 +02:00
5aec7ca730 Sammy/t 134 i see all filters in the dropdown (#78)
* feature: add filter dropdown

* test: add story for FilterDropdown

* feature: display filterOperand on top of dropdown

* feature: display filter operand

* feature: fix index and display selected filter

* refactor: set TopOption button inside dropdown file

* feature: move availableFilters outside the fitler component

* refactor: make the available sorts and filter optionnal

* refactor: rename availableSorts

* feature: add a resetState property on onOutsideClick

* feature: add filters and set  filters on Dropdown component

* feature: set filters on click in dropdown

* test: verify button is active after filters are set

* feature: display sorts and filters

* refactor: move SelectedFilters in SortAndFilter

* refactor: move SelectedFilters in dedicated file

* refactor: remove Id and use Key
2023-04-26 14:19:34 +00:00
ae7bad65ca Setup GraphQL Code Generator (#74)
* chore: add types of schema

* Ease codegen use on FE

* chore: ignore prettier in generated files

* lint: generated files

* feature: strongly type filter of query

* chore: ignore generated files in prettier

* chore: eslint ignore generated files

---------

Co-authored-by: Sammy Teillet <sammy.teillet@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-04-25 17:25:30 +02:00
a93c92c65c Sammy/t 131 i see a ascending descending option in (#73)
* refactor: use safe css selector

* feature: onclick update the order option

* feature: set option in the dropdown

* feature: display icon for sort options

* refactor: indent key so react does not complain of conflicting keys

* feature: align icon and text

* feature: fix size of icon to align text

* feature: create design for TopOption in dropdown

* refactor: set font weight in style

* feature: finalise design of TopOption

* refactor: rename option to sort

* refactor: remove order from the sortType

* refactor: move sort mapper in service

* test: selection of Descending in SortDropdownButton

* refactor: fix styme-component warning

* feature: add sorting by people

* refactor: set SortFields types for tables

* feature: add sort by company

* refactor: rename sortFields to singular

* refactor: rename option to SortDirection
2023-04-25 16:29:08 +02:00
8ed09d61ef Refactor GraphqlPerson to GraphqlQueryPerson
A GraphqlQueryPerson has an id which is used in mutations.
2023-04-25 12:55:27 +02:00
b6c7149b66 Use EditableCell for email 2023-04-25 12:55:27 +02:00
63feef5727 Fix small design feedbacks 2023-04-25 11:34:04 +02:00
bb8f61212b feature: add all the sortable fields for people 2023-04-24 15:01:18 +02:00
19903219c3 refactor: move sorts in peolpe-table 2023-04-24 14:59:53 +02:00
99aa39f2ba refactor: keep type of sortsAvailable while having type assertion 2023-04-24 14:57:57 +02:00
6e353f590c feature: add email in sorts fields 2023-04-24 14:56:20 +02:00
a5909bd6ff feature: keep callbacks between two renders 2023-04-24 14:49:40 +02:00
be947bdc8f refactor: strongly type keys of sorts 2023-04-24 14:02:38 +02:00
095a6886ae refactor: move sortable fields in People 2023-04-24 14:00:14 +02:00
efd6138877 Use GET_PEOPLE in mock 2023-04-24 12:28:22 +02:00
47bdabd5aa Refactor people query into separate file. 2023-04-24 11:10:56 +02:00
a5bfeef2d6 Merge pull request #64 from twentyhq/cbo-fetch-jwt-token
Refresh JWT when expired
2023-04-21 17:33:39 +02:00
d3e9709e08 Refresh token when token has expired 2023-04-21 17:31:17 +02:00
be601c58b1 Add pipe chip 2023-04-21 16:03:29 +02:00
049664b98e Require accessToken to browse pages 2023-04-21 15:53:47 +02:00
678363d8fd Fix according to PR 2023-04-21 14:37:46 +02:00
c5f2850a3b Fetch jwt token from hasura-auth with refresh_token 2023-04-21 14:07:02 +02:00
cd18e952b9 Store refresh token on login 2023-04-21 09:33:57 +02:00
79e8d9c84b Finalize sort created_at filter 2023-04-21 09:03:19 +02:00
0f09464f14 Finalize sort created_at filter 2023-04-21 09:00:50 +02:00
3a7b1077f8 test: wait for rows to be displayed 2023-04-20 18:44:43 +02:00
b5affcce3f test: fix mocks for person request 2023-04-20 18:08:20 +02:00
a915d15573 refactor: remove useless vars 2023-04-20 18:03:15 +02:00
7d745ab143 refactor: rename setSorts to onSortsUpdate 2023-04-20 17:58:26 +02:00
e0a19bdd43 refactor: rename and remove default data 2023-04-20 16:59:03 +02:00
fbd338ee7d feature: apply the sorts to the query 2023-04-20 16:56:42 +02:00
33473aea92 feature: add setSorts from parent component 2023-04-20 16:38:29 +02:00
9122815b07 feature: order people results 2023-04-20 15:56:59 +02:00
b3acfa465b refactor: move mapper in interface 2023-04-20 15:41:18 +02:00