diff --git a/src/Controller/CustomerController.php b/src/Controller/CustomerController.php
index 7d990c20..8e8e3e72 100644
--- a/src/Controller/CustomerController.php
+++ b/src/Controller/CustomerController.php
@@ -120,6 +120,7 @@ class CustomerController extends BaseController
$row['flag_mobile_app'] = $orow->hasMobileApp();
$row['app_mobile_number'] = $orow->hasMobileApp() && !empty($orow->getMobileSessions()) ? $orow->getMobileSessions()[0]->getPhoneNumber() : '';
$row['flag_active'] = $orow->isActive();
+ $row['flag_csat'] = $orow->isCSAT();
// TODO: properly add mobile numbers and plate numbers as searchable/sortable fields, use doctrine events
$row['mobile_numbers'] = implode("
", $orow->getMobileNumberList());
@@ -186,6 +187,7 @@ class CustomerController extends BaseController
->setCustomerClassification($req->request->get('customer_classification'))
->setCustomerNotes($req->request->get('customer_notes'))
->setEmail($req->request->get('email'))
+ ->setIsCSAT($req->request->get('flag_csat') ? true : false)
->setActive($req->request->get('flag_active') ? true : false);
// phone numbers
diff --git a/src/Entity/Customer.php b/src/Entity/Customer.php
index 3390064d..08c39293 100644
--- a/src/Entity/Customer.php
+++ b/src/Entity/Customer.php
@@ -126,6 +126,12 @@ class Customer
*/
protected $flag_active;
+ // csat
+ /**
+ * @ORM\Column(type="boolean")
+ */
+ protected $flag_csat;
+
/**
* @ORM\Column(type="string", length=80)
*/
@@ -165,6 +171,8 @@ class Customer
$this->priv_third_party = 0;
$this->priv_promo = 0;
+
+ $this->flag_csat = false;
}
public function getID()
@@ -372,6 +380,17 @@ class Customer
return $this->flag_active;
}
+ public function setIsCSAT($bool = true)
+ {
+ $this->flag_csat = $bool;
+ return $this;
+ }
+
+ public function isCSAT()
+ {
+ return $this->flag_csat;
+ }
+
public function getJobOrders()
{
return $this->job_orders;
diff --git a/templates/customer/form.html.twig b/templates/customer/form.html.twig
index b4e46ceb..8f3ffd32 100644
--- a/templates/customer/form.html.twig
+++ b/templates/customer/form.html.twig
@@ -91,6 +91,18 @@