PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
learnpress / assets / js / dist / admin / pages / dashboard.js

dashboard.js in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.9, at assets/js/dist/admin/pages/dashboard.js

127 lines 4.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ "use strict";
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "./assets/src/apps/js/admin/api.js":
6 /*!*****************************************!*\
7 !*** ./assets/src/apps/js/admin/api.js ***!
8 \*****************************************/
9 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14 /* harmony export */ });
15 /**
16 * List API on backend
17 */
18 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
19 apiAdminNotice: lpGlobalSettings.rest + 'lp/v1/admin/tools/admin-notices',
20 apiAdminOrderStatic: lpGlobalSettings.rest + 'lp/v1/orders/statistic',
21 apiAddons: lpGlobalSettings.rest + 'lp/v1/addon/all',
22 apiAddonAction: lpGlobalSettings.rest + 'lp/v1/addon/action'
23 });
24
25 /***/ })
26
27 /******/ });
28 /************************************************************************/
29 /******/ // The module cache
30 /******/ var __webpack_module_cache__ = {};
31 /******/
32 /******/ // The require function
33 /******/ function __webpack_require__(moduleId) {
34 /******/ // Check if module is in cache
35 /******/ var cachedModule = __webpack_module_cache__[moduleId];
36 /******/ if (cachedModule !== undefined) {
37 /******/ return cachedModule.exports;
38 /******/ }
39 /******/ // Create a new module (and put it into the cache)
40 /******/ var module = __webpack_module_cache__[moduleId] = {
41 /******/ // no module.id needed
42 /******/ // no module.loaded needed
43 /******/ exports: {}
44 /******/ };
45 /******/
46 /******/ // Execute the module function
47 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
48 /******/
49 /******/ // Return the exports of the module
50 /******/ return module.exports;
51 /******/ }
52 /******/
53 /************************************************************************/
54 /******/ /* webpack/runtime/define property getters */
55 /******/ (() => {
56 /******/ // define getter functions for harmony exports
57 /******/ __webpack_require__.d = (exports, definition) => {
58 /******/ for(var key in definition) {
59 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
60 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
61 /******/ }
62 /******/ }
63 /******/ };
64 /******/ })();
65 /******/
66 /******/ /* webpack/runtime/hasOwnProperty shorthand */
67 /******/ (() => {
68 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
69 /******/ })();
70 /******/
71 /******/ /* webpack/runtime/make namespace object */
72 /******/ (() => {
73 /******/ // define __esModule on exports
74 /******/ __webpack_require__.r = (exports) => {
75 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
76 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
77 /******/ }
78 /******/ Object.defineProperty(exports, '__esModule', { value: true });
79 /******/ };
80 /******/ })();
81 /******/
82 /************************************************************************/
83 var __webpack_exports__ = {};
84 /*!*****************************************************!*\
85 !*** ./assets/src/apps/js/admin/pages/dashboard.js ***!
86 \*****************************************************/
87 __webpack_require__.r(__webpack_exports__);
88 /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../api */ "./assets/src/apps/js/admin/api.js");
89 /**
90 * Scripts run on the Dashboard of WordPress
91 *
92 * @since 3.0.0
93 * @version 1.0.1
94 */
95
96
97 let dataOrderStatic = null;
98 let elOrderStatic = null;
99 const callAPIOrderStatic = () => {
100 if (!lpGlobalSettings.is_admin) {
101 return;
102 }
103 fetch(_api__WEBPACK_IMPORTED_MODULE_0__["default"].apiAdminOrderStatic, {
104 method: 'GET'
105 }).then(res => {
106 return res.json();
107 }).then(res => {
108 dataOrderStatic = res;
109 }).catch(err => {
110 console.log(err);
111 });
112 };
113 callAPIOrderStatic();
114 const interval = setInterval(() => {
115 elOrderStatic = document.querySelector('ul.lp-order-statuses');
116 if (elOrderStatic && dataOrderStatic !== null) {
117 if (dataOrderStatic.status === 'success' && dataOrderStatic.data) {
118 elOrderStatic.innerHTML = dataOrderStatic.data;
119 } else {
120 elOrderStatic.innerHTML = `<div class="error">${dataOrderStatic.message}</div>`;
121 }
122 clearInterval(interval);
123 }
124 }, 1);
125 /******/ })()
126 ;
127 //# sourceMappingURL=dashboard.js.map