Add 'cancelled' status to invoices
This commit is contained in:
@@ -18,7 +18,7 @@ class InvoiceFactory extends Factory
|
|||||||
*/
|
*/
|
||||||
public function definition(): array
|
public function definition(): array
|
||||||
{
|
{
|
||||||
$payment_status = $this->faker->randomElement(['draft', 'issued', 'paid', 'due', 'reminded']);
|
$payment_status = $this->faker->randomElement(['draft', 'issued', 'paid', 'due', 'reminded', 'cancelled']);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'nr' => ($payment_status == 'draft') ? null : $this->faker->unique()->numerify('RE-###'),
|
'nr' => ($payment_status == 'draft') ? null : $this->faker->unique()->numerify('RE-###'),
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ export const statusBadgeVariants = cva(
|
|||||||
"border-transparent bg-amber-300 text-amber-900 [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
"border-transparent bg-amber-300 text-amber-900 [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
||||||
reminded:
|
reminded:
|
||||||
"border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
"border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
||||||
|
cancelled:
|
||||||
|
"text-foreground bg-slate-400 dark:bg-zinc-700 [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
||||||
|
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
@@ -39,7 +41,8 @@ export const statusBadgeLabels: { [key: string]: string } = {
|
|||||||
issued: 'Gestellt',
|
issued: 'Gestellt',
|
||||||
paid: 'Bezahlt',
|
paid: 'Bezahlt',
|
||||||
due: 'Fällig',
|
due: 'Fällig',
|
||||||
reminded: 'Gemahnt'
|
reminded: 'Gemahnt',
|
||||||
|
cancelled: 'Storniert'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function statusBadgeTextColor(status: string): string {
|
export function statusBadgeTextColor(status: string): string {
|
||||||
|
|||||||
Vendored
+1
-1
@@ -139,7 +139,7 @@ export interface Invoice {
|
|||||||
isRecurring: boolean;
|
isRecurring: boolean;
|
||||||
isPartialService: boolean;
|
isPartialService: boolean;
|
||||||
customer?: Customer | null;
|
customer?: Customer | null;
|
||||||
paymentStatus: 'draft' | 'issued' | 'paid' | 'due' | 'reminded';
|
paymentStatus: 'draft' | 'issued' | 'paid' | 'due' | 'reminded' | 'cancelled';
|
||||||
totalAmount: number;
|
totalAmount: number;
|
||||||
title: string;
|
title: string;
|
||||||
text: string;
|
text: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user