Commit 78e85313 authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

issue seach ownertype

parent 72cee43a
......@@ -83,8 +83,10 @@ class SendPatchEdit extends Component
if (!empty($this->cur_ver)) {
$query->where('CUR_VERSION', 'LIKE', '%' . $this->cur_ver . '%');
}
$this->resultsServerkey = $query->take(50)->get();
if (!empty($this->selectedOwnerType)) {
$query->where('OWNERTYPE', $this->selectedOwnerType);
}
$this->resultsServerkey = $query->get();
$this->showSearch = true;
$this->searchInProgress = false;
}
......@@ -112,17 +114,18 @@ class SendPatchEdit extends Component
public function updatedSelectedOwnerType($value)
{
if (!empty($value)) {
$serverKeyOwnerType = $this->fetchServerKeyOption($value);
if (count($serverKeyOwnerType) > 0) {
foreach ($serverKeyOwnerType as $sk) {
$this->selectResult($sk["name"]);
}
}
} else {
$this->serverKeyOwnerType = [];
}
$this->serverkey = '';
// if (!empty($value)) {
// $serverKeyOwnerType = $this->fetchServerKeyOption($value);
// if (count($serverKeyOwnerType) > 0) {
// foreach ($serverKeyOwnerType as $sk) {
// $this->selectResult($sk["name"]);
// }
// }
// } else {
// $this->serverKeyOwnerType = [];
// }
// $this->serverkey = '';
$this->searchResults();
}
protected function fetchServerKeyOption($ownerType)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment