Add support for retrieving and displaying customer details
Enhanced plate scans to include customer name and vehicle type. Introduced a method in `customer_vehicles_o` for fetching vehicle details by plate and adjusted `users_o` to manage display names more effectively.
This commit is contained in:
@@ -294,12 +294,14 @@ class users_o extends db
|
||||
$phone_country_code = $phone_country_code === null ? null : (int)$phone_country_code;
|
||||
$phone = $this->phone->value();
|
||||
$phone = $phone === null ? null : (int)$phone;
|
||||
$display_name = $this->display_name->value();
|
||||
$customer_name = $this->getCustomerName($this->customer_number->value());
|
||||
// Create the array with the object properties
|
||||
$array = [
|
||||
'id' => (int)$this->id,
|
||||
'customer_number' => (int)$this->customer_number->value(),
|
||||
'customer_name' => $this->getCustomerName($this->customer_number->value()),
|
||||
'display_name' => $this->display_name->value(),
|
||||
'customer_name' => $customer_name,
|
||||
'display_name' => $display_name === 'Unnamed' ? $customer_name : $display_name,
|
||||
'group_id' => (int)$this->group_id->value(),
|
||||
'phone' => [
|
||||
'country_code' => $phone_country_code,
|
||||
|
||||
Reference in New Issue
Block a user