Commit 4e4fec73 authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

update view exchangerate & discharge port

parent 2c393a9d
...@@ -11,4 +11,10 @@ class ExchangeRateController extends Controller ...@@ -11,4 +11,10 @@ class ExchangeRateController extends Controller
$currentContent = 'ExchangeRate'; $currentContent = 'ExchangeRate';
return view('home' ,compact('menu', 'currentContent')); return view('home' ,compact('menu', 'currentContent'));
} }
public function creatPatch() {
$menu = 'PatchExchangeRate';
$currentContent = 'PatchExchangeRate';
return view('home' ,compact('menu', 'currentContent'));
}
} }
...@@ -13,7 +13,17 @@ class DischargeportUpload extends Component ...@@ -13,7 +13,17 @@ class DischargeportUpload extends Component
use WithFileUploads; use WithFileUploads;
public $file; public $file;
public $fileUploaded = false;
// public function startUpload()
// {
// $this->fileUploaded = true;
// }
public function removeFile()
{
$this->file = null;
$this->fileUploaded = false;
}
public function uploadFile() public function uploadFile()
{ {
$this->validate([ $this->validate([
......
...@@ -13,6 +13,17 @@ ...@@ -13,6 +13,17 @@
0 => 'Laravel\\Sanctum\\SanctumServiceProvider', 0 => 'Laravel\\Sanctum\\SanctumServiceProvider',
), ),
), ),
'laravel/socialite' =>
array (
'providers' =>
array (
0 => 'Laravel\\Socialite\\SocialiteServiceProvider',
),
'aliases' =>
array (
'Socialite' => 'Laravel\\Socialite\\Facades\\Socialite',
),
),
'laravel/telescope' => 'laravel/telescope' =>
array ( array (
'providers' => 'providers' =>
......
...@@ -25,20 +25,21 @@ ...@@ -25,20 +25,21 @@
21 => 'Illuminate\\View\\ViewServiceProvider', 21 => 'Illuminate\\View\\ViewServiceProvider',
22 => 'Laravel\\Sail\\SailServiceProvider', 22 => 'Laravel\\Sail\\SailServiceProvider',
23 => 'Laravel\\Sanctum\\SanctumServiceProvider', 23 => 'Laravel\\Sanctum\\SanctumServiceProvider',
24 => 'Laravel\\Telescope\\TelescopeServiceProvider', 24 => 'Laravel\\Socialite\\SocialiteServiceProvider',
25 => 'Laravel\\Tinker\\TinkerServiceProvider', 25 => 'Laravel\\Telescope\\TelescopeServiceProvider',
26 => 'Livewire\\LivewireServiceProvider', 26 => 'Laravel\\Tinker\\TinkerServiceProvider',
27 => 'Maatwebsite\\Excel\\ExcelServiceProvider', 27 => 'Livewire\\LivewireServiceProvider',
28 => 'Carbon\\Laravel\\ServiceProvider', 28 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
29 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', 29 => 'Carbon\\Laravel\\ServiceProvider',
30 => 'Termwind\\Laravel\\TermwindServiceProvider', 30 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
31 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', 31 => 'Termwind\\Laravel\\TermwindServiceProvider',
32 => 'App\\Providers\\AppServiceProvider', 32 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
33 => 'App\\Providers\\AuthServiceProvider', 33 => 'App\\Providers\\AppServiceProvider',
34 => 'App\\Providers\\EventServiceProvider', 34 => 'App\\Providers\\AuthServiceProvider',
35 => 'App\\Providers\\RouteServiceProvider', 35 => 'App\\Providers\\EventServiceProvider',
36 => 'App\\Providers\\TelescopeServiceProvider', 36 => 'App\\Providers\\RouteServiceProvider',
37 => 'App\\Providers\\ViewServiceProvider', 37 => 'App\\Providers\\TelescopeServiceProvider',
38 => 'App\\Providers\\ViewServiceProvider',
), ),
'eager' => 'eager' =>
array ( array (
...@@ -201,6 +202,7 @@ ...@@ -201,6 +202,7 @@
'validation.presence' => 'Illuminate\\Validation\\ValidationServiceProvider', 'validation.presence' => 'Illuminate\\Validation\\ValidationServiceProvider',
'Laravel\\Sail\\Console\\InstallCommand' => 'Laravel\\Sail\\SailServiceProvider', 'Laravel\\Sail\\Console\\InstallCommand' => 'Laravel\\Sail\\SailServiceProvider',
'Laravel\\Sail\\Console\\PublishCommand' => 'Laravel\\Sail\\SailServiceProvider', 'Laravel\\Sail\\Console\\PublishCommand' => 'Laravel\\Sail\\SailServiceProvider',
'Laravel\\Socialite\\Contracts\\Factory' => 'Laravel\\Socialite\\SocialiteServiceProvider',
'command.tinker' => 'Laravel\\Tinker\\TinkerServiceProvider', 'command.tinker' => 'Laravel\\Tinker\\TinkerServiceProvider',
), ),
'when' => 'when' =>
...@@ -244,6 +246,9 @@ ...@@ -244,6 +246,9 @@
'Laravel\\Sail\\SailServiceProvider' => 'Laravel\\Sail\\SailServiceProvider' =>
array ( array (
), ),
'Laravel\\Socialite\\SocialiteServiceProvider' =>
array (
),
'Laravel\\Tinker\\TinkerServiceProvider' => 'Laravel\\Tinker\\TinkerServiceProvider' =>
array ( array (
), ),
......
public/images/login-background.jpg

68.3 KB | W: | H:

public/images/login-background.jpg

1.75 MB | W: | H:

public/images/login-background.jpg
public/images/login-background.jpg
public/images/login-background.jpg
public/images/login-background.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
@isset($head) @isset($head)
{{ $head }} {{ $head }}
@endisset @endisset
{{-- @livewireStyles --}} @livewireStyles
</head> </head>
<body> <body>
{{ $slot }} {{ $slot }}
{{-- @livewireScripts --}} @livewireScripts
@isset($script) @isset($script)
{{ $script }} {{ $script }}
@endisset @endisset
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</ul> </ul>
</div> </div>
<div class="rounded-2xl p-3 bg-white w-full mb-2" x-data="{ open: ['/patch', '/master-file', '/exchange-rate', '/discharge-port'].includes(activeLink) }"> <div class="rounded-2xl p-3 bg-white w-full mb-2" x-data="{ open: ['/patch', '/master-file', '/exchange-rate', '/discharge-port' , '/patch-exchange-rate'].includes(activeLink) }">
<ul > <ul >
<li class="mb-1"> <li class="mb-1">
<a href="#" @click="open = !open" class="block py-2 px-4 rounded text-black flex items-center"> <a href="#" @click="open = !open" class="block py-2 px-4 rounded text-black flex items-center">
...@@ -37,15 +37,15 @@ ...@@ -37,15 +37,15 @@
</li> </li>
<li class="mb-1 ml-6"> <li class="mb-1 ml-6">
<a href="/master-file" :class="activeLink === '/master-file' ? 'bg-primary-focus text-white' : 'text-black'" <a href="/master-file" :class="activeLink === '/master-file' ? 'bg-primary-focus text-white' : 'text-black'"
class="block py-2 px-4 rounded hover:bg-primary-focus hover:text-white"> <i aria-hidden="true" class="fa fa-edit mr-2"></i>Create MasterFile</a> class="block py-2 px-4 rounded hover:bg-primary-focus hover:text-white"> <i aria-hidden="true" class="fa fa-edit mr-2"></i>Create Patch MasterFile</a>
</li> </li>
<li class="mb-1 ml-6"> <li class="mb-1 ml-6">
<a href="/exchange-rate" :class="activeLink === '/exchange-rate' ? 'bg-primary-focus text-white' : 'text-black'" <a href="/patch-exchange-rate" :class="activeLink === '/patch-exchange-rate' ? 'bg-primary-focus text-white' : 'text-black'"
class="block py-2 px-4 rounded hover:bg-primary-focus hover:text-white"> <i aria-hidden="true" class="fa fa-edit mr-2"></i>Create Exchange Rate</a> class="block py-2 px-4 rounded hover:bg-primary-focus hover:text-white"> <i aria-hidden="true" class="fa fa-edit mr-2"></i>Create Patch Exchange Rate</a>
</li> </li>
<li class="mb-1 ml-6"> <li class="mb-1 ml-6">
<a href="/discharge-port" :class="activeLink === '/discharge-port' ? 'bg-primary-focus text-white' : 'text-black'" <a href="/discharge-port" :class="activeLink === '/discharge-port' ? 'bg-primary-focus text-white' : 'text-black'"
class="block py-2 px-4 rounded hover:bg-primary-focus hover:text-white"> <i aria-hidden="true" class="fa fa-user mr-2"></i>Create Discharge Port</a> class="block py-2 px-4 rounded hover:bg-primary-focus hover:text-white"> <i aria-hidden="true" class="fa fa-user mr-2"></i>Create Patch Discharge Port</a>
</li> </li>
</div> </div>
</ul> </ul>
...@@ -77,7 +77,16 @@ ...@@ -77,7 +77,16 @@
</div> </div>
</ul> </ul>
</div> </div>
<div class="rounded-2xl p-3 bg-white w-full mb-2">
<ul >
<li class="mb-1">
<a href="/exchange-rate" :class="activeLink === '/exchange-rate' ? 'bg-primary-focus text-white' : 'text-black'"
class="block py-2 px-4 rounded text-black flex items-center">
<i aria-hidden="true" class="fa fa-server mr-2"></i> Exchange Rate
</a>
</li>
</ul>
</div>
<div class="rounded-2xl p-3 bg-white w-full mb-2"> <div class="rounded-2xl p-3 bg-white w-full mb-2">
<ul > <ul >
<li class="mb-1"> <li class="mb-1">
......
...@@ -62,6 +62,10 @@ ...@@ -62,6 +62,10 @@
<livewire:pages.exchangerate.exchangerate-index wire:init /> <livewire:pages.exchangerate.exchangerate-index wire:init />
@break @break
@case('PatchExchangeRate')
<livewire:pages.exchangerate.exchangerate-upload wire:init />
@break
@case('DischargePort') @case('DischargePort')
<livewire:pages.dischargeport.dischargeport-index wire:init /> <livewire:pages.dischargeport.dischargeport-index wire:init />
@break @break
......
<div wire:loading.remove> <div class="border-0 shadow-none">
<style> <div wire:loading.class="" wire:loading.class.remove="hidden" wire:target="save"
table { class="absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden">
width: 100%; <div class="flex justify-center items-center ">
table-layout: auto; <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>
.table-responsive {
overflow-x: auto;
}
.form-upload {
display: inline-block;
margin-left: 1rem;
}
.form-upload input[type="file"] {
display: inline-block;
margin-right: 0.5rem;
padding: 0.5rem;
border-radius: 0.25rem;
}
.form-upload label {
margin-left: 0.5rem;
margin-right: 1rem;
}
.form-upload button { </div>
margin-top: 0.5rem; </div>
} <div class="my-5 flex h-8 place-content-center px-4 ">
</style> <h2 class="text-xl text-slate-800">
<main class="m-2"> Patch Discharge Port
</h2>
<h2 class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4">
{{ $action === 'create' ? 'Create' : ($action === 'edit' ? 'Edit' : '') }}
</h2>
</div>
<div class="m-2">
@if ($action === 'list') @if ($action === 'list')
@if ($message) @if ($message)
<div class="alert alert-success"> <div class="alert alert-success">
...@@ -41,16 +28,10 @@ ...@@ -41,16 +28,10 @@
</div> </div>
</div> </div>
@endif @endif
<div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6"> <div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 mb-5 bg-main-container rounded-md">
<div class="pb-4"> <div class="pb-4 pt-5 bg-white rounded-lg shadow-lg">
<div class="my-3 flex h-8 items-center justify-between px-4 sm:px-5">
<h2 class="font-medium tracking-wide text-slate-700 line-clamp-1 dark:text-navy-100 lg:text-base">
Create Discharge Port
</h2>
</div>
<div class="flex justify-between"> <div class="flex justify-between">
<div class="px-2 ml-4"> <div class="px-2 ml-4">
<!-- File Upload Form -->
@livewire('pages.dischargeport.dischargeport-upload') @livewire('pages.dischargeport.dischargeport-upload')
</div> </div>
<div class="inline-flex flex-initial"> <div class="inline-flex flex-initial">
...@@ -77,7 +58,8 @@ ...@@ -77,7 +58,8 @@
@endforeach @endforeach
</select> </select>
</span> </span>
<button type="button" class="bg-stone-700 text-white px-4 py-2 rounded" <button type="button"
class="bg-primary text-white px-4 py-2 rounded hover:bg-primary-focus"
wire:click="search">Search</button> wire:click="search">Search</button>
</div> </div>
</div> </div>
...@@ -85,36 +67,42 @@ ...@@ -85,36 +67,42 @@
</div> </div>
<div class="mx-3 mt-3 px-4"> <div class="mx-3 mt-3 px-4">
<div class="is-scrollbar-hidden min-w-full table-responsive" x-data="pages.tables.initExample1"> <div class="is-scrollbar-hidden min-w-full table-responsive" x-data="pages.tables.initExample1">
<table aria-describedby="mydesc" class="is-hoverable table w-full text-left"> <table aria-describedby="mydesc" class="is-hoverable table w-full text-left">
<thead> <thead>
<tr> <tr>
<th scope="col" 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 scope="col"
class="whitespace-nowrap rounded-tl-lg bg-slate-300 px-4 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-5">
ISO Code ISO Code
</th> </th>
<th scope="col" class="whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"> <th scope="col"
class="whitespace-nowrap bg-slate-300 px-4 py-3 font-semibold uppercase text-black dark:bg-navy-800 dark:text-navy-100 lg:px-5">
Port Name Port Name
</th> </th>
<th scope="col" class="whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"> <th scope="col"
class="whitespace-nowrap bg-slate-300 px-4 py-3 font-semibold uppercase text-black dark:bg-navy-800 dark:text-navy-100 lg:px-5">
Country Code Country Code
</th> </th>
<th scope="col" class="whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"> <th scope="col"
class="whitespace-nowrap bg-slate-300 px-4 py-3 font-semibold uppercase text-black dark:bg-navy-800 dark:text-navy-100 lg:px-5">
Flag Status Flag Status
</th> </th>
<th scope="col" class="whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"> <th scope="col"
class="whitespace-nowrap rounded-tr-lg bg-slate-300 px-4 py-3 font-semibold uppercase text-black dark:bg-navy-800 dark:text-navy-100 lg:px-5">
Last Update Last Update
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach ($results as $disc) @foreach ($results as $disc)
<tr class="border-y border-transparent border-b-slate-200 dark:border-b-navy-500"> <tr
class="border-y border-transparent border-b-slate-200 dark:border-b-navy-500">
<td class="whitespace-nowrap px-4 py-3 sm:px-5"> <td class="whitespace-nowrap px-4 py-3 sm:px-5">
{{ $disc->isocode }} {{ $disc->isocode }}
</td> </td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $disc->portname }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-2">{{ $disc->portname }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $disc->cntrycode }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-2">{{ $disc->cntrycode }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $disc->flagstatus }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-2">{{ $disc->flagstatus }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2">{{ $disc->lastupdate }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-2">{{ $disc->lastupdate }}</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
...@@ -125,6 +113,7 @@ ...@@ -125,6 +113,7 @@
</div> </div>
</div> </div>
</div> </div>
@endif @endif
</main> </main>
</div>
</div> </div>
<div> <div class="bg-white p-2 flex flex-row items-center space-x-3">
@if (session()->has('message')) <div class="flex flex-row items-center">
<div class="alert alert-success"> @if ($file)
{{ session('message') }} <div class="text-sm text-gray-600 dark:text-gray-300">
</div> Uploaded File: {{ $file->getClientOriginalName() }}
@endif </div>
@endif
<span wire:loading>
<svg class="animate-spin h-5 w-5 text-primary m-3" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4">
</circle>
<path class="opacity-75" fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.964 7.964 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">
</path>
</svg>
</span>
<form wire:submit.prevent="uploadFile" enctype="multipart/form-data"> @if (!$file)
<div class="form-upload"> <label for="file-upload"
<input type="file" wire:model="file"> class="btn bg-gray-200 text-gray-800 hover:bg-gray-300 focus:bg-gray-300 active:bg-gray-300 dark:bg-gray-500 dark:text-gray-50 dark:hover:bg-gray-450 dark:focus:bg-gray-450 dark:active:bg-gray-450/90">
@error('file') <span class="error">{{ $message }}</span> @enderror <input tabindex="-1" id="file-upload" type="file" wire:model="file"
<button type="submit" class="py-2 px-3 bg-stone-700 rounded-lg text-white">Upload</button> class="pointer-events-none absolute inset-0 h-full w-full opacity-0" />
</div> <div class="flex items-center space-x-2">
</form> <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" />
</svg>
<span>Choose File</span>
</div>
</label>
@error('file')
<span class="text-red-600 text-sm mt-2">{{ $message }}</span>
@enderror
@else
<button
class=" text-error px-1 py-1 text-xl hover:text-2xl"
wire:click="removeFile">
<i class="fa fa-remove" aria-hidden="true"></i>
</button>
@endif
</div>
<div class="text-right">
@if (!$fileUploaded)
<button
class="bg-primary text-white px-4 py-2 rounded-md hover:bg-primary-focus focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50"
wire:click="uploadFile">
Upload
</button>
@endif
</div>
</div> </div>
<div> <div class="max-w-lg mx-auto p-8 bg-white shadow-lg rounded-lg">
<button type="button" wire:click="$emit('loadPage', 'list')" <div class="mx-auto ">
class="btn mx-auto m-3 text-white bg-primary px-3 py-2">Back</button> <form wire:submit.prevent="addExchangerate" class="space-y-3">
<div class="max-w-full mx-auto p-6 bg-gray-100"> <div class="mb-2">
<label for="currency" class="block text-sm font-medium text-gray-700">Currency</label>
<div class="w-full px-6 mb-12 flex justify-center"> <input type="text" wire:model.defer="currency" id="currency"
<div class="p-12 bg-white shadow-md rounded-lg w-1/2"> class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
<h2 class="text-2xl font-bold mb-4">Create Exchangerate</h2> @error('currency')
<span class="text-red-500">{{ $message }}</span>
<div class="mx-auto p-4"> @enderror
@if (session()->has('message'))
<div class="alert alert-success">
{{ session('message') }}
</div> </div>
@endif
<form wire:submit.prevent="addExchangerate"> <div class="mb-2">
<label for="exdate" class="block text-gray-700">Expired date</label>
<div class="mb-4"> <input type="date" id="exdate" class="w-full mt-1 p-2 border border-gray-300 rounded-md"
<label for="currency" class="block text-sm font-medium text-gray-700">Currency</label> wire:model.defer="exdate">
<input type="text" wire:model.defer="currency" id="currency" class="w-full mt-1 p-2 border border-gray-300 rounded-md"> </div>
@error('currency') <span class="text-red-500">{{ $message }}</span> @enderror <div class="mb-2">
</div> <label for="finishdate" class="block text-gray-700">Finish date</label>
<input type="date" id="finishdate" class="w-full mt-1 p-2 border border-gray-300 rounded-md"
<div class="mb-4"> wire:model.defer="finishdate">
<label for="exdate" class="block text-gray-700">Expired date</label> </div>
<input type="date" id="exdate" class="w-full mt-1 p-2 border border-gray-300 rounded-md" wire:model.defer="exdate">
<!-- @error('exdate') <span class="text-red-500">{{ $message }}</span> @enderror -->
</div>
<div class="mb-4">
<label for="finishdate" class="block text-gray-700">Finish date</label>
<input type="date" id="finishdate" class="w-full mt-1 p-2 border border-gray-300 rounded-md" wire:model.defer="finishdate">
</div>
<div class="mb-4"> <div class="mb-2">
<label for="rate" class="block text-sm font-medium text-gray-700">Rate</label> <label for="rate" class="block text-sm font-medium text-gray-700">Rate</label>
<input type="text" wire:model.defer="rate" id="rate" class="w-full mt-1 p-2 border border-gray-300 rounded-md"> <input type="text" wire:model.defer="rate" id="rate"
</div> class="w-full mt-1 p-2 border border-gray-300 rounded-md">
<div class="mb-4"> </div>
<label for="baht" class="block text-sm font-medium text-gray-700">Baht</label> <div class="mb-2">
<input type="text" wire:model.defer="baht" id="baht" class="w-full mt-1 p-2 border border-gray-300 rounded-md"> <label for="baht" class="block text-sm font-medium text-gray-700">Baht</label>
</div> <input type="text" wire:model.defer="baht" id="baht"
<div class="mb-4"> class="w-full mt-1 p-2 border border-gray-300 rounded-md">
<label for="exbaht" class="block text-sm font-medium text-gray-700">Export Baht</label> </div>
<input type="text" wire:model.defer="exbaht" id="exbaht" class="w-full mt-1 p-2 border border-gray-300 rounded-md"> <div class="mb-2">
</div> <label for="exbaht" class="block text-sm font-medium text-gray-700">Export Baht</label>
<div class="flex items-center justify-center"> <input type="text" wire:model.defer="exbaht" id="exbaht"
<button type="submit" class="w-full mt-1 p-2 border border-gray-300 rounded-md">
class="bg-primary inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> </div>
Save <div class="flex justify-end space-x-4 mt-4">
</button> <a href="/exchange-rate" type="button"
class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md shadow-sm hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-400">Cancel</a>
<button type="submit" type="submit"
class="px-4 py-2 bg-primary text-white rounded-md shadow-sm hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">Save</button>
</div> </div>
</form> </form>
</div> </div>
</div>
</div>
</div> </div>
<div> <div class="max-w-lg mx-auto p-8 bg-white shadow-lg rounded-lg">
<button type="button" wire:click="$emit('loadPage', 'list')" <div class="mx-auto ">
class="btn mx-auto m-3 text-white bg-primary px-3 py-2">Back</button> <form wire:submit.prevent="updateExchangerate" class="space-y-3">
<div class="max-w-full mx-auto p-6 bg-gray-100">
<div class="w-full px-6 mb-12 flex justify-center"> <div class="mb-2">
<div class="p-12 bg-white shadow-md rounded-lg w-1/2"> <label for="currency" class="block text-sm font-medium text-gray-700">Currency</label>
<h2 class="text-2xl font-bold mb-4">Edit Exchangerate</h2> <input type="text" wire:model.defer="currency" id="currency"
class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
<div class="mx-auto p-4"> @error('currency')
@if (session()->has('message')) <span class="text-red-500">{{ $message }}</span>
<div class="alert alert-success"> @enderror
{{ session('message') }}
</div> </div>
@endif
<form wire:submit.prevent="updateExchangerate"> <div class="mb-2">
<label for="exdate" class="block text-gray-700">Expired date</label>
<div class="mb-4"> <input type="date" id="exdate"
<label for="currency" class="block text-sm font-medium text-gray-700">Currency</label> class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm"
<input type="text" wire:model.defer="currency" id="currency" class="w-full mt-1 p-2 border border-gray-300 rounded-md"> wire:model.defer="exdate">
@error('currency') <span class="text-red-500">{{ $message }}</span> @enderror @error('exdate')
</div> <span class="text-red-500">{{ $message }}</span>
@enderror
<div class="mb-4"> </div>
<label for="exdate" class="block text-gray-700">Expired date</label> <div class="mb-2">
<input type="date" id="exdate" class="w-full mt-1 p-2 border border-gray-300 rounded-md" wire:model.defer="exdate"> <label for="finishdate" class="block text-gray-700">Finish date</label>
@error('exdate') <span class="text-red-500">{{ $message }}</span> @enderror <input type="date" id="finishdate"
</div> class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm"
<div class="mb-4"> wire:model.defer="finishdate">
<label for="finishdate" class="block text-gray-700">Finish date</label> </div>
<input type="date" id="finishdate" class="w-full mt-1 p-2 border border-gray-300 rounded-md" wire:model.defer="finishdate">
</div>
<div class="mb-4"> <div class="mb-2">
<label for="rate" class="block text-sm font-medium text-gray-700">Rate</label> <label for="rate" class="block text-sm font-medium text-gray-700">Rate</label>
<input type="text" wire:model.defer="rate" id="rate" class="w-full mt-1 p-2 border border-gray-300 rounded-md"> <input type="text" wire:model.defer="rate" id="rate"
</div> class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
<div class="mb-4"> </div>
<label for="baht" class="block text-sm font-medium text-gray-700">Baht</label> <div class="mb-2">
<input type="text" wire:model.defer="baht" id="baht" class="w-full mt-1 p-2 border border-gray-300 rounded-md"> <label for="baht" class="block text-sm font-medium text-gray-700">Baht</label>
</div> <input type="text" wire:model.defer="baht" id="baht"
<div class="mb-4"> class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
<label for="exbaht" class="block text-sm font-medium text-gray-700">Export Baht</label> </div>
<input type="text" wire:model.defer="exbaht" id="exbaht" class="w-full mt-1 p-2 border border-gray-300 rounded-md"> <div class="mb-2">
</div> <label for="exbaht" class="block text-sm font-medium text-gray-700">Export Baht</label>
<div class="flex items-center justify-center"> <input type="text" wire:model.defer="exbaht" id="exbaht"
class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
</div>
<div class="flex justify-end space-x-4 mt-4">
<a href="/exchange-rate" type="button"
class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md shadow-sm hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-400">Cancel</a>
<button type="submit" <button type="submit"
class="bg-primary inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> class="bg-primary inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
Update Update
...@@ -52,7 +52,4 @@ ...@@ -52,7 +52,4 @@
</div> </div>
</form> </form>
</div> </div>
</div>
</div>
</div> </div>
<form wire:submit.prevent="upload" class="form-upload"> <div class="bg-main-container" x-data="{ notLimit: false }">
<input type="file" wire:model="file"> <div class="max-w-full mx-auto p-6">
@error('file') <span class="error">{{ $message }}</span> @enderror <div class="mt-5 mb-2 flex h-8 place-content-center px-4 ">
<label> <h2 class="text-xl text-slate-800">
<input type="checkbox" wire:model="createPatch"> <strong>Create Patch</strong> Patch Exchange Rate
</label> </h2>
<label> <h2 class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4">
<input type="checkbox" wire:model="updatePatch"> <strong>Update Patch</strong> Create
</label> </h2>
<label> </div>
<input type="checkbox" wire:model="sendToEec"> <strong>Send To EEC</strong> <div class="bg-white p-6 rounded-lg shadow-md">
</label>
<button type="submit" class="py-2 px-3 bg-stone-700 rounded-lg text-white">Upload</button> <div class="mb-4">
</form> <div class="flex items-center mt-2">
<label for="upload_file" class="block text-gray-700 font-medium mr-5">Upload File Data</label>
@if ($file)
<div class="text-sm text-gray-600 dark:text-gray-300 mr-4">
Uploaded File: {{ $file->getClientOriginalName() }}
</div>
@endif
<span wire:loading>
<svg class="animate-spin h-5 w-5 text-primary m-3" xmlns="http://www.w3.org/2000/svg"
fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor"
stroke-width="4">
</circle>
<path class="opacity-75" fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.964 7.964 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">
</path>
</svg>
</span>
<label for="file-upload"
class="btn bg-gray-200 text-gray-800 hover:bg-gray-300 focus:bg-gray-300 active:bg-gray-300 dark:bg-gray-500 dark:text-gray-50 dark:hover:bg-gray-450 dark:focus:bg-gray-450 dark:active:bg-gray-450/90">
<input tabindex="-1" id="file-upload" type="file" wire:model="file"
class="pointer-events-none absolute inset-0 h-full w-full opacity-0" />
<div class="flex items-center space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" />
</svg>
<span>Choose File</span>
</div>
@error('file')
<span class="text-red-600 text-sm mt-2">{{ $message }}</span>
@enderror
</label>
</div>
</div>
<div class="mb-4 flex items-center space-x-4">
<label class="inline-flex items-center">
<input wire:model.defer="createPatch"
class="form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary focus:border-primary dark:bg-navy-900 dark:border-navy-500 dark:checked:bg-accent dark:checked:border-accent dark:hover:border-accent dark:focus:border-accent"
type="checkbox" value="">
<span class="ml-2">Create Patch</span>
</label>
<label class="inline-flex items-center">
<input wire:model.defer="updatePatch"
class="form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary focus:border-primary dark:bg-navy-900 dark:border-navy-500 dark:checked:bg-accent dark:checked:border-accent dark:hover:border-accent dark:focus:border-accent"
type="checkbox" value="">
<span class="ml-2">Update Patch</span>
</label>
<label class="inline-flex items-center">
<input wire:model.defer="sendToEec"
class="form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary focus:border-primary dark:bg-navy-900 dark:border-navy-500 dark:checked:bg-accent dark:checked:border-accent dark:hover:border-accent dark:focus:border-accent"
type="checkbox" value="">
<span class="ml-2">Send To EEC</span>
</label>
</div>
<div class="text-right">
<button
class="bg-primary text-white px-4 py-2 rounded-md hover:bg-primary-focus focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50"
wire:click="upload">
Upload
</button>
</div>
</div>
</div>
</div>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</h2> </h2>
</div> </div>
<form class="space-y-6"> <div class="space-y-2">
<div class="mb-2"> <div class="mb-2">
<label for="username" class="block text-sm font-medium text-gray-700">Username:</label> <label for="username" class="block text-sm font-medium text-gray-700">Username:</label>
<input type="text" wire:model.defer="username" id="username" <input type="text" wire:model.defer="username" id="username"
...@@ -99,5 +99,5 @@ ...@@ -99,5 +99,5 @@
<button type="submit" type="submit" <button type="submit" type="submit"
class="px-4 py-2 bg-primary text-white rounded-md shadow-sm hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">Save</button> class="px-4 py-2 bg-primary text-white rounded-md shadow-sm hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">Save</button>
</div> </div>
</form> </div>
</div> </div>
<x-guest-layout title="Login"> <x-guest-layout title="Login">
<style> <style>
input:-webkit-autofill ,input:-webkit-autofill:focus {
-webkit-box-shadow: 0 0 0px 1000px transparent inset;
-webkit-text-fill-color: inherit;
transition: background-color 5000s ease-in-out 0s;
}
.background-image { .background-image {
background-image: url('images/login-background.jpg'); /* Replace with your image URL */ background-image: url('images/login-background.jpg');
/* Replace with your image URL */
background-size: cover; background-size: cover;
background-position: center; background-position: center;
height: 100vh; height: 100vh;
...@@ -9,6 +15,7 @@ ...@@ -9,6 +15,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.background-blur { .background-blur {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -34,12 +41,14 @@ ...@@ -34,12 +41,14 @@
} }
.input-field { .input-field {
background: rgba(255, 255, 255, 0.9); /* Change this to the desired background color */ background: rgba(255, 255, 255, 0.9);
/* Change this to the desired background color */
border: none; border: none;
padding: 1rem; padding: 1rem;
border-radius: 5px; border-radius: 5px;
width: 100%; width: 100%;
color: #333; /* Change this to the desired text color */ color: #333;
/* Change this to the desired text color */
} }
.input-field:focus { .input-field:focus {
...@@ -73,12 +82,30 @@ ...@@ -73,12 +82,30 @@
<div class="background-image"> <div class="background-image">
<div class="background-blur"></div> {{-- <div class="background-blur"></div> --}}
<div class="glass-effect"> <div class="glass-effect">
<h2 class="text-3xl font-bold mb-6 text-center text-white">Sign In</h2> <h2 class="text-3xl font-bold mb-6 text-center text-white">Sign In</h2>
<p class="text-center mb-6 text-white">Your Social Campaigns</p>
<div class="flex flex-col items-center mb-6"> <form method="POST" action="{{ route('login') }}" class="flex flex-col items-center">
@csrf
<div class="w-full mb-4">
<label for="username" class="block text-white mb-2">UserName</label>
<input type="text" id="username" name="username" autocomplete="off"
class="w-full bg-transparent border-b-2 border-white text-black text-md p-3 active:border-none focus:outline-none active:outline-none focus:border-b-indigo-500 focus:transform focus:translate-y-1 focus:duration-300 focus:text-xl"
placeholder="Enter your username">
</div>
<div class="w-full mb-6">
<label for="password" class="block text-white mb-2">Password</label>
<input type="password" id="password" name="password" autocomplete="off"
class="w-full bg-transparent border-b-2 border-white text-black text-md p-3 focus:outline-none active:outline-none focus:border-b-indigo-500 focus:transform focus:translate-y-1 focus:duration-300 focus:text-xl">
</div>
<button type="submit"
class="w-full bg-indigo-600 text-white py-2 rounded-lg hover:bg-indigo-700 transition duration-300">Sign
In</button>
</form>
<div class="flex flex-col items-center mb-6 mt-4">
{{-- <a href="{{ url('auth/google') }}" class="social-button"> {{-- <a href="{{ url('auth/google') }}" class="social-button">
<i aria-hidden="true" class="fab fa-google social-icon"></i> <i aria-hidden="true" class="fab fa-google social-icon"></i>
Sign in with Google Sign in with Google
...@@ -93,24 +120,9 @@ ...@@ -93,24 +120,9 @@
</a> </a>
</div> </div>
<div class="text-center mb-6 text-white">Or with Username</div> {{-- <div class="text-center mt-6 text-white">
<form method="POST" action="{{ route('login') }}" class="flex flex-col items-center">
@csrf
<div class="w-full mb-4">
<label for="username" class="block text-white mb-2">Username</label>
<input type="text" id="username" name="username" class="input-field" >
</div>
<div class="w-full mb-6">
<label for="password" class="block text-white mb-2">Password</label>
<input type="password" id="password" name="password" class="input-field" >
</div>
<button type="submit" class="w-full bg-indigo-600 text-white py-2 rounded-lg hover:bg-indigo-700 transition duration-300">Sign In</button>
</form>
<div class="text-center mt-6 text-white">
Not a Member yet? <a href="{{ route('register') }}" class="text-indigo-300 hover:text-indigo-500 transition duration-300">Sign Up</a> Not a Member yet? <a href="{{ route('register') }}" class="text-indigo-300 hover:text-indigo-500 transition duration-300">Sign Up</a>
</div> </div> --}}
</div> </div>
</div> </div>
......
...@@ -78,6 +78,7 @@ Route::middleware(['auth' ])->group(function () { ...@@ -78,6 +78,7 @@ Route::middleware(['auth' ])->group(function () {
Route::get('/exchange-rate', [ExchangeRateController::class, 'index']); Route::get('/exchange-rate', [ExchangeRateController::class, 'index']);
Route::get('/patch-exchange-rate', [ExchangeRateController::class, 'creatPatch']);
Route::get('/parameter', [ParameterController::class, 'index']); Route::get('/parameter', [ParameterController::class, 'index']);
Route::get('/discharge-port', [DischargePortController::class, 'index']); Route::get('/discharge-port', [DischargePortController::class, 'index']);
......
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