Commit 9785f0e1 authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

Merge remote-tracking branch 'origin/manual-response' into sprint1

parents 6ba75bf3 6f9687de
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('conf_list_profiles', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('type');
$table->string('desc');
$table->timestamps();
});
DB::table('conf_list_profiles')->insert([
[
'name' => 'D',
'type' => 'PROD',
'desc' => ''
],
[
'name' => 'P',
'type' => 'PROD',
'desc' => ''
],
[
'name' => 'Q',
'type' => 'PROD',
'desc' => ''
],
[
'name' => 'A',
'type' => 'TEST',
'desc' => ''
],
[
'name' => 'B',
'type' => 'TEST',
'desc' => ''
],
[
'name' => 'H',
'type' => 'TEST',
'desc' => ''
]
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('conf_list_profiles');
}
};
...@@ -30,11 +30,11 @@ import 'quill/dist/quill.snow.css'; ...@@ -30,11 +30,11 @@ import 'quill/dist/quill.snow.css';
import flatpickr from 'flatpickr'; import flatpickr from 'flatpickr';
import Tom from 'tom-select/dist/js/tom-select.complete.min'; import Tom from 'tom-select/dist/js/tom-select.complete.min';
import "@fortawesome/fontawesome-free/css/all.css"; import "@fortawesome/fontawesome-free/css/all.css";
import Prism from 'prismjs'; // import Prism from 'prismjs';
import 'prismjs/themes/prism.css'; // import 'prismjs/themes/prism.css';
import 'prismjs/components/prism-diff.min.js'; // import 'prismjs/components/prism-diff.min.js';
import 'prismjs/plugins/line-numbers/prism-line-numbers.css'; // import 'prismjs/plugins/line-numbers/prism-line-numbers.css';
import 'prismjs/plugins/line-numbers/prism-line-numbers.js'; // import 'prismjs/plugins/line-numbers/prism-line-numbers.js';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'; import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
// Helper Functions // Helper Functions
...@@ -88,18 +88,24 @@ Alpine.data('accordionItem', accordionItem); ...@@ -88,18 +88,24 @@ Alpine.data('accordionItem', accordionItem);
Alpine.start(); Alpine.start();
document.addEventListener('DOMContentLoaded', (event) => { document.addEventListener('DOMContentLoaded', async (event) => {
Prism.highlightAll(); //Prism.highlightAll();
hljs.highlightAll();
}); });
document.addEventListener('livewire:load', function () { document.addEventListener('livewire:load', async function () {
Prism.highlightAll(); //Prism.highlightAll();
hljs.highlightAll();
}); });
Livewire.hook('message.processed', (message, component) => { Livewire.hook('message.processed', (message, component) => {
Prism.highlightAll(); // Find all code blocks inside the component that was updated
component.el.querySelectorAll('pre').forEach((block) => {
hljs.highlightElement(block); // Apply syntax highlighting to the specific element
});
}); });
window.addEventListener('diffResultUpdated', function () { window.addEventListener('diffResultUpdated', async function () {
Prism.highlightAll(); //Prism.highlightAll();
hljs.highlightAll();
}); });
\ No newline at end of file
...@@ -15,11 +15,6 @@ export default { ...@@ -15,11 +15,6 @@ export default {
document.body.classList.contains("is-sidebar-open") && document.body.classList.contains("is-sidebar-open") &&
Alpine.store("breakpoints").xlAndUp; Alpine.store("breakpoints").xlAndUp;
Alpine.effect(() => {
this.isDarkModeEnabled
? document.documentElement.classList.add("dark")
: document.documentElement.classList.remove("dark");
});
Alpine.effect(() => { Alpine.effect(() => {
this.isMonochromeModeEnabled this.isMonochromeModeEnabled
......
@props(['name', 'message' => '', 'status' => ''])
<div
x-data="{ showModal: false, name: '{{ $name }}', message: '{{ $message }}', status: '{{ $status }}' }"
x-show="showModal"
x-on:open-modal.window="if ($event.detail.name === name) { showModal = true; message = $event.detail.message; status = $event.detail.status; }"
x-on:close-modal.window="showModal = false" style="display: none">
<div>
<dialog class="fixed inset-0 z-[100] flex flex-col items-center justify-center overflow-hidden px-4 py-6 sm:px-5 w-full h-full bg-transparent"
x-show="showModal" @keydown.window.escape="showModal = false">
<div class="absolute inset-0 bg-slate-900/60 transition-opacity duration-300" @click="showModal = false"
x-show="showModal" x-transition:enter="ease-out" x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100" x-transition:leave="ease-in" x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"></div>
<div class="relative max-w-lg min-w-[500px] rounded-lg bg-white px-4 py-10 text-center transition-opacity duration-300 dark:bg-navy-700 sm:px-5"
x-show="showModal" x-transition:enter="ease-out" x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100" x-transition:leave="ease-in" x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0">
<!-- Conditional SVGs based on status -->
<template x-if="status === 'success'">
<svg xmlns="http://www.w3.org/2000/svg" class="inline size-28 text-success" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</template>
<template x-if="status === 'warning'">
<svg xmlns="http://www.w3.org/2000/svg" class="inline size-28 text-warning" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
</svg>
</template>
<template x-if="status === 'failed'">
<svg xmlns="http://www.w3.org/2000/svg" class="inline size-28 text-error" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd"
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/>
</svg>
</template>
<div class="mt-4">
<p class="mt-2" x-text="message"></p>
<button @click="showModal = false"
class="btn mt-6 bg-gray-200 font-medium text-gray-700 hover:bg-gray-200-focus focus:bg-gray-200-focus active:bg-gray-200-focus/90">
Close
</button>
</div>
</div>
</dialog>
</div>
</div>
@props(['name'])
<div
x-data="{ showModal: false, name: '{{ $name }}' }"
x-show="showModal"
x-on:open-modal.window="showModal = ($event.detail.name === name); console.log(event.detail)"
x-on:close-modal.window="showModal = false" style="display: none">
<template x-teleport="#x-teleport-target">
<div class="fixed inset-0 z-[100] flex flex-col items-center justify-center overflow-hidden px-4 py-6 sm:px-5"
x-show="showModal" role="dialog" @keydown.window.escape="showModal = false">
<div class="absolute inset-0 bg-slate-900/60 transition-opacity duration-300" @click="showModal = false"
x-show="showModal" x-transition:enter="ease-out" x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100" x-transition:leave="ease-in" x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"></div>
<div class="relative max-w-lg min-w-[500px] rounded-lg bg-white px-4 py-10 text-center transition-opacity duration-300 dark:bg-navy-700 sm:px-5"
x-show="showModal" x-transition:enter="ease-out" x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100" x-transition:leave="ease-in" x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0">
<svg xmlns="http://www.w3.org/2000/svg" class="inline size-28 text-success" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<div class="mt-4">
<h2 class="text-2xl text-slate-700 dark:text-navy-100"></h2>
@if(isset($message))
<p class="mt-2">{{ $message }}</p>
@endif
<button @click="showModal = false"
class="btn mt-6 font-medium text-slate-700 hover:bg-slate-300/20 active:bg-slate-300/25 border border-slate-300">
Cancel
</button>
<button @click="$wire.emit('test') ; showModal = false"
class="btn mt-6 bg-primary font-medium text-white hover:bg-primary-focus focus:bg-primary-focus active:bg-primary-focus/90">
Confirm
</button>
</div>
</div>
</div>
</template>
</div>
<div class="h-full text-white bg-main-container w-80 p-4 transition-all duration-300 overflow-y" x-data="{ activeLink: window.location.pathname }"> <div class="h-full text-white bg-main-container w-80 p-4 transition-all duration-300 overflow-y" x-data="{ activeLink: window.location.pathname }">
<div class="rounded-2xl p-3 bg-white w-full mb-2" x-init="checkWindowWidth(); window.addEventListener('resize', checkWindowWidth)"> <div class="rounded-2xl p-3 bg-white w-full mb-2" x-init="checkWindowWidth(); window.addEventListener('resize', checkWindowWidth)">
<ul > <ul >
<li class="mb-1 flex justify-between"> <li class="flex justify-between">
<a href="/" class="text-black block py-1 px-4 rounded text-xl">Spn Patch</a> <a href="/" class="text-black block py-1 px-4 rounded text-xl">SPN Patch</a>
<button @click="sidebarOpen = false; if (!sidebarOpen) setTimeout(() => showSidebarButton = true, 400)" class="mb-4 pt-1 focus:outline-none"> <button @click="sidebarOpen = false; if (!sidebarOpen) setTimeout(() => showSidebarButton = true, 400)" class="mb-4 pt-1 focus:outline-none">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="black" viewBox="0 0 24 24" <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="black" viewBox="0 0 24 24"
stroke="black"> stroke="black">
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
</svg> </svg>
</button> </button>
</li> </li>
<li class="mb-1"> <!-- <li class="mb-1">
<a href="#" class="block py-1 px-4 rounded hover:primary-focus text-black"> <a href="#" class="block py-1 px-4 rounded hover:primary-focus text-black">
<i aria-hidden="true" class="fa fa-home mx-2"></i>Home</a> <i aria-hidden="true" class="fa fa-home mr-2"></i>Home</a>
</li> </li> -->
</ul> </ul>
</div> </div>
...@@ -107,6 +107,16 @@ ...@@ -107,6 +107,16 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="rounded-2xl p-3 bg-white w-full mb-2">
<ul >
<li class="mb-1">
<a href="/manual-response/index" :class="activeLink === '/manual-response/index' ? 'bg-primary-focus text-white rounded-xl' : 'text-black'"
class="block py-2 px-4 rounded text-black flex items-center">
<i aria-hidden="true" class="fa-sharp fa-regular fa-paper-plane mr-2"></i> Manual Response
</a>
</li>
</ul>
</div>
<div class="rounded-2xl p-3 bg-white w-full mb-2" x-data="{ open: ['/company', '/role', '/group', '/user', '/format-file-master'].includes(activeLink) }"> <div class="rounded-2xl p-3 bg-white w-full mb-2" x-data="{ open: ['/company', '/role', '/group', '/user', '/format-file-master'].includes(activeLink) }">
<ul > <ul >
...@@ -148,7 +158,7 @@ ...@@ -148,7 +158,7 @@
<div x-data="{ open: false, timer: null }" @click.away="open = false" @mouseenter="open = true; clearTimeout(timer)" <div x-data="{ open: false, timer: null }" @click.away="open = false" @mouseenter="open = true; clearTimeout(timer)"
@mouseleave="timer = setTimeout(() => open = false, 100)" @mouseleave="timer = setTimeout(() => open = false, 100)"
class="relative px-2 py-1 rounded text-gray-700 hover:bg-primary-focus hover:text-white cursor-pointer"> class="relative px-2 py-1 rounded text-gray-700 hover:bg-primary-focus hover:text-white cursor-pointer">
<i aria-hidden="true" class="fa fa-user" aria-hidden="true"></i> <i aria-hidden="true" class="fa fa-user mr-2" aria-hidden="true"></i>
<span>Hello, {{ $userName ?? '' }}</span> <span>Hello, {{ $userName ?? '' }}</span>
<ul x-cloak x-show="open" @click="open = false" @mouseleave="open = false" <ul x-cloak x-show="open" @click="open = false" @mouseleave="open = false"
class="absolute left-0 mt-2 w-32 bg-white shadow-lg"> class="absolute left-0 mt-2 w-32 bg-white shadow-lg">
......
<div>
<div wire:loading wire:target="{{ $action }}" style="display: none">
<div class="fixed inset-0 z-[100] flex flex-col items-center justify-center overflow-hidden px-4 py-6 sm:px-5">
<div class="absolute inset-0 bg-slate-200/60 backdrop-blur transition-opacity duration-300">
</div>
<div
class="spinner size-16 animate-spin rounded-full border-4 border-[#A020F0] border-r-transparent dark:border-accent dark:border-r-transparent">
</div>
</div>
</div>
</div>
...@@ -82,9 +82,14 @@ ...@@ -82,9 +82,14 @@
<livewire:pages.report.report-index wire:init /> <livewire:pages.report.report-index wire:init />
@break @break
@case('ManualResponse')
<livewire:pages.manual-response.manual-response/>
@break
@default @default
@livewire('code-comparer') @livewire('code-comparer')
@endswitch @endswitch
<x-modals.alert-modal name="alert-modal"></x-modals.alert-modal>
</div> </div>
<script> <script>
// document.addEventListener('livewire:load', function () { // document.addEventListener('livewire:load', function () {
......
<div>
<div id="backgroundDiv" class="w-11/12 mx-auto mt-5 mb-5 pb-5 bg-white/20 rounded-lg shadow-lg backdrop-blur-sm border border-white/30">
<div class="w-10/12 mx-auto pt-5" id="filterDiv">
@if ($errors->any())
{{ $displayCustomizeDiv = false }}
@endif
<h1 class="text-2xl font-bold tracking-tight text-gray-900">Manual Response: Standard Template</h1>
<hr class="my-5">
<div
class="badge space-x-2.5 rounded-full bg-primary text-white shadow-soft shadow-lg shadow-[#1f863680]/50 p-2.5 mb-2">
<div class="size-2 rounded-full bg-current mr-1"></div>
Step 1: Config
</div>
<div class="mx-auto">
<div class="grid grid-cols-1 gap-4 sm:grid-cols-3 pb-1">
<label class="block">
<span class="block text-sm font-medium text-slate-700">Message</span>
<span class="relative mt-1.5 mb-0.1 flex">
<select
class="form-select h-9 w-full rounded-lg border border-slate-300 bg-white px-3 py-2 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:bg-navy-700 dark:hover:border-navy-400 dark:focus:border-accent"
wire:model="messageId">
<option value="">Select an option</option>
@foreach ($messageTypes as $value => $label)
<option value="{{ $value }}">{{ $label }}</option>
@endforeach
</select>
</span>
@error('messageId')
<span class="text-tiny+ text-error">{{ $message }}</span>
@enderror
</label>
<label class="block">
<span class="block text-sm font-medium text-slate-700">Template</span>
<span class="relative mt-1.5 mb-0.1 flex">
<select
class="form-select h-9 w-full rounded-lg border border-slate-300 bg-white px-3 py-2 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:bg-navy-700 dark:hover:border-navy-400 dark:focus:border-accent"
wire:model.defer="templateId">
<option value="">Select an option</option>
@foreach ($responseTemplates as $value => $label)
<option value="{{ $value }}">{{ $label }}</option>
@endforeach
</select>
</span>
@error('templateId')
<span class="text-tiny+ text-error">{{ $message }}</span>
@enderror
</label>
<label class="block">
<span class="block text-sm font-medium text-slate-700">Document Type</span>
<span class="relative mt-1.5 mb-0.1 flex">
<select
class="form-select h-9 w-full rounded-lg border border-slate-300 bg-white px-3 py-2 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:bg-navy-700 dark:hover:border-navy-400 dark:focus:border-accent"
wire:model.defer="docType">
<option value="">Select an option</option>
@foreach ($docTypes as $value => $label)
<option value="{{ $value }}">{{ $label }}</option>
@endforeach
</select>
</span>
@error('docType')
<span class="text-tiny+ text-error">{{ $message }}</span>
@enderror
</label>
</div>
<div class="flex justify-center items-center py-1">
<button class="bg-primary text-white hover:bg-primary-focus py-2 px-4 rounded-md mr-1" wire:click="gotoCustomize">
<i class="fa-solid fa-arrow-right mr-1"></i>Customize</button>
<label class="inline-flex items-center space-x-2">
<input
class="form-checkbox is-basic size-5 rounded border-slate-400/70 checked:bg-primary checked:border-primary hover:border-primary focus:border-primary dark:border-navy-400 dark:checked:bg-accent dark:checked:border-accent dark:hover:border-accent dark:focus:border-accent"
type="checkbox" wire:model.defer="lockData" @if ($disableLockData) disabled @endif />
<p>Lock Data</p>
</label>
</div>
</div>
</div>
@if ($displayCustomizeDiv)
<div class="w-10/12 mx-auto" id="customizeResponseDiv">
<hr class="my-5">
{{-- <h1 class="text-2xl font-bold tracking-tight text-gray-900">1. Customize Template</h1> --}}
<div
class="badge space-x-2.5 rounded-full bg-primary text-white shadow-soft shadow-lg shadow-[#1f863680]/50 p-2.5 mb-2">
<div class="size-2 rounded-full bg-current mr-1"></div>
Step 2: Customize
</div>
@if (session()->has('error'))
<div x-data="{ show: {{ session()->has('error') ? 'true' : 'false' }} }" x-init="setTimeout(() => show = false, 2000)" x-show="show"
x-transition:leave="transition ease-in duration-1000" x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="alert flex rounded-lg bg-error px-4 py-4 text-white sm:px-5">
{{ session('error') }}
</div>
@endif
<div class="flex">
<div class="w-4/12">
<div class="w-12/12 py-1">
@foreach ($xmlData as $key => $value)
<label class="block">
<span class="text-sm font-medium text-slate-700">{{ $key }}</span>
<span class="relative mt-1.5 mb-1.5 flex">
<input
class="form-input peer w-full rounded-lg border border-slate-300 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"
type="text" id="{{ $key }}"
wire:model="xmlData.{{ $key }}" value="{{ $value }}"
autocomplete="off" />
</span>
</label>
@endforeach
</div>
</div>
<div class="w-8/12 pl-5">
<div>
<span class="block text-sm font-medium text-slate-700">Preview XML</span>
</div>
<div class="bg-gray-100 p-4 rounded-lg">
<!-- Highlight.js Code Block -->
<pre class="is-scrollbar-hidden max-h-96 overflow-auto rounded-lg" x-data x-init="hljs.highlightElement($el);"><code class="xml">{{ $xmlContent }}</code></pre>
</div>
<div class="flex justify-center items-center pt-1">
<button
class="bg-slate-150 font-medium text-slate-800 hover:bg-slate-200 focus:bg-slate-200 active:bg-slate-200/80 rounded-md border border-[#e5e7eb] py-2 px-4 mr-1"
wire:click="reGenerateXML">
<i class="fa-solid fa-rotate mr-1"></i>Reload XML</button>
</div>
</div>
</div>
<div class="flex justify-center items-center py-1">
<button class="bg-primary text-white hover:bg-primary-focus font-bold py-2 px-4 rounded-md mr-1"
wire:click="generateAndUploadXml"></i>Submit</button>
</div>
</div>
@endif
@include('livewire.loading-component', ['action' => 'generateAndUploadXml, messageId'])
</div>
</div>
<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>
...@@ -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
......
<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
...@@ -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');
......
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