-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add timezone and datetime formatting on workspace member level #5699
add timezone and datetime formatting on workspace member level #5699
Conversation
TODOs/FIXMEs:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
- Added timezone and datetime formatting fields to
WorkspaceMember
type in GraphQL - Introduced
DateTimeSettings
component for user-specific datetime preferences - Refactored and moved timezone and datetime utilities to
workspace-member
module - Deleted redundant components and constants related to datetime settings
- Updated mock data to include new timezone and datetime formatting properties
packages/twenty-front/src/modules/settings/profile/components/DateTimeSettings.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workspace-member/utils/detectTimeFormat.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workspace-member/utils/formatDateLabel.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workspace-member/utils/formatTimeLabel.ts
Outdated
Show resolved
Hide resolved
...ty-server/src/modules/workspace-member/standard-objects/workspace-member.workspace-entity.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, added some first comments, think we should use enums for workspace-member entity as you suggest, also we would like to create a graphql type to be able to use those enum values in the front
packages/twenty-front/src/modules/workspace-member/utils/formatDateLabel.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workspace-member/utils/formatDateLabel.ts
Outdated
Show resolved
Hide resolved
...ty-server/src/modules/workspace-member/standard-objects/workspace-member.workspace-entity.ts
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/engine/core-modules/user/dtos/workspace-member.dto.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workspace-member/constants/TimeFormat.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workspace-member/constants/TimeFormat.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workspace-member/constants/DateFormat.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Introduced timezone and datetime formatting at the workspace member level
- Updated GraphQL queries and mutations to use new
DateFormat
andTimeFormat
enums - Enhanced
DateTimeSettings.tsx
for granular control over date and time settings - Added new fields and enums for timeZone, dateFormat, and timeFormat in
workspace-member.dto.ts
- Updated
workspace-member.workspace-entity.ts
to define and use new enums for date and time formats
@@ -0,0 +1,242 @@ | |||
import { FieldMetadataComplexOption } from 'src/engine/metadata-modules/field-metadata/dtos/options.input'; | |||
|
|||
export enum WorkspaceMemberLocaleEnum { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
closes twentyhq#5552 <img width="754" alt="Bildschirmfoto 2024-07-19 um 23 35 25" src="https://github.com/user-attachments/assets/715192cd-679d-430a-95f1-8bc1d8fd26f4">
@Bonapara Fixed! the issue (twentyhq#6365) where the `background-color` style was not set, causing the bug. Now, the background color is properly applied. https://github.com/user-attachments/assets/668bd3cc-77ea-42a9-84d4-071fca497e07
This PR commit history is dirty and there is a lot of changes here that we don't need on locale and colorScheme. I create a new PR and handpicked the relevant changes : #6408 |
@lucasbordeau I don't really get your comment to be honest, the commit history get squashed. And as for the changes on locale and colorScheme this was an ask I made to @AdityaPimpalkar during review to remain consistent and avoid creating debt by having those inconsistencies between different fields. He did it because I asked |
What was the issue with the PR? The vision is for WorkspaceMember is to become an object visible in the UI at somepoint, we're trying to migrate everything to standard objects (like the work we're doing on Note/Task). The work done by @AdityaPimpalkar was in line with that long-term vision |
closes: #5140