mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 21:20:45 +00:00
Add showReloadButton, showExportButton
This commit is contained in:
@ -52,6 +52,9 @@ public class QWidgetMetaData implements QWidgetMetaDataInterface
|
||||
private List<WidgetDropdownData> dropdowns;
|
||||
private boolean storeDropdownSelections;
|
||||
|
||||
private boolean showReloadButton = true;
|
||||
private boolean showExportButton = true;
|
||||
|
||||
protected Map<String, Serializable> defaultValues = new LinkedHashMap<>();
|
||||
|
||||
|
||||
@ -529,4 +532,66 @@ public class QWidgetMetaData implements QWidgetMetaDataInterface
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for showReloadButton
|
||||
*******************************************************************************/
|
||||
public boolean getShowReloadButton()
|
||||
{
|
||||
return (this.showReloadButton);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for showReloadButton
|
||||
*******************************************************************************/
|
||||
public void setShowReloadButton(boolean showReloadButton)
|
||||
{
|
||||
this.showReloadButton = showReloadButton;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for showReloadButton
|
||||
*******************************************************************************/
|
||||
public QWidgetMetaData withShowReloadButton(boolean showReloadButton)
|
||||
{
|
||||
this.showReloadButton = showReloadButton;
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for showExportButton
|
||||
*******************************************************************************/
|
||||
public boolean getShowExportButton()
|
||||
{
|
||||
return (this.showExportButton);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for showExportButton
|
||||
*******************************************************************************/
|
||||
public void setShowExportButton(boolean showExportButton)
|
||||
{
|
||||
this.showExportButton = showExportButton;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for showExportButton
|
||||
*******************************************************************************/
|
||||
public QWidgetMetaData withShowExportButton(boolean showExportButton)
|
||||
{
|
||||
this.showExportButton = showExportButton;
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.kingsrook.qqq.backend.core.actions.permissions.PermissionsHelper;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.AbstractActionInput;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.dashboard.QWidgetMetaData;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.dashboard.QWidgetMetaDataInterface;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.dashboard.WidgetDropdownData;
|
||||
|
||||
@ -50,6 +51,9 @@ public class QFrontendWidgetMetaData
|
||||
private final boolean storeDropdownSelections;
|
||||
private final List<WidgetDropdownData> dropdowns;
|
||||
|
||||
private boolean showReloadButton = false;
|
||||
private boolean showExportButton = false;
|
||||
|
||||
private final boolean hasPermission;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
@ -74,6 +78,12 @@ public class QFrontendWidgetMetaData
|
||||
this.dropdowns = widgetMetaData.getDropdowns();
|
||||
this.storeDropdownSelections = widgetMetaData.getStoreDropdownSelections();
|
||||
|
||||
if(widgetMetaData instanceof QWidgetMetaData qWidgetMetaData)
|
||||
{
|
||||
this.showExportButton = qWidgetMetaData.getShowExportButton();
|
||||
this.showReloadButton = qWidgetMetaData.getShowReloadButton();
|
||||
}
|
||||
|
||||
hasPermission = PermissionsHelper.hasWidgetPermission(actionInput, name);
|
||||
}
|
||||
|
||||
@ -198,4 +208,25 @@ public class QFrontendWidgetMetaData
|
||||
return storeDropdownSelections;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for showReloadButton
|
||||
**
|
||||
*******************************************************************************/
|
||||
public boolean getShowReloadButton()
|
||||
{
|
||||
return showReloadButton;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for showExportButton
|
||||
**
|
||||
*******************************************************************************/
|
||||
public boolean getShowExportButton()
|
||||
{
|
||||
return showExportButton;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user