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
a4b0f3d1
Commit
a4b0f3d1
authored
Nov 12, 2024
by
Chanon.u
Browse files
Add manual response feature
parent
7885f031
Changes
24
Show whitespace changes
Inline
Side-by-side
resources/views/livewire/pages/user/config-manual-response.blade.php
0 → 100644
View file @
a4b0f3d1
<div
class=
"w-4/6 mx-auto p-8 bg-white shadow-lg rounded-lg"
x-data=
"{ showPasswordField: false }"
>
<form
wire:submit.prevent=
"updateConfig"
autocomplete=
"off"
>
<div
class=
"mb-6"
>
<h2
class=
"font-medium flex items-center tracking-wide text-slate-700 line-clamp-1 dark:text-navy-100 lg:text-base"
>
<i
aria-hidden=
"true"
class=
"fa-solid fa-edit text-primary pr-2"
></i>
Edit Config Manual Response
</h2>
</div>
<div
class=
"mb-2"
>
<label
for=
"linkSPN"
class=
"block text-sm font-medium text-gray-700"
>
SPN Endpoint
</label>
<input
type=
"text"
id=
"linkSPN"
class=
"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm"
placeholder=
"Link SPN"
wire:model.defer=
"linkSPN"
autocomplete=
"off"
>
</div>
<div
class=
"mb-2"
>
<label
for=
"username"
class=
"block text-sm font-medium text-gray-700"
>
Username: SPN
</label>
<input
type=
"text"
id=
"usernameSPN"
class=
"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm"
placeholder=
"Username on SPN"
wire:model.defer=
"usernameSPN"
autocomplete=
"off"
>
</div>
<div
class=
"mb-2"
style=
"display: none;"
>
<label
for=
"first_name"
class=
"block text-sm font-medium text-gray-700"
>
Password: SPN
</label>
<input
type=
"password"
id=
"passwordSPN"
class=
"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm"
placeholder=
"Password on SPN"
wire:model.defer=
"passwordSPN"
autocomplete=
"off"
>
</div>
<div
class=
"mb-2"
x-show=
"showPasswordField"
style=
"display: none;"
>
<label
for=
"first_name"
class=
"block text-sm font-medium text-gray-700"
>
Password: SPN
</label>
<input
type=
"password"
id=
"passwordSPN"
class=
"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm"
placeholder=
"Password on SPN"
wire:model.defer=
"passwordSPN"
autocomplete=
"off"
>
</div>
<div
class=
"flex w-full mt-5"
>
<div
class=
"ml-auto flex space-x-2 w-3/4 justify-end"
>
<button
class=
"w-1/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"
type=
"button"
wire:click=
"backToMainList"
>
Back
</button>
<button
class=
"w-1/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"
type=
"button"
@
click=
"showPasswordField = !showPasswordField"
>
Change Password
</button>
<button
class=
"w-1/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"
type=
"button"
wire:click=
"testConnection"
>
Test Connection
</button>
<button
class=
"w-1/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"
type=
"submit"
>
Save
</button>
</div>
</div>
</form>
</div>
resources/views/livewire/pages/user/user-index.blade.php
View file @
a4b0f3d1
...
@@ -145,6 +145,10 @@
...
@@ -145,6 +145,10 @@
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
aria-hidden=
"true"
class=
"fa fa-edit"
></i>
<i
aria-hidden=
"true"
class=
"fa fa-edit"
></i>
</a>
</a>
<a
wire:click=
"showConfigManualResponseForm({{ $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-solid fa-sliders"
></i>
</a>
<a
@
click=
"$wire.emit('showDeleteModal', {{ $user->id }})"
<a
@
click=
"$wire.emit('showDeleteModal', {{ $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
aria-hidden=
"true"
class=
"fa fa-trash"
></i>
<i
aria-hidden=
"true"
class=
"fa fa-trash"
></i>
...
@@ -199,6 +203,8 @@
...
@@ -199,6 +203,8 @@
<livewire:pages.user.user-create
wire:key=
"user-create"
/>
<livewire:pages.user.user-create
wire:key=
"user-create"
/>
@elseif($action === 'edit')
@elseif($action === 'edit')
<livewire:pages.user.user-edit
:editUserId=
"$editUserId"
wire:key=
"user-edit"
/>
<livewire:pages.user.user-edit
:editUserId=
"$editUserId"
wire:key=
"user-edit"
/>
@elseif($action === 'configManualResponse')
<livewire:pages.user.config-manual-response
:editUserId=
"$editUserId"
/>
@else
@else
<div></div>
<div></div>
@endif
@endif
...
...
resources/views/manual-response/index.blade.php
0 → 100644
View file @
a4b0f3d1
<x-app-layout
title=
"Starter Sideblock"
is-sidebar-open=
"true"
is-header-blur=
"true"
>
<style>
[
x-cloak
]
{
display
:
none
;
}
</style>
<!-- Main Content Wrapper -->
<main
class=
"main-content w-full pb-8"
>
<livewire:pages.manual-response.manual-response/>
<x-modals.alert-modal
name=
"send-response"
></x-modals.alert-modal>
</main>
</x-app-layout>
\ No newline at end of file
routes/web.php
View file @
a4b0f3d1
...
@@ -31,6 +31,7 @@ use App\Http\Livewire\MainContainer;
...
@@ -31,6 +31,7 @@ use App\Http\Livewire\MainContainer;
use
App\Http\Livewire\Pages\Patch\PatchIndex
;
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
;
use
App\Http\Controllers\ManualResponse\ManualResponseController
;
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Web Routes
| Web Routes
...
@@ -87,6 +88,8 @@ Route::middleware(['auth' ])->group(function () {
...
@@ -87,6 +88,8 @@ Route::middleware(['auth' ])->group(function () {
Route
::
get
(
'/get-roles'
,
[
SelectListController
::
class
,
'getRoles'
]);
Route
::
get
(
'/get-roles'
,
[
SelectListController
::
class
,
'getRoles'
]);
Route
::
get
(
'/get-groups'
,
[
SelectListController
::
class
,
'getGroups'
]);
Route
::
get
(
'/get-groups'
,
[
SelectListController
::
class
,
'getGroups'
]);
Route
::
get
(
'/manual-response/index'
,
[
ManualResponseController
::
class
,
'index'
])
->
name
(
'manual-response/index'
);
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
Route::get('role', [RoleController::class ,'index'])->name('role-index');
Route::get('role', [RoleController::class ,'index'])->name('role-index');
...
...
Prev
1
2
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