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

add laravel telescope and fix paginate

parent 06d55160
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"/app.js": "/app.js?id=48ba33a2532e4b6ec718bc0f03b3f1e4",
"/app-dark.css": "/app-dark.css?id=1ea407db56c5163ae29311f1f38eb7b9",
"/app.css": "/app.css?id=de4c978567bfd90b38d186937dee5ccf"
}
......@@ -33,7 +33,7 @@ html.dark {
}
body {
@apply bg-slate-50 font-sans text-sm leading-5 text-slate-500 antialiased [text-rendering:optimizeLegibility] dark:bg-navy-900 dark:text-navy-200 dark:[color-scheme:dark];
@apply bg-slate-50 font-sans text-sm leading-5 text-black antialiased [text-rendering:optimizeLegibility] dark:bg-navy-900 dark:text-navy-200 dark:[color-scheme:dark];
}
body.is-monochrome::before {
......
......@@ -36,14 +36,12 @@
<style>
html,
body {
/* height: 100%; */
margin: 0;
}
body {
display: flex;
flex-direction: column;
/* min-height: 100vh; */
}
main {
......@@ -59,11 +57,6 @@
{{ $slot }}
@yield('content')
</main>
{{-- <footer class="bg-gray-800 text-white p-4">
<div class="container mx-auto">
<p class="text-center">&copy; 2024 Your Company</p>
</div>
</footer> --}}
@livewireScripts
@isset($script)
{{ $script }}
......
<x-app-layout title="Starter Sideblock" is-sidebar-open="true" is-header-blur="true">
{{-- <div class="container mx-auto mt-10 card min-h-auto z-0"> --}}
{{-- <div class="flex flex-col md:flex-row items-center"> --}}
{{-- Hello World --}}
{{-- </div> --}}
{{-- </div> --}}
<style> [x-cloak] {
display: none;
}</style>
......
......@@ -84,13 +84,13 @@
@mouseleave="timer = setTimeout(() => open = false, 100)"
class="relative px-2 py-1 rounded text-gray-700 hover:bg-primary-focus hover:text-white cursor-pointer">
<i class="fa fa-user" aria-hidden="true"></i>
<span>Hello , {{ auth()->user()->username ?? '' }}</span>
<span>Hello , {{ $userName ?? '' }}</span>
<ul x-cloak x-show="open" @click="open = false" @mouseleave="open = false"
class="absolute right-0 mt-2 w-full">
<li class="float-right">
class="absolute left-0 mt-2 w-32 bg-white shadow-lg">
<li class="block px-4 py-2 text-gray-700 hover:bg-stone-100">
<form method="POST" action="{{ route('logout') }}">
@csrf
<button class="bg-primary text-white px-4 py-2 rounded"
<button type="button"
onclick="event.preventDefault(); this.closest('form').submit();">
Logout
</button>
......
<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">
<div class="flex justify-center items-center ">
<div class="items-center h-100vh" style="align-content: center;">
......
......@@ -26,12 +26,13 @@
</div>
@endif
<div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md" x-data="{ showDeleteListModal : false}">
<div class="pb-4 pt-5 bg-white rounded-lg shadow-lg">
<div class="my-1 flex h-8 items-center justify-between px-4 sm:px-5">
<h2 class="text-2xl text-black ">
<h2 class="text-2xl mb-3 text-black ">
News & Update
</h2>
</div>
<div class="pb-4 pt-5 bg-white rounded-lg shadow-lg">
<div class="flex justify-between">
<div class="px-2 ml-4">
<button type="button"
......
<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">
<div class="flex justify-center items-center ">
<div class="items-center h-100vh" style="align-content: center;">
......
<div>
<div class="bg-white shadow-md rounded-lg p-6 w-full max-w-5xl mx-auto">
<form class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<!-- Search By -->
<div class="mb-4">
<label for="searchBy" class="block text-gray-700 font-medium">Search By</label>
<select id="searchBy" wire:model="searchSelected" class="form-select w-full">
@foreach ($searchBy as $key => $value)
<option value="{{ $key }}">{{ $value }}</option>
@endforeach
</select>
</div>
<!-- Keyword -->
<div class="mb-4">
<label for="keyword" class="block text-gray-700 font-medium">Keyword</label>
<input type="text" id="keyword" wire:model="keyword" class="form-input w-full" placeholder="Enter keyword">
</div>
<!-- Search Button -->
<div class="flex justify-end col-span-2">
<button type="button" wire:click="filterReport"
class="bg-primary text-white px-6 py-2 rounded-md hover:bg-primary-focus">
Search
</button>
</div>
</form>
<!-- Export Button -->
<div class="flex justify-end mb-4">
<button wire:click="exportReport" class="bg-green-500 text-white px-6 py-2 rounded-md hover:bg-green-700">
<div x-data="{ progress: @entangle('progress'), exporting: @entangle('exporting') }" x-init="setInterval(() => { $wire.checkProgress() }, 2000)">
<button @click="exporting = true" wire:click="exportReport" :disabled="exporting">
Export Report
</button>
</div>
<!-- Table Display -->
<div class="overflow-x-auto">
<table class="min-w-full bg-white border border-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 border-b border-gray-200">ID</th>
<th class="px-6 py-3 border-b border-gray-200">Server Key</th>
<th class="px-6 py-3 border-b border-gray-200">Company</th>
<th class="px-6 py-3 border-b border-gray-200">Status</th>
<th class="px-6 py-3 border-b border-gray-200">Current Version</th>
<th class="px-6 py-3 border-b border-gray-200">Database Type</th>
<th class="px-6 py-3 border-b border-gray-200">License Date</th>
</tr>
</thead>
<tbody>
@foreach ($results as $result)
<tr>
<td class="px-6 py-4 border-b border-gray-200">{{ $result->ID }}</td>
<td class="px-6 py-4 border-b border-gray-200">{{ $result->SNKEY }}</td>
<td class="px-6 py-4 border-b border-gray-200">{{ $result->COMPANY }}</td>
<td class="px-6 py-4 border-b border-gray-200">{{ $result->STATUS }}</td>
<td class="px-6 py-4 border-b border-gray-200">{{ $result->CUR_VERSION }}</td>
<td class="px-6 py-4 border-b border-gray-200">{{ $result->DATABASETYPE }}</td>
<td class="px-6 py-4 border-b border-gray-200">{{ $result->LICENSEDATE }}</td>
</tr>
@endforeach
</tbody>
</table>
<!-- Progress Bar -->
<div x-show="exporting" class="progress-bar" style="position: relative; width: 100%; background-color: #e0e0e0;">
<div class="progress" :style="{ width: progress + '%' }" style="background-color: #4caf50; height: 20px;"></div>
</div>
<!-- แสดง progress เป็นเปอร์เซ็นต์ -->
<div x-show="exporting">
<span x-text="progress + '%'"></span>
</div>
<!-- แสดงสถานะของ batch -->
<div x-text="'Status: ' + @entangle('status')"></div>
</div>
\ No newline at end of file
<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">
<div class="flex justify-center items-center ">
<div class="items-center h-100vh" style="align-content: center;">
......@@ -143,7 +143,7 @@
</div>
</div>
@elseif($action === 'edit')
<livewire:pages.send-patch.send-patch-edit :editPid="$editPid">
{{-- <livewire:pages.send-patch.send-patch-edit :editPid="$editPid"> --}}
@endif
</main>
</div>
<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">
<div class="flex justify-center items-center ">
<div class="items-center h-100vh" style="align-content: center;">
......
......@@ -18,8 +18,8 @@
<div class="pagination">
<span class="rounded-l-lg bg-slate-150 dark:bg-navy-500">
@if ($paginator->currentPage() > 1)
<a href="#" wire:click="gotoPage({{ $paginator->currentPage() - 1 }})"
class="flex h-8 w-8 items-center justify-center rounded-lg text-slate-500 hover:text-white transition-colors hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/80 dark:text-navy-200 dark:hover:bg-navy-450 dark:focus:bg-navy-450 dark:active:bg-navy-450/90">
<a wire:click="gotoPage({{ $paginator->currentPage() - 1 }})"
class="cursor-pointer flex h-8 w-8 items-center justify-center rounded-lg text-slate-500 hover:text-white transition-colors hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/80 dark:text-navy-200 dark:hover:bg-navy-450 dark:focus:bg-navy-450 dark:active:bg-navy-450/90">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
......@@ -31,7 +31,7 @@
@foreach ($elements as $element)
@if (is_string($element))
<span class="bg-slate-150 dark:bg-navy-500 list-none">
<a href="#" class="flex h-8 min-w-[2rem] items-center justify-center rounded-lg px-3 leading-tight transition-colors hover:text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/80 dark:hover:bg-navy-450 dark:focus:bg-navy-450 dark:active:bg-navy-450/90">{{ $element }}</a>
<a wire:click="gotoPage({{ $page }})" class="cursor-pointer flex h-8 min-w-[2rem] items-center justify-center rounded-lg px-3 leading-tight transition-colors hover:text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/80 dark:hover:bg-navy-450 dark:focus:bg-navy-450 dark:active:bg-navy-450/90">{{ $element }}</a>
</span>
@endif
......@@ -39,10 +39,10 @@
@foreach ($element as $page => $url)
<span class="bg-slate-150 dark:bg-navy-500 list-none">
@if ($page == $paginator->currentPage())
<span class="flex h-8 min-w-[2rem] items-center justify-center rounded-lg bg-primary px-3 leading-tight text-white">{{ $page }}</span>
<span class="cursor-pointer flex h-8 min-w-[2rem] items-center justify-center rounded-lg bg-primary px-3 leading-tight text-white">{{ $page }}</span>
@else
<a href="#" wire:click="gotoPage({{ $page }})"
class="flex h-8 min-w-[2rem] items-center justify-center rounded-lg px-3 leading-tight transition-colors hover:text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/80 dark:hover:bg-navy-450 dark:focus:bg-navy-450 dark:active:bg-navy-450/90">{{ $page }}</a>
<a wire:click="gotoPage({{ $page }})"
class="cursor-pointer flex h-8 min-w-[2rem] items-center justify-center rounded-lg px-3 leading-tight transition-colors hover:text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/80 dark:hover:bg-navy-450 dark:focus:bg-navy-450 dark:active:bg-navy-450/90">{{ $page }}</a>
@endif
</span>
@endforeach
......@@ -51,7 +51,7 @@
<span class="rounded-r-lg bg-slate-150 dark:bg-navy-500">
@if ($paginator->hasMorePages())
<a href="#" wire:click="gotoPage({{ $paginator->currentPage() + 1 }})"
<a wire:click="gotoPage({{ $paginator->currentPage() + 1 }})"
class="flex h-8 w-8 items-center justify-center rounded-lg text-slate-500 hover:text-white transition-colors hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/80 dark:text-navy-200 dark:hover:bg-navy-450 dark:focus:bg-navy-450 dark:active:bg-navy-450/90">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
......
......@@ -49,7 +49,7 @@ Route::middleware('guest')->group(function () {
Route::post('/register', [\App\Http\Controllers\AuthController::class, 'register'])->name('register');
});
Route::middleware(['auth', 'disableDebugbar'])->group(function () {
Route::middleware([ ])->group(function () {
Route::post('/logout', [\App\Http\Controllers\AuthController::class, 'logout'])->name('logout');
Route::get('/convert-to-json', [ConvertToJsonController::class, 'convert']);
Route::get('/', [HomeController::class, 'index'])->name('index');
......
......@@ -39,7 +39,7 @@ const customColors = {
error: "#DC3545",
"error-focus": "#C82333",
"slate-100": "#2D6A4F",
"main-container": "#f3f4f6", // background
"main-container": "#fff", // background
};
module.exports = {
content: [
......
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