codbex / codbex-olympus

Enterprise Resource Planing
Eclipse Public License 2.0
0 stars 0 forks source link

[Modules] Refactor widgets, navigations & reports #190

Open Mrgoblings opened 1 week ago

Mrgoblings commented 1 week ago
  1. Navigations & Widgets refactor file structure & file names
    • Navigations: Image

  1. Navigations service.js
    • Property orderNumber to be renamed to order and set the corrected value from the Navigation List
    • Remove property view
    • Remove property lazyload

Before:

const navigationData = {
    id: 'credit-notes-navigation',
    label: "Credit Notes",
    view: "credit-notes",
    group: "sales",
    orderNumber: 1000,
    lazyLoad: true,
    link: "/services/web/codbex-invoices/gen/codbex-invoices/ui/CreditNote/index.html?embedded"
};

After:

const navigationData = {
    id: 'credit-notes-navigation',
    label: "Credit Notes",
    group: "sales",
    order: 1000,
    link: "/services/web/codbex-invoices/gen/codbex-invoices/ui/CreditNote/index.html?embedded"
};

  1. Widget service.js file needs
    • Add property redirectViewId only if needed.
      When a widget is clicked it will redirect the current view to the one given. A valid redirectViewId is any "id" property from a navigation service.js file
    • Remove property lazyload

Before:

const widgetData = {
    id: 'gross-profit-widget',
    label: 'Gross Profit Widget',
    link: '/services/web/codbex-invoices/widgets/subviews/gross-profit.html',
    lazyLoad: true,
    size: "medium"
};

After:

const widgetData = {
    id: 'gross-profit-widget',
    label: 'Gross Profit Widget',
    link: '/services/web/codbex-invoices/widgets/subviews/gross-profit.html',
    redirectViewId: 'credit-notes-navigation', // OPTIONAL - if the property is missing the widget won't redirect 
    size: "small"
};
  1. Widgets Refactor

    • index.html swap