This topic is locked

Remove edit tab from Dashboard record on selection

2/21/2018 7:04:35 AM
PHPRunner General questions
J
Juliosor author

I have a Dashboard with two panels:

  1. Grid - restaurant.
  2. Record - menu.
    The grid has a master relationship with the record.
    Now, the first shows a series of restaurants. Everytime a row in this grid is clicked, the record menu view changes.
    This record may or not belong to the user. In the dashboard record settings I've allowed View/Edit tabs.
    In "Advanced security" I've allowed users only to edit only their own menus and to see the rest.
    Problem:
    If there is a menu, both tabs are allowed. If the second tab (Edit) is clicked on a menu that not belongs to the user, the Edit menu tab shows not the current menu selected, but the last one seen, or a default one.
    This can be confusing for users as they may not realise that record doesn't belong to them and that they are changing a different one that's not the one being viewed in the first place.
    Bonus: If a menu is "completed", is not editable anymore. Don't show edit tab when "completed" is True.
    Solution needed:
    Remove the edit tab in the record dashboard when the user doesn't have permission to edit it or $values["completed"] is true.
    Tried:

  • In "menu" events Is record editable set $isEditable=FALSE if menu is completed. Result: The View/Edit tabs disappear altogether from the Dashboard.
  • Change "record" for "details" of restaurant (as menu is a detail) in Dashboard. Result: Doesn't work as it shows a list when there is only one possible menu, and the edit/view buttons of the list display popups which are too small and underwhelming.


Thanks.

admin 2/21/2018

This can be done but some extra coding will be required. We do not have such a built-in functionality.
After you purchase PHPRunner contact support directly and we'll help you with this.