mirror of
https://github.com/twentyhq/twenty.git
synced 2025-01-06 03:45:15 +03:00
Fixed: Inconsistent Field Label Display on Task Side Panel (#5687)
Now all the required fields are displayed with the respective labels. - Added a `FieldContextProvider` for the field `Reminder` in the `ActivityEditorFields`. - Fixed the missing label values, by adding a missed optional `showLabel` within the `fieldDefinition` in the `useFieldContext`. fixes: #5667 ![Screenshot (342)](https://github.com/twentyhq/twenty/assets/140178357/adf9563a-6cab-4809-8616-1c256abab717)
This commit is contained in:
parent
2886664b62
commit
04dcbffe75
@ -57,11 +57,21 @@ export const ActivityEditorFields = ({
|
||||
return [upsertActivityMutation, { loading: false }];
|
||||
};
|
||||
|
||||
const { FieldContextProvider: ReminderAtFieldContextProvider } =
|
||||
useFieldContext({
|
||||
objectNameSingular: CoreObjectNameSingular.Activity,
|
||||
objectRecordId: activityId,
|
||||
fieldMetadataName: 'reminderAt',
|
||||
fieldPosition: 0,
|
||||
clearable: true,
|
||||
customUseUpdateOneObjectHook: useUpsertOneActivityMutation,
|
||||
});
|
||||
|
||||
const { FieldContextProvider: DueAtFieldContextProvider } = useFieldContext({
|
||||
objectNameSingular: CoreObjectNameSingular.Activity,
|
||||
objectRecordId: activityId,
|
||||
fieldMetadataName: 'dueAt',
|
||||
fieldPosition: 0,
|
||||
fieldPosition: 1,
|
||||
clearable: true,
|
||||
customUseUpdateOneObjectHook: useUpsertOneActivityMutation,
|
||||
});
|
||||
@ -71,7 +81,7 @@ export const ActivityEditorFields = ({
|
||||
objectNameSingular: CoreObjectNameSingular.Activity,
|
||||
objectRecordId: activityId,
|
||||
fieldMetadataName: 'assignee',
|
||||
fieldPosition: 1,
|
||||
fieldPosition: 2,
|
||||
clearable: true,
|
||||
customUseUpdateOneObjectHook: useUpsertOneActivityMutation,
|
||||
});
|
||||
@ -81,15 +91,19 @@ export const ActivityEditorFields = ({
|
||||
objectNameSingular: CoreObjectNameSingular.Activity,
|
||||
objectRecordId: activityId,
|
||||
fieldMetadataName: 'activityTargets',
|
||||
fieldPosition: 2,
|
||||
fieldPosition: 3,
|
||||
});
|
||||
|
||||
return (
|
||||
<StyledPropertyBox>
|
||||
{activity.type === 'Task' &&
|
||||
ReminderAtFieldContextProvider &&
|
||||
DueAtFieldContextProvider &&
|
||||
AssigneeFieldContextProvider && (
|
||||
<>
|
||||
<ReminderAtFieldContextProvider>
|
||||
<RecordInlineCell />
|
||||
</ReminderAtFieldContextProvider>
|
||||
<DueAtFieldContextProvider>
|
||||
<RecordInlineCell />
|
||||
</DueAtFieldContextProvider>
|
||||
|
@ -69,6 +69,7 @@ export const useFieldContext = ({
|
||||
isLabelIdentifier,
|
||||
fieldDefinition: formatFieldMetadataItemAsColumnDefinition({
|
||||
field: fieldMetadataItem,
|
||||
showLabel: true,
|
||||
position: fieldPosition,
|
||||
objectMetadataItem,
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user