@illuminateeducation/dna-atd-frontend 1.0.1-DNAATD-2189.0 → 1.0.2-DNAATD-3045-v3-POC.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -21
- package/dist/assets/dna-atd-frontend.css +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +47350 -0
- package/dist/index.es.js.map +1 -0
- package/dist/src/App.vue.d.ts +2 -0
- package/dist/src/components/common/BaseButton.vue.d.ts +16 -0
- package/dist/src/components/common/BaseInput.vue.d.ts +8 -0
- package/dist/src/components/common/BaseModal.vue.d.ts +19 -0
- package/dist/src/components/common/ErrorBoundary.vue.d.ts +37 -0
- package/dist/src/composables/useAsync.d.ts +24 -0
- package/dist/src/composables/useClickOutside.d.ts +7 -0
- package/dist/src/composables/useForm.d.ts +38 -0
- package/dist/src/composables/useLocalStorage.d.ts +24 -0
- package/dist/src/composables/useWindowSize.d.ts +20 -0
- package/dist/src/config/app.config.d.ts +67 -0
- package/dist/src/context/backendContext.d.ts +9 -0
- package/dist/src/features/admin/customization/composables/useCustomization.d.ts +19 -0
- package/dist/src/features/admin/customization/store/customizationStore.d.ts +30 -0
- package/dist/src/features/admin/customization/views/CustomizationView.vue.d.ts +2 -0
- package/dist/src/features/admin/validation/composables/useValidation.d.ts +18 -0
- package/dist/src/features/admin/validation/store/validationStore.d.ts +27 -0
- package/dist/src/features/admin/validation/views/ValidationView.vue.d.ts +2 -0
- package/dist/src/features/reports/codeBasedJasper/components/AssessmentFinder.vue.d.ts +618 -0
- package/dist/src/features/reports/codeBasedJasper/components/DownloadButtons.vue.d.ts +13 -0
- package/dist/src/features/reports/codeBasedJasper/components/FavoritesWidget.vue.d.ts +10 -0
- package/dist/src/features/reports/codeBasedJasper/components/MultipleAssessmentIdsField.vue.d.ts +18 -0
- package/dist/src/features/reports/codeBasedJasper/components/ReportFilters.vue.d.ts +18 -0
- package/dist/src/features/reports/codeBasedJasper/components/ReportPagination.vue.d.ts +11 -0
- package/dist/src/features/reports/codeBasedJasper/components/ReportViewer.vue.d.ts +16 -0
- package/dist/src/features/reports/codeBasedJasper/composables/useCodeBasedJasper.d.ts +184 -0
- package/dist/src/features/reports/codeBasedJasper/mount.d.ts +1 -0
- package/dist/src/features/reports/codeBasedJasper/services/codeBasedJasperApi.d.ts +190 -0
- package/dist/src/features/reports/codeBasedJasper/store/codeBasedJasperStore.d.ts +503 -0
- package/dist/src/features/reports/codeBasedJasper/types/index.d.ts +54 -0
- package/dist/src/features/reports/codeBasedJasper/views/CodeBasedJasperReportView.vue.d.ts +32 -0
- package/dist/src/index.d.ts +51 -0
- package/dist/src/layouts/AdminLayout.vue.d.ts +2 -0
- package/dist/src/plugins/globalErrorHandling.d.ts +36 -0
- package/dist/src/plugins/vuetify.d.ts +86 -0
- package/dist/src/router/index.d.ts +16 -0
- package/dist/src/services/apiService.d.ts +33 -0
- package/dist/src/services/integration.d.ts +54 -0
- package/dist/src/types/api.d.ts +27 -0
- package/dist/src/types/backend.d.ts +27 -0
- package/dist/src/utils/helpers.d.ts +50 -0
- package/dist/src/utils/safeJson.d.ts +17 -0
- package/dist/src/views/HomeView.vue.d.ts +2 -0
- package/dist/src/views/NotFoundView.vue.d.ts +2 -0
- package/package.json +33 -22
- package/dist/.vite/manifest.json +0 -87
- package/dist/assets/AdminLayout.css +0 -1
- package/dist/assets/AdminLayout.js +0 -1
- package/dist/assets/CustomizationView.css +0 -1
- package/dist/assets/CustomizationView.js +0 -1
- package/dist/assets/HomeView.css +0 -1
- package/dist/assets/HomeView.js +0 -1
- package/dist/assets/NotFoundView.css +0 -1
- package/dist/assets/NotFoundView.js +0 -1
- package/dist/assets/ValidationView.css +0 -1
- package/dist/assets/ValidationView.js +0 -1
- package/dist/assets/_plugin-vue_export-helper.js +0 -1
- package/dist/assets/index.css +0 -1
- package/dist/assets/index.js +0 -2
- package/dist/index.html +0 -14
- package/index.js +0 -1
- package/src/App.vue +0 -68
- package/src/__tests__/App.spec.js +0 -26
- package/src/components/common/BaseButton.vue +0 -20
- package/src/components/common/BaseInput.vue +0 -27
- package/src/components/common/BaseModal.vue +0 -37
- package/src/composables/useAsync.js +0 -34
- package/src/composables/useClickOutside.js +0 -29
- package/src/composables/useForm.js +0 -89
- package/src/composables/useLocalStorage.js +0 -51
- package/src/composables/useWindowSize.js +0 -30
- package/src/config/app.config.js +0 -79
- package/src/features/admin/customization/composables/useCustomization.js +0 -19
- package/src/features/admin/customization/store/customizationStore.js +0 -30
- package/src/features/admin/customization/views/CustomizationView.vue +0 -17
- package/src/features/admin/validation/composables/useValidation.js +0 -18
- package/src/features/admin/validation/store/validationStore.js +0 -25
- package/src/features/admin/validation/views/ValidationView.vue +0 -17
- package/src/index.js +0 -53
- package/src/layouts/AdminLayout.vue +0 -146
- package/src/main.js +0 -41
- package/src/router/index.js +0 -57
- package/src/services/apiService.js +0 -72
- package/src/services/integration.js +0 -59
- package/src/services/phpIntegration.js +0 -1
- package/src/stores/counter.js +0 -12
- package/src/utils/helpers.js +0 -119
- package/src/utils/validators.js +0 -131
- package/src/views/HomeView.vue +0 -121
- package/src/views/NotFoundView.vue +0 -56
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ref, onMounted, onUnmounted } from 'vue'
|
|
2
|
-
import { debounce } from '../utils/helpers'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Composable for tracking window size
|
|
6
|
-
* @returns {Object}
|
|
7
|
-
*/
|
|
8
|
-
export function useWindowSize() {
|
|
9
|
-
const width = ref(window.innerWidth)
|
|
10
|
-
const height = ref(window.innerHeight)
|
|
11
|
-
|
|
12
|
-
const handleResize = debounce(() => {
|
|
13
|
-
width.value = window.innerWidth
|
|
14
|
-
height.value = window.innerHeight
|
|
15
|
-
}, 200)
|
|
16
|
-
|
|
17
|
-
onMounted(() => {
|
|
18
|
-
window.addEventListener('resize', handleResize)
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
onUnmounted(() => {
|
|
22
|
-
window.removeEventListener('resize', handleResize)
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
width,
|
|
27
|
-
height
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
package/src/config/app.config.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Application Configuration
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export const appConfig = {
|
|
6
|
-
// Application name
|
|
7
|
-
name: 'DNA ATD Frontend',
|
|
8
|
-
|
|
9
|
-
// Version
|
|
10
|
-
version: '1.0.0',
|
|
11
|
-
|
|
12
|
-
// API Configuration
|
|
13
|
-
api: {
|
|
14
|
-
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000/api',
|
|
15
|
-
timeout: 30000,
|
|
16
|
-
headers: {
|
|
17
|
-
'Content-Type': 'application/json'
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
// Theme Configuration
|
|
22
|
-
theme: {
|
|
23
|
-
default: 'light',
|
|
24
|
-
available: ['light', 'dark', 'auto']
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
// Layout Configuration
|
|
28
|
-
layout: {
|
|
29
|
-
sidebarWidth: 250,
|
|
30
|
-
headerHeight: 64,
|
|
31
|
-
footerHeight: 48
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
// Pagination
|
|
35
|
-
pagination: {
|
|
36
|
-
defaultPageSize: 10,
|
|
37
|
-
pageSizeOptions: [10, 20, 50, 100]
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
// Date Format
|
|
41
|
-
dateFormat: {
|
|
42
|
-
short: 'MMM DD, YYYY',
|
|
43
|
-
long: 'MMMM DD, YYYY HH:mm',
|
|
44
|
-
time: 'HH:mm:ss'
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
// Storage Keys
|
|
48
|
-
storageKeys: {
|
|
49
|
-
theme: 'app_theme',
|
|
50
|
-
locale: 'app_locale',
|
|
51
|
-
token: 'app_token',
|
|
52
|
-
user: 'app_user'
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
// Feature Flags
|
|
56
|
-
features: {
|
|
57
|
-
darkMode: true,
|
|
58
|
-
notifications: true,
|
|
59
|
-
analytics: false
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
// Validation Rules
|
|
63
|
-
validation: {
|
|
64
|
-
password: {
|
|
65
|
-
minLength: 8,
|
|
66
|
-
requireUppercase: true,
|
|
67
|
-
requireLowercase: true,
|
|
68
|
-
requireNumbers: true,
|
|
69
|
-
requireSpecialChars: true
|
|
70
|
-
},
|
|
71
|
-
username: {
|
|
72
|
-
minLength: 3,
|
|
73
|
-
maxLength: 20
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export default appConfig
|
|
79
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { storeToRefs } from 'pinia'
|
|
2
|
-
import { useCustomizationStore } from '../store/customizationStore'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Composable for customization feature
|
|
6
|
-
*/
|
|
7
|
-
export function useCustomization() {
|
|
8
|
-
const customizationStore = useCustomizationStore()
|
|
9
|
-
const { settings, isLoading } = storeToRefs(customizationStore)
|
|
10
|
-
const { fetchSettings, updateSettings } = customizationStore
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
settings,
|
|
14
|
-
isLoading,
|
|
15
|
-
fetchSettings,
|
|
16
|
-
updateSettings
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { defineStore } from 'pinia'
|
|
2
|
-
import { ref } from 'vue'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Customization Store - Basic Example
|
|
6
|
-
*/
|
|
7
|
-
export const useCustomizationStore = defineStore('customization', () => {
|
|
8
|
-
// State
|
|
9
|
-
const settings = ref({})
|
|
10
|
-
const isLoading = ref(false)
|
|
11
|
-
|
|
12
|
-
// Actions
|
|
13
|
-
const fetchSettings = async () => {
|
|
14
|
-
isLoading.value = true
|
|
15
|
-
// Add your API call here
|
|
16
|
-
isLoading.value = false
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const updateSettings = (newSettings) => {
|
|
20
|
-
settings.value = { ...settings.value, ...newSettings }
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
settings,
|
|
25
|
-
isLoading,
|
|
26
|
-
fetchSettings,
|
|
27
|
-
updateSettings
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="customization-view">
|
|
3
|
-
<h2>Customization Module</h2>
|
|
4
|
-
<p>Customization feature content goes here.</p>
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script setup>
|
|
9
|
-
// Customization module - basic implementation
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<style scoped>
|
|
13
|
-
.customization-view {
|
|
14
|
-
padding: 2rem;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { storeToRefs } from 'pinia'
|
|
2
|
-
import { useValidationStore } from '../store/validationStore'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Composable for validation feature
|
|
6
|
-
*/
|
|
7
|
-
export function useValidation() {
|
|
8
|
-
const validationStore = useValidationStore()
|
|
9
|
-
const { data, isLoading } = storeToRefs(validationStore)
|
|
10
|
-
const { fetchData } = validationStore
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
data,
|
|
14
|
-
isLoading,
|
|
15
|
-
fetchData
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { defineStore } from 'pinia'
|
|
2
|
-
import { ref } from 'vue'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Validation Store - Basic Example
|
|
6
|
-
*/
|
|
7
|
-
export const useValidationStore = defineStore('validation', () => {
|
|
8
|
-
// State
|
|
9
|
-
const data = ref([])
|
|
10
|
-
const isLoading = ref(false)
|
|
11
|
-
|
|
12
|
-
// Actions
|
|
13
|
-
const fetchData = async () => {
|
|
14
|
-
isLoading.value = true
|
|
15
|
-
// Add your API call here
|
|
16
|
-
isLoading.value = false
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
data,
|
|
21
|
-
isLoading,
|
|
22
|
-
fetchData
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="validation-view">
|
|
3
|
-
<h2>Validation Module</h2>
|
|
4
|
-
<p>Validation feature content goes here.</p>
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script setup>
|
|
9
|
-
// Validation module - basic implementation
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<style scoped>
|
|
13
|
-
.validation-view {
|
|
14
|
-
padding: 2rem;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
|
package/src/index.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { createApp } from 'vue'
|
|
2
|
-
import { createPinia } from 'pinia'
|
|
3
|
-
import router from './router'
|
|
4
|
-
import App from './App.vue'
|
|
5
|
-
|
|
6
|
-
export function createDnaAtdApp(elementId = '#app') {
|
|
7
|
-
const app = createApp(App)
|
|
8
|
-
const pinia = createPinia()
|
|
9
|
-
app.use(pinia)
|
|
10
|
-
app.use(router)
|
|
11
|
-
return app.mount(elementId)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function createDnaAtdAppInstance() {
|
|
15
|
-
const app = createApp(App)
|
|
16
|
-
const pinia = createPinia()
|
|
17
|
-
app.use(pinia)
|
|
18
|
-
app.use(router)
|
|
19
|
-
return app
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { default as App } from './App.vue'
|
|
23
|
-
export { default as router } from './router'
|
|
24
|
-
|
|
25
|
-
export { default as BaseButton } from './components/common/BaseButton.vue'
|
|
26
|
-
export { default as BaseInput } from './components/common/BaseInput.vue'
|
|
27
|
-
export { default as BaseModal } from './components/common/BaseModal.vue'
|
|
28
|
-
|
|
29
|
-
export { default as AdminLayout } from './layouts/AdminLayout.vue'
|
|
30
|
-
|
|
31
|
-
export { useAsync } from './composables/useAsync'
|
|
32
|
-
export { useForm } from './composables/useForm'
|
|
33
|
-
export { useClickOutside } from './composables/useClickOutside'
|
|
34
|
-
export { useLocalStorage } from './composables/useLocalStorage'
|
|
35
|
-
export { useWindowSize } from './composables/useWindowSize'
|
|
36
|
-
|
|
37
|
-
export { useValidationStore } from './features/admin/validation/store/validationStore'
|
|
38
|
-
export { useCustomizationStore } from './features/admin/customization/store/customizationStore'
|
|
39
|
-
|
|
40
|
-
export { useValidation } from './features/admin/validation/composables/useValidation'
|
|
41
|
-
export { useCustomization } from './features/admin/customization/composables/useCustomization'
|
|
42
|
-
|
|
43
|
-
export { default as ValidationView } from './features/admin/validation/views/ValidationView.vue'
|
|
44
|
-
export { default as CustomizationView } from './features/admin/customization/views/CustomizationView.vue'
|
|
45
|
-
|
|
46
|
-
export { default as apiService } from './services/apiService'
|
|
47
|
-
export { appConfig } from './config/app.config'
|
|
48
|
-
|
|
49
|
-
export * from './utils/helpers'
|
|
50
|
-
export * from './utils/validators'
|
|
51
|
-
|
|
52
|
-
export { default as HomeView } from './views/HomeView.vue'
|
|
53
|
-
export { default as NotFoundView } from './views/NotFoundView.vue'
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="admin-layout">
|
|
3
|
-
<aside class="admin-sidebar">
|
|
4
|
-
<div class="sidebar-header">
|
|
5
|
-
<h2>Admin Panel</h2>
|
|
6
|
-
</div>
|
|
7
|
-
<nav class="sidebar-nav">
|
|
8
|
-
<router-link
|
|
9
|
-
to="/admin/validation"
|
|
10
|
-
class="nav-item"
|
|
11
|
-
active-class="active"
|
|
12
|
-
>
|
|
13
|
-
<span class="nav-icon">✓</span>
|
|
14
|
-
<span>Validation</span>
|
|
15
|
-
</router-link>
|
|
16
|
-
<router-link
|
|
17
|
-
to="/admin/customization"
|
|
18
|
-
class="nav-item"
|
|
19
|
-
active-class="active"
|
|
20
|
-
>
|
|
21
|
-
<span class="nav-icon">🎨</span>
|
|
22
|
-
<span>Customization</span>
|
|
23
|
-
</router-link>
|
|
24
|
-
</nav>
|
|
25
|
-
<div class="sidebar-footer">
|
|
26
|
-
<router-link to="/" class="back-link">
|
|
27
|
-
← Back to Home
|
|
28
|
-
</router-link>
|
|
29
|
-
</div>
|
|
30
|
-
</aside>
|
|
31
|
-
|
|
32
|
-
<main class="admin-content">
|
|
33
|
-
<div class="content-header">
|
|
34
|
-
<h1>{{ pageTitle }}</h1>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="content-body">
|
|
37
|
-
<router-view />
|
|
38
|
-
</div>
|
|
39
|
-
</main>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script setup>
|
|
44
|
-
import { computed } from 'vue'
|
|
45
|
-
import { useRoute } from 'vue-router'
|
|
46
|
-
|
|
47
|
-
const route = useRoute()
|
|
48
|
-
|
|
49
|
-
const pageTitle = computed(() => {
|
|
50
|
-
return route.meta.title || 'Admin'
|
|
51
|
-
})
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<style scoped>
|
|
55
|
-
.admin-layout {
|
|
56
|
-
display: flex;
|
|
57
|
-
min-height: 100vh;
|
|
58
|
-
background-color: #f5f7fa;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.admin-sidebar {
|
|
62
|
-
width: 250px;
|
|
63
|
-
background-color: #2c3e50;
|
|
64
|
-
color: white;
|
|
65
|
-
display: flex;
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.sidebar-header {
|
|
70
|
-
padding: 2rem 1.5rem;
|
|
71
|
-
border-bottom: 1px solid rgba(255,255,255,0.1);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.sidebar-header h2 {
|
|
75
|
-
margin: 0;
|
|
76
|
-
font-size: 1.5rem;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.sidebar-nav {
|
|
80
|
-
flex: 1;
|
|
81
|
-
padding: 1rem 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.nav-item {
|
|
85
|
-
display: flex;
|
|
86
|
-
align-items: center;
|
|
87
|
-
gap: 1rem;
|
|
88
|
-
padding: 1rem 1.5rem;
|
|
89
|
-
color: rgba(255,255,255,0.8);
|
|
90
|
-
text-decoration: none;
|
|
91
|
-
transition: all 0.3s;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.nav-item:hover {
|
|
95
|
-
background-color: rgba(255,255,255,0.1);
|
|
96
|
-
color: white;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.nav-item.active {
|
|
100
|
-
background-color: #3498db;
|
|
101
|
-
color: white;
|
|
102
|
-
border-right: 3px solid #2ecc71;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.nav-icon {
|
|
106
|
-
font-size: 1.2rem;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.sidebar-footer {
|
|
110
|
-
padding: 1.5rem;
|
|
111
|
-
border-top: 1px solid rgba(255,255,255,0.1);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.back-link {
|
|
115
|
-
color: rgba(255,255,255,0.8);
|
|
116
|
-
text-decoration: none;
|
|
117
|
-
transition: color 0.3s;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.back-link:hover {
|
|
121
|
-
color: white;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.admin-content {
|
|
125
|
-
flex: 1;
|
|
126
|
-
display: flex;
|
|
127
|
-
flex-direction: column;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.content-header {
|
|
131
|
-
background: white;
|
|
132
|
-
padding: 1.5rem 2rem;
|
|
133
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.content-header h1 {
|
|
137
|
-
margin: 0;
|
|
138
|
-
font-size: 1.5rem;
|
|
139
|
-
color: #2c3e50;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.content-body {
|
|
143
|
-
flex: 1;
|
|
144
|
-
overflow-y: auto;
|
|
145
|
-
}
|
|
146
|
-
</style>
|
package/src/main.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { createApp } from 'vue'
|
|
2
|
-
import { createPinia } from 'pinia'
|
|
3
|
-
|
|
4
|
-
import App from './App.vue'
|
|
5
|
-
import router from './router'
|
|
6
|
-
|
|
7
|
-
// Backend Integration: Read data from DOM element attributes
|
|
8
|
-
const appElement = document.getElementById('app')
|
|
9
|
-
const configData = appElement?.getAttribute('data-config')
|
|
10
|
-
const userData = appElement?.getAttribute('data-user')
|
|
11
|
-
|
|
12
|
-
// Parse backend-provided data
|
|
13
|
-
const backendConfig = configData ? JSON.parse(configData) : {}
|
|
14
|
-
const backendUser = userData ? JSON.parse(userData) : {}
|
|
15
|
-
|
|
16
|
-
// Create Vue app
|
|
17
|
-
const app = createApp(App)
|
|
18
|
-
|
|
19
|
-
// Make backend data available globally
|
|
20
|
-
app.config.globalProperties.$config = backendConfig
|
|
21
|
-
app.config.globalProperties.$user = backendUser
|
|
22
|
-
|
|
23
|
-
// Setup plugins
|
|
24
|
-
app.use(createPinia())
|
|
25
|
-
app.use(router)
|
|
26
|
-
|
|
27
|
-
// Mount app when DOM is ready
|
|
28
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
29
|
-
// Add any DOM modifications needed for backend integration
|
|
30
|
-
const canvas = document.getElementById('canvas')
|
|
31
|
-
if (canvas) {
|
|
32
|
-
canvas.style.padding = '0'
|
|
33
|
-
canvas.classList.add('vue-app')
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Mount the Vue app
|
|
37
|
-
if (appElement) {
|
|
38
|
-
app.mount('#app')
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
|
package/src/router/index.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
-
|
|
3
|
-
const router = createRouter({
|
|
4
|
-
history: createWebHistory(import.meta.env.BASE_URL),
|
|
5
|
-
routes: [
|
|
6
|
-
{
|
|
7
|
-
path: '/',
|
|
8
|
-
name: 'home',
|
|
9
|
-
component: () => import('../views/HomeView.vue')
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
path: '/admin',
|
|
13
|
-
name: 'admin',
|
|
14
|
-
component: () => import('../layouts/AdminLayout.vue'),
|
|
15
|
-
redirect: '/admin/validation',
|
|
16
|
-
children: [
|
|
17
|
-
{
|
|
18
|
-
path: 'validation',
|
|
19
|
-
name: 'admin-validation',
|
|
20
|
-
component: () => import('../features/admin/validation/views/ValidationView.vue'),
|
|
21
|
-
meta: {
|
|
22
|
-
title: 'Validation Management'
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
path: 'customization',
|
|
27
|
-
name: 'admin-customization',
|
|
28
|
-
component: () => import('../features/admin/customization/views/CustomizationView.vue'),
|
|
29
|
-
meta: {
|
|
30
|
-
title: 'UI Customization'
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
meta: {
|
|
35
|
-
requiresAuth: true
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
path: '/:pathMatch(.*)*',
|
|
40
|
-
name: 'not-found',
|
|
41
|
-
component: () => import('../views/NotFoundView.vue')
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
// Navigation guard for authentication
|
|
47
|
-
router.beforeEach((to, from, next) => {
|
|
48
|
-
if (to.meta.requiresAuth) {
|
|
49
|
-
// Add your authentication logic here
|
|
50
|
-
// For now, we'll just allow access
|
|
51
|
-
next()
|
|
52
|
-
} else {
|
|
53
|
-
next()
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
export default router
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API Service
|
|
3
|
-
* Centralized API calls using fetch
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000/api'
|
|
7
|
-
|
|
8
|
-
class ApiService {
|
|
9
|
-
constructor(baseURL = API_BASE_URL) {
|
|
10
|
-
this.baseURL = baseURL
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async request(endpoint, options = {}) {
|
|
14
|
-
const url = `${this.baseURL}${endpoint}`
|
|
15
|
-
const config = {
|
|
16
|
-
headers: {
|
|
17
|
-
'Content-Type': 'application/json',
|
|
18
|
-
...options.headers
|
|
19
|
-
},
|
|
20
|
-
...options
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
const response = await fetch(url, config)
|
|
25
|
-
|
|
26
|
-
if (!response.ok) {
|
|
27
|
-
throw new Error(`HTTP error! status: ${response.status}`)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return await response.json()
|
|
31
|
-
} catch (error) {
|
|
32
|
-
console.error('API request failed:', error)
|
|
33
|
-
throw error
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
get(endpoint, options = {}) {
|
|
38
|
-
return this.request(endpoint, { method: 'GET', ...options })
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
post(endpoint, data, options = {}) {
|
|
42
|
-
return this.request(endpoint, {
|
|
43
|
-
method: 'POST',
|
|
44
|
-
body: JSON.stringify(data),
|
|
45
|
-
...options
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
put(endpoint, data, options = {}) {
|
|
50
|
-
return this.request(endpoint, {
|
|
51
|
-
method: 'PUT',
|
|
52
|
-
body: JSON.stringify(data),
|
|
53
|
-
...options
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
patch(endpoint, data, options = {}) {
|
|
58
|
-
return this.request(endpoint, {
|
|
59
|
-
method: 'PATCH',
|
|
60
|
-
body: JSON.stringify(data),
|
|
61
|
-
...options
|
|
62
|
-
})
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
delete(endpoint, options = {}) {
|
|
66
|
-
return this.request(endpoint, { method: 'DELETE', ...options })
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export const apiService = new ApiService()
|
|
71
|
-
export default apiService
|
|
72
|
-
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Integration Service
|
|
3
|
-
* Handles communication between Vue app and backend
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export class Integration {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.config = this.getConfig()
|
|
9
|
-
this.user = this.getUser()
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Get configuration from backend
|
|
14
|
-
*/
|
|
15
|
-
getConfig() {
|
|
16
|
-
const appElement = document.getElementById('app')
|
|
17
|
-
const configData = appElement?.getAttribute('data-config')
|
|
18
|
-
return configData ? JSON.parse(configData) : {}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Get user data from backend
|
|
23
|
-
*/
|
|
24
|
-
getUser() {
|
|
25
|
-
const appElement = document.getElementById('app')
|
|
26
|
-
const userData = appElement?.getAttribute('data-user')
|
|
27
|
-
return userData ? JSON.parse(userData) : {}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get any custom data attribute
|
|
32
|
-
*/
|
|
33
|
-
getData(attribute) {
|
|
34
|
-
const appElement = document.getElementById('app')
|
|
35
|
-
const data = appElement?.getAttribute(`data-${attribute}`)
|
|
36
|
-
return data ? JSON.parse(data) : null
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Emit event to backend (via window for backend to listen)
|
|
41
|
-
*/
|
|
42
|
-
emitToBackend(eventName, data) {
|
|
43
|
-
window.dispatchEvent(new CustomEvent(`vue:${eventName}`, { detail: data }))
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Listen for backend events
|
|
48
|
-
*/
|
|
49
|
-
listenFromBackend(eventName, callback) {
|
|
50
|
-
window.addEventListener(`backend:${eventName}`, (event) => {
|
|
51
|
-
callback(event.detail)
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Singleton instance
|
|
57
|
-
export const integration = new Integration()
|
|
58
|
-
export default integration
|
|
59
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/src/stores/counter.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ref, computed } from 'vue'
|
|
2
|
-
import { defineStore } from 'pinia'
|
|
3
|
-
|
|
4
|
-
export const useCounterStore = defineStore('counter', () => {
|
|
5
|
-
const count = ref(0)
|
|
6
|
-
const doubleCount = computed(() => count.value * 2)
|
|
7
|
-
function increment() {
|
|
8
|
-
count.value++
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return { count, doubleCount, increment }
|
|
12
|
-
})
|