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
51f4cd8b
Commit
51f4cd8b
authored
Aug 15, 2024
by
Sarun Mungthanya
Browse files
remove commend history patch
parent
04602d47
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Livewire/Pages/ServerLicense/ServerLicenseEdit.php
View file @
51f4cd8b
...
...
@@ -678,23 +678,8 @@ class ServerLicenseEdit extends Component
{
$this
->
tab
=
'historyPatch'
;
}
public
function
sort
History
By
(
$field
)
public
function
load
History
PatchData
(
)
{
if
(
$this
->
sortHistoryField
===
$field
)
{
$this
->
sortHistoryDirection
=
$this
->
sortHistoryDirection
===
'asc'
?
'desc'
:
'asc'
;
}
else
{
$this
->
sortHistoryField
=
$field
;
$this
->
sortHistoryDirection
=
'asc'
;
}
}
public
function
setMessage
(
$message
)
{
$this
->
messages
[]
=
$message
;
}
public
function
render
()
{
$this
->
tab
=
'historyPatch'
;
$this
->
historyPatchList
=
DB
::
table
(
'conf_server_pendding as cp'
)
->
join
(
'conf_smartupdate as cs'
,
'cp.PatchID'
,
'='
,
'cs.PID'
)
->
select
(
...
...
@@ -710,6 +695,24 @@ class ServerLicenseEdit extends Component
->
where
(
'cp.ServerID'
,
$this
->
licenseId
)
->
orderBy
(
$this
->
sortHistoryField
,
$this
->
sortHistoryDirection
)
->
paginate
(
$this
->
perPage
);
}
public
function
sortHistoryBy
(
$field
)
{
if
(
$this
->
sortHistoryField
===
$field
)
{
$this
->
sortHistoryDirection
=
$this
->
sortHistoryDirection
===
'asc'
?
'desc'
:
'asc'
;
}
else
{
$this
->
sortHistoryField
=
$field
;
$this
->
sortHistoryDirection
=
'asc'
;
}
}
public
function
setMessage
(
$message
)
{
$this
->
messages
[]
=
$message
;
}
public
function
render
()
{
$this
->
loadHistoryPatchData
();
return
view
(
'livewire.pages.server-license.server-license-edit'
,
[
'historyPatchList'
=>
$this
->
historyPatchList
,
...
...
resources/views/livewire/pages/server-license/history-patch.blade.php
View file @
51f4cd8b
<div
class=
" p-4"
>
<div
class=
"max-w-full mx-auto bg-white rounded-lg"
>
<!-- Header -->
<div
class=
"text-black p-4 rounded-t-lg flex justify-between items-center"
>
<h1
class=
"text-lg font-semibold"
>
{{ $company }} (SN={{ $serverKey }}):: History Patch
</h1>
<button
class=
"bg-info hover:info-focus text-white font-bold py-2 px-4 rounded"
>
{{--
<button
class=
"bg-info hover:info-focus text-white font-bold py-2 px-4 rounded"
>
Export Query
</button>
</button>
--}}
</div>
<!-- Table Section -->
...
...
@@ -64,7 +63,6 @@
</tr>
</thead>
<tbody>
{{-- @if (count($historyPatchList) > 0) --}}
@foreach ($historyPatchList as $key => $patch)
<tr
class=
"border-b"
>
<td
class=
"py-2 px-4 border min-w-36 max-w-36 text-center"
>
{{ $patch->TaskDate }}
</td>
...
...
@@ -77,7 +75,6 @@
<td
class=
"py-2 px-4 border min-w-64 max-w-64 text-center"
>
{{ $patch->PDESC }}
</td>
</tr>
@endforeach
{{-- @endif --}}
</tbody>
</table>
<div
class=
"mt-4"
>
...
...
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