Commit 74be1082 authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

update new ui

parent d9e7ef9c
Pipeline #26899 passed with stage
in 1 minute and 22 seconds
...@@ -8,6 +8,14 @@ ...@@ -8,6 +8,14 @@
</div> </div>
</div> </div>
<div class="my-5 flex h-8 place-content-center px-4 ">
<h2 class="text-xl text-slate-800">
Master File Format
</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"> <div class="m-2">
@if ($action === 'list') @if ($action === 'list')
...@@ -21,19 +29,17 @@ ...@@ -21,19 +29,17 @@
</div> </div>
@endif @endif
<div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md"> <div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md">
<div class="card py-4">
<div class="pb-4">
<div class="my-3 flex h-8 items-center justify-between px-4 sm:px-5">
<h2 class="text-2xl text-black ">
Master File Format
</h2>
</div>
<div class="flex justify-between"> <div class="flex justify-between">
<div class="px-2 ml-4"> <div class="flex ">
<div class="px-1 ml-5">
<button type="button" <button type="button"
class="py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus" class="py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus"
wire:click="showAddForm">Add</button> wire:click="showAddForm"><i aria-hidden="true"
class="fa fa-add fa-solid"></i>Add</button>
</div> </div>
</div>
<div class="inline-flex flex-initial"> <div class="inline-flex flex-initial">
<div x-data="{ isInputActive: true }"> <div x-data="{ isInputActive: true }">
<div class="flex gap-4 px-5 items-center"> <div class="flex gap-4 px-5 items-center">
...@@ -118,7 +124,7 @@ ...@@ -118,7 +124,7 @@
</td> </td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2"> <td class="whitespace-nowrap px-1 py-3 sm:px-2">
<div class="flex justify-center space-x-2"> <div class="flex justify-center space-x-2">
<a wire:click="showpatchEditForm({{ $formatFile->formatservice_ID }})" <a wire:click="showEditForm({{ $formatFile->formatservice_ID }})"
class="btn h-8 w-8 p-0 hover:text-main-container active:text-main-container hover:primary-focus focus:primary-focus active:bg-info/25"> class="btn h-8 w-8 p-0 hover:text-main-container active:text-main-container hover:primary-focus focus:primary-focus active:bg-info/25">
<i class="fa fa-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
......
<div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6"x-data="{ changePassword: @entangle('changePassword'), tomGReady: false }" x-show="tomGReady">
<form wire:submit.prevent="submitEditForm">
@csrf
<div class="card pb-4">
<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">
<i class="fa-solid fa-edit text-primary"></i> Edit User
</h2>
</div>
<div class="w-3/4 px-3 space-y-3 m-auto mb-4">
<div class="flex items-center">
<label class="w-2/12 mr-2">
<span>Name:</span>
</label>
<span class="relative flex w-full">
<input wire:model.defer="name"
class="form-input w-2/4 rounded-lg border border-slate-300 bg-transparent px-3 py-2 text-xs pl-4 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
placeholder="Name" name="name" type="text" />
@error('name')
<span class="text-red-500 text-md self-center ml-4">{{ $message }}</span>
@enderror
</span>
</div>
<div class="flex items-center">
<label class="w-2/12 mr-2">
<span>Email:</span>
</label>
<span class="relative flex w-full">
<input wire:model.defer="email"
class="form-input w-2/4 rounded-lg border border-slate-300 bg-transparent px-3 py-2 text-xs pl-4 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
placeholder="Email" name="email" type="email" />
@error('email')
<span class="text-red-500 text-md self-center ml-4">{{ $message }}</span>
@enderror
</span>
</div>
<div class="flex items-center " wire:ignore>
<span class="w-2/12 mr-2">Add Groups:</span>
<span class="relative flex w-full">
<input class="mt-1.5 relative flex w-1/2" wire:ignore x-data="{ groupLists: @entangle('group_lists') }"
x-init="groupLists = @js($userGroups);
const tempGroup = pages.groupSelect;
pages.fetchGroups(tempGroup).then(() => {
$el._x_tom = new Tom($el, {
...tempGroup.group,
onChange: (value) => {
groupLists = value;
}
});
$el._x_tom.setValue(groupLists);
tomGReady = true
})" type="text">
</span>
</div>
<!-- Toggle Button for Change Password -->
<div class="flex items-center">
<button type="button" @click="changePassword = !changePassword"
class="btn border bg-gray-300 border-gray-300 font-medium text-gray-800 hover:text-white focus:text-white hover:bg-gray-500 focus:bg-gray-500 active:bg-gray-150/80 dark:border-navy-450 dark:text-navy-50 dark:hover:bg-navy-500 dark:focus:bg-navy-500 dark:active:bg-navy-500/90">
Change Password
</button>
</div>
<!-- Password Fields (Hidden by Default) -->
<div x-show="changePassword">
<div class="flex items-center mt-4">
<label class="w-2/12 mr-2">
<span>Current Password:</span>
</label>
<span class="relative flex w-full">
<input wire:model.defer="current_password"
class="form-input w-2/4 rounded-lg border border-slate-300 bg-transparent px-3 py-2 text-xs pl-4 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
placeholder="Current Password" name="current_password" type="password" />
@error('current_password')
<span class="text-red-500 text-md self-center ml-4">{{ $message }}</span>
@enderror
</span>
</div>
<div class="flex items-center mt-4">
<label class="w-2/12 mr-2">
<span>New Password:</span>
</label>
<span class="relative flex w-full">
<input wire:model.defer="new_password"
class="form-input w-2/4 rounded-lg border border-slate-300 bg-transparent px-3 py-2 text-xs pl-4 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
placeholder="New Password" name="new_password" type="password" />
@error('new_password')
<span class="text-red-500 text-md self-center ml-4">{{ $message }}</span>
@enderror
</span>
</div>
<div class="flex items-center mt-4">
<label class="w-2/12 mr-2">
<span>Confirm New Password:</span>
</label>
<span class="relative flex w-full">
<input wire:model.defer="new_password_confirmation"
class="form-input w-2/4 rounded-lg border border-slate-300 bg-transparent px-3 py-2 text-xs pl-4 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
placeholder="Confirm New Password" name="new_password_confirmation" type="password" />
@error('new_password_confirmation')
<span class="text-red-500 text-md self-center ml-4">{{ $message }}</span>
@enderror
</span>
</div>
</div>
</div>
<div class="grid grid-cols-12 justify-center space-x-2 pt-4">
<span wire:click="goBack"
class="col-start-4 btn border border-slate-300 font-medium text-slate-800 hover:bg-slate-150 focus:bg-slate-150 active:bg-slate-150/80 dark:border-navy-450 dark:text-navy-50 dark:hover:bg-navy-500 dark:focus:bg-navy-500 dark:active:bg-navy-500/90">
Cancel
</span>
<button type="submit"
class="btn ml-3 bg-primary font-medium text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/90 dark:bg-accent dark:hover:bg-accent-focus dark:focus:bg-accent-focus dark:active:bg-accent/90">
Save
</button>
</div>
</div>
</form>
</div>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</div> </div>
<div class="w-3/4 px-3 space-y-3 m-auto mb-4"> <div class="w-3/4 px-3 space-y-3 m-auto mb-4">
<div class="flex items-center w-3/5"> <div class="flex items-center w-3/5">
<label class="w-2/12 mr-2"> <label for="" class="w-2/12 mr-2">
<span>Name</span> <span>Name</span>
</label> </label>
<span class="relative flex w-full"> <span class="relative flex w-full">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</span> </span>
</div> </div>
<div class="flex items-center w-3/5"> <div class="flex items-center w-3/5">
<label class="w-2/12 mr-2"> <label for="" class="w-2/12 mr-2">
<span>Comapany</span> <span>Comapany</span>
</label> </label>
<span class="relative flex w-full"> <span class="relative flex w-full">
......
<div> <div x-cloak>
@include('components.no-permission') @include('components.no-permission')
<div class="flex items-center space-x-4 py-5 lg:py-6 "> <div wire:loading.class="flex" wire:loading.class.remove="hidden" wire:target="showCompanyList"
<ul class="hidden flex-wrap items-center space-x-2 sm:flex"> class="absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden">
<li class="flex items-center space-x-2"> <div class="app-preloader grid h-full w-full place-content-center">
<a class="text-primary transition-colors hover:text-primary-focus dark:text-accent-light dark:hover:text-accent" <div class="app-preloader-inner relative inline-block h-48 w-48"></div>
href="/">Home</a> </div>
<svg x-ignore xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" </div>
stroke="currentColor"> <div class="my-5 flex h-8 place-content-center px-4 ">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" /> <h2 class="text-xl text-slate-800">
</svg> Group Management
</li> </h2>
<li class="flex items-center space-x-2"> <h2 class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4">
<a class="text-primary transition-colors hover:text-primary-focus dark:text-accent-light dark:hover:text-accent" {{ $action === 'create' ? 'Create' : ($action === 'edit' ? 'Edit' : '') }}
wire:click="$emit('menuClicked', 'Group')">Group Management</a> </h2>
</li>
</ul>
</div> </div>
@if ($action === 'list') @if ($action === 'list')
<div x-data="{ show: @entangle('showMessage'), message: '' }" x-init="window.addEventListener('show-message', event => { <div x-data="{ show: @entangle('showMessage'), message: '' }" x-init="window.addEventListener('show-message', event => {
...@@ -48,27 +45,18 @@ ...@@ -48,27 +45,18 @@
selectedGroups: @entangle('selectedGroups') selectedGroups: @entangle('selectedGroups')
}" class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 "> }" class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 ">
<div class="card pb-4"> <div class="card py-4">
<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">
Group Management
</h2>
</div>
<div class="flex justify-between"> <div class="flex justify-between">
<div class="px-2 ml-4"> <div class="flex ">
<button wire:click="showGroupCreateForm()" <div class="px-1 ml-5">
class="btn h-6 w-28 rounded space-x-1 bg-primary px-3 text-xs font-medium text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/90 dark:bg-accent dark:hover:bg-accent-focus dark:focus:bg-accent-focus dark:active:bg-accent/90"> <button type="button"
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus"
stroke-width="1.5" stroke="currentColor" class="w-3 h-3"> wire:click="showGroupCreateForm"><i aria-hidden="true"
<path stroke-linecap="round" stroke-linejoin="round" class="fa fa-add fa-solid"></i>Add</button>
d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"> </div>
</path> <div class=" ml-1">
</svg>
<span>Create</span>
</button>
<a @click.prevent="if (selectedGroupsAlpine.length > 0) { showDeleteListModal = true; } else { showAlert = true;}" <a @click.prevent="if (selectedGroupsAlpine.length > 0) { showDeleteListModal = true; } else { showAlert = true;}"
class="btn h-6 w-28 rounded space-x-1 bg-primary px-3 text-xs font-medium text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/90 dark:bg-accent dark:hover:bg-accent-focus dark:focus:bg-accent-focus dark:active:bg-accent/90"> class="py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus flex items-center space-x-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" class="w-3 h-3"> stroke-width="1.5" stroke="currentColor" class="w-3 h-3">
<path stroke-linecap="round" stroke-linejoin="round" <path stroke-linecap="round" stroke-linejoin="round"
...@@ -78,6 +66,8 @@ ...@@ -78,6 +66,8 @@
<span>Delete</span> <span>Delete</span>
</a> </a>
</div> </div>
</div>
<div class="inline-flex flex-initial"> <div class="inline-flex flex-initial">
<div x-data="{ isInputActive: true }"> <div x-data="{ isInputActive: true }">
<div class="flex gap-3 px-5 items-center"> <div class="flex gap-3 px-5 items-center">
...@@ -165,14 +155,14 @@ ...@@ -165,14 +155,14 @@
</td> </td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $group->created_at }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $group->created_at }}</td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5"> <td class="whitespace-nowrap px-4 py-3 sm:px-5">
<div class="flex justify-center space-x-2"> <div class="flex justify-center space-x-1">
<a wire:click="showGroupEditForm({{ $group->id }})" <a wire:click="showGroupEditForm({{ $group->id }})"
class="btn h-8 w-8 p-0 text-info hover:bg-info/20 focus:bg-info/20 active:bg-info/25"> class="btn h-8 w-8 p-0 hover:bg-info/20 focus:bg-info/20 active:bg-info/25">
<i class="fa fa-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
<div> <div>
<a @click="$wire.emit('showDeleteModal', {{ $group->id }})" <a @click="$wire.emit('showDeleteModal', {{ $group->id }})"
class="btn h-8 w-8 p-0 text-error hover:bg-error/20 focus:bg-error/20 active:bg-error/25"> class="btn h-8 w-8 p-0 hover:text-white focus:text-white active:bg-error/25">
<i class="fa fa-trash-alt"></i> <i class="fa fa-trash-alt"></i>
</a> </a>
</div> </div>
......
<div class="max-w-4xl mx-auto p-8 bg-white shadow-lg rounded-lg"> <div class=" p-6 bg-white shadow-lg rounded-lg">
<style> <style>
.ql-container { .ql-container {
height: 15rem; height: 15rem;
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
[{ color: [] }, { background: [] }], [{ color: [] }, { background: [] }],
[{ font: [] }], [{ font: [] }],
[{ align: [] }], [{ align: [] }],
['clean'], // remove formatting button ['clean'],
['image'], // Add image upload button ['image'],
], ],
handlers: { handlers: {
image: function() { image: function() {
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
canvas.width = width; canvas.width = width;
canvas.height = height; canvas.height = height;
ctx.drawImage(img, 0, 0, width, height); ctx.drawImage(img, 0, 0, width, height);
const resizedImage = canvas.toDataURL('image/jpeg', 0.7); // Adjust quality const resizedImage = canvas.toDataURL('image/jpeg', 0.7);
const range = quill.getSelection(); const range = quill.getSelection();
quill.insertEmbed(range.index, 'image', resizedImage); quill.insertEmbed(range.index, 'image', resizedImage);
}; };
...@@ -263,8 +263,8 @@ ...@@ -263,8 +263,8 @@
</div> </div>
<div class="flex justify-end space-x-4 mt-4"> <div class="flex justify-end space-x-4 mt-4">
<button type="button" wire:click="goBack" <a href="/news" 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</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" x-ref="submitButton" <button type="submit" x-ref="submitButton"
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>
......
<div class="max-w-4xl mx-auto p-8 bg-white shadow-lg rounded-lg"> <div class=" p-6 bg-white shadow-lg rounded-lg">
<style> <style>
.ql-container { .ql-container {
height: 15rem; height: 15rem;
...@@ -232,8 +232,8 @@ ...@@ -232,8 +232,8 @@
</div> </div>
<div class="flex justify-end space-x-4 mt-4"> <div class="flex justify-end space-x-4 mt-4">
<button type="button" wire:click="goBack" <a href="/news" 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</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" x-ref="submitButton" <button type="submit" x-ref="submitButton"
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>
......
<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;">
...@@ -8,13 +8,16 @@ ...@@ -8,13 +8,16 @@
</div> </div>
</div> </div>
<div class="m-2"> <div class="my-5 flex h-8 place-content-center px-4 ">
{{-- <div wire:loading.class="flex" wire:loading.class.remove="hidden" <h2 class="text-xl text-slate-800">
class="absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden"> News & Update
<div class="flex justify-center items-center "> </h2>
<div class="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-blue-500"></div>
<h2 class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4">
{{ $action === 'create'? 'Create' :(($action === 'edit')? 'Edit':'') }}
</h2>
</div> </div>
</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">
...@@ -28,11 +31,6 @@ ...@@ -28,11 +31,6 @@
<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="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="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 mb-3 text-black ">
News & Update
</h2>
</div>
<div class="flex justify-between"> <div class="flex justify-between">
<div class="px-2 ml-4"> <div class="px-2 ml-4">
<button type="button" <button type="button"
...@@ -129,16 +127,16 @@ ...@@ -129,16 +127,16 @@
<tr <tr
class="border-y border-transparent border-b-slate-200 dark:border-b-navy-500"> 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">
<label class="inline-flex items-center space-x-2"> <div class="inline-flex items-center space-x-2">
<input @change="toggleGroup($event)" <input @change="toggleGroup($event)"
class="form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary hover: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" class="form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary hover: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" wire:model.defer="selectedNews" type="checkbox" wire:model.defer="selectedNews"
value="{{ $news->shippingnetnews_ID }}" /> value="{{ $news->shippingnetnews_ID }}" />
</label> </div>
</td> </td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5"> <td class="whitespace-nowrap px-4 py-3 sm:px-5">
{{ \Illuminate\Support\Str::limit($news->topic, 70) }}</td> {{ \Illuminate\Support\Str::limit($news->topic, 70) }}</td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $news->group->groupname??"" }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $news->groupname??"" }}</td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $news->authorDate }} <td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $news->authorDate }}
</td> </td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $news->issueDate }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $news->issueDate }}</td>
...@@ -195,7 +193,7 @@ ...@@ -195,7 +193,7 @@
</template> </template>
<livewire:delete-modal /> <livewire:delete-modal />
{{ $results->links('livewire.paginate-custom') }} {{ $results->links('livewire.paginate-custom' ) }}
</div> </div>
</div> </div>
......
<div class="bg-main-container"> <div class="bg-main-container">
<link href="{{ asset('css/pages/patch.css') }}" rel="stylesheet"> <link href="{{ asset('css/pages/patch.css') }}" rel="stylesheet">
<div class="max-w-full mx-auto px-5 "> <div class="mt-5 mb-2 flex h-8 place-content-center px-4 ">
<h2 class="text-2xl text-black "> <h2 class="text-xl text-slate-800">
Patch Management Patch Management
</h2> </h2>
<h2 class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4">
Create
</h2>
</div>
<a type="button" href="/patch" class="btn mx-auto m-3 text-white bg-primary px-3 py-2">Back</a> <a type="button" href="/patch" class="btn mx-auto m-3 text-white bg-primary px-3 py-2">Back</a>
<div class="pb-4 max-w-full mx-auto">
@if (session()->has('message')) @if (session()->has('message'))
<div class="alert alert-success"> <div class="alert alert-success">
{{ session('message') }} {{ session('message') }}
...@@ -67,20 +73,6 @@ ...@@ -67,20 +73,6 @@
</div> </div>
</div> </div>
{{-- <template x-if="selectedProject"> --}}
{{-- <template x-if="true">
<div class="mb-3">
<label for="branch" class="form-label w-64 text-lg mr-2">Select Branch:</label>
<select x-model="selectedBranch" id="branch"
class="ml-2 w-64 h-8 mt-1 border border-gray-300 rounded-md">
<option value="">Choose Branch</option>
<template x-for="branch in branches" :key="branch.name">
<option :value="branch.name" x-text="branch.name"></option>
</template>
</select>
</div>
</template> --}}
<div class="mb-3"> <div class="mb-3">
<input type="text" value="c5d80f79" wire:model.defer="startCommit" placeholder="Start Commit" <input type="text" value="c5d80f79" wire:model.defer="startCommit" placeholder="Start Commit"
class="placeholder:text-sm text-lg mb-2 form-input rounded-lg border border-slate-300 px-2"> class="placeholder:text-sm text-lg mb-2 form-input rounded-lg border border-slate-300 px-2">
......
...@@ -9,12 +9,17 @@ ...@@ -9,12 +9,17 @@
} }
}); });
}, 1000); }, 1000);
});"> });" x-cloak>
<link href="{{ asset('css/pages/patch.css') }}" rel="stylesheet"> <link href="{{ asset('css/pages/patch.css') }}" rel="stylesheet">
<div class="max-w-full mx-auto px-5" x-cloak> <div class="mt-5 mb-2 flex h-8 place-content-center px-4 ">
<h2 class="text-2xl text-black "> <h2 class="text-xl text-slate-800">
Patch Management Patch Management
</h2> </h2>
<h2 class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4">
Edit
</h2>
</div>
<div class="max-w-full mx-auto px-5" >
<style> <style>
.progress-bar { .progress-bar {
height: 20px; height: 20px;
...@@ -191,10 +196,10 @@ ...@@ -191,10 +196,10 @@
<tr <tr
class="border-y border-transparent border-b-slate-200 dark:border-b-navy-500"> class="border-y border-transparent border-b-slate-200 dark:border-b-navy-500">
<td class="whitespace-nowrap px-4 py-1 sm:px-5"> <td class="whitespace-nowrap px-4 py-1 sm:px-5">
<label class="inline-flex items-center space-x-2"> <label for="patchFile-{{ $patchFile['fid'] }}" class="inline-flex items-center space-x-2">
<input <input
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" 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" x-model="selectedDeleteFiles" type="checkbox" x-model="selectedDeleteFiles" id="patchFile-{{ $patchFile['fid'] }}"
value="{{ $patchFile['fid'] }}" /> value="{{ $patchFile['fid'] }}" />
</label> </label>
</td> </td>
...@@ -204,14 +209,14 @@ ...@@ -204,14 +209,14 @@
<td class="whitespace-nowrap px-1 py-1 sm:px-2"> <td class="whitespace-nowrap px-1 py-1 sm:px-2">
<div class="flex justify-center space-x-2"> <div class="flex justify-center space-x-2">
<a wire:click="$emit('openModalFormPatchFile', '{{ $patchFile['fid'] }}' , '{{ $patchId }}')" <button wire:click="$emit('openModalFormPatchFile', '{{ $patchFile['fid'] }}' , '{{ $patchId }}')"
class="btn h-8 w-8 p-0 hover:text-main-container active:text-main-container hover:primary-focus focus:primary-focus active:bg-info/25"> class="btn h-8 w-8 p-0 hover:text-main-container active:text-main-container hover:primary-focus focus:primary-focus active:bg-info/25">
<i class="fa fa-edit"></i> <i class="fa fa-edit"></i>
</a> </button>
<a onclick="confirmDeletePatchFile({{ $patchFile['fid'] }})" <button onclick="confirmDeletePatchFile({{ $patchFile['fid'] }})"
class="btn h-8 w-8 p-0 hover:text-main-container active:text-main-container hover:primary-focus focus:primary-focus active:bg-info/25"> class="btn h-8 w-8 p-0 hover:text-main-container active:text-main-container hover:primary-focus focus:primary-focus active:bg-info/25" >
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</a> </button>
</div> </div>
</td> </td>
</tr> </tr>
......
...@@ -9,12 +9,6 @@ ...@@ -9,12 +9,6 @@
</div> </div>
</div> </div>
<div class="m-2"> <div class="m-2">
{{-- <div wire:loading.class="flex" wire:loading.class.remove="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="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-blue-500"></div>
</div>
</div> --}}
@if ($action === 'list') @if ($action === 'list')
@if ($message) @if ($message)
<div class="alert alert-success"> <div class="alert alert-success">
...@@ -25,14 +19,12 @@ ...@@ -25,14 +19,12 @@
</div> </div>
</div> </div>
@endif @endif
<div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md"> <div class="my-5 flex h-8 place-content-center px-4 ">
<h2 class="text-xl text-slate-800">
<div class="pb-4">
<div class="my-3 flex h-8 items-center justify-between px-4 sm:px-5">
<h2 class="text-2xl text-black ">
Patch Management Patch Management
</h2> </h2>
</div> </div>
<div class="pb-4 card shadow-lg p-4">
<div class="flex justify-between"> <div class="flex justify-between">
<div class="px-2 ml-4"> <div class="px-2 ml-4">
<button type="button" <button type="button"
...@@ -71,7 +63,7 @@ ...@@ -71,7 +63,7 @@
</div> </div>
</div> </div>
<div class="mx-3 mt-3 px-4"> <div class="mx-3 mt-3">
<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 class="is-hoverable table w-full text-left border-b"> <table class="is-hoverable table w-full text-left border-b">
<thead> <thead>
...@@ -161,7 +153,6 @@ ...@@ -161,7 +153,6 @@
</div> </div>
</div> </div>
</div>
@elseif($action === 'add') @elseif($action === 'add')
<livewire:pages.patch.patch-create> <livewire:pages.patch.patch-create>
@elseif($action === 'edit') @elseif($action === 'edit')
......
<div> <div x-cloak>
@include('components.no-permission') @include('components.no-permission')
<div wire:loading.class="flex" wire:loading.class.remove="hidden" wire:target="showRoleList"
<div class="flex items-center space-x-4 py-5 lg:py-6 "> class="absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden">
<ul class="hidden flex-wrap items-center space-x-2 sm:flex"> <div class="app-preloader grid h-full w-full place-content-center">
<li class="flex items-center space-x-2"> <div class="app-preloader-inner relative inline-block h-48 w-48"></div>
<a class="text-primary transition-colors hover:text-primary-focus dark:text-accent-light dark:hover:text-accent" </div>
href="/">Home</a> </div>
<svg x-ignore xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" <div class="my-5 flex h-8 place-content-center px-4 ">
stroke="currentColor"> <h2 class="text-xl text-slate-800">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" /> Role Management
</svg> </h2>
</li> <h2 class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4">
<li class="flex items-center space-x-2"> {{ $action === 'create' ? 'Create' : ($action === 'edit' ? 'Edit' : '') }}
<a class="text-primary transition-colors hover:text-primary-focus dark:text-accent-light dark:hover:text-accent" </h2>
wire:click="$emit('menuClicked', 'Role')">Role Management</a>
</li>
</ul>
</div> </div>
@if ($action === 'list') @if ($action === 'list')
<div x-data="{ show: @entangle('showMessage'), message: '' }" x-init="window.addEventListener('show-message', event => { <div x-data="{ show: @entangle('showMessage'), message: '' }" x-init="window.addEventListener('show-message', event => {
...@@ -48,31 +44,18 @@ ...@@ -48,31 +44,18 @@
selectedRoles: @entangle('selectedRoles') selectedRoles: @entangle('selectedRoles')
}" class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 "> }" class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 ">
<div class="card pb-4"> <div class="card pb-4 py-4 ">
<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">
Role Management
</h2>
</div>
{{-- @include('components/search-by', ['searchBy' => $searchBy ?? []]) --}}
<div class="flex justify-between"> <div class="flex justify-between">
<div class="flex ">
<div class="px-2 ml-4"> <div class="px-1 ml-5">
<button wire:click="showRoleCreateForm()" <button type="button"
class="btn h-6 w-28 rounded space-x-1 bg-primary px-3 text-xs font-medium text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/90 dark:bg-accent dark:hover:bg-accent-focus dark:focus:bg-accent-focus dark:active:bg-accent/90"> class="py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus"
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" wire:click="showRoleCreateForm"><i aria-hidden="true"
stroke-width="1.5" stroke="currentColor" class="w-3 h-3"> class="fa fa-add fa-solid"></i>Add</button>
<path stroke-linecap="round" stroke-linejoin="round" </div>
d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"> <div class=" ml-1">
</path>
</svg>
<span>Create</span>
</button>
<a @click.prevent="if (selectedRolesAlpine.length > 0) { showDeleteListModal = true; } else { showAlert = true;}" <a @click.prevent="if (selectedRolesAlpine.length > 0) { showDeleteListModal = true; } else { showAlert = true;}"
class="btn h-6 w-28 rounded space-x-1 bg-primary px-3 text-xs font-medium text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/90 dark:bg-accent dark:hover:bg-accent-focus dark:focus:bg-accent-focus dark:active:bg-accent/90"> class="py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus flex items-center space-x-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" class="w-3 h-3"> stroke-width="1.5" stroke="currentColor" class="w-3 h-3">
<path stroke-linecap="round" stroke-linejoin="round" <path stroke-linecap="round" stroke-linejoin="round"
...@@ -82,6 +65,7 @@ ...@@ -82,6 +65,7 @@
<span>Delete</span> <span>Delete</span>
</a> </a>
</div> </div>
</div>
<div class="inline-flex flex-initial"> <div class="inline-flex flex-initial">
<div x-data="{ isInputActive: true }"> <div x-data="{ isInputActive: true }">
<div class="flex gap-4 px-5 items-center"> <div class="flex gap-4 px-5 items-center">
...@@ -169,14 +153,14 @@ ...@@ -169,14 +153,14 @@
</td> </td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $role->created_at }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $role->created_at }}</td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5"> <td class="whitespace-nowrap px-4 py-3 sm:px-5">
<div class="flex justify-center space-x-2"> <div class="flex justify-center space-x-1">
<a wire:click="showRoleEditForm({{ $role->id }})" <a wire:click="showRoleEditForm({{ $role->id }})"
class="btn h-8 w-8 p-0 text-info hover:bg-info/20 focus:bg-info/20 active:bg-info/25"> class="btn h-8 w-8 p-0 hover:bg-info/20 focus:bg-info/20 active:bg-info/25">
<i class="fa fa-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
<div> <div>
<a @click="$wire.emit('showDeleteModal', {{ $role->id }})" <a @click="$wire.emit('showDeleteModal', {{ $role->id }})"
class="btn h-8 w-8 p-0 text-error hover:bg-error/20 focus:bg-error/20 active:bg-error/25"> class="btn h-8 w-8 p-0 hover:text-white focus:text-white active:bg-error/25">
<i class="fa fa-trash-alt"></i> <i class="fa fa-trash-alt"></i>
</a> </a>
</div> </div>
......
...@@ -90,12 +90,10 @@ ...@@ -90,12 +90,10 @@
.length; .length;
} }
}" x-init="$watch('selectedPatch', () => resetCheckAllCheckbox())" class="w-full mb-6"> }" x-init="$watch('selectedPatch', () => resetCheckAllCheckbox())" class="w-full mb-6">
<div class="p-6 bg-white shadow-md rounded-lg"> <div class="p-6 bg-white shadow-md rounded-lg">
<div x-show="true" class=""> <div x-show="true" class="">
<div class="flex justify-between mb-5"> <div class="flex justify-end mb-5">
<h2 class="font-medium tracking-wide text-slate-700 line-clamp-1 dark:text-navy-100 lg:text-base">
Patch List
</h2>
<div class="inline-flex flex-initial"> <div class="inline-flex flex-initial">
<div x-data="{ isInputActive: true }"> <div x-data="{ isInputActive: true }">
<div class="flex gap-4 px-5 items-center"> <div class="flex gap-4 px-5 items-center">
......
<div class="w-full px-3 mb-6 bg-main-container"> <div x-cloak class="w-full px-3 mb-6 bg-main-container">
<div class="p-6 rounded-lg relative h-svh bg-main-container "> <div class="my-5 flex h-8 place-content-center px-4 ">
<h2 class="text-xl text-slate-800">
Delete Patch
</h2>
<h2 @click="selectedPatches = []; "
class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4 cursor-pointer">
Delete Multi
</h2>
</div>
<div class="pt-2 pb-4 rounded-lg relative h-svh bg-main-container ">
<div class="flex flex-wrap -mx-3"> <div class="flex flex-wrap -mx-3">
<div class="w-2/3 px-3 mb-6 "> <div class="w-2/3 px-3 mb-6 ">
<div class="shadow-md bg-white w-full mb-3 p-3 rounded-lg"> <div class="shadow-md bg-white w-full mb-3 p-3 rounded-lg">
......
<div class="w-full md:w-1/3 px-3 mb-6" x-data="{ showProgressModal: @entangle('showProgressModal') }"> <div class="w-full md:w-1/3 px-3 mb-6" x-cloak x-data="{ showProgressModal: @entangle('showProgressModal') }">
<div class="p-6 bg-white shadow-md rounded-lg"> <div class="p-6 bg-white shadow-md rounded-lg">
<h2 class="text-2xl font-bold mb-4">Selected Patches</h2> <h2 class="text-2xl font-bold mb-4">Selected Patches</h2>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
selectedPatchByPage: {}, selectedPatchByPage: {},
allSelectPatches: [], allSelectPatches: [],
allSelectPatchName: [], allSelectPatchName: [],
currentPage: @entangle('page'), // Bind currentPage to Livewire 'page' variable currentPage: @entangle('page'),
init() { init() {
this.$watch('currentPage', (value) => { this.$watch('currentPage', (value) => {
this.loadSelectedPatch(); this.loadSelectedPatch();
...@@ -91,22 +91,27 @@ ...@@ -91,22 +91,27 @@
} }
</style> </style>
<div class="max-w-full mx-auto p-6 bg-gray-100"> <div class="max-w-full mx-auto pb-5 bg-gray-100">
@if (session()->has('message')) @if (session()->has('message'))
<div class="alert alert-success"> <div class="alert alert-success">
{{ session('message') }} {{ session('message') }}
</div> </div>
@endif @endif
<div class="my-5 flex h-8 place-content-center px-4 ">
<h2 class="text-xl text-slate-800">
Send Patch to Customer
</h2>
<h2 @click="selectedPatches = []; " class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4 cursor-pointer">
Send Multi
</h2>
</div>
<div class="flex flex-wrap -mx-3"> <div class="flex flex-wrap -mx-3">
<div class="w-full md:w-2/3 px-3 mb-6"> <div class="w-full md:w-2/3 px-3 mb-6">
<div class="p-6 bg-white shadow-md rounded-lg"> <div class="p-6 bg-white shadow-md rounded-lg">
<div x-show="true" class=""> <div x-show="true" class="">
<div class="flex justify-between mb-5"> <div class="flex justify-between mb-5">
<h2
class="font-medium tracking-wide text-slate-700 line-clamp-1 dark:text-navy-100 lg:text-base">
Send Multi Patch
</h2>
<div class="inline-flex flex-initial"> <div class="inline-flex flex-initial">
<div x-data="{ isInputActive: true }"> <div x-data="{ isInputActive: true }">
<div class="flex gap-4 px-5 items-center"> <div class="flex gap-4 px-5 items-center">
......
<div class="border-0 shadow-none"> <div class="border-0 shadow-none" x-data="{ open: @entangle('showSearch'), serverKeySuccess: [] ,serverKeyWaitingSend: @entangle('serverKeyWaitingSend').defer }">
<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 ">
...@@ -8,17 +8,21 @@ ...@@ -8,17 +8,21 @@
</div> </div>
</div> </div>
<div class="bg-main-container rounded-md"> <div class="mt-5 mb-2 flex h-8 place-content-center px-4 " x-data="{serverKeyWaitingSend2: @entangle('serverKeyWaitingSend')}">
<div class="max-w-full mx-auto px-5 text-left flex flex-col items-start"> <h2 class="text-xl text-slate-800">
<h2 class="text-2xl text-black ">
Send Patch to Customer Send Patch to Customer
</h2> </h2>
<a href="/send-patch" type="button" class="btn ml-1 my-3 text-white bg-primary px-3 py-2">Back</a> <h2 @click="serverKeySuccess = [], serverKeyWaitingSend2= [] "
class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4 cursor-pointer">
Send
</h2>
</div> </div>
<div class="" x-data="{ tomGReady: false, serverKeyWaitingSend: @entangle('serverKeyWaitingSend').defer }" x-show="true"> <a href="/send-patch" type="button" class="btn ml-1 my-3 text-white bg-primary px-3 py-2">Back</a>
<div class="rounded-md" >
<div class="" x-data="{ tomGReady: false }" x-show="true">
<div class="mb-4"> <div class="mb-4">
<div class="grid grid-cols-12 gap-2 "> <div class="grid grid-cols-12 gap-2 ">
<div class="bg-main-container col-span-3 p-6 rounded-lg shadow-md"> <div class="col-span-3 p-6 rounded-lg shadow-md card">
<!-- Server Information Group --> <!-- Server Information Group -->
<div class="mb-6"> <div class="mb-6">
<h3 class="text-lg font-medium text-gray-900 mb-2">Server Key</h3> <h3 class="text-lg font-medium text-gray-900 mb-2">Server Key</h3>
...@@ -28,7 +32,9 @@ ...@@ -28,7 +32,9 @@
<input type="text" <input type="text"
class="form-input h-9 peer w-full rounded-lg border border-slate-300 bg-transparent px-3 py-2 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent" class="form-input h-9 peer w-full rounded-lg border border-slate-300 bg-transparent px-3 py-2 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
wire:model.debounce.500ms="serverkey" placeholder="Search for a server key"> wire:model.debounce.500ms="serverkey" placeholder="Search for a server key">
<span wire:loading wire:target="serverkey, selectedOwnerType, company, db_type, cur_ver, selectAllResults" class="absolute right-3"> <span wire:loading
wire:target="serverkey, selectedOwnerType, company, db_type, cur_ver, selectAllResults"
class="absolute right-3">
<svg class="animate-spin h-5 w-5 text-black" <svg class="animate-spin h-5 w-5 text-black"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" <circle class="opacity-25" cx="12" cy="12" r="10"
...@@ -41,7 +47,7 @@ ...@@ -41,7 +47,7 @@
</div> </div>
@if ($showSearch) @if ($showSearch)
<ul <ul x-show="open" @click.away="open = false"
class="absolute left-0 right-0 mt-2 border border-gray-200 rounded-md max-h-64 overflow-auto z-50 bg-white"> class="absolute left-0 right-0 mt-2 border border-gray-200 rounded-md max-h-64 overflow-auto z-50 bg-white">
<li class="p-2 bg-gray-200 hover:bg-gray-300 cursor-pointer font-semibold" <li class="p-2 bg-gray-200 hover:bg-gray-300 cursor-pointer font-semibold"
wire:click="selectAllResults"> wire:click="selectAllResults">
...@@ -65,8 +71,6 @@ ...@@ -65,8 +71,6 @@
<h3 class="text-lg font-medium text-gray-900 mb-2">Server Information</h3> <h3 class="text-lg font-medium text-gray-900 mb-2">Server Information</h3>
<div class="grid grid-cols-1 gap-4"> <div class="grid grid-cols-1 gap-4">
<div> <div>
<label for="server_of" class="block text-sm font-medium text-gray-700">Server
of</label>
<select id="server_of" name="server_of" wire:model="selectedOwnerType" <select id="server_of" name="server_of" wire:model="selectedOwnerType"
class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
<option value="">Please Select</option> <option value="">Please Select</option>
...@@ -79,45 +83,31 @@ ...@@ -79,45 +83,31 @@
</div> </div>
</div> </div>
<div class="mb-6 ">
<!-- Company & Database Information Group --> <h3 class="text-lg font-medium text-gray-900 mb-2">Company Information </h3>
<div class="mb-6"> <div class="grid grid-cols-1 gap-4">
<h3 class="text-lg font-medium text-gray-900 mb-2">Company & Database Information</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div> <div>
<label for="company"
class="block text-sm font-medium text-gray-700">Company</label>
<input type="text" id="company" name="company" wire:model='company' <input type="text" id="company" name="company" wire:model='company'
class="mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> class="mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div> </div>
</div>
</div>
<div class="mb-6 ">
<h3 class="text-lg font-medium text-gray-900 mb-2">Database </h3>
<div class="grid grid-cols-1 gap-4">
<div> <div>
<label for="db_type" class="block text-sm font-medium text-gray-700">DB
Type</label>
<input type="text" id="db_type" name="db_type" wire:model='db_type' <input type="text" id="db_type" name="db_type" wire:model='db_type'
class="mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> class="mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div> </div>
</div> </div>
</div> </div>
<div class="mb-6 ">
<!-- Additional Information Group --> <h3 class="text-lg font-medium text-gray-900 mb-2">Current Version</h3>
<div class="mb-6"> <div class="grid grid-cols-1 gap-4">
<h3 class="text-lg font-medium text-gray-900 mb-2">Additional Information</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div> <div>
<label for="cur_ver" class="block text-sm font-medium text-gray-700">Cur.
Ver.</label>
<input type="text" id="cur_ver" name="cur_ver" wire:model='cur_ver' <input type="text" id="cur_ver" name="cur_ver" wire:model='cur_ver'
class="mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> class="mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div> </div>
{{-- <div>
<label for="hscode_method" class="block text-sm font-medium text-gray-700">HSCODE
2017 Method</label>
<select id="hscode_method" name="hscode_method"
class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
<option>Please Select</option>
<!-- Options -->
</select>
</div> --}}
</div> </div>
</div> </div>
...@@ -135,15 +125,14 @@ ...@@ -135,15 +125,14 @@
</div> </div>
</div> --}} </div> --}}
</div> </div>
<div class="bg-main-container p-6 rounded-lg shadow-md col-span-4"> <div class="card p-6 rounded-lg shadow-md col-span-4">
<h3 class="text-lg font-medium text-gray-900 mb-2">Server key waiting to send</h3> <h3 class="text-lg font-medium text-gray-900 mb-2">Server key waiting to send</h3>
<div id="serverkey-list" class="overflow-y-auto max-h-[70vh]"> <div id="serverkey-list" class="overflow-y-auto max-h-[70vh]">
<div class="bg-gray m-3"> <div class="bg-gray m-3">
@foreach ($serverKeyWaitingSend as $key => $serverkey) @foreach ($serverKeyWaitingSend as $key => $serverkey)
<div class="flex items-center bg-blue-500 text-white w-full px-4 py-2 rounded m-1"> <div class="flex items-center bg-blue-500 text-white w-full px-4 py-2 rounded m-1">
<span class="flex-grow">{{ $serverkey['key'] }}</span> <span class="flex-grow">{{ $serverkey['key'] }}</span>
<button wire:click="removeServerKey('{{ $serverkey['key'] }}')" <button wire:click="removeServerKey('{{ $serverkey['key'] }}')" class="ml-2">
class="ml-2">
<i class="fas fa-trash-alt"></i> <i class="fas fa-trash-alt"></i>
</button> </button>
</div> </div>
...@@ -159,37 +148,27 @@ ...@@ -159,37 +148,27 @@
</div> </div>
</div> </div>
</div> </div>
<div class="bg-main-container p-6 rounded-lg shadow-md col-span-4"> <div class="card p-6 rounded-lg shadow-md col-span-4">
<h3 class="text-lg font-medium text-gray-900 mb-2">Server key send success</h3> <h3 class="text-lg font-medium text-gray-900 mb-2">Server key send success</h3>
{{-- <div id="serverkey-list" class="overflow-y-auto max-h-[70vh]"> <div x-init="Livewire.on('patchSent', server => {
<div class="bg-gray m-3"> serverKeySuccess.push(server);
@foreach ($serverKeySuccess as $key => $serverkey) });">
<div class="flex items-center bg-lime-600 text-white w-full px-4 py-2 rounded m-1">
<span class="flex-grow">{{ $serverkey['key'] }}</span>
</div>
@endforeach
</div>
</div> --}}
<div x-data="{ serverKeySuccess: [] }" x-init="
Livewire.on('patchSent', server => {
serverKeySuccess.push(server); // เพิ่ม server ที่สำเร็จลงในรายการ
});
">
<!-- UI ที่จะแสดงรายการของ server ที่สำเร็จ -->
<template x-for="server in serverKeySuccess" :key="server.id"> <template x-for="server in serverKeySuccess" :key="server.id">
<div class="bg-green-100 text-green-700 p-2 rounded mb-2"> <div class="bg-green-100 text-green-700 p-2 rounded mb-2">
Patch Sent: <span x-text="server.key"></span> Patch Sent: <span x-text="server.key"></span>
</div> </div>
</template> </template>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="mb-4"> <div class="mb-1">
<h3 class="text-xl font-medium leading-6 text-black">Server list</h3> <h3 class="text-xl font-medium leading-6 text-black my-3"><i aria-hidden="true" class="fa fa-server mr-3"></i>Server list</h3>
</div> </div>
<div class="is-scrollbar-hidden min-w-full table-responsive card p-4 mb-4">
<div class="flex px-5 items-center justify-end mb-3" x-data="{ isInputActive: false }"> <div class="flex px-5 items-center justify-end mb-3" x-data="{ isInputActive: false }">
<button @click="isInputActive = !isInputActive" <button @click="isInputActive = !isInputActive"
class="btn h-8 w-14 rounded-full p-0 hover:bg-slate-300/20 focus:bg-slate-300/20 active:bg-slate-300/25 dark:hover:bg-navy-300/20 dark:focus:bg-navy-300/20 dark:active:bg-navy-300/25"> class="btn h-8 w-14 rounded-full p-0 hover:bg-slate-300/20 focus:bg-slate-300/20 active:bg-slate-300/25 dark:hover:bg-navy-300/20 dark:focus:bg-navy-300/20 dark:active:bg-navy-300/25">
...@@ -212,7 +191,6 @@ ...@@ -212,7 +191,6 @@
</select> </select>
</span> </span>
</div> </div>
<div class="is-scrollbar-hidden min-w-full table-responsive">
<table class="min-w-full is-hoverable table w-full divide-y divide-gray-200"> <table class="min-w-full is-hoverable table w-full divide-y divide-gray-200">
<thead> <thead>
<tr> <tr>
...@@ -272,10 +250,13 @@ ...@@ -272,10 +250,13 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div>
<div class="mt-4"> <div class="mt-4">
{{ $results->links('livewire.paginate-custom') }} {{ $results->links('livewire.paginate-custom') }}
</div> </div>
</div> </div>
<div>
&nbsp;
</div>
</div>
</div> </div>
</div> </div>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<main class="m-2"> <div class="m-2">
@if ($action === 'list') @if ($action === 'list')
@if ($message) @if ($message)
<div class="alert alert-success"> <div class="alert alert-success">
...@@ -19,14 +19,12 @@ ...@@ -19,14 +19,12 @@
</div> </div>
</div> </div>
@endif @endif
<div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md"> <div class="my-5 flex h-8 place-content-center px-4 ">
<div class="pb-4"> <h2 class="text-xl text-slate-800">
<div class="my-3 flex h-8 items-center justify-between px-4 sm:px-5">
<h2 class="text-2xl text-black ">
Send Patch to Customer Send Patch to Customer
</h2> </h2>
</div> </div>
{{-- @include('components/search-by', ['searchBy' => $searchBy ?? []]) --}} <div class="pb-4 card shadow-lg p-4">
<div class="flex justify-between"> <div class="flex justify-between">
<div class="px-2 ml-4"> <div class="px-2 ml-4">
</div> </div>
...@@ -104,17 +102,9 @@ ...@@ -104,17 +102,9 @@
<tbody> <tbody>
@foreach ($results as $patch) @foreach ($results as $patch)
<tr <tr class="border-y border-transparent border-b-slate-200 dark:border-b-navy-500">
class="border-y border-transparent border-b-slate-200 dark:border-b-navy-500"> <td class="whitespace-nowrap px-1 py-3 sm:px-2 text-center">{{ $patch->PID }}
{{-- <td class="whitespace-nowrap px-4 py-3 sm:px-5"> </td>
<label class="inline-flex items-center space-x-2">
<input
class="form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary hover: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" wire:model.defer="selectedPatchs"
value="{{ $patch->id }}" />
</label>
</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"> <td class="whitespace-nowrap px-1 py-3 sm:px-2">
{{ \Illuminate\Support\Str::limit($patch->PDESC, 40) }}</td> {{ \Illuminate\Support\Str::limit($patch->PDESC, 40) }}</td>
...@@ -141,9 +131,8 @@ ...@@ -141,9 +131,8 @@
</div> </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>
<div class="border-0 shadow-none"> <div class="border-0 shadow-none" x-cloak>
<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 ">
...@@ -8,13 +8,15 @@ ...@@ -8,13 +8,15 @@
</div> </div>
</div> </div>
<div class="m-2" > <div class="my-5 flex h-8 place-content-center px-4 ">
{{-- <div wire:loading.class="flex" wire:loading.class.remove="hidden" <h2 class="text-xl text-slate-800">
class="absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden"> User Management
<div class="flex justify-center items-center "> </h2>
<div class="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-blue-500"></div> <h2 class="ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4">
{{ $action === 'create' ? 'Create' : ($action === 'edit' ? 'Edit' : '') }}
</h2>
</div> </div>
</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">
...@@ -26,15 +28,12 @@ ...@@ -26,15 +28,12 @@
</div> </div>
@endif @endif
<div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md"> <div class="grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md">
<div class="my-1 flex h-8 items-center justify-between px-4 sm:px-5">
<h2 class="text-2xl text-black ">
User Management
</h2>
</div>
<div class="pb-4 pt-5 bg-white rounded-lg shadow-lg"> <div class="pb-4 pt-5 bg-white rounded-lg shadow-lg">
<div class="flex justify-between"> <div class="flex justify-between">
<div class="px-2 ml-4"> <div class="px-2 ml-4">
<button type="button" class="py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus" <button type="button"
class="py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus"
wire:click="showUserAddForm">Add</button> wire:click="showUserAddForm">Add</button>
</div> </div>
<div class="inline-flex flex-initial"> <div class="inline-flex flex-initial">
...@@ -61,7 +60,8 @@ ...@@ -61,7 +60,8 @@
@endforeach @endforeach
</select> </select>
</span> </span>
<button type="button" class="bg-primary text-white px-4 py-2 rounded hover:bg-primary-focus" <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>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<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 class="is-hoverable table w-full text-left border-b" > <table class="is-hoverable table w-full text-left border-b">
<thead> <thead>
<tr> <tr>
<th <th
...@@ -102,18 +102,22 @@ ...@@ -102,18 +102,22 @@
<tbody> <tbody>
@foreach ($results as $user) @foreach ($results as $user)
<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">
<label class="inline-flex items-center space-x-2"> <label for="selectedUsers-{{ $user->id }}"
class="inline-flex items-center space-x-2">
<input @change="toggleGroup($event)" <input @change="toggleGroup($event)"
class="form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary hover: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" class="form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary hover: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" wire:model.defer="selectedUsers" type="checkbox" wire:model.defer="selectedUsers"
id="selectedUsers-{{ $user->id }}"
value="{{ $user->id }}" /> value="{{ $user->id }}" />
</label> </label>
</td> </td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $user->username }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $user->username }}</td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $user->email }}</td> <td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $user->email }}</td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5"> <td class="whitespace-nowrap px-4 py-3 sm:px-5">
<ul>
@php @php
$groups = $user->groups->take(5); $groups = $user->groups->take(5);
$remainingCount = $user->groups->count() - $groups->count(); $remainingCount = $user->groups->count() - $groups->count();
...@@ -126,13 +130,17 @@ ...@@ -126,13 +130,17 @@
@endforeach @endforeach
@if ($remainingCount > 0) @if ($remainingCount > 0)
<li class="inline-block px-2 py-1 bg-gray-300 text-gray-700 rounded">+ <li
class="inline-block px-2 py-1 bg-gray-300 text-gray-700 rounded">
+
{{ $remainingCount }} more</li> {{ $remainingCount }} more</li>
@endif @endif
</ul>
</td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $user->created_at }}
</td> </td>
<td class="whitespace-nowrap px-4 py-3 sm:px-5">{{ $user->created_at }}</td>
<td class="whitespace-nowrap px-1 py-3 sm:px-2"> <td class="whitespace-nowrap px-1 py-3 sm:px-2">
<div class="flex justify-center space-x-2"> <div class="flex justify-center space-x-1">
<a wire:click="showUserEditForm({{ $user->id }})" <a wire:click="showUserEditForm({{ $user->id }})"
class="btn h-8 w-8 p-0 hover:text-main-container active:text-main-container hover:primary-focus focus:primary-focus active:bg-info/25"> class="btn h-8 w-8 p-0 hover:text-main-container active:text-main-container hover:primary-focus focus:primary-focus active:bg-info/25">
<i class="fa fa-edit"></i> <i class="fa fa-edit"></i>
...@@ -187,7 +195,6 @@ ...@@ -187,7 +195,6 @@
</div> </div>
</div> </div>
</div> </div>
@elseif($action === 'create') @elseif($action === 'create')
<livewire:pages.user.user-create wire:key="user-create" /> <livewire:pages.user.user-create wire:key="user-create" />
@elseif($action === 'edit') @elseif($action === 'edit')
...@@ -196,5 +203,4 @@ ...@@ -196,5 +203,4 @@
<div></div> <div></div>
@endif @endif
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -27,6 +27,8 @@ use App\Http\Controllers\SendPatchController; ...@@ -27,6 +27,8 @@ use App\Http\Controllers\SendPatchController;
use App\Http\Controllers\ServerLicenseController; use App\Http\Controllers\ServerLicenseController;
use App\Http\Controllers\TestController; use App\Http\Controllers\TestController;
use App\Http\Controllers\TransferDataController; use App\Http\Controllers\TransferDataController;
use App\Http\Livewire\MainContainer;
use App\Http\Livewire\Pages\Patch\PatchIndex;
use App\Http\Livewire\Pages\Role\RoleIndex; use App\Http\Livewire\Pages\Role\RoleIndex;
use App\Http\Livewire\Pages\SendPatch\SendPatch; use App\Http\Livewire\Pages\SendPatch\SendPatch;
/* /*
...@@ -49,13 +51,16 @@ Route::middleware('guest')->group(function () { ...@@ -49,13 +51,16 @@ Route::middleware('guest')->group(function () {
Route::post('/register', [\App\Http\Controllers\AuthController::class, 'register'])->name('register'); Route::post('/register', [\App\Http\Controllers\AuthController::class, 'register'])->name('register');
}); });
Route::middleware([ ])->group(function () { Route::middleware(['auth' ])->group(function () {
Route::post('/logout', [\App\Http\Controllers\AuthController::class, 'logout'])->name('logout'); Route::post('/logout', [\App\Http\Controllers\AuthController::class, 'logout'])->name('logout');
Route::get('/convert-to-json', [ConvertToJsonController::class, 'convert']); Route::get('/convert-to-json', [ConvertToJsonController::class, 'convert']);
Route::get('/', [HomeController::class, 'index'])->name('index'); Route::get('/', [HomeController::class, 'index'])->name('index');
Route::get('/get-serverlicense', [ServerLicenseController::class, 'getAllServerKey']); Route::get('/get-serverlicense', [ServerLicenseController::class, 'getAllServerKey']);
Route::get('/patch', [PatchController::class, 'index'])->name('patch.index'); Route::get('/patch', [PatchController::class, 'index'])->name('patch.index');
Route::get('/master-file', [MasterFileController::class, 'index'])->name('master-file.index'); Route::get('/master-file', [MasterFileController::class, 'index'])->name('master-file.index');
Route::get('/format-file-master', [FormatFileMasterContrller::class, 'index'])->name('format-file-master.index'); Route::get('/format-file-master', [FormatFileMasterContrller::class, 'index'])->name('format-file-master.index');
Route::get('/send-patch', [SendPatchController::class, 'index']); Route::get('/send-patch', [SendPatchController::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