Finalize the backend for each coupon, customer and access functionalities

This commit is contained in:
dwindown
2025-09-24 21:46:03 +07:00
parent 4151ea3b9e
commit 6f6b039441
6 changed files with 70 additions and 138 deletions

View File

@@ -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;
}