| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- # app/pages/Admin/Dashboard/index.coffee
- if globalThis.stylFns and globalThis.stylFns['app/pages/Admin/Dashboard/index.styl']
- styleElement = document.createElement('style')
- styleElement.type = 'text/css'
- styleElement.textContent = globalThis.stylFns['app/pages/Admin/Dashboard/index.styl']
- document.head.appendChild(styleElement)
- module.exports = {
- props:
- domainSettings:
- type: Object
- default: -> {}
- language:
- type: String
- default: 'ru'
- data: ->
- {
- stats: {
- products: 0,
- categories: 0,
- orders: 0,
- users: 0
- }
- recentActivity: []
- loading: true
- }
- methods:
- loadDashboardData: ->
- @loading = true
- # Заглушка для загрузки данных
- setTimeout (=>
- @stats = {
- products: 156,
- categories: 12,
- orders: 24,
- users: 89
- }
- @recentActivity = [
- { type: 'product', action: 'created', name: 'Грунтовка глубокого проникновения', time: '5 мин назад' },
- { type: 'order', action: 'placed', name: 'Заказ #00125', time: '10 мин назад' },
- { type: 'user', action: 'registered', name: 'Новый пользователь', time: '15 мин назад' }
- ]
- @loading = false
- ), 1000
- mounted: ->
- @loadDashboardData()
- log '📊 Дашборд админ-панели загружен'
- render: (new Function '_ctx', '_cache', globalThis.renderFns['app/pages/Admin/Dashboard/index.pug'])()
- }
|