Commit Graph

467 Commits

Author SHA1 Message Date
Charles Bochet
192b89a7b7
Make companies employees type a number (#130)
Make companies employees type a number to be consistent with api
2023-05-19 11:53:50 +02:00
Charles Bochet
20bf89ab1e
Add employees and address filter on companies table page (#129) 2023-05-18 18:15:07 +02:00
Charles Bochet
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
Charles Bochet
4211d5872b
Update favicon, manifest, page border (#127) 2023-05-18 10:07:47 +02:00
Charles Bochet
cdc9e24ac0
Simplifies search through relations usage (#126) 2023-05-17 23:10:00 +02:00
Charles Bochet
434e020846
Restructure project (#124) 2023-05-17 22:31:16 +02:00
Sammy Teillet
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
Charles Bochet
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
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
Charles Bochet
499752ed6b
Refactor Filters and Search (#119) 2023-05-17 13:25:33 +02:00
Félix Malfait
96e3f2c7ea
Small fixes: broken links and unused files (#116)
* Remove node modules and package.json from root
* Remove unused references to FontAwesome
* Fix documentation link
2023-05-12 10:35:06 +02:00
Charles Bochet
7208ec9e5a
Fix bug get current user (#115)
* Fix bug get current user

* Add tests

* Fix design on Workspace section in Navbar
2023-05-12 09:02:39 +02:00
Charles Bochet
6b2ccd460d
Update Favicon with new logo (#114) 2023-05-09 17:18:42 +02:00
Charles Bochet
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
Charles Bochet
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
Charles Bochet
48a75358b4
Enable add person on People Table (#111)
Add possibility to add Person on People table
2023-05-08 00:15:32 +02:00
Charles Bochet
50a4a97145
Add new line on Table Views (#110)
Add addition on Companies table
2023-05-07 23:41:22 +02:00
Charles Bochet
8c7815af79
Hide Opportunities as nothing is built yet and make company table fully editable (#109)
* Hide Opportunities as nothing is built yet and make company table fully editable

* Fix tests
2023-05-06 19:08:47 +02:00
Charles Bochet
760a49c5e3
Redesign DatePicker (#108) 2023-05-06 18:13:16 +02:00
Charles Bochet
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
Charles Bochet
7ac2f8e1a6
Fix Cancel button behavior on TopFilterAndSort bar (#106) 2023-05-06 08:27:14 +02:00
Sammy Teillet
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
Charles Bochet
406e1dc02e
Enable Date edition on People view (#105)
* Enable Date edition on People view

* Fix linter
2023-05-05 18:52:04 +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
Charles Bochet
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
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
Charles Bochet
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
Charles Bochet
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
Charles Bochet
e65fd3d6a5
Update Edit Inplace behavior and style (#97)
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-04 16:03:13 +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 Teillet
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
Charles Bochet
27d5edc031
Fetch workspace and user from database (#94)
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-05-04 11:09:06 +02:00
Felix Malfait
1490f986f2
Fix previous PR (.npmrc no longer needed) 2023-05-03 17:32:22 +02:00
Félix Malfait
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
Anders Borch
f28edd405f
I can open the project in GitHub (#92)
* Ignore node_modules

* Use bash-compatible dotenv format

While still being compatible with dotenv, this
also allows sourcing the file to export all
variables in bash.

* Add prettier extension to recommendations

* Move to port 5001 to avoid conflict with macOS services

* Add workspace

* Add devcontainer

This automatically starts with all environment
variables available locally.

It brings up services which are dependent on each
other individually and verifies health before
moving on to the next service.

* Split init into clean, up, and logs tasks.

This allows the developer to set up .env and .npmrc
files before running services, and does not require
starting from a clean db every time the devcontainer
is restarted.

* Copy .env when creating codespace

* Automatically run UP command upon devcontainer creation

* Fix log message

---------

Co-authored-by: Felix Malfait <felix.malfait@gmail.com>
2023-05-03 11:34:10 +02:00
Anders Borch
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
Anders Borch
d5c1bd6365
Handle missing account owner (#89) 2023-04-28 07:40:40 +02:00
Charles Bochet
571cb6ed5c
Style filter key in bold in filter and search bar (#86)
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-04-27 17:28:17 +02:00
Anders Borch
00f0a36457
Implicitly start hasura console (#88) 2023-04-27 17:28:04 +02:00
Anders Borch
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
Félix Malfait
42bf653e4a
Improve documentation (#82)
* Propose new doc architecture

* Many improvements to documentation (styling, structure...)

* Remove modules added inadvertently + continue improving styling

* Swizzle navbar item to add support for custom icon

* Additional doc styling

* Setup docs for API and redirect homepage for docs
2023-04-26 19:10:17 +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
Charles Bochet
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
Sammy Teillet
884080a9da
refactor: extract render into methods (#81) 2023-04-26 17:38:05 +02:00
Charles Bochet
04051e737f Fix long table scroll 2023-04-26 17:29:00 +02:00
Charles Bochet
6c7eb53333
Add seeds and move to uuid (#80)
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-04-26 16:42:01 +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
Anders Borch
1c8a4058c3
Fix html entities and newline handling (#77)
* Fix html entities and newline handling

This forces contenteditable to behave as single line input,
and properly handles html entities.

* Proposal without reacteditable

* Fix tests and re-add focus styleé

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-04-26 11:58:40 +02:00
Anders Borch
e19a85a5d0
Build fixes (#76)
* Fix compose syntax error

It turns out that docker compose does not like a literal `true`
but it will accept a `"true"` string.

* Added missing && operators
2023-04-26 09:53:11 +02:00