| 1 |
/** |
| 2 |
* Statistics dashboard entry — bootstraps the per-tab modules. |
| 3 |
* |
| 4 |
* All four tabs run on the statistics/* module stack (state, api, chart, |
| 5 |
* data-table, report-modal); the legacy per-tab loaders are gone. |
| 6 |
* |
| 7 |
* @since 4.2.5.5 |
| 8 |
* @version 2.0.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
import * as lpUtils from 'lpAssetsJsPath/utils.js'; |
| 12 |
import { lpStatsFilterBar, LpStatsFilterBar } from './statistics/filter-bar.js'; |
| 13 |
import { lpStatsReportModal } from './statistics/report-modal.js'; |
| 14 |
import { lpStatsTabOverview, LpStatsTabOverview } from './statistics/tab-overview.js'; |
| 15 |
import { lpStatsTabOrders, LpStatsTabOrders } from './statistics/tab-orders.js'; |
| 16 |
import { lpStatsTabCourses, LpStatsTabCourses } from './statistics/tab-courses.js'; |
| 17 |
import { lpStatsTabUsers, LpStatsTabUsers } from './statistics/tab-users.js'; |
| 18 |
import { lpStatsTabInstructors, LpStatsTabInstructors } from './statistics/tab-instructors.js'; |
| 19 |
|
| 20 |
lpUtils.lpOnElementReady( LpStatsFilterBar.selectors.elContainer, () => { |
| 21 |
lpStatsFilterBar.init(); |
| 22 |
} ); |
| 23 |
// SweetAlert2 popup: delegated events only, no rendered container to wait for. |
| 24 |
lpStatsReportModal.init(); |
| 25 |
lpUtils.lpOnElementReady( LpStatsTabOverview.selectors.elContainer, () => { |
| 26 |
lpStatsTabOverview.init(); |
| 27 |
} ); |
| 28 |
lpUtils.lpOnElementReady( LpStatsTabOrders.selectors.elContainer, () => { |
| 29 |
lpStatsTabOrders.init(); |
| 30 |
} ); |
| 31 |
lpUtils.lpOnElementReady( LpStatsTabCourses.selectors.elContainer, () => { |
| 32 |
lpStatsTabCourses.init(); |
| 33 |
} ); |
| 34 |
lpUtils.lpOnElementReady( LpStatsTabUsers.selectors.elContainer, () => { |
| 35 |
lpStatsTabUsers.init(); |
| 36 |
} ); |
| 37 |
lpUtils.lpOnElementReady( LpStatsTabInstructors.selectors.elContainer, () => { |
| 38 |
lpStatsTabInstructors.init(); |
| 39 |
} ); |
| 40 |
|