Aller au contenu principal

Dashboard Configuration

Description

The Dashboard Configuration defines the structure and content of dashboards within the Liberty Core framework.
A dashboard consists of header metadata and content components that can be dynamically rendered.

Header Fields

Field NameTypeDescription
DSH_IDNumberUnique identifier for the dashboard.
DSH_LABELStringName of the dashboard.
DSH_ROWNumberNumber of rows in the layout.
DSH_COLUMNNumberNumber of columns in the layout.

Content Fields

Field NameTypeDescription
DSH_IDNumberDashboard ID it belongs to.
DSH_COL_IDNumberColumn identifier.
DSH_DISPLAY_TITLEStringWhether to display the title ("Y" or "N").
DSH_TITLEStringTitle of the dashboard component.
DSH_ROWNumberRow position in the layout.
DSH_COLUMNNumberColumn position in the layout.
DSH_COMPONENTEnumComponent type (e.g., FormsContent).
DSH_CONTENTJSXThe actual component to be displayed.

Example Usage

import { getDashboard } from "@nomana-it/liberty-core"

export const DashboardExample = async () => {
const dashboard = await getDashboard(1);

return (
<div>
<h2>{dashboard?.header.DSH_LABEL}</h2>
<ul>
{dashboard?.content.map((item, index) => (
<li key={index}>
<strong>{item.DSH_TITLE}</strong> (Row: {item.DSH_ROW}, Column: {item.DSH_COLUMN})
</li>
))}
</ul>
</div>
);
};

🔗 GitHub Repository (Core): Liberty Core
🔗 GitHub Repository (Test Project): Liberty Test
📖 Live Documentation: Liberty Core Docs
💖 Sponsor & Support: Sponsor Liberty Core