Commit Graph

72 Commits

Author SHA1 Message Date
cdc9e24ac0 Simplifies search through relations usage (#126) 2023-05-17 23:10:00 +02:00
434e020846 Restructure project (#124) 2023-05-17 22:31:16 +02:00
baca6150f5 Sammy/t 240 frontend filtering search is refactored (#122)
* refactor: use AnyEntity instead of any

* refactor: remove any and brand company type

* refactor: add typename for user and people

* bugfix: await company to be created before displaying it

* feature: await deletion before removing the lines

* refactor: remove default tyep for filters

* refactor: remove default type AnyEntity

* refactor: remove USers from filterable types

* refactor: do not depend on Filter types in Table

* Add tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-17 21:49:34 +02:00
bc49815ff0 Make all fields optional on entities (#121)
* Make all fields optional on entities

* Rewrite tests

* Add test on TableHeader Cancel button
2023-05-17 14:50:49 +02:00
2facb383a2 bugfix: use row id instead of index to keep row selection after table… (#120)
* bugfix: use row id instead of index to keep row selection after table update

* bugfix: await creation before displaying the row and refetching
2023-05-17 14:43:09 +02:00
499752ed6b Refactor Filters and Search (#119) 2023-05-17 13:25:33 +02:00
2212900663 Enable deletion on table views (#113)
* Enable deletion on table views

* Add tests

* Enable deletion on table views for companies too
2023-05-08 23:26:37 +02:00
94ea9835a9 Enable multi-selection on table views (#112)
* Enable multi-selection on table views

* Enable multi-selection
2023-05-08 10:58:53 +02:00
48a75358b4 Enable add person on People Table (#111)
Add possibility to add Person on People table
2023-05-08 00:15:32 +02:00
50a4a97145 Add new line on Table Views (#110)
Add addition on Companies table
2023-05-07 23:41:22 +02:00
41c46c36ed Create and EditableRelation component and make it generic (#107)
* Create and EditableRelation component and make it generic

* Refactor EditableCell component to be more flexible

* Complete Company picker on people page

* Fix lint
2023-05-06 16:08:45 +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
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
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
04051e737f Fix long table scroll 2023-04-26 17:29:00 +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
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
47bdabd5aa Refactor people query into separate file. 2023-04-24 11:10:56 +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
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
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
b8032e9605 refactor: move person types in interface 2023-04-20 15:39:56 +02:00
e4edaf183f test: fix People test 2023-04-20 14:42:17 +02:00
7a89e5591d refactor: extract mapper 2023-04-20 13:58:54 +02:00
33e12a52c7 refactor: rename default data file 2023-04-20 13:58:54 +02:00
d5ebff5b53 refactor: etract type in file 2023-04-20 13:58:54 +02:00
887a7af5e2 feature: wip get persons and map it 2023-04-20 13:58:53 +02:00
8555df6f3f refactor: move style in Cell component 2023-04-20 13:58:52 +02:00
f2dcffd8f0 refactor: move data types and table definition out of People component 2023-04-20 13:58:52 +02:00
5a1baf9121 Filter ongoing 2023-04-19 23:15:08 +02:00
3c7bd5cd28 bugfix: fix pointer propagation of links behind the before element 2023-04-19 18:31:03 +02:00
630447a2f6 refactor: put TD up back in the table 2023-04-19 18:21:42 +02:00
71c18e864f feature: move TD creation to cells 2023-04-19 17:10:37 +02:00
74990a3686 feature: clickableCell left space should be inside the border 2023-04-19 16:19:35 +02:00
1a70a5ba65 feature: update icons of People table 2023-04-19 15:58:38 +02:00