Skip to content
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

QuickEdit in subpanel list items #10626

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

SinergiaCRM
Copy link
Contributor

Description

In SuiteCRM, subpanels allow users to create related records using the "Quick Create" view, which is embedded within the subpanel itself. However, editing existing related records is only possible by navigating to the full edit view of the record, which disrupts the context of the related items.

This PR introduces a "Quick Edit" button for subpanels, which can replace the default "Edit" button. This new functionality enables users to edit related records directly within the subpanel using the "Quick Create" view, maintaining the context of the related items.

The following changes are included:

  1. A new quickedit_button option is available for subpanels, replacing the default edit button.
  2. The "Quick Edit" button can be added to subpanels via Studio.
  3. Support for adding the button programmatically through subpanel metadata definitions.

This implementation is based on the idea discussed here:
https://community.suitecrm.com/t/quickedit-view-does-it-exist/80182/3.

Motivation and Context

This feature addresses the lack of a seamless way to edit related records within subpanels. By adding "Quick Edit" functionality, users can modify records directly within subpanels without leaving the main view, improving the user experience and saving time. This functionality is especially useful when working with related records that require frequent updates.

How To Test This

Testing via Studio

  1. Access Studio and select a module.
  2. Edit a subpanel and verify that the quickedit_button option is available.
    image
  3. Add the quickedit_button to the subpanel, save, and deploy.
  4. Open the detail view of a record for the module with the edited subpanel.
  5. Verify the following:
    1. The "↙ Edit" button appears in the subpanel.
      image
    2. Clicking the "↙ Edit" button opens the "Quick Create" view for editing the record within the subpanel.
    3. Modified data is saved correctly.

Testing via code:

  1. Edit the metadata definition of a subpanel (e.g., modules/[SUBPANEL_MODULE]/metadata/subpanels/default.php).
  2. Replace the SubPanelEditButton widget with SubPanelQuickEditButton as follows:
'quickedit_button' => array(
    'vname' => 'LBL_QUICKEDIT_BUTTON',
    'widget_class' => 'SubPanelQuickEditButton',
    'module' => '%% MY_MODULE %%',
    'width' => '4%',
    'default' => true,
),
  1. Quick Repair and Rebuild
  2. Open the detail view of a record with the edited subpanel.
  3. Verify that the "↙ Edit" button appears and allows editing of related records using the "Quick Create" view.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

@mattlorimer mattlorimer added PR:Type:Enhancement Pull requests that provide more functionality. Associated Issues are called suggestions Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member PR 9-14 Complexity Score given to PRs once assessed labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:Type:Enhancement Pull requests that provide more functionality. Associated Issues are called suggestions PR 9-14 Complexity Score given to PRs once assessed Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants