ADD: added dockerfile and docker-compose and k8s manifest
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useMatches, Link } from "react-router";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import { useMatches, useLocation, Link } from "react-router";
|
||||
import { ChevronRight, LayoutDashboard } from "lucide-react";
|
||||
|
||||
interface Breadcrumb {
|
||||
label: string;
|
||||
@@ -26,6 +26,8 @@ function getInitials(name?: string | null): string {
|
||||
|
||||
export function Topbar({ userName }: { userName?: string | null }) {
|
||||
const matches = useMatches();
|
||||
const location = useLocation();
|
||||
const isOnDashboard = location.pathname === "/";
|
||||
|
||||
const activeMatch = [...matches].reverse().find((m) => isBreadcrumbHandle(m.handle));
|
||||
const breadcrumbs: Breadcrumb[] =
|
||||
@@ -83,6 +85,28 @@ export function Topbar({ userName }: { userName?: string | null }) {
|
||||
)}
|
||||
</nav>
|
||||
|
||||
{/* Dashboard Button */}
|
||||
{!isOnDashboard && (
|
||||
<Link
|
||||
to="/"
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
gap: "0.375rem",
|
||||
fontSize: "0.875rem",
|
||||
color: "#64748b",
|
||||
textDecoration: "none",
|
||||
padding: "0.375rem 0.75rem",
|
||||
borderRadius: "0.375rem",
|
||||
border: "1px solid #e2e8f0",
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
<LayoutDashboard className="h-4 w-4" />
|
||||
Dashboard
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{/* User */}
|
||||
{userName && (
|
||||
<div style={{ display: "flex", alignItems: "center", gap: "0.625rem", marginLeft: "1rem", flexShrink: 0 }}>
|
||||
|
||||
@@ -6,7 +6,6 @@ const companySchema = z.object({
|
||||
name: z.string().min(1),
|
||||
legalForm: z.string().optional(),
|
||||
taxId: z.string().optional(),
|
||||
vatId: z.string().optional(),
|
||||
address: z.string().min(1),
|
||||
zip: z.string().min(1),
|
||||
city: z.string().min(1),
|
||||
|
||||
@@ -4,7 +4,6 @@ import { z } from "zod";
|
||||
|
||||
const customerSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
vatId: z.string().optional(),
|
||||
taxId: z.string().optional(),
|
||||
address: z.string().min(1),
|
||||
zip: z.string().min(1),
|
||||
|
||||
@@ -5,7 +5,6 @@ import { z } from "zod";
|
||||
const customerSchema = z.object({
|
||||
companyId: z.string().min(1),
|
||||
name: z.string().min(1),
|
||||
vatId: z.string().optional(),
|
||||
taxId: z.string().optional(),
|
||||
address: z.string().min(1),
|
||||
zip: z.string().min(1),
|
||||
|
||||
@@ -22,7 +22,7 @@ import { z } from "zod";
|
||||
|
||||
const schema = z.object({
|
||||
name: z.string().min(1, "Pflichtfeld"),
|
||||
vatId: z.string().optional(),
|
||||
// vatId: z.string().optional(),
|
||||
address: z.string().min(1, "Pflichtfeld"),
|
||||
zip: z.string().min(1, "Pflichtfeld"),
|
||||
city: z.string().min(1, "Pflichtfeld"),
|
||||
@@ -35,7 +35,7 @@ type FormData = z.infer<typeof schema>;
|
||||
interface Customer {
|
||||
id: string;
|
||||
name: string;
|
||||
vatId?: string | null;
|
||||
// vatId?: string | null;
|
||||
address: string;
|
||||
zip: string;
|
||||
city: string;
|
||||
@@ -93,10 +93,10 @@ function CustomerForm({
|
||||
<Label>Ort *</Label>
|
||||
<Input {...register("city")} placeholder="Berlin" />
|
||||
</div>
|
||||
<div className="space-y-1.5">
|
||||
{/* <div className="space-y-1.5">
|
||||
<Label>USt-IdNr.</Label>
|
||||
<Input {...register("vatId")} placeholder="DE..." />
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="space-y-1.5">
|
||||
<Label>E-Mail</Label>
|
||||
<Input {...register("email")} type="email" placeholder="kontakt@..." />
|
||||
@@ -185,7 +185,6 @@ export default function CustomersPage() {
|
||||
address: editCustomer.address,
|
||||
zip: editCustomer.zip,
|
||||
city: editCustomer.city,
|
||||
vatId: editCustomer.vatId ?? undefined,
|
||||
email: editCustomer.email ?? undefined,
|
||||
phone: editCustomer.phone ?? undefined,
|
||||
}}
|
||||
@@ -212,7 +211,7 @@ export default function CustomersPage() {
|
||||
<div>
|
||||
<p className="font-semibold text-gray-900">{customer.name}</p>
|
||||
<p className="text-sm text-gray-500 mt-0.5">{customer.address}, {customer.zip} {customer.city}</p>
|
||||
{customer.vatId && <p className="text-xs text-gray-400 mt-0.5">USt-IdNr.: {customer.vatId}</p>}
|
||||
{/* {customer.vatId && <p className="text-xs text-gray-400 mt-0.5">USt-IdNr.: {customer.vatId}</p>} */}
|
||||
<div className="flex gap-3 mt-2">
|
||||
{customer.email && (
|
||||
<span className="flex items-center gap-1 text-xs text-gray-500">
|
||||
|
||||
Reference in New Issue
Block a user