Add Create related records to Record standard actions (#13095)
#12924 Add Create related records to Record standard actions - add the "Create related records" option to the standard Record actions in the command menu. - apply to one-to-many relations. - command should open a side panel with an empty record for the selected object. <img width="518" alt="Screenshot" src="https://github.com/user-attachments/assets/0388aaf9-b974-4ae1-85bf-2966d89cbbec" /> --------- Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com> Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
+8
-1
@@ -19,6 +19,7 @@ export const useMatchingCommandMenuActions = ({
|
||||
workflowRunRecordSelectionActions,
|
||||
workflowRunGlobalActions,
|
||||
fallbackActions,
|
||||
createRelatedRecordActions,
|
||||
} = useCommandMenuActions();
|
||||
|
||||
const matchingNavigateActions =
|
||||
@@ -40,13 +41,18 @@ export const useMatchingCommandMenuActions = ({
|
||||
workflowRunGlobalActions,
|
||||
);
|
||||
|
||||
const matchingCreateRelatedRecordActions = filterActionsWithCommandMenuSearch(
|
||||
createRelatedRecordActions,
|
||||
);
|
||||
|
||||
const noResults =
|
||||
!matchingStandardActionRecordSelectionActions.length &&
|
||||
!matchingWorkflowRunRecordSelectionActions.length &&
|
||||
!matchingStandardActionGlobalActions.length &&
|
||||
!matchingWorkflowRunGlobalActions.length &&
|
||||
!matchingStandardActionObjectActions.length &&
|
||||
!matchingNavigateActions.length;
|
||||
!matchingNavigateActions.length &&
|
||||
!matchingCreateRelatedRecordActions.length;
|
||||
|
||||
return {
|
||||
noResults,
|
||||
@@ -56,6 +62,7 @@ export const useMatchingCommandMenuActions = ({
|
||||
matchingStandardActionGlobalActions,
|
||||
matchingWorkflowRunGlobalActions,
|
||||
matchingNavigateActions,
|
||||
matchingCreateRelatedRecordActions,
|
||||
fallbackActions: noResults ? fallbackActions : [],
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user