Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sarun Mungthanya
SpnPatch-Laravel
Commits
78e85313
Commit
78e85313
authored
Dec 12, 2024
by
Sarun Mungthanya
Browse files
issue seach ownertype
parent
72cee43a
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Livewire/Pages/SendPatch/SendPatchEdit.php
View file @
78e85313
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment