Commit Graph

4622 Commits

Author SHA1 Message Date
Antoine Moreaux
9bbb963a08
refactor(settings): nest support section within workspace (#8937)
Refactor the settings structure to include the support section within
the workspace feature when multi-workspace is enabled. This update
provides a more consistent user interface by grouping related settings,
thereby enhancing the manageability of workspace-specific actions.

Fix #8914
2024-12-06 17:58:46 +01:00
Antoine Moreaux
6285186ead
doc(tips): add tips to inform on authenticate methods settings (#8936)
Fix #8879
2024-12-06 17:54:47 +01:00
Guillim
4208bd2b83
Settings Icon CSS update (#8934)
Current :

![image](https://github.com/user-attachments/assets/985e4f1b-6379-43ee-9311-25b455d8f5c0)

Expected : 
<img width="594" alt="Screenshot 2024-12-06 at 17 01 45"
src="https://github.com/user-attachments/assets/a26a5415-ecd2-4111-a093-ae049b734925">


Design Request from @Bonapara 😸
2024-12-06 17:47:28 +01:00
Raphaël Bosi
9c67a109af
Fix SingleRecordSelectMenuItemsWithSearch (#8932)
- Fix all fields being selected when opening dropdown
- Fix not being able to set back to no selection when a record is
selected and there is only one record to select

Before:



https://github.com/user-attachments/assets/31185a05-7e1a-4550-aa2a-591683934224


After:


https://github.com/user-attachments/assets/e3cd388b-44de-42e2-970b-b4d4f31253bc
2024-12-06 17:41:58 +01:00
Thomas Trompette
e1a0259154
Split record crud actions (#8930)
Having a global record crud action adds complex logic.
We decided to split those actions. I only kept a common folder / module
in backend.

⚠️ this may break existing workflows if these were using previous
actions!
2024-12-06 16:58:57 +01:00
Raphaël Bosi
229a93e41a
Fix advanced settings icon tool and right bar alignment (#8910)
Before:
<img width="253" alt="Capture d’écran 2024-12-05 à 18 27 58"
src="https://github.com/user-attachments/assets/73f943d9-d5be-4f0c-8b65-a2c0a8420b80">


After:
<img width="233" alt="Capture d’écran 2024-12-05 à 18 27 45"
src="https://github.com/user-attachments/assets/e3992655-fd1f-4748-91e7-3f4e3a2a5fda">

Co-authored-by: Weiko <corentin@twenty.com>
2024-12-06 15:37:46 +00:00
Lucas Bordeau
a9cb20f317
Refactor and fixes dropdown bugs (#8807)
Fixes https://github.com/twentyhq/twenty/issues/8788
Fixes https://github.com/twentyhq/twenty/issues/8793
Fixes https://github.com/twentyhq/twenty/issues/8791
Fixes https://github.com/twentyhq/twenty/issues/8890
Fixes https://github.com/twentyhq/twenty/issues/8893

- [x] Also : 

Icon buttons under dropdown are visible without blur : 

![Capture d’écran du 2024-11-29
15-09-53](https://github.com/user-attachments/assets/f563333d-4e43-4ded-acc7-62e116004ed9)

- [x] Also : 

<img width="237" alt="image"
src="https://github.com/user-attachments/assets/e4c70936-beff-4481-89cb-0a32a36e0ee2">

- [x] Also : 

<img width="335" alt="image"
src="https://github.com/user-attachments/assets/5be60395-6baf-49eb-8d40-197add049e20">

- [x] Also : 

<img width="287" alt="image"
src="https://github.com/user-attachments/assets/a317561f-7986-4d70-a1c0-deee4f4e268a">

- Button create new without padding
- Container is expanding

- [x] Also : 

<img width="303" alt="image"
src="https://github.com/user-attachments/assets/09f8a27f-91db-4191-acdc-aaaeedaf6da5">

- [x] Also : 

<img width="133" alt="image"
src="https://github.com/user-attachments/assets/fe17b32e-f7a4-46c4-8040-239eaf8198e8">

Font is cut at bottom ?

- [x] Also : 

<img width="385" alt="image"
src="https://github.com/user-attachments/assets/7bab2092-2936-4112-a2ee-d32d6737e304">

The component should flip and not resize in this situation

- [x] Also : 

<img width="244" alt="image"
src="https://github.com/user-attachments/assets/5384f49a-71f9-4638-a60c-158cc8c83f81">

- [x] Also : 


![image](https://github.com/user-attachments/assets/9cd1f43a-df59-401e-9a41-bdb8e93ebe58)
2024-12-06 14:27:48 +00:00
Guillim
14b7bcf262
Fix phone not reactive (#8918)
Fixin reactivity on the multi items phone component (add/delete/edit
phones)

<img width="325" alt="Screenshot 2024-12-06 at 11 03 34"
src="https://github.com/user-attachments/assets/96ddaf82-19ae-4a09-aa45-04caad2f0af1">

---------

Co-authored-by: khuddite <khuddite@gmail.com>
Co-authored-by: Weiko <deniaud.corentin@gmail.com>
2024-12-06 14:45:14 +01:00
Antoine Moreaux
36fb14179b
feat(workspace): Add subdomain availability check (#8906)
Implemented a feature to check the availability of subdomains when
updating workspace settings. This includes a new mutation,
`isSubdomainAvailable`, to validate subdomain availability through
GraphQL. The frontend now verifies if a subdomain is available to
prevent duplicates during updates.

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-12-06 13:28:30 +00:00
Thomas Trompette
5c565345ae
Add delete record action (#8908)
<img width="1272" alt="Capture d’écran 2024-12-05 à 18 04 19"
src="https://github.com/user-attachments/assets/dcbcc761-2f6d-4b6d-9e10-0f5b25d12c39">

- Adding new action
- Adding tests
- Moving into action folder
2024-12-06 13:02:17 +01:00
Antoine Moreaux
ab22fd560a
fix(): Add default name to workspace in MultiWorkspaceDropdownButton (#8924)
Fix #8923
2024-12-06 12:23:02 +01:00
martmull
2b3b073570
8725 workflow avoid serverless function autosave errors (#8916)
See issue #8725 
- Build function asynchronously using a job
- prevent useless builds
- run promises simultaneously

Todo:
- fix outputSchema computing
2024-12-06 10:13:12 +00:00
Raphaël Bosi
a8867fd090
Remove advanced settings wrapper from security page (#8912)
Before:
Without advanced settings toggled:
<img width="1512" alt="Capture d’écran 2024-12-05 à 19 12 53"
src="https://github.com/user-attachments/assets/efe550e2-5b7f-483f-9726-254acefb2872">

With advanced settings toggled:
<img width="1512" alt="Capture d’écran 2024-12-05 à 19 13 01"
src="https://github.com/user-attachments/assets/2fab6843-5be1-4d5b-83c4-94c22c85d4d3">

After:
Without advanced settings toggled:
<img width="1512" alt="Capture d’écran 2024-12-05 à 19 12 34"
src="https://github.com/user-attachments/assets/72d87281-3822-42d7-816b-403724052678">

With advanced settings toggled:
<img width="1512" alt="Capture d’écran 2024-12-05 à 19 12 26"
src="https://github.com/user-attachments/assets/34c87be4-d528-41a8-b269-e274939a75c7">
2024-12-06 00:17:47 +01:00
Khuddite
50af41f170
Remove duplicate plus sign for phone numbers (#8871)
Fixes #8838 

1. Summary
It seems [this PR](https://github.com/twentyhq/twenty/pull/8614) caused
the issue. We added a plus sign on front-end when the
[callingCode](c735026f6c/packages/twenty-front/src/modules/ui/field/display/components/PhonesDisplay.tsx (L70))
retrieved from back-end already has a plus sign.

2. Solution
@guillim Please let me know if I missed a case where the plus sign is
not there for the `callingCode`. If so, I think we should check whether
or not `callingCode` has a leading plus sign on front-end before adding
it. For now, I just removed the code that appends a plus sign on
front-end.

3. Screenshots

![localhost_3001_objects_people_view=f4aee583-9d0c-4961-a6e1-fd66bc51dfd5](https://github.com/user-attachments/assets/9fe8b361-47b9-4e3f-82b7-570713cf430c)

---------

Co-authored-by: guillim <guigloo@msn.com>
Co-authored-by: Guillim <guillim@users.noreply.github.com>
Co-authored-by: Weiko <deniaud.corentin@gmail.com>
2024-12-05 22:41:14 +01:00
Guillim
4623b6127b
Dropdown in dropdown (#8911)
Dropdown in dropdown bug
while still fixing scroll issue 
fix #8716
2024-12-05 19:07:19 +01:00
eliasylonen
f60ce384c6
CSV importing and exporting fixes (#8824)
Fixes issue https://github.com/twentyhq/twenty/issues/5793 (and
duplicate https://github.com/twentyhq/twenty/issues/8822)

- Fix importing multi-select and array fields.
- Fix exporting and importing RAW_JSON fields.

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
2024-12-05 18:44:53 +01:00
Weiko
815e5dfa16
Fix migration folder (#8909)
## Context
Common migrations now live in a different directory however the PR that
added that behavior was not up to date with the few migrations that were
merged recently.

This PR moves the migrations to the correct folder so they can be
executed properly.

## Test
reset-db

Before
<img width="1505" alt="Screenshot 2024-12-05 at 18 14 13"
src="https://github.com/user-attachments/assets/6cabf094-805a-4101-aeb2-3678497c2947">
After
<img width="1200" alt="Screenshot 2024-12-05 at 18 15 40"
src="https://github.com/user-attachments/assets/3ae59af5-d615-48e0-bfde-9467770acc27">
2024-12-05 18:19:22 +01:00
Raphaël Bosi
c23896c5dc
Fix dropdown overflow (#8907)
Fixes:
<img width="267" alt="Capture d’écran 2024-12-03 à 14 59 24"
src="https://github.com/user-attachments/assets/73278208-25d2-4225-a632-eb37cc69fcd6">
2024-12-05 18:12:59 +01:00
Raphaël Bosi
de56c01206
8733 refactor gmailhandleerrorservice (#8901)
Closes #8733 
- Refactor `GmailHandleErrorService`
- Add tests and mocks for the errors
2024-12-05 17:57:57 +01:00
Antoine Moreaux
680366e998
fix(): validate subdomain (#8902)
Fix #8876
2024-12-05 17:30:23 +01:00
Antoine Moreaux
f4c5d03b98
fix(): redirect loop + signout (#8899) 2024-12-05 16:24:24 +01:00
Ana Sofia Marin Alexandre
11d244194f
Add billing tables (#8772)
Beforehand, the name of the branch is not representative of the work
that has been done in this PR

**TLDR:**

Solves https://github.com/twentyhq/private-issues/issues/192
Add 3 tables BillingCustomer, BillingProduct and BillingPrice and
BillingMeter to core, inspired by the Stripe implementation. Separates
migration, between common and billing on order to not populate the db of
the self-hosting instances with unused tables.

**In order to test:**

Run the command:
npx nx typeorm -- migration:run -d
src/database/typeorm/core/core.datasource.ts


**Considerations:**

I only put the information we should use right now in the Billing
module, for instance columns like meter or agreggation formula where
omitted in the creation of the tables.
These columns and other ones who fall on the same spectrum will be added
as we need them.

If you want to add more information to the table, I'll leave some
utility links down bellow:

- BillingPrices: https://docs.stripe.com/api/prices/object
- BillingCustomer: https://docs.stripe.com/api/customers/object
- BillingProduct:  https://docs.stripe.com/api/products/object

**Next Steps**

Use the Stripe Webhook in order to update the tables accordingly

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-05 16:17:35 +01:00
Weiko
c993f2de0b
Fix user email unique constraint (#8898)
## Context
Fix wrong unique index on user email as we don't want an index on
email/deletedAt but a partial on a where condition on deletedAt. This
should enforce email unicity excluding the ones that have a deletedAt

## Test
Run
```sql
SELECT email, COUNT(*) as duplicate_count
FROM core."user"
WHERE "deletedAt" IS NULL
GROUP BY email
HAVING COUNT(*) > 1
ORDER BY duplicate_count DESC;
```
to check duplicates before running the migration
2024-12-05 15:54:12 +01:00
Marie
26ff344f56
Refetch aggregate queries on record creation/update/deletion of record (#8885)
Closes #8755.
Refetching the aggregate queries on an object following creation,
update, deletion of a record.
2024-12-05 15:23:54 +01:00
Guillim
9ed9b4746a
Settings Form Select refacto (#8875)
fixes #8751
2024-12-05 13:44:24 +00:00
Guillim
6c78cac908
Fix wrapping text side effects (#8895)
- ellipsis on the letter level instead of work level
- summaryCard title line-height diffferent from the record line-height
2024-12-05 14:43:16 +01:00
martmull
455e548bea
8839 workflow follow up code step (#8856)
- add readonly mode
- fix falsy stepOutput computation
2024-12-05 13:26:28 +00:00
Antoine Moreaux
081ecbcfaf
review(front): refacto url-manager (#8861)
Replace https://github.com/twentyhq/twenty/pull/8855
2024-12-05 11:47:51 +01:00
Jérémy M
7ab00a4c82
feat: record group fetch more (#8868)
Fix #8756 

This PR is adding a load more button when we're grouping by a field in
table view.
Only 8 records are printed at first, and a click on `Load more` is
needed to show more records.

<img width="1347" alt="Screenshot 2024-12-04 at 11 54 15 AM"
src="https://github.com/user-attachments/assets/4ad6ad4f-8de9-424d-b7b6-5f82f28c53df">
<img width="1352" alt="Screenshot 2024-12-04 at 11 54 23 AM"
src="https://github.com/user-attachments/assets/2a94b4ac-7285-4ba2-9cff-d2f653e36302">

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-05 10:51:56 +01:00
Thomas des Francs
b686e0b2e6
Update BackgroundDark.ts (#8883)
Fixes #8877

Improved Contrast for better modal visibility

### After
![CleanShot 2024-12-05 at 09 39
59](https://github.com/user-attachments/assets/1a8723d3-fe2b-488f-9e45-7f396af0cbb4)

### Before
![CleanShot 2024-12-05 at 09 39
05](https://github.com/user-attachments/assets/b2882e37-265b-42db-8bed-d32e756cc737)
2024-12-05 10:50:34 +01:00
Thomas Trompette
36e4357bb1
Select full record in variable dropdown (#8851)
Output schema is now separated in two sections:
- object, that gather all informations on the selectable object
- fields, that display object fields in a record context, or simply the
available fields from the previous steps

The dropdown variable has now a new mode:
- if objectNameSingularToSelect is defined, it goes into an object mode.
Only objects of the right type will be shown
- if not set, it will use the already existing mode, to select a field

When an object is selected, it actually set the id of the object



https://github.com/user-attachments/assets/1c95f8fd-10f0-4c1c-aeb7-c7d847e89536
2024-12-05 09:48:34 +00:00
Antoine Moreaux
33e69805cb
review(): from PR #8656 (#8870) 2024-12-05 10:46:13 +01:00
Baptiste Devessier
99caab1412
Select all fields even those not loaded yet when doing Ctrl+A or Cmd+A on Record Table (#8849)
Solves
https://github.com/twentyhq/twenty/pull/8282#issuecomment-2508641480
2024-12-05 06:11:48 +01:00
JorgeGraciaViveros
02f34211b5
Updated email invitation logic to include sender details in the From … (#8858)
Updated email invitation logic to include sender details in the From
field.

Please feel free to provide comments so that we can make adjustments as
early as possible if needed


Fixes #7001

---------

Co-authored-by: Your Name <your@email.address>
Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-05 05:52:35 +01:00
Raphaël Bosi
078e23154a
Update messaging and calendar doc (#8869)
Update messaging and calendar doc
2024-12-04 17:30:50 +01:00
Jérémy M
2fa5fb7de7
fix: record group issues (#8854)
This PR is fixing the following issues with record groups:

- [x] [Backend] - Only update view groups when a field is edited if this
one already has view groups
- [x] [Backend] - Editing a Select field metadata option brake view
groups
- [x] [Frontend] - Changing the group by field from one to another brake
record group and doesn't remove the previous ones
- [x] [Frontend & Backend] - Mark `kanbanFieldMetadataId` as deprecated
in favour of `viewGroups.fieldMetadataId`

Also the following has been checked:

- [x] Properly displayed a table with only one view groups
- [x] Properly displayed a table without view groups
2024-12-04 16:03:25 +01:00
Baptiste Devessier
9142bdfb92
Add Select form field (#8815)
Closes https://github.com/twentyhq/twenty/pull/8815

I took inspiration from existing parts of the codebase. Please, see the
comments I left below.

Remaining questions:

- I'm not sure about the best way to handle hotkey scopes in the
components easily



https://github.com/user-attachments/assets/7a6dd144-d528-4f68-97cd-c9181f3954f9
2024-12-04 15:39:14 +01:00
Guillim
2c0d3e93d2
Error 500 (#8845) 2024-12-04 14:03:06 +00:00
Weiko
c735026f6c
Fix seed-demo command (#8866)
## Context
Fix seed demo command since we added a subdomain non-nullable column we
needed to update the command to fill that info for the demo workspace
2024-12-04 11:24:48 +01:00
Raphaël Bosi
743169a260
Fix message participant assignation bug (#8857)
Closes #8846
2024-12-03 23:27:08 +01:00
Marie
2fc247cb21
Display and update aggregate queries in kanban views (#8833)
Closes #8752, #8753, #8754

Implements usage of aggregate queries in kanban views.

https://github.com/user-attachments/assets/732590ca-2785-4c57-82d5-d999a2279e92

TO DO

1. write tests + storybook
2. Fix values displayed should have the same format as defined in number
fields + Fix display for amountMicros

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-12-03 22:46:57 +01:00
Weiko
5e891a135b
Fix CI (#8862) 2024-12-03 21:58:43 +01:00
Antoine Moreaux
7943141d03
feat(*): allow to select auth providers + add multiworkspace with subdomain management (#8656)
## Summary
Add support for multi-workspace feature and adjust configurations and
states accordingly.
- Introduced new state isMultiWorkspaceEnabledState.
- Updated ClientConfigProviderEffect component to handle
multi-workspace.
- Modified GraphQL schema and queries to include multi-workspace related
configurations.
- Adjusted server environment variables and their respective
documentation to support multi-workspace toggle.
- Updated server-side logic to handle new multi-workspace configurations
and conditions.
2024-12-03 19:06:28 +01:00
nitin
9a65e80566
Remove the heart icon button to add the view as a favorite from the top bar (#8769)
closes #8546 

@Bonapara please check the behaviour, if this is what you were looking
for! ;)
2024-12-03 13:49:00 +01:00
Weiko
3c7805c6d0
Add field isLabelSyncedWithName (#8829)
## Context
The recent addition of object renaming introduced issues with enum
names. Enum names should follow the pattern
`${schemaName}.${tableName}_${columnName}_enum`. To address this, and to
allow users to customize the API name (which is included in the enum
name, columnName), this PR implements behavior similar to object
renaming by introducing a `isLabelSyncedWithName` boolean.

<img width="624" alt="Screenshot 2024-12-02 at 11 58 49"
src="https://github.com/user-attachments/assets/690fb71c-83f0-4922-80c0-946c92dacc30">
<img width="596" alt="Screenshot 2024-12-02 at 11 58 39"
src="https://github.com/user-attachments/assets/af9a0037-7cf5-40c3-9ed5-d51b340c8087">
2024-12-03 13:22:12 +01:00
Guillim
7e4277fbe4
Better errors handling (#8835)
- [ ] Catch this specific `500` error
- [ ] Make sure catched `500` errors are sent to sentry for the Cloud
version
- [ ] Hide the option to sync email with google in this situation where
the according env var is missing
- [x] Add Worskpace information to all catched errors for better
debugging

fix #8607
2024-12-03 12:16:38 +01:00
Raphaël Bosi
32194a88b3
Implement contextual actions for the workflows (#8814)
Implemented the following actions for the workflows:
- Test Workflow
- Discard Draft
- Activate Draft
- Activate Workflow Last Published Version
- Deactivate Workflow
- See Workflow Executions
- See Workflow Active Version
- See Workflow Versions History

And the following actions for the workflow versions:
- Use As Draft
- See Workflow Versions History
- See Workflow Executions

Video example:


https://github.com/user-attachments/assets/016956a6-6f2e-4de5-9605-d6e14526cbb3

A few of these actions are links to the relations of the workflow object
(link to a filtered table). To generalize this behavior, I will create
an hook named `useSeeRelationsActionSingleRecordAction` to automatically
generate links to a showPage if the relation is a Many To One or to a
filtered table if the relation is a One to Many for all the record
types.
I will also create actions which will allow to create a relation.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-03 12:09:51 +01:00
Antoine Moreaux
7b2d9894f3
fix(environment): Make SSL variables optional (#8843)
Previously, SSL_KEY_PATH and SSL_CERT_PATH were required if the
SERVER_URL started with 'https'. This change makes these variables
optional, allowing greater flexibility in dealing with SSL
configurations. This update helps in scenarios where SSL paths are
managed differently or not needed.
2024-12-03 11:20:24 +01:00
martmull
d0ff1ffd5f
8723 workflow add editor in serverless function code step (#8805)
- create a serverless function when creating a new workflow code step
- add code editor in workflow code step
- move workflowVersion steps management from frontend to backend
  - add a custom resolver for workflow-version management
  - fix optimistic rendering on frontend
- fix css
- delete serverless function when deleting workflow code step

TODO
- Don't update serverlessFunction if no code change
- Factorize what can be between crud trigger and crud step
- Publish serverless version when activating workflow
- delete serverless functions when deleting workflow or workflowVersion
- fix optimistic rendering for code updates
- Unify CRUD types

<img width="1279" alt="image"
src="https://github.com/user-attachments/assets/3d97ee9f-4b96-4abc-9d36-5c0280058be4">
2024-12-03 08:41:13 +00:00
Baptiste Devessier
9d7632cb4f
Update best-practices-front.mdx (#8836) 2024-12-02 17:26:31 +01:00