Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sarun Mungthanya
SpnPatch-Laravel
Commits
74be1082
"app/Http/Controllers/GroupController.php" did not exist on "f0a4d5210af2061d1cc606bf0dc03958387b5065"
Commit
74be1082
authored
Oct 01, 2024
by
Sarun Mungthanya
Browse files
update new ui
parent
d9e7ef9c
Pipeline
#26899
passed with stage
in 1 minute and 22 seconds
Changes
41
Pipelines
1
Show whitespace changes
Inline
Side-by-side
resources/views/livewire/pages/format-file-master/file-index.blade.php
View file @
74be1082
...
...
@@ -8,6 +8,14 @@
</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"
>
@if ($action === 'list')
...
...
@@ -21,19 +29,17 @@
</div>
@endif
<div
class=
"grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md"
>
<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=
"card py-4"
>
<div
class=
"flex justify-between"
>
<div
class=
"px-2 ml-4"
>
<div
class=
"flex "
>
<div
class=
"px-1 ml-5"
>
<button
type=
"button"
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
class=
"inline-flex flex-initial"
>
<div
x-data=
"{ isInputActive: true }"
>
<div
class=
"flex gap-4 px-5 items-center"
>
...
...
@@ -118,7 +124,7 @@
</td>
<td
class=
"whitespace-nowrap px-1 py-3 sm:px-2"
>
<div
class=
"flex justify-center space-x-2"
>
<a
wire:click=
"show
patch
EditForm({{ $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"
>
<i
class=
"fa fa-edit"
></i>
</a>
...
...
resources/views/livewire/pages/format-file-master/format-file-edit.blade.php
deleted
100644 → 0
View file @
d9e7ef9c
<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>
resources/views/livewire/pages/group/group-edit.blade.php
View file @
74be1082
...
...
@@ -9,7 +9,7 @@
</div>
<div
class=
"w-3/4 px-3 space-y-3 m-auto mb-4"
>
<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>
</label>
<span
class=
"relative flex w-full"
>
...
...
@@ -23,7 +23,7 @@
</span>
</div>
<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>
</label>
<span
class=
"relative flex w-full"
>
...
...
resources/views/livewire/pages/group/group-index.blade.php
View file @
74be1082
<div>
<div
x-cloak
>
@include('components.no-permission')
<div
class=
"flex items-center space-x-4 py-5 lg:py-6 "
>
<ul
class=
"hidden flex-wrap items-center space-x-2 sm:flex"
>
<li
class=
"flex items-center space-x-2"
>
<a
class=
"text-primary transition-colors hover:text-primary-focus dark:text-accent-light dark:hover:text-accent"
href=
"/"
>
Home
</a>
<svg
x-ignore
xmlns=
"http://www.w3.org/2000/svg"
class=
"h-4 w-4"
fill=
"none"
viewBox=
"0 0 24 24"
stroke=
"currentColor"
>
<path
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-width=
"2"
d=
"M9 5l7 7-7 7"
/>
</svg>
</li>
<li
class=
"flex items-center space-x-2"
>
<a
class=
"text-primary transition-colors hover:text-primary-focus dark:text-accent-light dark:hover:text-accent"
wire:click=
"$emit('menuClicked', 'Group')"
>
Group Management
</a>
</li>
</ul>
<div
wire:loading.class=
"flex"
wire:loading.class.remove=
"hidden"
wire:target=
"showCompanyList"
class=
"absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden"
>
<div
class=
"app-preloader grid h-full w-full place-content-center"
>
<div
class=
"app-preloader-inner relative inline-block h-48 w-48"
></div>
</div>
</div>
<div
class=
"my-5 flex h-8 place-content-center px-4 "
>
<h2
class=
"text-xl text-slate-800"
>
Group Management
</h2>
<h2
class=
"ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4"
>
{{ $action === 'create' ? 'Create' : ($action === 'edit' ? 'Edit' : '') }}
</h2>
</div>
@if ($action === 'list')
<div
x-data=
"{ show: @entangle('showMessage'), message: '' }"
x-init=
"window.addEventListener('show-message', event => {
...
...
@@ -48,27 +45,18 @@
selectedGroups: @entangle('selectedGroups')
}"
class=
"grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 "
>
<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"
>
Group Management
</h2>
</div>
<div
class=
"card py-4"
>
<div
class=
"flex justify-between"
>
<div
class=
"px-2 ml-4"
>
<button
wire:click=
"showGroupCreateForm()"
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"
>
<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"
>
<path
stroke-linecap=
"round"
stroke-linejoin=
"round"
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"
>
</path>
</svg>
<span>
Create
</span>
</button>
<div
class=
"flex "
>
<div
class=
"px-1 ml-5"
>
<button
type=
"button"
class=
"py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus"
wire:click=
"showGroupCreateForm"
><i
aria-hidden=
"true"
class=
"fa fa-add fa-solid"
></i>
Add
</button>
</div>
<div
class=
" ml-1"
>
<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 f
ocus: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 p
x-
3
bg-primary
rounded-md
text-white hover:bg-primary-focus f
lex items-center space-x-1
"
>
<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"
>
<path
stroke-linecap=
"round"
stroke-linejoin=
"round"
...
...
@@ -78,6 +66,8 @@
<span>
Delete
</span>
</a>
</div>
</div>
<div
class=
"inline-flex flex-initial"
>
<div
x-data=
"{ isInputActive: true }"
>
<div
class=
"flex gap-3 px-5 items-center"
>
...
...
@@ -165,14 +155,14 @@
</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"
>
<div
class=
"flex justify-center space-x-
2
"
>
<div
class=
"flex justify-center space-x-
1
"
>
<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>
</a>
<div>
<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>
</a>
</div>
...
...
resources/views/livewire/pages/news/news-create.blade.php
View file @
74be1082
<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>
.ql-container
{
height
:
15rem
;
...
...
@@ -20,8 +20,8 @@
[{ color: [] }, { background: [] }],
[{ font: [] }],
[{ align: [] }],
['clean'],
// remove formatting button
['image'],
// Add image upload button
['clean'],
['image'],
],
handlers: {
image: function() {
...
...
@@ -58,7 +58,7 @@
canvas.width = width;
canvas.height = 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();
quill.insertEmbed(range.index, 'image', resizedImage);
};
...
...
@@ -263,8 +263,8 @@
</div>
<div
class=
"flex justify-end space-x-4 mt-4"
>
<
button
type=
"button"
wire:click=
"goBack
"
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
>
<
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
</
a
>
<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>
</div>
...
...
resources/views/livewire/pages/news/news-edit.blade.php
View file @
74be1082
<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>
.ql-container
{
height
:
15rem
;
...
...
@@ -232,8 +232,8 @@
</div>
<div
class=
"flex justify-end space-x-4 mt-4"
>
<
button
type=
"button"
wire:click=
"goBack
"
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
>
<
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
</
a
>
<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>
</div>
...
...
resources/views/livewire/pages/news/news-index.blade.php
View file @
74be1082
<div
class=
"border-0 shadow-none"
>
`
<div
wire:loading.class=
""
wire:loading.class.remove=
"hidden"
wire:target=
"save"
<div
wire:loading.class=
""
wire:loading.class.remove=
"hidden"
wire:target=
"save"
class=
"absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden"
>
<div
class=
"flex justify-center items-center "
>
<div
class=
"items-center h-100vh"
style=
"align-content: center;"
>
...
...
@@ -8,13 +8,16 @@
</div>
</div>
<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
class=
"my-5 flex h-8 place-content-center px-4 "
>
<h2
class=
"text-xl text-slate-800"
>
News
&
Update
</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
>
--}}
<div
class=
"m-2"
>
@if ($action === 'list')
@if ($message)
<div
class=
"alert alert-success"
>
...
...
@@ -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=
"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=
"px-2 ml-4"
>
<button
type=
"button"
...
...
@@ -129,16 +127,16 @@
<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"
>
<
label
class=
"inline-flex items-center space-x-2"
>
<
div
class=
"inline-flex items-center space-x-2"
>
<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"
type=
"checkbox"
wire:model.defer=
"selectedNews"
value=
"{{ $news->shippingnetnews_ID }}"
/>
</
label
>
</
div
>
</td>
<td
class=
"whitespace-nowrap px-4 py-3 sm:px-5"
>
{{ \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>
<td
class=
"whitespace-nowrap px-4 py-3 sm:px-5"
>
{{ $news->issueDate }}
</td>
...
...
@@ -195,7 +193,7 @@
</template>
<livewire:delete-modal
/>
{{ $results->links('livewire.paginate-custom') }}
{{ $results->links('livewire.paginate-custom'
) }}
</div>
</div>
...
...
resources/views/livewire/pages/patch/patch-create.blade.php
View file @
74be1082
<div
class=
"bg-main-container"
>
<link
href=
"{{ asset('css/pages/patch.css') }}"
rel=
"stylesheet"
>
<div
class=
"m
ax-w-full mx-auto
px-
5
"
>
<h2
class=
"text-
2
xl text-
b
la
ck
"
>
<div
class=
"m
t-5 mb-2 flex h-8 place-content-center
px-
4
"
>
<h2
class=
"text-xl text-
s
la
te-800
"
>
Patch Management
</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>
<div
class=
"pb-4 max-w-full mx-auto"
>
@if (session()->has('message'))
<div
class=
"alert alert-success"
>
{{ session('message') }}
...
...
@@ -67,20 +73,6 @@
</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"
>
<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"
>
...
...
resources/views/livewire/pages/patch/patch-edit.blade.php
View file @
74be1082
...
...
@@ -9,12 +9,17 @@
}
});
}, 1000);
});"
>
<link
href=
"{{ asset('css/pages/patch.css') }}"
rel=
"stylesheet"
>
<div
class=
"m
ax-w-full mx-auto px-5"
x-cloak
>
<h2
class=
"text-
2
xl text-
b
la
ck
"
>
});"
x-cloak
>
<link
href=
"{{ asset('css/pages/patch.css') }}"
rel=
"stylesheet"
>
<div
class=
"m
t-5 mb-2 flex h-8 place-content-center px-4 "
>
<h2
class=
"text-xl text-
s
la
te-800
"
>
Patch Management
</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>
.progress-bar
{
height
:
20px
;
...
...
@@ -191,10 +196,10 @@
<tr
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"
>
<label
class=
"inline-flex items-center space-x-2"
>
<label
for=
"patchFile-{{ $patchFile['fid'] }}"
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 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'] }}"
/>
</label>
</td>
...
...
@@ -204,14 +209,14 @@
<td
class=
"whitespace-nowrap px-1 py-1 sm:px-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"
>
<i
class=
"fa fa-edit"
></i>
</
a
>
<
a
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"
>
</
button
>
<
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"
>
<i
class=
"fa fa-trash"
></i>
</
a
>
</
button
>
</div>
</td>
</tr>
...
...
resources/views/livewire/pages/patch/patch-index.blade.php
View file @
74be1082
...
...
@@ -9,12 +9,6 @@
</div>
</div>
<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 ($message)
<div
class=
"alert alert-success"
>
...
...
@@ -25,14 +19,12 @@
</div>
</div>
@endif
<div
class=
"grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md"
>
<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 "
>
<div
class=
"my-5 flex h-8 place-content-center px-4 "
>
<h2
class=
"text-xl text-slate-800"
>
Patch Management
</h2>
</div>
<div
class=
"pb-4 card shadow-lg p-4"
>
<div
class=
"flex justify-between"
>
<div
class=
"px-2 ml-4"
>
<button
type=
"button"
...
...
@@ -71,7 +63,7 @@
</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"
>
<table
class=
"is-hoverable table w-full text-left border-b"
>
<thead>
...
...
@@ -161,7 +153,6 @@
</div>
</div>
</div>
@elseif($action === 'add')
<livewire:pages.patch.patch-create>
@elseif($action === 'edit')
...
...
resources/views/livewire/pages/role/role-index.blade.php
View file @
74be1082
<div>
<div
x-cloak
>
@include('components.no-permission')
<div
class=
"flex items-center space-x-4 py-5 lg:py-6 "
>
<ul
class=
"hidden flex-wrap items-center space-x-2 sm:flex"
>
<li
class=
"flex items-center space-x-2"
>
<a
class=
"text-primary transition-colors hover:text-primary-focus dark:text-accent-light dark:hover:text-accent"
href=
"/"
>
Home
</a>
<svg
x-ignore
xmlns=
"http://www.w3.org/2000/svg"
class=
"h-4 w-4"
fill=
"none"
viewBox=
"0 0 24 24"
stroke=
"currentColor"
>
<path
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-width=
"2"
d=
"M9 5l7 7-7 7"
/>
</svg>
</li>
<li
class=
"flex items-center space-x-2"
>
<a
class=
"text-primary transition-colors hover:text-primary-focus dark:text-accent-light dark:hover:text-accent"
wire:click=
"$emit('menuClicked', 'Role')"
>
Role Management
</a>
</li>
</ul>
<div
wire:loading.class=
"flex"
wire:loading.class.remove=
"hidden"
wire:target=
"showRoleList"
class=
"absolute inset-0 items-center justify-center z-50 bg-slate-50 dark:bg-navy-900 hidden"
>
<div
class=
"app-preloader grid h-full w-full place-content-center"
>
<div
class=
"app-preloader-inner relative inline-block h-48 w-48"
></div>
</div>
</div>
<div
class=
"my-5 flex h-8 place-content-center px-4 "
>
<h2
class=
"text-xl text-slate-800"
>
Role Management
</h2>
<h2
class=
"ml-3 text-xl text-slate-800 font-semibold underline underline-offset-4"
>
{{ $action === 'create' ? 'Create' : ($action === 'edit' ? 'Edit' : '') }}
</h2>
</div>
@if ($action === 'list')
<div
x-data=
"{ show: @entangle('showMessage'), message: '' }"
x-init=
"window.addEventListener('show-message', event => {
...
...
@@ -48,31 +44,18 @@
selectedRoles: @entangle('selectedRoles')
}"
class=
"grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 "
>
<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"
>
Role Management
</h2>
</div>
{{-- @include('components/search-by', ['searchBy' => $searchBy ?? []]) --}}
<div
class=
"card pb-4 py-4 "
>
<div
class=
"flex justify-between"
>
<div
class=
"px-2 ml-4"
>
<button
wire:click=
"showRoleCreateForm()"
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"
>
<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"
>
<path
stroke-linecap=
"round"
stroke-linejoin=
"round"
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"
>
</path>
</svg>
<span>
Create
</span>
</button>
<div
class=
"flex "
>
<div
class=
"px-1 ml-5"
>
<button
type=
"button"
class=
"py-2 px-3 bg-primary rounded-md text-white hover:bg-primary-focus"
wire:click=
"showRoleCreateForm"
><i
aria-hidden=
"true"
class=
"fa fa-add fa-solid"
></i>
Add
</button>
</div>
<div
class=
" ml-1"
>
<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 f
ocus: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 p
x-
3
bg-primary
rounded-md
text-white hover:bg-primary-focus f
lex items-center space-x-1
"
>
<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"
>
<path
stroke-linecap=
"round"
stroke-linejoin=
"round"
...
...
@@ -82,6 +65,7 @@
<span>
Delete
</span>
</a>
</div>
</div>
<div
class=
"inline-flex flex-initial"
>
<div
x-data=
"{ isInputActive: true }"
>
<div
class=
"flex gap-4 px-5 items-center"
>
...
...
@@ -169,14 +153,14 @@
</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"
>
<div
class=
"flex justify-center space-x-
2
"
>
<div
class=
"flex justify-center space-x-
1
"
>
<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>
</a>
<div>
<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>
</a>
</div>
...
...
resources/views/livewire/pages/send-patch/delete-multi-patch-list.blade.php
View file @
74be1082
...
...
@@ -90,12 +90,10 @@
.length;
}
}"
x-init=
"$watch('selectedPatch', () => resetCheckAllCheckbox())"
class=
"w-full mb-6"
>
<div
class=
"p-6 bg-white shadow-md rounded-lg"
>
<div
x-show=
"true"
class=
""
>
<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"
>
Patch List
</h2>
<div
class=
"flex justify-end mb-5"
>
<div
class=
"inline-flex flex-initial"
>
<div
x-data=
"{ isInputActive: true }"
>
<div
class=
"flex gap-4 px-5 items-center"
>
...
...
resources/views/livewire/pages/send-patch/delete-multi-patch.blade.php
View file @
74be1082
<div
class=
"w-full px-3 mb-6 bg-main-container"
>
<div
class=
"p-6 rounded-lg relative h-svh bg-main-container "
>
<div
x-cloak
class=
"w-full px-3 mb-6 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=
"w-2/3 px-3 mb-6 "
>
<div
class=
"shadow-md bg-white w-full mb-3 p-3 rounded-lg"
>
...
...
resources/views/livewire/pages/send-patch/send-multi-patch-box.blade.php
View file @
74be1082
<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"
>
<h2
class=
"text-2xl font-bold mb-4"
>
Selected Patches
</h2>
...
...
resources/views/livewire/pages/send-patch/send-multi-patch-list.blade.php
View file @
74be1082
...
...
@@ -3,7 +3,7 @@
selectedPatchByPage: {},
allSelectPatches: [],
allSelectPatchName: [],
currentPage: @entangle('page'),
// Bind currentPage to Livewire 'page' variable
currentPage: @entangle('page'),
init() {
this.$watch('currentPage', (value) => {
this.loadSelectedPatch();
...
...
@@ -91,22 +91,27 @@
}
</style>
<div
class=
"max-w-full mx-auto p
-6
bg-gray-100"
>
<div
class=
"max-w-full mx-auto p
b-5
bg-gray-100"
>
@if (session()->has('message'))
<div
class=
"alert alert-success"
>
{{ session('message') }}
</div>
@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=
"w-full md:w-2/3 px-3 mb-6"
>
<div
class=
"p-6 bg-white shadow-md rounded-lg"
>
<div
x-show=
"true"
class=
""
>
<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
x-data=
"{ isInputActive: true }"
>
<div
class=
"flex gap-4 px-5 items-center"
>
...
...
resources/views/livewire/pages/send-patch/send-patch-edit.blade-old.php
View file @
74be1082
resources/views/livewire/pages/send-patch/send-patch-edit.blade.php
View file @
74be1082
<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"
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 "
>
...
...
@@ -8,17 +8,21 @@
</div>
</div>
<div
class=
"bg-main-container rounded-md"
>
<div
class=
"max-w-full mx-auto px-5 text-left flex flex-col items-start"
>
<h2
class=
"text-2xl text-black "
>
<div
class=
"mt-5 mb-2 flex h-8 place-content-center px-4 "
x-data=
"{serverKeyWaitingSend2: @entangle('serverKeyWaitingSend')}"
>
<h2
class=
"text-xl text-slate-800"
>
Send Patch to Customer
</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
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=
"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 -->
<div
class=
"mb-6"
>
<h3
class=
"text-lg font-medium text-gray-900 mb-2"
>
Server Key
</h3>
...
...
@@ -28,7 +32,9 @@
<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"
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"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
viewBox=
"0 0 24 24"
>
<circle
class=
"opacity-25"
cx=
"12"
cy=
"12"
r=
"10"
...
...
@@ -41,7 +47,7 @@
</div>
@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"
>
<li
class=
"p-2 bg-gray-200 hover:bg-gray-300 cursor-pointer font-semibold"
wire:click=
"selectAllResults"
>
...
...
@@ -65,8 +71,6 @@
<h3
class=
"text-lg font-medium text-gray-900 mb-2"
>
Server Information
</h3>
<div
class=
"grid grid-cols-1 gap-4"
>
<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"
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>
...
...
@@ -79,45 +83,31 @@
</div>
</div>
<!-- Company & Database Information Group -->
<div
class=
"mb-6"
>
<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
class=
"mb-6 "
>
<h3
class=
"text-lg font-medium text-gray-900 mb-2"
>
Company Information
</h3>
<div
class=
"grid grid-cols-1 gap-4"
>
<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'
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
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>
<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'
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>
<!-- Additional Information Group -->
<div
class=
"mb-6"
>
<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
class=
"mb-6 "
>
<h3
class=
"text-lg font-medium text-gray-900 mb-2"
>
Current Version
</h3>
<div
class=
"grid grid-cols-1 gap-4"
>
<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'
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>
<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>
...
...
@@ -135,15 +125,14 @@
</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>
<div
id=
"serverkey-list"
class=
"overflow-y-auto max-h-[70vh]"
>
<div
class=
"bg-gray m-3"
>
@foreach ($serverKeyWaitingSend as $key => $serverkey)
<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>
<button
wire:click=
"removeServerKey('{{ $serverkey['key'] }}')"
class=
"ml-2"
>
<button
wire:click=
"removeServerKey('{{ $serverkey['key'] }}')"
class=
"ml-2"
>
<i
class=
"fas fa-trash-alt"
></i>
</button>
</div>
...
...
@@ -159,37 +148,27 @@
</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>
{{--
<div
id=
"serverkey-list"
class=
"overflow-y-auto max-h-[70vh]"
>
<div
class=
"bg-gray m-3"
>
@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 ที่สำเร็จ -->
<div
x-init=
"Livewire.on('patchSent', server => {
serverKeySuccess.push(server);
});"
>
<template
x-for=
"server in serverKeySuccess"
:key=
"server.id"
>
<div
class=
"bg-green-100 text-green-700 p-2 rounded mb-2"
>
Patch Sent:
<span
x-text=
"server.key"
></span>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
<div
class=
"mb-
4
"
>
<h3
class=
"text-xl font-medium leading-6 text-black
"
>
Server list
</h3>
<div
class=
"mb-
1
"
>
<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
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 }"
>
<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"
>
...
...
@@ -212,7 +191,6 @@
</select>
</span>
</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"
>
<thead>
<tr>
...
...
@@ -272,10 +250,13 @@
@endforeach
</tbody>
</table>
</div>
<div
class=
"mt-4"
>
{{ $results->links('livewire.paginate-custom') }}
</div>
</div>
<div>
</div>
</div>
</div>
</div>
resources/views/livewire/pages/send-patch/send-patch-index.blade.php
View file @
74be1082
...
...
@@ -8,7 +8,7 @@
</div>
</div>
<
main
class=
"m-2"
>
<
div
class=
"m-2"
>
@if ($action === 'list')
@if ($message)
<div
class=
"alert alert-success"
>
...
...
@@ -19,14 +19,12 @@
</div>
</div>
@endif
<div
class=
"grid grid-cols-1 gap-4 sm:gap-5 lg:gap-6 bg-main-container rounded-md"
>
<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 "
>
<div
class=
"my-5 flex h-8 place-content-center px-4 "
>
<h2
class=
"text-xl text-slate-800"
>
Send Patch to Customer
</h2>
</div>
{{-- @include('components/search-by', ['searchBy' => $searchBy ?? []]) --}}
<div
class=
"pb-4 card shadow-lg p-4"
>
<div
class=
"flex justify-between"
>
<div
class=
"px-2 ml-4"
>
</div>
...
...
@@ -104,17 +102,9 @@
<tbody>
@foreach ($results as $patch)
<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"
>
<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>
<tr
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>
<td
class=
"whitespace-nowrap px-1 py-3 sm:px-2"
>
{{ $patch->PATCHNAME }}
</td>
<td
class=
"whitespace-nowrap px-1 py-3 sm:px-2"
>
{{ \Illuminate\Support\Str::limit($patch->PDESC, 40) }}
</td>
...
...
@@ -141,9 +131,8 @@
</div>
</div>
</div>
@elseif($action === 'edit')
{{--
<livewire:pages.send-patch.send-patch-edit
:editPid=
"$editPid"
>
--}}
<livewire:pages.send-patch.send-patch-edit
:editPid=
"$editPid"
>
@endif
</main>
</div>
resources/views/livewire/pages/user/user-index.blade.php
View file @
74be1082
<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"
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 "
>
...
...
@@ -8,13 +8,15 @@
</div>
</div>
<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
class=
"my-5 flex h-8 place-content-center px-4 "
>
<h2
class=
"text-xl text-slate-800"
>
User Management
</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
>
--}}
<div
class=
"m-2"
>
@if ($action === 'list')
@if ($message)
<div
class=
"alert alert-success"
>
...
...
@@ -26,15 +28,12 @@
</div>
@endif
<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=
"flex justify-between"
>
<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>
</div>
<div
class=
"inline-flex flex-initial"
>
...
...
@@ -61,7 +60,8 @@
@endforeach
</select>
</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>
</div>
</div>
...
...
@@ -70,7 +70,7 @@
<div
class=
"mx-3 mt-3 px-4"
>
<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>
<tr>
<th
...
...
@@ -102,18 +102,22 @@
<tbody>
@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"
>
<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)"
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"
id=
"selectedUsers-{{ $user->id }}"
value=
"{{ $user->id }}"
/>
</label>
</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"
>
<ul>
@php
$groups = $user->groups->take(5);
$remainingCount = $user->groups->count() - $groups->count();
...
...
@@ -126,13 +130,17 @@
@endforeach
@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>
@endif
</ul>
</td>
<td
class=
"whitespace-nowrap px-4 py-3 sm:px-5"
>
{{ $user->created_at }}
</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"
>
<div
class=
"flex justify-center space-x-
2
"
>
<div
class=
"flex justify-center space-x-
1
"
>
<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"
>
<i
class=
"fa fa-edit"
></i>
...
...
@@ -187,7 +195,6 @@
</div>
</div>
</div>
@elseif($action === 'create')
<livewire:pages.user.user-create
wire:key=
"user-create"
/>
@elseif($action === 'edit')
...
...
@@ -196,5 +203,4 @@
<div></div>
@endif
</div>
</div>
\ No newline at end of file
</div>
routes/web.php
View file @
74be1082
...
...
@@ -27,6 +27,8 @@ use App\Http\Controllers\SendPatchController;
use
App\Http\Controllers\ServerLicenseController
;
use
App\Http\Controllers\TestController
;
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\SendPatch\SendPatch
;
/*
...
...
@@ -49,13 +51,16 @@ Route::middleware('guest')->group(function () {
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
::
get
(
'/convert-to-json'
,
[
ConvertToJsonController
::
class
,
'convert'
]);
Route
::
get
(
'/'
,
[
HomeController
::
class
,
'index'
])
->
name
(
'index'
);
Route
::
get
(
'/get-serverlicense'
,
[
ServerLicenseController
::
class
,
'getAllServerKey'
]);
Route
::
get
(
'/patch'
,
[
PatchController
::
class
,
'index'
])
->
name
(
'patch.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
(
'/send-patch'
,
[
SendPatchController
::
class
,
'index'
]);
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment