From 6db63ec2c508d526def23042524625247a74cdb0 Mon Sep 17 00:00:00 2001
From: Henning Leutz <leutz@pcsg.de>
Date: Mon, 27 May 2024 09:05:50 +0200
Subject: [PATCH] fix: added offers to the process entity handling

---
 bin/backend/controls/process/ProcessGrid.js | 16 ++++++++++++++++
 src/QUI/ERP/Utils/Utils.php                 | 10 ++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/bin/backend/controls/process/ProcessGrid.js b/bin/backend/controls/process/ProcessGrid.js
index 9aec173..9c7e0ac 100644
--- a/bin/backend/controls/process/ProcessGrid.js
+++ b/bin/backend/controls/process/ProcessGrid.js
@@ -119,6 +119,14 @@ define('package/quiqqer/erp/bin/backend/controls/process/ProcessGrid', [
                         case 'QUI\\ERP\\SalesOrders\\SalesOrder':
                             Type.setAttribute('title', QUILocale.get(lg, 'processGrid.salesOrder.open'));
                             break;
+
+                        case 'QUI\\ERP\\Accounting\\Offers\\Offer':
+                            Type.setAttribute('title', QUILocale.get(lg, 'processGrid.offer.open'));
+                            break;
+
+                        case 'QUI\\ERP\\Accounting\\Offers\\OfferTemporary':
+                            Type.setAttribute('title', QUILocale.get(lg, 'processGrid.temporaryOffer.open'));
+                            break;
                     }
 
                     if (typeof entry.paid_status === 'undefined') {
@@ -171,6 +179,14 @@ define('package/quiqqer/erp/bin/backend/controls/process/ProcessGrid', [
                     panel = 'package/quiqqer/salesorders/bin/js/backend/controls/panels/SalesOrder';
                     break;
 
+                case 'QUI\\ERP\\Accounting\\Offers\\Offer':
+                    panel = 'package/quiqqer/offers/bin/js/backend/controls/panels/Offer';
+                    break;
+
+                case 'QUI\\ERP\\Accounting\\Offers\\OfferTemporary':
+                    panel = 'package/quiqqer/offers/bin/js/backend/controls/panels/TemporaryOffer';
+                    break;
+
                 default:
                     console.error('missing', uuid, Btn.getAttribute('entityType'));
                     return;
diff --git a/src/QUI/ERP/Utils/Utils.php b/src/QUI/ERP/Utils/Utils.php
index 6d9ce66..eb0dc83 100644
--- a/src/QUI/ERP/Utils/Utils.php
+++ b/src/QUI/ERP/Utils/Utils.php
@@ -14,10 +14,12 @@
 class Utils
 {
     public static array $entityIcons = [
-        'QUI\\ERP\\Order\\Order' => 'fa-shopping-basket',
-        'QUI\\ERP\\Accounting\\Invoice\\InvoiceTemporary' => 'fa-file-text-o',
-        'QUI\\ERP\\Accounting\\Invoice\\Invoice' => 'fa-file-text-o',
-        'QUI\\ERP\\SalesOrders\\SalesOrder' => 'fa-suitcase',
+        'QUI\ERP\Order\Order' => 'fa-shopping-basket',
+        'QUI\ERP\Accounting\Invoice\InvoiceTemporary' => 'fa-file-text-o',
+        'QUI\ERP\Accounting\Invoice\Invoice' => 'fa-file-text-o',
+        'QUI\ERP\SalesOrders\SalesOrder' => 'fa-suitcase',
+        'QUI\ERP\Accounting\Offers\Offer' => 'fa-file-text-o',
+        'QUI\ERP\Accounting\Offers\OfferTemporary' => 'fa-file-text-o',
     ];
 
     /**
-- 
GitLab