Commit 51f4cd8b authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

remove commend history patch

parent 04602d47
...@@ -52,8 +52,8 @@ class ServerLicenseEdit extends Component ...@@ -52,8 +52,8 @@ class ServerLicenseEdit extends Component
public $allDate; public $allDate;
public $mappingList = [], $labelList = [], $userInterfaceList = [], $globalList = [], $parameterList = [], $onloadList = [], $validateList = [], $mapToList = [], $fileNameList = []; public $mappingList = [], $labelList = [], $userInterfaceList = [], $globalList = [], $parameterList = [], $onloadList = [], $validateList = [], $mapToList = [], $fileNameList = [];
protected $historyPatchList; protected $historyPatchList;
public $sortHistoryField = 'TaskDate'; public $sortHistoryField = 'TaskDate';
public $sortHistoryDirection = 'asc'; public $sortHistoryDirection = 'asc';
public $globalListGroup = []; public $globalListGroup = [];
public $fieldList = ['mapId', 'mapName', 'mapType', 'mapTo', 'mapConfig']; public $fieldList = ['mapId', 'mapName', 'mapType', 'mapTo', 'mapConfig'];
public $backupFeedback, $info = []; public $backupFeedback, $info = [];
...@@ -678,23 +678,8 @@ class ServerLicenseEdit extends Component ...@@ -678,23 +678,8 @@ class ServerLicenseEdit extends Component
{ {
$this->tab = 'historyPatch'; $this->tab = 'historyPatch';
} }
public function sortHistoryBy($field) public function loadHistoryPatchData()
{ {
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') $this->historyPatchList = DB::table('conf_server_pendding as cp')
->join('conf_smartupdate as cs', 'cp.PatchID', '=', 'cs.PID') ->join('conf_smartupdate as cs', 'cp.PatchID', '=', 'cs.PID')
->select( ->select(
...@@ -710,6 +695,24 @@ class ServerLicenseEdit extends Component ...@@ -710,6 +695,24 @@ class ServerLicenseEdit extends Component
->where('cp.ServerID', $this->licenseId) ->where('cp.ServerID', $this->licenseId)
->orderBy($this->sortHistoryField, $this->sortHistoryDirection) ->orderBy($this->sortHistoryField, $this->sortHistoryDirection)
->paginate($this->perPage); ->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', [ return view('livewire.pages.server-license.server-license-edit', [
'historyPatchList' => $this->historyPatchList, 'historyPatchList' => $this->historyPatchList,
......
<div class=" p-4"> <div class=" p-4">
<div class="max-w-full mx-auto bg-white rounded-lg"> <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"> <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> <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 Export Query
</button> </button> --}}
</div> </div>
<!-- Table Section --> <!-- Table Section -->
...@@ -64,7 +63,6 @@ ...@@ -64,7 +63,6 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{-- @if (count($historyPatchList) > 0) --}}
@foreach ($historyPatchList as $key => $patch) @foreach ($historyPatchList as $key => $patch)
<tr class="border-b"> <tr class="border-b">
<td class="py-2 px-4 border min-w-36 max-w-36 text-center">{{ $patch->TaskDate }}</td> <td class="py-2 px-4 border min-w-36 max-w-36 text-center">{{ $patch->TaskDate }}</td>
...@@ -77,7 +75,6 @@ ...@@ -77,7 +75,6 @@
<td class="py-2 px-4 border min-w-64 max-w-64 text-center">{{ $patch->PDESC }}</td> <td class="py-2 px-4 border min-w-64 max-w-64 text-center">{{ $patch->PDESC }}</td>
</tr> </tr>
@endforeach @endforeach
{{-- @endif --}}
</tbody> </tbody>
</table> </table>
<div class="mt-4"> <div class="mt-4">
......
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