New Plugins: - USB plugin: Device checkout/checkin with employee lookup, checkout history - Notifications plugin: Announcements with types, scheduling, shopfloor display - Network plugin: Network device management with subnets and VLANs - Equipment and Computers plugins: Asset type separation Frontend: - EmployeeSearch component: Reusable employee lookup with autocomplete - USB views: List, detail, checkout/checkin modals - Notifications views: List, form with recognition mode - Network views: Device list, detail, form - Calendar view with FullCalendar integration - Shopfloor and TV dashboard views - Reports index page - Map editor for asset positioning - Light/dark mode fixes for map tooltips Backend: - Employee search API with external lookup service - Collector API for PowerShell data collection - Reports API endpoints - Slides API for TV dashboard - Fixed AppVersion model (removed BaseModel inheritance) - Added checkout_name column to usbcheckouts table Styling: - Unified detail page styles - Improved pagination (page numbers instead of prev/next) - Dark/light mode theme improvements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
71 lines
1.6 KiB
Vue
71 lines
1.6 KiB
Vue
<template>
|
|
<div class="login-container">
|
|
<div class="login-box">
|
|
<img src="/ge-aerospace-logo.svg" alt="GE Aerospace" class="login-logo" />
|
|
<h1>ShopDB</h1>
|
|
|
|
<div v-if="error" class="error-message">
|
|
{{ error }}
|
|
</div>
|
|
|
|
<form @submit.prevent="handleLogin">
|
|
<div class="form-group">
|
|
<label for="username">Username</label>
|
|
<input
|
|
id="username"
|
|
v-model="username"
|
|
type="text"
|
|
class="form-control"
|
|
required
|
|
autofocus
|
|
/>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password">Password</label>
|
|
<input
|
|
id="password"
|
|
v-model="password"
|
|
type="password"
|
|
class="form-control"
|
|
required
|
|
/>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary" :disabled="loading">
|
|
{{ loading ? 'Logging in...' : 'Login' }}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
import { useRouter } from 'vue-router'
|
|
import { useAuthStore } from '../stores/auth'
|
|
|
|
const router = useRouter()
|
|
const authStore = useAuthStore()
|
|
|
|
const username = ref('')
|
|
const password = ref('')
|
|
const error = ref('')
|
|
const loading = ref(false)
|
|
|
|
async function handleLogin() {
|
|
error.value = ''
|
|
loading.value = true
|
|
|
|
const result = await authStore.login(username.value, password.value)
|
|
|
|
loading.value = false
|
|
|
|
if (result.success) {
|
|
router.push('/')
|
|
} else {
|
|
error.value = result.message
|
|
}
|
|
}
|
|
</script>
|