chore: align device terminology to cash register across wizard and success pages
All checks were successful
Staging Build / build (push) Successful in 2m46s
All checks were successful
Staging Build / build (push) Successful in 2m46s
This commit is contained in:
@@ -113,12 +113,12 @@ export default async function OrderSuccessPage({
|
|||||||
</Badge>
|
</Badge>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="space-y-4">
|
<CardContent className="space-y-4">
|
||||||
{/* Produkte gruppiert nach Gerät */}
|
{/* Produkte gruppiert nach Kasse */}
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{Object.entries(groupedItems).map(([deviceName, devItems]) => (
|
{Object.entries(groupedItems).map(([deviceName, devItems]) => (
|
||||||
<div key={deviceName} className="space-y-2 border-b border-white/5 pb-3 last:border-0 last:pb-0">
|
<div key={deviceName} className="space-y-2 border-b border-white/5 pb-3 last:border-0 last:pb-0">
|
||||||
<div className="bg-white/5 px-2 py-1 rounded text-xs text-primary font-bold">
|
<div className="bg-white/5 px-2 py-1 rounded text-xs text-primary font-bold">
|
||||||
Gerät: {deviceName}
|
Kasse: {deviceName}
|
||||||
</div>
|
</div>
|
||||||
{devItems.map((item) => (
|
{devItems.map((item) => (
|
||||||
<div key={item.product_id} className="space-y-1 pl-2">
|
<div key={item.product_id} className="space-y-1 pl-2">
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export const InvoicePDF = ({ order, orderSnapshot, customer }: any) => {
|
|||||||
} else {
|
} else {
|
||||||
oneTimeNet += item.base_price || 0;
|
oneTimeNet += item.base_price || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.selected_modules?.forEach((mod: any) => {
|
item.selected_modules?.forEach((mod: any) => {
|
||||||
const qty = mod.quantity || 1;
|
const qty = mod.quantity || 1;
|
||||||
const price = mod.total_price ?? (mod.price * qty);
|
const price = mod.total_price ?? (mod.price * qty);
|
||||||
@@ -152,7 +152,7 @@ export const InvoicePDF = ({ order, orderSnapshot, customer }: any) => {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Text style={styles.title}>
|
<Text style={styles.title}>
|
||||||
{isSubscription ? 'Anfragebestätigung: Software-Abonnement' : 'Anfragebestätigung: Einmalige Lizenzen'}
|
Anfragebestätigung: {order.order_number || order.id}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<View style={styles.section}>
|
<View style={styles.section}>
|
||||||
@@ -176,7 +176,7 @@ export const InvoicePDF = ({ order, orderSnapshot, customer }: any) => {
|
|||||||
<View key={groupIdx} style={{ marginBottom: 12, borderWidth: 1, borderColor: '#e2e8f0', borderRadius: 4, padding: 8, backgroundColor: '#f8fafc' }}>
|
<View key={groupIdx} style={{ marginBottom: 12, borderWidth: 1, borderColor: '#e2e8f0', borderRadius: 4, padding: 8, backgroundColor: '#f8fafc' }}>
|
||||||
<View style={{ borderBottomWidth: 1, borderBottomColor: '#cbd5e1', paddingBottom: 4, marginBottom: 6 }}>
|
<View style={{ borderBottomWidth: 1, borderBottomColor: '#cbd5e1', paddingBottom: 4, marginBottom: 6 }}>
|
||||||
<Text style={{ fontSize: 10, fontWeight: 'bold', color: '#1e3a8a' }}>
|
<Text style={{ fontSize: 10, fontWeight: 'bold', color: '#1e3a8a' }}>
|
||||||
Gerät: {deviceName}
|
Kasse: {deviceName}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
{devItems.map((item: any, idx: number) => (
|
{devItems.map((item: any, idx: number) => (
|
||||||
|
|||||||
@@ -102,22 +102,22 @@ export function LoginForm({
|
|||||||
onChange={(e) => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{errorParam === "gesperrt" && (
|
{errorParam === "gesperrt" && (
|
||||||
<p className="text-sm text-red-500 bg-red-500/10 border border-red-500/20 p-3 rounded-lg text-center font-medium">
|
<p className="text-sm text-red-500 bg-red-500/10 border border-red-500/20 p-3 rounded-lg text-center font-medium">
|
||||||
🚫 Ihr Konto wurde gesperrt. Bitte wenden Sie sich an den Administrator.
|
🚫 Ihr Konto wurde gesperrt. Bitte wenden Sie sich an den Administrator.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
{messageParam === "concurrent" && (
|
{messageParam === "concurrent" && (
|
||||||
<p className="text-sm text-amber-500 bg-amber-500/10 border border-amber-500/20 p-3 rounded-lg text-center font-medium">
|
<p className="text-sm text-amber-500 bg-amber-500/10 border border-amber-500/20 p-3 rounded-lg text-center font-medium">
|
||||||
Sie wurden abgemeldet, da Sie sich an einem anderen Gerät angemeldet haben.
|
Sie wurden abgemeldet, da Sie sich an einem anderen Gerät angemeldet haben.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
{error && <p className="text-sm text-red-500">{error}</p>}
|
{error && <p className="text-sm text-red-500">{error}</p>}
|
||||||
<Button type="submit" className="w-full" disabled={isLoading}>
|
<Button type="submit" className="w-full" disabled={isLoading}>
|
||||||
{isLoading ? "Wird angemeldet..." : "Anmelden"}
|
{isLoading ? "Wird angemeldet..." : "Anmelden"}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -645,8 +645,8 @@ export function OrderWizard({
|
|||||||
const finalItemsToShow = basketItems.length > 0
|
const finalItemsToShow = basketItems.length > 0
|
||||||
? basketItems
|
? basketItems
|
||||||
: (allCategoriesFilled && productValidationErrors.length === 0
|
: (allCategoriesFilled && productValidationErrors.length === 0
|
||||||
? [{ deviceName: deviceName || 'Kasse 1', selections, moduleQuantities, billingInterval: selectedBillingInterval }]
|
? [{ deviceName: deviceName || 'Kasse 1', selections, moduleQuantities, billingInterval: selectedBillingInterval }]
|
||||||
: []);
|
: []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="max-w-5xl mx-auto py-12 px-4">
|
<div className="max-w-5xl mx-auto py-12 px-4">
|
||||||
@@ -1050,10 +1050,10 @@ export function OrderWizard({
|
|||||||
<Label
|
<Label
|
||||||
onClick={() => !disabled && selectProduct(cat.id, product.id)}
|
onClick={() => !disabled && selectProduct(cat.id, product.id)}
|
||||||
className={`flex flex-col items-start p-4 rounded-xl border-2 transition-all ${disabled
|
className={`flex flex-col items-start p-4 rounded-xl border-2 transition-all ${disabled
|
||||||
? 'border-white/5 bg-white/5 opacity-50 cursor-not-allowed'
|
? 'border-white/5 bg-white/5 opacity-50 cursor-not-allowed'
|
||||||
: isChecked
|
: isChecked
|
||||||
? 'border-primary bg-primary/5 cursor-pointer'
|
? 'border-primary bg-primary/5 cursor-pointer'
|
||||||
: 'border-white/5 bg-white/5 hover:bg-white/10 cursor-pointer'
|
: 'border-white/5 bg-white/5 hover:bg-white/10 cursor-pointer'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="flex justify-between w-full items-center">
|
<div className="flex justify-between w-full items-center">
|
||||||
@@ -1109,8 +1109,8 @@ export function OrderWizard({
|
|||||||
<Label
|
<Label
|
||||||
htmlFor={disabled ? undefined : `${cat.id}-${product.id}`}
|
htmlFor={disabled ? undefined : `${cat.id}-${product.id}`}
|
||||||
className={`flex flex-col items-start p-4 rounded-xl border-2 border-white/5 bg-white/5 transition-all ${disabled
|
className={`flex flex-col items-start p-4 rounded-xl border-2 border-white/5 bg-white/5 transition-all ${disabled
|
||||||
? 'opacity-50 cursor-not-allowed'
|
? 'opacity-50 cursor-not-allowed'
|
||||||
: 'hover:bg-white/10 peer-data-[state=checked]:border-primary peer-data-[state=checked]:bg-primary/5 cursor-pointer'
|
: 'hover:bg-white/10 peer-data-[state=checked]:border-primary peer-data-[state=checked]:bg-primary/5 cursor-pointer'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="flex justify-between w-full items-center">
|
<div className="flex justify-between w-full items-center">
|
||||||
@@ -1399,7 +1399,7 @@ export function OrderWizard({
|
|||||||
size="icon"
|
size="icon"
|
||||||
className="w-7 h-7 hover:bg-white/10 text-slate-400 hover:text-white"
|
className="w-7 h-7 hover:bg-white/10 text-slate-400 hover:text-white"
|
||||||
onClick={() => editBasketItem(idx)}
|
onClick={() => editBasketItem(idx)}
|
||||||
title="Gerät bearbeiten"
|
title="Kasse bearbeiten"
|
||||||
>
|
>
|
||||||
<Pencil className="w-3.5 h-3.5" />
|
<Pencil className="w-3.5 h-3.5" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -1409,7 +1409,7 @@ export function OrderWizard({
|
|||||||
size="icon"
|
size="icon"
|
||||||
className="w-7 h-7 hover:bg-white/10 text-destructive hover:text-red-400"
|
className="w-7 h-7 hover:bg-white/10 text-destructive hover:text-red-400"
|
||||||
onClick={() => deleteBasketItem(idx)}
|
onClick={() => deleteBasketItem(idx)}
|
||||||
title="Gerät löschen"
|
title="Kasse löschen"
|
||||||
>
|
>
|
||||||
<Trash2 className="w-3.5 h-3.5" />
|
<Trash2 className="w-3.5 h-3.5" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -1422,7 +1422,7 @@ export function OrderWizard({
|
|||||||
</CardContent>
|
</CardContent>
|
||||||
<CardFooter className="flex flex-col gap-3">
|
<CardFooter className="flex flex-col gap-3">
|
||||||
<div className="w-full space-y-2">
|
<div className="w-full space-y-2">
|
||||||
<Label htmlFor="device-name" className="text-xs text-slate-400">Gerätename (optional)</Label>
|
<Label htmlFor="device-name" className="text-xs text-slate-400">Kassenname (optional)</Label>
|
||||||
<Input
|
<Input
|
||||||
id="device-name"
|
id="device-name"
|
||||||
placeholder="z.B. Hauptkasse, Theke"
|
placeholder="z.B. Hauptkasse, Theke"
|
||||||
@@ -1482,10 +1482,10 @@ export function OrderWizard({
|
|||||||
{finalItemsToShow.map((item, itemIdx) => (
|
{finalItemsToShow.map((item, itemIdx) => (
|
||||||
<div key={itemIdx} className="space-y-3 border-b border-white/10 pb-4 last:border-0 last:pb-0">
|
<div key={itemIdx} className="space-y-3 border-b border-white/10 pb-4 last:border-0 last:pb-0">
|
||||||
<div className="flex justify-between items-center bg-white/5 p-2 rounded">
|
<div className="flex justify-between items-center bg-white/5 p-2 rounded">
|
||||||
<span className="text-white font-bold text-sm">Gerät: {item.deviceName}</span>
|
<span className="text-white font-bold text-sm">Kasse: {item.deviceName}</span>
|
||||||
<span className="text-xs text-slate-400 capitalize">{item.billingInterval === 'one_time' ? 'Kauf' : 'Abo'}</span>
|
<span className="text-xs text-slate-400 capitalize">{item.billingInterval === 'one_time' ? 'Kauf' : 'Abo'}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{visibleCategories.map(cat => {
|
{visibleCategories.map(cat => {
|
||||||
const sel = item.selections[cat.id]
|
const sel = item.selections[cat.id]
|
||||||
const selectedProds: Product[] = []
|
const selectedProds: Product[] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user