diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vue index 9392536..1e7bf0b 100644 --- a/frontend/src/layouts/DashboardLayout.vue +++ b/frontend/src/layouts/DashboardLayout.vue @@ -13,6 +13,7 @@ const nav = computed(() => [ { label: 'Reseller', to: '/app/resellers', icon: 'M3 21h18M5 21V7l8-4v18M19 21V11l-6-3', show: auth.isPlatformAdmin }, { label: 'Firmen', to: '/app/companies', icon: 'M3 7h18v13H3zM8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2', show: auth.isResellerAdmin || auth.isPlatformAdmin }, { label: 'Mitarbeiter', to: '/app/employees', icon: 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z', show: true }, + { label: 'Produkte', to: '/app/products', icon: 'M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16zM3.27 6.96 12 12.01l8.73-5.05M12 22.08V12', show: auth.isResellerAdmin || auth.isPlatformAdmin }, { label: 'Visitenkarten', to: '/app/card-editor', icon: 'M3 5h18v14H3zM3 10h18M7 15h5', show: true }, { label: 'Standorte', to: '/app/locations', icon: 'M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0zM12 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z', show: auth.isCompanyAdmin || auth.isResellerAdmin }, { label: 'Domains', to: '/app/domains', icon: 'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18z', show: auth.isCompanyAdmin || auth.isResellerAdmin }, diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 53bfef5..e3f2b63 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -19,6 +19,7 @@ const router = createRouter({ { path: 'resellers', name: 'resellers', component: () => import('@/views/ResellersView.vue') }, { path: 'companies', name: 'companies', component: () => import('@/views/CompaniesView.vue') }, { path: 'employees', name: 'employees', component: () => import('@/views/EmployeesView.vue') }, + { path: 'products', name: 'products', component: () => import('@/views/ProductsView.vue') }, { path: 'card-editor', name: 'card-editor', component: () => import('@/views/CardEditorView.vue') }, { path: 'locations', name: 'locations', component: () => import('@/views/LocationsView.vue') }, { path: 'domains', name: 'domains', component: () => import('@/views/DomainsView.vue') }, diff --git a/frontend/src/views/CardEditorView.vue b/frontend/src/views/CardEditorView.vue index 133eeec..dafa657 100644 --- a/frontend/src/views/CardEditorView.vue +++ b/frontend/src/views/CardEditorView.vue @@ -14,6 +14,7 @@ interface Template { front: El[]; back: El[] hasBackground?: boolean; fonts?: string[] } +interface Product { '@id': string; id: string; kind: string; name: string; sides: number; nfcEnabled: boolean; active: boolean } interface Company { '@id': string; id: string; name: string; slug: string; brandingConfig: Record | unknown[] } interface Employee { id: string; firstName: string; lastName: string; position: string | null; email: string | null; phone: string | null; mobile: string | null; company: string; department: string | null } @@ -21,6 +22,8 @@ const SCALE = 6 // px pro mm const companies = ref([]) const selectedCompanyId = ref('') +const products = ref([]) +const selectedProductId = ref('') const tpl = ref