Commit Graph
100 Commits
Author SHA1 Message Date
Sammy Teillet 294b290939 338 on opportunities page when i associate a new company to a pipelinestage its persisted in db (#339)
* feature: add navigation for opportunities

* chore: add companies in pipeline seed

* feature: make the board scrollable

* feature: make the board scrollable vertically

* feature: remove board container

* feature: fix newButton style

* feature: add onClickNew method on board

* feature: call backend with hardcoded id for new pipeline progressable

* feature: refetch board on click on new

* feature: use pipelineProgressId instead of entityId to ensure unicity of itemKey

* feature: avoid rerender of columns when refetching
2023-06-20 19:27:02 -07:00
Sammy Teillet c120903a45 Persist update on board drag and drop (#328)
* chore: move dnd lib comment aligned with import

* feature: add onUpdate on board

* chore: remove multi entity pipelines

* feature: add pipelineProgressableType field

* feature: fetch progressableType in board

* feature: implement on update to persist progress change
2023-06-20 10:56:36 +02:00
Sammy TeilletandCharles Bochet 96a53ad765 refactor: remove mappers (#326)
* refactor: remove mappers

* chore: generate graphql types

* lint: remove useless import

* Remove preset-react-create-app from storybook addons

* test: remove old tests

* Upgrade storybook version

* Remove sb preset-cra and add sb svgr loader

* chore: remove figma image url from storybook

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-06-19 14:07:16 +00:00
Sammy Teillet 287168f691 289 on opportunities page i see person and company card layout read only (#293)
* feature: create boardCard component

* test: add snapshot for BoardCards

* feature: fix typename of company

* feature: add max width on BoardItem

* feature: design CompanyBoardCard

* feature: Add People picture and name

* feature: design PeopleCard

* feature: fix font weight for card header

* test: fix storybook for board

* test: add unit test for column optimistic renderer
2023-06-14 17:06:50 +02:00
Sammy Teillet bf6fb0ba70 282 on opportunities page data pipeline + companies + people is fetched from be (#285)
* feature: get pipelines columns from backend

* feature: display item not found instead of crashing

* feature: add BoardCard component

* feature: display items from the backend

* refactor: extract useBoard in a hook

* refactor: export only loading and error from useBoard

* refactor: create var pipelineStage

* feature: implement support for Company boards
2023-06-14 10:37:44 +02:00
Sammy Teillet c20fd458ae 278 refactor uiboard opportunitiesboard + put state in recoil (#280)
* refactor: move Board file to opportunities

* refactor: dropable props are move in ui component

* refactor: rename provided in droppableProvided

* refactor: rename provided in draggableProvided

* refactor: rename BoardCard in BoardItem

* refactor: rename BoardCard in BoardItem file

* refactor: BoardItem use children instead of content

* refactor: Extract StyledColumnContainer

* refactor: create method to get optimistic new board after update

* refactor: move getOptimisticNewBoard in board UI

* refactor: make provided nullable

* lint: remove unused import
2023-06-13 17:02:09 +02:00
Sammy Teillet 49a99c8ae6 Sammy/t 392 aau i can drag and drop opportunities (#257)
* refactor: extract data from Board component

* feature: display board on opportunities page

* test: add strict mode in storybook

* chore: replace dnd to make it work with React 18 and strict mode

Atlassion has not fixed this issue in a year so we use the fork @hello-pangea/dnd
https://github.com/atlassian/react-beautiful-dnd/issues/2350

* refactor: move mocked-data in a file

* chore: use real column names in mock data

* feature: design columns

* feature: add New button at bottum of columns

* bugfix: move header out of dragable so the cards does not flicker on drop

* lint: remove useless imports

* refactor: rename board item key
2023-06-08 17:40:25 +02:00
Sammy Teillet b827716d1b Sammy/t 394 aadev i have a storybook with drag and drop features (#255)
* feature: add Board component

* feature: add BoardColumn

* feature: add BoardCard

* chore: install react beautiful dnd

* refactor: use children instead of item parameter

* feature: wrap board in DragDropContext

* feature: wrap columns in dropable

* feature: wrap boardCard in draggable

* feature: add a second column

* refactor: rename columns to initialBoard

* refactor: use itemKeys instead if item directly

* feature: add key for react to render

* refactor: type the onDragEnd callback

* feature: drag and drop elements between columns
2023-06-08 15:09:40 +02:00
Sammy Teillet b1bf050936 test: add story for table header (#204)
* test: add story for table header

* feature: wrap chips in a container and set shrink to 0 so they don't grow vertically

* feature: cancel button is darker

* feature: set gap between chip to 4px instead of 8

* lint: remove unused code

* bugfix: ChipContainer has a starting margin
2023-06-06 17:45:07 +02:00
Sammy Teillet 86e00c3a03 Sammy/t 362 on people view when i click on comment bubble icon row level (#202)
* test: add empty comment test

* test: comments section opens on click on comments chip

* test: add a failing test for opening comment section

* feature: open comments drawer on click on comment chip

* test: refactor company test, create folders
2023-06-06 14:34:35 +02:00
Sammy Teillet c70bea9513 feature: display a message when user is not defined (#196)
* feature: display a message when user is not defined

* feature: display text in a fadein in case redirection is slow
2023-06-05 15:55:45 +00:00
Sammy Teillet 4cde1d68e8 Sammy/t 367 on comment drawer update top right close icon to match figma (#195)
* style: add a story for right drawer topbar

* style: use same cross from Tb but rotate it
2023-06-05 15:46:28 +00:00
Sammy Teillet 236437e4ff Sammy/t fix display of comment section (#197)
* feature: do not display commentChip if no comments

* style: add mocked data for comment sections
2023-06-05 17:36:56 +02:00
Sammy Teillet 063ef8a4eb Sammy/t refactor services use generated code (#194)
* refactor: use generated queries for Companies

* refactor: remove useQuery from service, use generated code

* refactor: rename to ts file instead of tsx

* bugfix: use generatd queries, and fix non existing id in workspace member query
2023-06-05 17:36:14 +02:00
Sammy Teillet 6de90024ef Sammy/t 363 comments count at row level depends on total comments number (#192)
* feature: add rightEndContent to editable cell

* refactor: use rightEndContent instead of comments sections

* refactor: move commentCount in a var

* feature: get commentsCount from backend

* refactor: use an index

* feature: use commentCount from backend on people

* refactor: rename commentCount for companies

* refactor: use generated queries, instead of useQuery
2023-06-05 14:41:27 +02:00
Sammy Teillet fecf45f3bc Sammy/t 245 implement resolvers matching hasura (#139)
* chore: remove old resolvers

* refactor: move generated file in code base

* feature: use only necessary code in graphql

* feature: implement query companies

* feature: implement companies and relations

* feature: implement all companies resolvers

* feature: implement all people resolver

* feature: add use resolvers

* feature: implement resolvers for workspace and users
2023-05-25 17:10:00 +02:00
Sammy TeilletandCharles Bochet 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
Sammy Teillet 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
Sammy TeilletandCharles Bochet 354cdb6ad9 Sammy/t 195 aau i see filters and sort on company (#104)
* feature: add company filter by name

* feature: add fitler on URL

* feature: set icons for sorts

* feature: add creation date and address sorts

* Add tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-06 07:59:30 +02:00
Sammy Teillet 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
Sammy Teillet 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
Sammy Teillet 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
Sammy Teillet 3605c0034c feature: display only 5 results in filter search (#96)
* feature: display only 5 results in filter search

* feature: Display laoding in a dropdown item

* test: use testid insread of text
2023-05-04 12:58:43 +00:00
Sammy TeilletandCharles Bochet 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
Sammy Teillet 35cf3ee801 Sammy/t 138 when i select an option i see it (#84)
* feature: remove selected filter item

* feature: add searchable field in dropdown
2023-04-26 19:10:05 +02:00
Sammy Teillet 884080a9da refactor: extract render into methods (#81) 2023-04-26 17:38:05 +02:00
Sammy Teillet 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
Sammy Teillet 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
Sammy Teillet f7c53dbdeb feature: set the right sort on click 2023-04-24 18:17:01 +02:00
Sammy Teillet 0f4dcc1957 refactor: extract dropdown for Sort dropdown 2023-04-24 18:05:29 +02:00
Sammy Teillet 795f9e7af8 refactor: create SortDropdownButton 2023-04-24 17:35:43 +02:00
Sammy Teillet 7cf1f913b0 feature: add property isActive for dropdown buttons 2023-04-24 17:01:26 +02:00
Sammy Teillet 911eb48250 Merge pull request #67 from twentyhq/sammy/t-129-i-see-all-text-sorts-available-in-the
feature: Add all sortable fields of People table
2023-04-24 15:47:35 +02:00
Sammy Teillet 19385e00c0 feature: fix background color of dropdown item to be fully transparent 2023-04-24 15:39:36 +02:00
Sammy Teillet 4e3acf21d2 feature: set the right border radius for dropdown items 2023-04-24 15:29:24 +02:00
Sammy Teillet bb8f61212b feature: add all the sortable fields for people 2023-04-24 15:01:18 +02:00
Sammy Teillet 19903219c3 refactor: move sorts in peolpe-table 2023-04-24 14:59:53 +02:00
Sammy Teillet 99aa39f2ba refactor: keep type of sortsAvailable while having type assertion 2023-04-24 14:57:57 +02:00
Sammy Teillet c3da5fa5f4 feature: put react app in strict mode 2023-04-24 14:56:44 +02:00
Sammy Teillet 6e353f590c feature: add email in sorts fields 2023-04-24 14:56:20 +02:00
Sammy Teillet a5909bd6ff feature: keep callbacks between two renders 2023-04-24 14:49:40 +02:00
Sammy Teillet 2acd98370d bugfix: remove infinite renderloop of onSortUpdate 2023-04-24 14:46:39 +02:00
Sammy Teillet c7dc9cf83b bugfix: fix direction and zindex of dropdown 2023-04-24 14:18:22 +02:00
Sammy Teillet be947bdc8f refactor: strongly type keys of sorts 2023-04-24 14:02:38 +02:00
Sammy Teillet 095a6886ae refactor: move sortable fields in People 2023-04-24 14:00:14 +02:00
Sammy Teillet bc91e97695 refactor: move sortable fields in table 2023-04-24 13:55:13 +02:00
Sammy Teillet 3a7b1077f8 test: wait for rows to be displayed 2023-04-20 18:44:43 +02:00
Sammy Teillet b5affcce3f test: fix mocks for person request 2023-04-20 18:08:20 +02:00
Sammy Teillet a915d15573 refactor: remove useless vars 2023-04-20 18:03:15 +02:00
Sammy Teillet 7d745ab143 refactor: rename setSorts to onSortsUpdate 2023-04-20 17:58:26 +02:00
Sammy Teillet e0a19bdd43 refactor: rename and remove default data 2023-04-20 16:59:03 +02:00
Sammy Teillet fbd338ee7d feature: apply the sorts to the query 2023-04-20 16:56:42 +02:00
Sammy Teillet 33473aea92 feature: add setSorts from parent component 2023-04-20 16:38:29 +02:00
Sammy Teillet 9122815b07 feature: order people results 2023-04-20 15:56:59 +02:00
Sammy Teillet b3acfa465b refactor: move mapper in interface 2023-04-20 15:41:18 +02:00
Sammy Teillet b8032e9605 refactor: move person types in interface 2023-04-20 15:39:56 +02:00
Sammy Teillet 7ade04b79e Merge pull request #55 from twentyhq/fix-hasura-file
bugfix: rename hasura file
2023-04-20 15:13:54 +02:00
Sammy Teillet 08f6e82e5b bugfix: rename hasura file 2023-04-20 15:13:32 +02:00
Sammy Teillet d330fdbb8b Merge pull request #54 from twentyhq/sammy/t-107-i-see-a-people-data-model-and-graphql
feature: add person schema in hasura
2023-04-20 14:55:01 +02:00
Sammy Teillet e4edaf183f test: fix People test 2023-04-20 14:42:17 +02:00
Sammy Teillet 7a89e5591d refactor: extract mapper 2023-04-20 13:58:54 +02:00
Sammy Teillet 33e12a52c7 refactor: rename default data file 2023-04-20 13:58:54 +02:00
Sammy Teillet d5ebff5b53 refactor: etract type in file 2023-04-20 13:58:54 +02:00
Sammy Teillet c1883d381e feature: strongly type Table component 2023-04-20 13:58:53 +02:00
Sammy Teillet 887a7af5e2 feature: wip get persons and map it 2023-04-20 13:58:53 +02:00
Sammy Teillet 7f2ec0c260 feature: fix Apollo client 2023-04-20 13:58:53 +02:00
Sammy Teillet 38e2e930b6 feature: add creation dates 2023-04-20 13:58:53 +02:00
Sammy Teillet 63c31b4290 feature: add company and link person to company and workspace 2023-04-20 13:58:53 +02:00
Sammy Teillet 79f274c355 feature: add person schema in hasura 2023-04-20 13:58:52 +02:00
Sammy Teillet 874b920571 chore: introduce different creation dates 2023-04-20 13:58:52 +02:00
Sammy Teillet 8555df6f3f refactor: move style in Cell component 2023-04-20 13:58:52 +02:00
Sammy Teillet f2dcffd8f0 refactor: move data types and table definition out of People component 2023-04-20 13:58:52 +02:00
Sammy Teillet 3c7bd5cd28 bugfix: fix pointer propagation of links behind the before element 2023-04-19 18:31:03 +02:00
Sammy Teillet 630447a2f6 refactor: put TD up back in the table 2023-04-19 18:21:42 +02:00
Sammy Teillet a4e7211625 feature: adjust checkbox size 2023-04-19 18:00:30 +02:00
Sammy Teillet 8fa9c7f1db chore: make sure darktheme implement sames keys as light theme 2023-04-19 17:26:18 +02:00
Sammy Teillet b4915895fe feature: display a border when hovering the component 2023-04-19 17:22:16 +02:00
Sammy Teillet 71c18e864f feature: move TD creation to cells 2023-04-19 17:10:37 +02:00
Sammy Teillet 05c5272c93 feature: make border transparent instead of 0px 2023-04-19 16:47:34 +02:00
Sammy Teillet 74990a3686 feature: clickableCell left space should be inside the border 2023-04-19 16:19:35 +02:00
Sammy Teillet 1a70a5ba65 feature: update icons of People table 2023-04-19 15:58:38 +02:00
Sammy Teillet 0f779f9d43 feature: change the border color again 2023-04-19 15:45:46 +02:00
Sammy Teillet a361d7732e feature: remove border of table container 2023-04-19 15:40:08 +02:00
Sammy Teillet 28af85fcb7 feature: set table text colors 2023-04-19 15:35:55 +02:00
Sammy Teillet d1f05993be feature: fix default padding of table 2023-04-19 15:24:18 +02:00
Sammy Teillet 6e9b612409 feature: fix color of border 2023-04-19 15:23:09 +02:00
Sammy Teillet 6f9506b924 feature: fix borders of table 2023-04-19 15:19:10 +02:00
Sammy Teillet 0844490c13 feature: wrap all elements in a cell 2023-04-19 15:13:26 +02:00
Sammy Teillet a843d7d76e feature: add a left padding in cells 2023-04-19 15:00:22 +02:00
Sammy Teillet b0b81ba40d feature: fix table layout 2023-04-19 14:46:54 +02:00
Sammy Teillet 43e71c6c93 Merge pull request #44 from twentyhq/sammy/t-102-i-see-people-chip-designed-with-picture
Sammy/t 102 i see people chip designed with picture
2023-04-19 14:38:41 +02:00
Sammy Teillet 59f64695a2 test: test PersonChip displays image or placeholder 2023-04-19 14:37:36 +02:00
Sammy Teillet 97457f54cb test: rename test and remove useless nav wrapper 2023-04-19 14:25:27 +02:00
Sammy Teillet b434f3da45 feature: make the person picture circle 2023-04-19 12:40:57 +02:00
Sammy Teillet bb5ae02c3a refactor: use PersonChip in people page 2023-04-19 12:35:19 +02:00
Sammy Teillet 16a1aadba9 feature: add alt tag for image in company chip 2023-04-19 12:28:32 +02:00
Sammy Teillet 8d321013f3 refactor: remove useless ClickableCell props 2023-04-19 12:25:20 +02:00
Sammy Teillet 5962140656 refactor: rename CellLink to ClickableCell 2023-04-19 12:24:25 +02:00
Sammy Teillet 3696bf2617 feature: CellLinkacceptd children 2023-04-19 12:23:27 +02:00
Sammy Teillet 471d6743ad refactor: create company chip 2023-04-19 12:20:19 +02:00