feat(customers): add controlled CSV and XLSX customer import
This commit is contained in:
parent
613ffdc8b7
commit
82e03877b3
566 changed files with 2752 additions and 991 deletions
|
|
@ -6,6 +6,7 @@ import {
|
|||
ClipboardPlus,
|
||||
FileArchive,
|
||||
FileCog,
|
||||
FileUp,
|
||||
Gauge,
|
||||
LayoutDashboard,
|
||||
LogOut,
|
||||
|
|
@ -26,6 +27,7 @@ const quickstartRoles = ["admin", "pruefer", "mitarbeiter"];
|
|||
const navigation = [
|
||||
{ href: "/dashboard", label: "Dashboard", icon: LayoutDashboard },
|
||||
{ href: "/customers", label: "Kunden", icon: Building2 },
|
||||
{ href: "/customers/import", label: "Kunden importieren", icon: FileUp, adminOnly: true },
|
||||
{ href: "/locations", label: "Standorte", icon: MapPin },
|
||||
{ href: "/contacts", label: "Ansprechpartner", icon: UserRound },
|
||||
{ href: "/devices", label: "Geraete", icon: Stethoscope },
|
||||
|
|
@ -41,6 +43,9 @@ function canStartValidation(role?: string) {
|
|||
}
|
||||
|
||||
function isActiveRoute(pathname: string, href: string) {
|
||||
if (href === "/customers") {
|
||||
return pathname === href;
|
||||
}
|
||||
if (href === "/validations") {
|
||||
return pathname === href || (pathname.startsWith(`${href}/`) && pathname !== QUICKSTART_HREF);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue