Commit Graph

40 Commits

Author SHA1 Message Date
67353eda8e Add all filters to tables + make column width fixed (#133)
* Add additional filters on companies and people page

* Make colunn width fixed

* Remove duplicate declaration of Unknown type
2023-05-21 22:47:18 +02:00
5286dfd695 Refactor Filter type to accept Is, Is Not, Contains, Does not Contain (#128)
* Refactor Filter type to accept Is, Is Not, Contains, Does not Contain

* Remove any and add tests
2023-05-18 15:32:57 +02:00
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
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
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
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
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
8de2d345ed Add horizontal scroll on tables 2023-04-25 12:14:31 +02:00
095a6886ae refactor: move sortable fields in People 2023-04-24 14:00:14 +02:00
bc91e97695 refactor: move sortable fields in table 2023-04-24 13:55:13 +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
7d745ab143 refactor: rename setSorts to onSortsUpdate 2023-04-20 17:58:26 +02:00
33473aea92 feature: add setSorts from parent component 2023-04-20 16:38:29 +02:00
c1883d381e feature: strongly type Table component 2023-04-20 13:58:53 +02:00
5a1baf9121 Filter ongoing 2023-04-19 23:15:08 +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
05c5272c93 feature: make border transparent instead of 0px 2023-04-19 16:47:34 +02:00
0f779f9d43 feature: change the border color again 2023-04-19 15:45:46 +02:00
28af85fcb7 feature: set table text colors 2023-04-19 15:35:55 +02:00
d1f05993be feature: fix default padding of table 2023-04-19 15:24:18 +02:00
6e9b612409 feature: fix color of border 2023-04-19 15:23:09 +02:00
6f9506b924 feature: fix borders of table 2023-04-19 15:19:10 +02:00
b0b81ba40d feature: fix table layout 2023-04-19 14:46:54 +02:00
1e635b9d2f Add dropdown on Sort button on table 2023-04-19 14:22:51 +02:00
c4cc6a397a Rework Table Header 2023-04-14 12:38:40 +02:00
5619078abd Hide table footer when all groups are empty 2023-04-13 10:26:09 +02:00
7111f99cff Add table styling 2023-04-12 19:24:35 +02:00
b7e43de670 Add icon property to table. 2023-04-12 13:30:13 +02:00
cb3a209380 Setting up first table in frontend 2023-04-12 11:39:46 +02:00