Compare commits
5
Commits
7d06fe8dd5
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da300da460 | ||
|
|
227952a7a3 | ||
|
|
b34d3a5854 | ||
|
|
cddb7e6aff | ||
|
|
f6c6e5e1e9 |
No files matched your search
+13
-12
@@ -9,7 +9,14 @@
|
|||||||
to="/"
|
to="/"
|
||||||
/>
|
/>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
prepend-icon="mdi-file-search"
|
prepend-icon="mdi-toy-brick-plus"
|
||||||
|
title="Changes"
|
||||||
|
value="changes"
|
||||||
|
to="/changes"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<v-list-item
|
||||||
|
prepend-icon="mdi-toy-brick-search"
|
||||||
title="Review"
|
title="Review"
|
||||||
value="review"
|
value="review"
|
||||||
to="/review"
|
to="/review"
|
||||||
@@ -21,16 +28,10 @@
|
|||||||
to="/stats"
|
to="/stats"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<v-list-item
|
|
||||||
prepend-icon="mdi-code-tags"
|
|
||||||
title="Demo"
|
|
||||||
value="demo"
|
|
||||||
to="/demo"
|
|
||||||
/>
|
|
||||||
<v-divider class="my-2"></v-divider>
|
<v-divider class="my-2"></v-divider>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
prepend-icon="mdi-cog"
|
prepend-icon="mdi-sync-off"
|
||||||
title="Settings"
|
title="Run sync (DISABLED)"
|
||||||
value="settings"
|
value="settings"
|
||||||
to="/settings"
|
to="/settings"
|
||||||
disabled="true"
|
disabled="true"
|
||||||
@@ -39,14 +40,14 @@
|
|||||||
</v-list>
|
</v-list>
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
|
|
||||||
<v-app-bar>
|
<v-app-bar density="compact">
|
||||||
<v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon>
|
<v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon>
|
||||||
|
|
||||||
<v-app-bar-title>Dashboard</v-app-bar-title>
|
<v-app-bar-title><a href="/">Dashboard</a></v-app-bar-title>
|
||||||
|
|
||||||
</v-app-bar>
|
</v-app-bar>
|
||||||
|
|
||||||
<v-main>
|
<v-main class="pa-0">
|
||||||
<router-view />
|
<router-view />
|
||||||
</v-main>
|
</v-main>
|
||||||
</v-app>
|
</v-app>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
height="40"
|
height="40"
|
||||||
>
|
>
|
||||||
<div class="text-caption">
|
<div class="text-caption">
|
||||||
StudSpider 0.2 (<small>5288d</small>)
|
StudSpider 0.2 <small>(<a href="http://git.traps.moe/ph0sgene/studspider-status/commits/branch/master">{{ gitHash }}</a>)</small>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
v-for="item in items"
|
v-for="item in items"
|
||||||
@@ -25,15 +25,15 @@
|
|||||||
class="text-caption text-disabled"
|
class="text-caption text-disabled"
|
||||||
style="position: absolute; right: 16px;"
|
style="position: absolute; right: 16px;"
|
||||||
>
|
>
|
||||||
© 2025-{{ (new Date()).getFullYear() }} <span class="d-none d-sm-inline-block">PLAY-WELL TEKNOLOGIES</span>
|
© {{ copyrightYear }} <span class="d-none d-sm-inline-block">PLAY-WELL TEKNOLOGIES</span>
|
||||||
—
|
—
|
||||||
<a
|
<a
|
||||||
class="text-decoration-none on-surface"
|
class="text-decoration-none on-surface"
|
||||||
href="https://www.mozilla.org/en-US/MPL/"
|
href="https://www.mozilla.org/en-US/MPL/2.0"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
MPL 2.0 License
|
MPL 2.0
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -41,6 +41,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { computed } from 'vue'
|
||||||
|
|
||||||
|
const gitHash = __GIT_COMMIT_HASH__
|
||||||
|
|
||||||
|
const copyrightYear = computed(() => {
|
||||||
|
const currentYear = new Date().getFullYear()
|
||||||
|
const startYear = 2025
|
||||||
|
return currentYear > startYear ? `${startYear}-${currentYear}` : `${startYear}`
|
||||||
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
|
|||||||
Whitespace-only changes.
@@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<v-container fluid class="pa-0 ma-0">
|
||||||
|
<v-card style="height: calc(100vh - 64px); display: flex; flex-direction: column;">
|
||||||
|
<v-card-title class="text-h5">Recent Changes</v-card-title>
|
||||||
|
|
||||||
|
<v-card-text style="overflow-y: auto; flex: 1; padding: 0;">
|
||||||
|
<v-list>
|
||||||
|
<template v-for="(item, index) in changeItems" :key="item.id">
|
||||||
|
<v-list-item
|
||||||
|
:title="item.title"
|
||||||
|
:subtitle="item.description"
|
||||||
|
:prepend-icon="item.icon"
|
||||||
|
three-line
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<v-chip
|
||||||
|
:color="getTypeColor(item.type)"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ item.type }}
|
||||||
|
</v-chip>
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
|
<v-divider v-if="index < changeItems.length - 1"></v-divider>
|
||||||
|
</template>
|
||||||
|
</v-list>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<route lang="yaml">
|
||||||
|
name: changes
|
||||||
|
layout: default
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
// Sample change items - replace with actual data from your API
|
||||||
|
const changeItems = ref([
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
title: 'Added set 76218 (MV)',
|
||||||
|
description: 'Marvel Spider-Man set added to inventory. Quantity: 5 units. Added 2 minutes ago.',
|
||||||
|
type: 'Add',
|
||||||
|
icon: 'mdi-plus-circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
title: 'Marked for Review 76389 (HP)',
|
||||||
|
description: 'Harry Potter Hogwarts Chamber flagged for manual review. Price mismatch detected. 15 minutes ago.',
|
||||||
|
type: 'Review',
|
||||||
|
icon: 'mdi-pencil'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
title: 'Removed duplicate 71404 (FR)',
|
||||||
|
description: 'Friends Beach House duplicate entry removed from database. 1 hour ago.',
|
||||||
|
type: 'Remove',
|
||||||
|
icon: 'mdi-minus-circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
title: 'Added set 75396 (SW)',
|
||||||
|
description: 'Star Wars AT-TE Walker added to inventory. Quantity: 2 units. 2 hours ago.',
|
||||||
|
type: 'Add',
|
||||||
|
icon: 'mdi-plus-circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
title: 'Updated set 75387 (SW)',
|
||||||
|
description: 'Star Wars Millennium Falcon inventory count updated from 3 to 5. 3 hours ago.',
|
||||||
|
type: 'Update',
|
||||||
|
icon: 'mdi-pencil'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 6,
|
||||||
|
title: 'Added set 60320 (City)',
|
||||||
|
description: 'City Fire Station added to inventory. Quantity: 8 units. 4 hours ago.',
|
||||||
|
type: 'Add',
|
||||||
|
icon: 'mdi-plus-circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 7,
|
||||||
|
title: 'Updated set 42143 (Technic)',
|
||||||
|
description: 'Technic Ferrari price updated to match Square. 5 hours ago.',
|
||||||
|
type: 'Update',
|
||||||
|
icon: 'mdi-pencil'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const getTypeColor = (type) => {
|
||||||
|
switch(type) {
|
||||||
|
case 'Add': return 'success'
|
||||||
|
case 'Remove': return 'error'
|
||||||
|
case 'Update': return 'info'
|
||||||
|
case 'Review': return 'warning'
|
||||||
|
default: return 'default'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
+27
-12
@@ -1,11 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-main>
|
<v-container fluid class="pa-0 ma-0">
|
||||||
<v-container fluid>
|
<v-row class="ma-0">
|
||||||
<v-row>
|
|
||||||
<!-- Column 1: Database Changes List -->
|
<!-- Column 1: Database Changes List -->
|
||||||
<v-col cols="12" md="3">
|
<v-col cols="12" md="3">
|
||||||
<v-card class="mb-4">
|
<v-card class="mb-4">
|
||||||
<v-card-title>Recent Changes</v-card-title>
|
<v-card-title><a href="changes/">Recent Changes</a></v-card-title>
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
v-for="(change, index) in recentChanges"
|
v-for="(change, index) in recentChanges"
|
||||||
@@ -22,6 +21,13 @@
|
|||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
<v-card class="mb-4">
|
||||||
|
<v-card-text class="text-center">
|
||||||
|
<div class="text-h4">{{ itemsWaitingForReview }}</div>
|
||||||
|
<div class="text-subtitle-1"><a href="/review">Items waiting for review</a></div>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<!-- Column 2: Graphs and Statistics -->
|
<!-- Column 2: Graphs and Statistics -->
|
||||||
@@ -59,10 +65,12 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" md="4">
|
<v-col cols="12" md="4">
|
||||||
<v-card variant="outlined">
|
<v-card variant="outlined" @click="toggleChangesView" style="cursor: pointer;">
|
||||||
<v-card-text class="text-center">
|
<v-card-text class="text-center">
|
||||||
<div class="text-h3">{{ changesThisWeek }}</div>
|
<div class="text-h3">{{ changesCount }}</div>
|
||||||
<div class="text-subtitle-1">Changes This Week</div>
|
<div class="text-subtitle-1">
|
||||||
|
{{ changesLabel }}
|
||||||
|
</div>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -73,11 +81,10 @@
|
|||||||
|
|
||||||
<!-- Column 3: Pie Chart -->
|
<!-- Column 3: Pie Chart -->
|
||||||
<v-col cols="12" md="3">
|
<v-col cols="12" md="3">
|
||||||
<v-card>
|
<v-card style="max-height: calc(100vh - 100px); display: flex; flex-direction: column;">
|
||||||
<v-card-title>Theme Distribution</v-card-title>
|
<v-card-title>Theme Distribution</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text style="overflow-y: auto; flex: 1;">
|
||||||
<v-pie
|
<v-pie
|
||||||
title="Sets by theme"
|
|
||||||
animation
|
animation
|
||||||
legend
|
legend
|
||||||
:palette="['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFEEAD',
|
:palette="['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFEEAD',
|
||||||
@@ -96,7 +103,6 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
</v-main>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -109,7 +115,14 @@
|
|||||||
// Statistics
|
// Statistics
|
||||||
const totalSets = computed(() => items.reduce((acc, item) => acc + item.value, 0))
|
const totalSets = computed(() => items.reduce((acc, item) => acc + item.value, 0))
|
||||||
const totalThemes = computed(() => items.length)
|
const totalThemes = computed(() => items.length)
|
||||||
const changesThisWeek = ref(12) // This could be computed from recentChanges if needed
|
|
||||||
|
// Dynamic changes metric
|
||||||
|
const changesThisWeek = ref(0) // Set to 0 to test auto-switching, or get from your API
|
||||||
|
const changesThisMonth = ref(45)
|
||||||
|
|
||||||
|
// Automatically show monthly if no weekly activity
|
||||||
|
const changesLabel = computed(() => changesThisWeek.value > 0 ? 'Changes This Week' : 'Changes This Month')
|
||||||
|
const changesCount = computed(() => changesThisWeek.value > 0 ? changesThisWeek.value : changesThisMonth.value)
|
||||||
|
|
||||||
// Sample recent changes data
|
// Sample recent changes data
|
||||||
const recentChanges = [
|
const recentChanges = [
|
||||||
@@ -172,4 +185,6 @@
|
|||||||
{ key: 29, title: "Art", value: 1 },
|
{ key: 29, title: "Art", value: 1 },
|
||||||
{ key: 30, title: "Botanicals", value: 1 }
|
{ key: 30, title: "Botanicals", value: 1 }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const itemsWaitingForReview = ref(7)
|
||||||
</script>
|
</script>
|
||||||
+80
-3
@@ -1,11 +1,88 @@
|
|||||||
<template>
|
<template>
|
||||||
this is the page that shows items needed for manual review
|
<v-container fluid class="pa-0 ma-0">
|
||||||
</template>
|
<v-card style="height: calc(100vh - 64px); display: flex; flex-direction: column;">
|
||||||
|
<v-card-title class="text-h5">Manual Review Items</v-card-title>
|
||||||
|
|
||||||
|
<v-card-text style="overflow-y: auto; flex: 1; padding: 0;">
|
||||||
|
<v-list>
|
||||||
|
<template v-for="(item, index) in reviewItems" :key="item.id">
|
||||||
|
<v-list-item
|
||||||
|
:title="item.title"
|
||||||
|
:subtitle="item.description"
|
||||||
|
:prepend-icon="item.icon"
|
||||||
|
three-line
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<v-chip
|
||||||
|
:color="getStatusColor(item.status)"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ item.status }}
|
||||||
|
</v-chip>
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
|
<v-divider v-if="index < reviewItems.length - 1"></v-divider>
|
||||||
|
</template>
|
||||||
|
</v-list>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
<route lang="yaml">
|
<route lang="yaml">
|
||||||
name: review
|
name: review
|
||||||
layout: default
|
layout: default
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<script setup> </script>
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
// Sample review items - replace with actual data from your API
|
||||||
|
const reviewItems = ref([
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
title: 'LEGO Set 76218 - Marvel Spider-Man',
|
||||||
|
description: 'Inventory mismatch detected. Square shows 5 units, database shows 3 units.',
|
||||||
|
status: 'Pending',
|
||||||
|
icon: 'mdi-alert-circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
title: 'LEGO Set 76389 - Harry Potter Hogwarts Chamber',
|
||||||
|
description: 'Price discrepancy found. Needs verification.',
|
||||||
|
status: 'Urgent',
|
||||||
|
icon: 'mdi-alert'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
title: 'LEGO Set 71404 - Friends Beach House',
|
||||||
|
description: 'Duplicate entry detected in system.',
|
||||||
|
status: 'Review',
|
||||||
|
icon: 'mdi-file-document-multiple'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
title: 'LEGO Set 75396 - Star Wars AT-TE Walker',
|
||||||
|
description: 'New set added to Square but not in Brickset database.',
|
||||||
|
status: 'Pending',
|
||||||
|
icon: 'mdi-plus-circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
title: 'LEGO Set 75387 - Star Wars Millennium Falcon',
|
||||||
|
description: 'Stock level adjustment required.',
|
||||||
|
status: 'Review',
|
||||||
|
icon: 'mdi-pencil'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const getStatusColor = (status) => {
|
||||||
|
switch(status) {
|
||||||
|
case 'Urgent': return 'error'
|
||||||
|
case 'Pending': return 'warning'
|
||||||
|
case 'Review': return 'info'
|
||||||
|
default: return 'default'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
+19
-1
@@ -11,9 +11,23 @@ import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
|||||||
// Utilities
|
// Utilities
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import { fileURLToPath, URL } from 'node:url'
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
import { execSync } from 'child_process'
|
||||||
|
|
||||||
|
// Get git commit hash
|
||||||
|
const getGitHash = () => {
|
||||||
|
try {
|
||||||
|
return execSync('git rev-parse --short HEAD').toString().trim()
|
||||||
|
} catch (e) {
|
||||||
|
return 'unknown'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
define: {
|
||||||
|
'__GIT_COMMIT_HASH__': JSON.stringify(getGitHash()),
|
||||||
|
'process.env': {}
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
VueRouter(),
|
VueRouter(),
|
||||||
Layouts(),
|
Layouts(),
|
||||||
@@ -59,7 +73,6 @@ export default defineConfig({
|
|||||||
'unplugin-vue-router/data-loaders/basic',
|
'unplugin-vue-router/data-loaders/basic',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
define: { 'process.env': {} },
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('src', import.meta.url)),
|
'@': fileURLToPath(new URL('src', import.meta.url)),
|
||||||
@@ -76,5 +89,10 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
port: 3000,
|
port: 3000,
|
||||||
|
host: true,
|
||||||
|
allowedHosts: [
|
||||||
|
'studspider.sh',
|
||||||
|
'.studspider.sh',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
Reference in new issue
Block a user