From f8bbae5c84f31e30a2171521014af94e7239ba64 Mon Sep 17 00:00:00 2001 From: nisse Date: Mon, 21 Apr 2025 15:16:59 -0700 Subject: [PATCH] #131: Change Service Type color on PDF --- README.md | 3 ++- app/Enums/OrderType.php | 11 +++++++++++ resources/views/pdf/order.blade.php | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c35ed27..33ae7a7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Changelog -**2025-04-20** +**UPCOMING** +- Fixed #131 - Add Service Type background color on PDFs - Fixed #155 - Invoice internal ID should be 5 digits - Fixed #154 - Logo name doesn't get replicated - Fixed #153 - Improved product service form again diff --git a/app/Enums/OrderType.php b/app/Enums/OrderType.php index c3cae96..cf5f734 100644 --- a/app/Enums/OrderType.php +++ b/app/Enums/OrderType.php @@ -34,4 +34,15 @@ public function getColor(): string self::MISC => 'misc', }; } + + public function getColorHex(): string + { + return match ($this) { + self::EMB => '#9900BB', + self::SCP => '#0088FF', + self::DTG => '#57cded', + self::VINYL => '#22AA22', + self::MISC => '#0000FF', + }; + } } diff --git a/resources/views/pdf/order.blade.php b/resources/views/pdf/order.blade.php index b8b0f33..b805194 100644 --- a/resources/views/pdf/order.blade.php +++ b/resources/views/pdf/order.blade.php @@ -13,8 +13,8 @@
-
-
{{$order->order_type->getLabel()}}
+
+
{{$order->order_type->name}}