Move dashboard to root level route
- Dashboard now accessible at /dashboard instead of /upadaj/dashboard - Updated all navigation links to use new /dashboard route - Login page still at /upadaj, redirects to /dashboard on success - Colors and requests remain under /upadaj prefix - Updated test files to reference new dashboard path
This commit is contained in:
@@ -18,7 +18,7 @@ describe('No Mock Data Tests', () => {
|
|||||||
|
|
||||||
it('should use API service in all components', () => {
|
it('should use API service in all components', () => {
|
||||||
const pagePath = join(process.cwd(), 'app', 'page.tsx');
|
const pagePath = join(process.cwd(), 'app', 'page.tsx');
|
||||||
const adminPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
const adminPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
||||||
|
|
||||||
const pageContent = readFileSync(pagePath, 'utf-8');
|
const pageContent = readFileSync(pagePath, 'utf-8');
|
||||||
const adminContent = readFileSync(adminPath, 'utf-8');
|
const adminContent = readFileSync(adminPath, 'utf-8');
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { join } from 'path';
|
|||||||
|
|
||||||
describe('UI Features Tests', () => {
|
describe('UI Features Tests', () => {
|
||||||
it('should have color hex input in admin form', () => {
|
it('should have color hex input in admin form', () => {
|
||||||
const adminDashboardPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
const adminDashboardPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
||||||
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||||
|
|
||||||
// Check for color input
|
// Check for color input
|
||||||
@@ -22,7 +22,7 @@ describe('UI Features Tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should have number inputs for quantity fields', () => {
|
it('should have number inputs for quantity fields', () => {
|
||||||
const adminDashboardPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
const adminDashboardPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
||||||
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||||
|
|
||||||
// Check for number inputs for quantities
|
// Check for number inputs for quantities
|
||||||
@@ -34,7 +34,7 @@ describe('UI Features Tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should have number input for quantity', () => {
|
it('should have number input for quantity', () => {
|
||||||
const adminDashboardPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
const adminDashboardPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
||||||
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||||
|
|
||||||
// Check for number input
|
// Check for number input
|
||||||
@@ -44,7 +44,7 @@ describe('UI Features Tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should have predefined material options', () => {
|
it('should have predefined material options', () => {
|
||||||
const adminDashboardPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
const adminDashboardPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
||||||
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||||
|
|
||||||
// Check for material select dropdown
|
// Check for material select dropdown
|
||||||
@@ -54,7 +54,7 @@ describe('UI Features Tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should have admin header with navigation', () => {
|
it('should have admin header with navigation', () => {
|
||||||
const adminDashboardPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
const adminDashboardPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
||||||
|
|
||||||
const dashboardContent = readFileSync(adminDashboardPath, 'utf-8');
|
const dashboardContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ export default function ColorsManagement() {
|
|||||||
<h2 className="text-xl font-bold text-gray-900 dark:text-white mb-6">Admin Panel</h2>
|
<h2 className="text-xl font-bold text-gray-900 dark:text-white mb-6">Admin Panel</h2>
|
||||||
<nav className="space-y-2">
|
<nav className="space-y-2">
|
||||||
<a
|
<a
|
||||||
href="/upadaj/dashboard"
|
href="/dashboard"
|
||||||
className="block px-4 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded"
|
className="block px-4 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded"
|
||||||
>
|
>
|
||||||
Filamenti
|
Filamenti
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default function AdminLogin() {
|
|||||||
trackEvent('Admin', 'Login', 'Success');
|
trackEvent('Admin', 'Login', 'Success');
|
||||||
|
|
||||||
// Redirect to admin dashboard using window.location for static export
|
// Redirect to admin dashboard using window.location for static export
|
||||||
window.location.href = '/upadaj/dashboard';
|
window.location.href = '/dashboard';
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
setError('Neispravno korisničko ime ili lozinka');
|
setError('Neispravno korisničko ime ili lozinka');
|
||||||
console.error('Login error:', err);
|
console.error('Login error:', err);
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ export default function ColorRequestsAdmin() {
|
|||||||
<h1 className="text-3xl font-bold text-gray-800 dark:text-gray-100">Zahtevi za Boje</h1>
|
<h1 className="text-3xl font-bold text-gray-800 dark:text-gray-100">Zahtevi za Boje</h1>
|
||||||
<div className="space-x-4">
|
<div className="space-x-4">
|
||||||
<Link
|
<Link
|
||||||
href="/upadaj/dashboard"
|
href="/dashboard"
|
||||||
className="px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700"
|
className="px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700"
|
||||||
>
|
>
|
||||||
Inventar
|
Inventar
|
||||||
|
|||||||
Reference in New Issue
Block a user