Commit eb19084d authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

update ui sendpatch

parent e6d1b757
...@@ -53,6 +53,7 @@ class SendMultiPatchList extends Component ...@@ -53,6 +53,7 @@ class SendMultiPatchList extends Component
} }
$query->orderBy('PID', 'DESC'); $query->orderBy('PID', 'DESC');
$results = $query->paginate($this->perPage); $results = $query->paginate($this->perPage);
return view('livewire.pages.send-patch.send-multi-patch-list', [ return view('livewire.pages.send-patch.send-multi-patch-list', [
'results' => $results, 'results' => $results,
'selectedPatches' => ConfSmartUpdate::whereIn('PID', $this->selectedPatches)->get() 'selectedPatches' => ConfSmartUpdate::whereIn('PID', $this->selectedPatches)->get()
......
...@@ -34,6 +34,7 @@ class SendPatchIndex extends Component ...@@ -34,6 +34,7 @@ class SendPatchIndex extends Component
public function render() public function render()
{ {
$results = [];
if ($this->action == 'list') { if ($this->action == 'list') {
$numServerSubquery = DB::table('conf_server_pendding as p2') $numServerSubquery = DB::table('conf_server_pendding as p2')
->select(DB::raw('count(p2.ServerID) as NUMSERVER'), 'p2.PatchID') ->select(DB::raw('count(p2.ServerID) as NUMSERVER'), 'p2.PatchID')
...@@ -52,7 +53,8 @@ class SendPatchIndex extends Component ...@@ -52,7 +53,8 @@ class SendPatchIndex extends Component
$query->orderBy('p1.PID', 'DESC'); $query->orderBy('p1.PID', 'DESC');
$results = $query->paginate($this->perPage); $results = $query->paginate($this->perPage);
} }
$results = []; // $results = [];
// dd($results);
return view('livewire.pages.send-patch.send-patch-index', compact('results')); return view('livewire.pages.send-patch.send-patch-index', compact('results'));
} }
......
<div class="border-0 shadow-none"> <div class="border-0 shadow-none">
` <div wire:loading.class="" wire:loading.class.remove="hidden" wire:target="save" ` <div wire:loading.class="" wire:loading.class.remove="hidden" wire:target="save"
class="absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden"> class="absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden">
<div class="flex justify-center items-center "> <div class="flex justify-center items-center ">
<div class="items-center h-100vh" style="align-content: center;"> <div class="items-center h-100vh" style="align-content: center;">
<div class="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-blue-500"></div> <div class="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-blue-500"></div>
</div>
</div> </div>
</div> </div>
</div>
<main class="m-2"> <main class="m-2">
@if ($action === 'list') @if ($action === 'list')
@if ($message) @if ($message)
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="pb-4"> <div class="pb-4">
<div class="my-3 flex h-8 items-center justify-between px-4 sm:px-5"> <div class="my-3 flex h-8 items-center justify-between px-4 sm:px-5">
<h2 class="text-2xl text-black "> <h2 class="text-2xl text-black ">
Send Patch to Customer Send Patch to Customer
</h2> </h2>
</div> </div>
{{-- @include('components/search-by', ['searchBy' => $searchBy ?? []]) --}} {{-- @include('components/search-by', ['searchBy' => $searchBy ?? []]) --}}
...@@ -54,7 +54,9 @@ ...@@ -54,7 +54,9 @@
@endforeach @endforeach
</select> </select>
</span> </span>
<button type="button" class="bg-primary text-white px-4 py-2 rounded hover:bg-primary-focus" wire:click="search">Search</button> <button type="button"
class="bg-primary text-white px-4 py-2 rounded hover:bg-primary-focus"
wire:click="search">Search</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -65,12 +67,8 @@ ...@@ -65,12 +67,8 @@
<table class="is-hoverable table w-full text-left "> <table class="is-hoverable table w-full text-left ">
<thead> <thead>
<tr> <tr>
{{-- <th
class="whitespace-nowrap rounded-tl-lg bg-slate-200 px-4 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-5">
#
</th> --}}
<th <th
class="whitespace-nowrap rounded-tl-lg bg-slate-300 text-black px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"> class="whitespace-nowrap text-center rounded-tl-lg bg-slate-300 px-4 py-3 font-semibold uppercase text-black dark:bg-navy-800 dark:text-navy-100 lg:px-5">
Patch ID Patch ID
</th> </th>
<th <th
...@@ -116,9 +114,10 @@ ...@@ -116,9 +114,10 @@
value="{{ $patch->id }}" /> value="{{ $patch->id }}" />
</label> </label>
</td> --}} </td> --}}
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->PID }}</td> <td class="whitespace-nowrap px-1 py-3 sm:px-2 text-center">{{ $patch->PID }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->PATCHNAME }}</td> <td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->PATCHNAME }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ \Illuminate\Support\Str::limit($patch->PDESC, 40) }}</td> <td class="whitespace-nowrap px-1 py-3 sm:px-2">
{{ \Illuminate\Support\Str::limit($patch->PDESC, 40) }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->NUMSERVER }}</td> <td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->NUMSERVER }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->PDATE }}</td> <td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->PDATE }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->PLEVEL }}</td> <td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $patch->PLEVEL }}</td>
...@@ -144,7 +143,7 @@ ...@@ -144,7 +143,7 @@
</div> </div>
</div> </div>
@elseif($action === 'edit') @elseif($action === 'edit')
<livewire:pages.send-patch.send-patch-edit :editPid="$editPid"> <livewire:pages.send-patch.send-patch-edit :editPid="$editPid">
@endif @endif
</main> </main>
</div> </div>
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