Finalize the backend for each coupon, customer and access functionalities
This commit is contained in:
@@ -453,7 +453,17 @@ class Customer {
|
||||
|
||||
public function autocomplete_options($r, $args) {
|
||||
|
||||
console.log(print_r($args, true));
|
||||
$r = [];
|
||||
$customers = $this->get();
|
||||
if(!empty($customers)) {
|
||||
foreach($customers as $customer){
|
||||
$r[] = [
|
||||
'id' => $customer->id,
|
||||
'title' => $customer->name . ($customer->email ? ' | ' .$customer->email : '') . ($customer->phone ? ' | ' .$customer->phone : '')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $r;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user