v1.0.0
This commit is contained in:
34
src/resources/views/components/custom-field-input.blade.php
Normal file
34
src/resources/views/components/custom-field-input.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@props(['field', 'wireModel'])
|
||||
|
||||
<div class="field">
|
||||
<label>{{ $field->label }}{{ $field->required ? ' *' : '' }}</label>
|
||||
|
||||
@switch($field->type)
|
||||
@case('text')
|
||||
<input class="input" wire:model="{{ $wireModel }}.{{ $field->id }}">
|
||||
@break
|
||||
@case('textarea')
|
||||
<textarea class="input" wire:model="{{ $wireModel }}.{{ $field->id }}"></textarea>
|
||||
@break
|
||||
@case('number')
|
||||
<input class="input" type="number" wire:model="{{ $wireModel }}.{{ $field->id }}">
|
||||
@break
|
||||
@case('date')
|
||||
<input class="input" type="date" wire:model="{{ $wireModel }}.{{ $field->id }}">
|
||||
@break
|
||||
@case('select')
|
||||
<select class="input" wire:model="{{ $wireModel }}.{{ $field->id }}">
|
||||
<option value="">Wybierz</option>
|
||||
@foreach ($field->options ?? [] as $option)
|
||||
<option value="{{ $option }}">{{ $option }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@case('checkbox')
|
||||
<label class="radio">
|
||||
<input type="checkbox" wire:model="{{ $wireModel }}.{{ $field->id }}" style="position:static;opacity:1;width:auto;height:auto">
|
||||
Tak
|
||||
</label>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
17
src/resources/views/components/login-notice.blade.php
Normal file
17
src/resources/views/components/login-notice.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
@props(['html' => '', 'type' => 'info'])
|
||||
|
||||
{{--
|
||||
"ql-editor" is included alongside our own classes purely so Quill's own
|
||||
CSS (quill.snow.css, loaded in layouts/app.blade.php) applies here too —
|
||||
it's what makes alignment, indent, headings, blockquote and code-block
|
||||
formatting saved from the editor actually render outside of it (those
|
||||
are plain classes/tags in the stored HTML, and several of Quill's rules
|
||||
for them are scoped under .ql-editor). See app.css for the min-height /
|
||||
overflow reset that undoes the parts of that scoping meant for the live,
|
||||
editable textarea rather than static output like this.
|
||||
--}}
|
||||
@if (trim(strip_tags($html)) !== '')
|
||||
<div {{ $attributes->merge(['class' => 'login-notice login-notice-'.$type.' ql-editor']) }}>
|
||||
{!! $html !!}
|
||||
</div>
|
||||
@endif
|
||||
@@ -0,0 +1,9 @@
|
||||
@props(['attachment'])
|
||||
|
||||
<a
|
||||
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->url($attachment->path) }}"
|
||||
target="_blank"
|
||||
style="display:inline-flex;align-items:center;gap:6px;margin-top:8px;padding:5px 10px;border:1px solid var(--color-divider);border-radius:6px;font-size:12.5px;color:inherit;text-decoration:none;background:color-mix(in srgb, var(--color-text) 5%, transparent)"
|
||||
>
|
||||
<span class="material-symbols-outlined" style="font-size:15px">attach_file</span>{{ $attachment->original_name }}
|
||||
</a>
|
||||
40
src/resources/views/components/multiselect.blade.php
Normal file
40
src/resources/views/components/multiselect.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
@props(['options', 'selectedIds', 'toggleAction', 'placeholder' => 'Wybierz…'])
|
||||
|
||||
@php
|
||||
$selected = collect($options)->filter(fn ($o) => in_array($o['id'], $selectedIds, true))->values();
|
||||
$available = collect($options)->filter(fn ($o) => ! in_array($o['id'], $selectedIds, true))->values();
|
||||
@endphp
|
||||
|
||||
<div x-data="{ open: false }" style="position:relative">
|
||||
<div
|
||||
@click="open = ! open"
|
||||
style="display:flex;flex-wrap:wrap;gap:6px;align-items:center;border:1px solid var(--color-divider);border-radius:7px;padding:7px 8px;min-height:38px;cursor:pointer;background:var(--color-bg)"
|
||||
>
|
||||
@forelse ($selected as $opt)
|
||||
<span class="tag tag-accent" style="display:inline-flex;align-items:center;gap:5px">
|
||||
{{ $opt['label'] }}
|
||||
<span
|
||||
class="material-symbols-outlined"
|
||||
style="font-size:14px;cursor:pointer"
|
||||
wire:click.stop="{{ $toggleAction }}({{ $opt['id'] }})"
|
||||
>close</span>
|
||||
</span>
|
||||
@empty
|
||||
<span class="text-muted" style="font-size:13px">{{ $placeholder }}</span>
|
||||
@endforelse
|
||||
<span class="material-symbols-outlined" style="font-size:18px;margin-left:auto;opacity:0.6">expand_more</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
x-show="open"
|
||||
x-cloak
|
||||
@click.outside="open = false"
|
||||
style="position:absolute;top:100%;left:0;right:0;margin-top:4px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:8px;box-shadow:var(--shadow-md);max-height:220px;overflow:auto;z-index:30"
|
||||
>
|
||||
@forelse ($available as $opt)
|
||||
<button type="button" class="theme-toggle-option" wire:click="{{ $toggleAction }}({{ $opt['id'] }})">{{ $opt['label'] }}</button>
|
||||
@empty
|
||||
<div class="text-muted" style="padding:8px 12px;font-size:12.5px">Brak więcej opcji do dodania.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
53
src/resources/views/components/profile-menu.blade.php
Normal file
53
src/resources/views/components/profile-menu.blade.php
Normal file
@@ -0,0 +1,53 @@
|
||||
@php
|
||||
$user = auth()->user();
|
||||
$areas = [];
|
||||
|
||||
if ($user) {
|
||||
if ($user->isClient()) {
|
||||
$areas[] = ['label' => 'Panel Klienta', 'url' => route('client.dashboard'), 'active' => request()->routeIs('client.*')];
|
||||
}
|
||||
if ($user->isOperator()) {
|
||||
$areas[] = ['label' => 'Panel Operatora', 'url' => route('operator.queue'), 'active' => request()->routeIs('operator.*')];
|
||||
}
|
||||
if ($user->isAdmin()) {
|
||||
$areas[] = ['label' => 'Panel Administratora', 'url' => route('admin.panel'), 'active' => request()->routeIs('admin.*')];
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if ($user)
|
||||
<div x-data="{ open: false }" @click.outside="open = false" style="position:relative;display:inline-block">
|
||||
<button type="button" class="btn btn-secondary" @click="open = !open" style="display:flex;align-items:center;gap:6px">
|
||||
<span class="material-symbols-outlined" style="font-size:18px">account_circle</span>
|
||||
<span class="profile-menu-name">{{ $user->name }}</span>
|
||||
<span class="material-symbols-outlined" style="font-size:16px">expand_more</span>
|
||||
</button>
|
||||
<div
|
||||
x-show="open"
|
||||
x-cloak
|
||||
style="position:absolute;top:100%;right:0;margin-top:6px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:8px;box-shadow:var(--shadow-md);min-width:200px;overflow:hidden;z-index:30"
|
||||
>
|
||||
@foreach ($areas as $area)
|
||||
<a
|
||||
href="{{ $area['url'] }}"
|
||||
wire:navigate
|
||||
@click="open = false"
|
||||
class="theme-toggle-option"
|
||||
style="text-decoration:none;color:{{ $area['active'] ? 'var(--color-accent)' : 'var(--color-text)' }};font-size:12.5px"
|
||||
>{{ $area['label'] }}</a>
|
||||
@endforeach
|
||||
|
||||
@if (count($areas))
|
||||
<div style="border-top:1px solid var(--color-divider)"></div>
|
||||
@endif
|
||||
|
||||
<a
|
||||
href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault(); document.getElementById('profile-menu-logout-form').submit();"
|
||||
class="theme-toggle-option"
|
||||
style="text-decoration:none;color:var(--color-danger);font-size:12.5px"
|
||||
>Wyloguj się</a>
|
||||
<form id="profile-menu-logout-form" action="{{ route('logout') }}" method="POST" style="display:none">@csrf</form>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
74
src/resources/views/components/quill-editor.blade.php
Normal file
74
src/resources/views/components/quill-editor.blade.php
Normal file
@@ -0,0 +1,74 @@
|
||||
@props(['value' => '', 'onChange', 'minHeight' => '160px'])
|
||||
|
||||
{{--
|
||||
A QuillJS rich-text editor whose HTML is pushed back to the Livewire
|
||||
component via the given method name, debounced so typing doesn't fire a
|
||||
request per keystroke. wire:ignore keeps Livewire from touching Quill's
|
||||
own DOM once it's mounted — either the wrapping @if in the parent view
|
||||
(opening a dialog) or a changing wire:key passed in via $attributes (e.g.
|
||||
after a server-side "Resetuj" reset) is what gives us a fresh node — and
|
||||
therefore a fresh x-init reading the new $value — when the content changes
|
||||
from outside the editor itself.
|
||||
--}}
|
||||
<div
|
||||
{{ $attributes }}
|
||||
wire:ignore
|
||||
x-data="{
|
||||
quill: null,
|
||||
timer: null,
|
||||
init() {
|
||||
// Quill has no built-in horizontal-rule button — register a
|
||||
// custom block-embed format for it once (guarded since every
|
||||
// editor instance on the page runs this same init). Community
|
||||
// pattern: https://github.com/quilljs/quill/issues/1211
|
||||
if (! window.quillDividerRegistered) {
|
||||
const BlockEmbed = Quill.import('blots/block/embed');
|
||||
class DividerBlot extends BlockEmbed {}
|
||||
DividerBlot.blotName = 'divider';
|
||||
DividerBlot.tagName = 'hr';
|
||||
Quill.register(DividerBlot);
|
||||
Quill.import('ui/icons').divider = `<svg viewBox='0 0 18 18'><line class='ql-stroke' x1='3' y1='9' x2='15' y2='9'></line></svg>`;
|
||||
window.quillDividerRegistered = true;
|
||||
}
|
||||
|
||||
this.quill = new Quill(this.$refs.editor, {
|
||||
theme: 'snow',
|
||||
placeholder: 'Treść…',
|
||||
modules: {
|
||||
toolbar: {
|
||||
container: [
|
||||
[{ header: [2, 3, false] }],
|
||||
['bold', 'italic', 'underline', 'strike'],
|
||||
[{ color: [] }, { background: [] }],
|
||||
[{ align: [] }],
|
||||
[{ list: 'ordered' }, { list: 'bullet' }],
|
||||
[{ indent: '-1' }, { indent: '+1' }],
|
||||
[{ script: 'sub' }, { script: 'super' }],
|
||||
['blockquote', 'code-block'],
|
||||
['divider'],
|
||||
['link'],
|
||||
['clean'],
|
||||
],
|
||||
handlers: {
|
||||
divider() {
|
||||
const range = this.quill.getSelection(true);
|
||||
this.quill.insertText(range.index, '\n', Quill.sources.USER);
|
||||
this.quill.insertEmbed(range.index + 1, 'divider', true, Quill.sources.USER);
|
||||
this.quill.setSelection(range.index + 2, 0, Quill.sources.SILENT);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
this.quill.root.innerHTML = @js($value);
|
||||
this.quill.on('text-change', () => {
|
||||
clearTimeout(this.timer);
|
||||
this.timer = setTimeout(() => {
|
||||
$wire.call(@js($onChange), this.quill.root.innerHTML);
|
||||
}, 500);
|
||||
});
|
||||
},
|
||||
}"
|
||||
>
|
||||
<div x-ref="editor" style="min-height: {{ $minHeight }}"></div>
|
||||
</div>
|
||||
35
src/resources/views/components/theme-toggle.blade.php
Normal file
35
src/resources/views/components/theme-toggle.blade.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<div
|
||||
x-data="{
|
||||
theme: localStorage.getItem('theme') || 'auto',
|
||||
open: false,
|
||||
icon() { return this.theme === 'light' ? 'light_mode' : this.theme === 'dark' ? 'dark_mode' : 'brightness_auto' },
|
||||
apply(t) {
|
||||
this.theme = t
|
||||
localStorage.setItem('theme', t)
|
||||
let systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
document.documentElement.setAttribute('data-theme', t === 'auto' ? (systemDark ? 'dark' : 'light') : t)
|
||||
this.open = false
|
||||
}
|
||||
}"
|
||||
@click.outside="open = false"
|
||||
style="position:relative;display:inline-block"
|
||||
>
|
||||
<button type="button" class="btn btn-secondary btn-icon" @click="open = !open">
|
||||
<span class="material-symbols-outlined" x-text="icon()"></span>
|
||||
</button>
|
||||
<div
|
||||
x-show="open"
|
||||
x-cloak
|
||||
style="position:absolute;top:100%;right:0;margin-top:6px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:8px;box-shadow:var(--shadow-md);min-width:150px;overflow:hidden;z-index:20"
|
||||
>
|
||||
<button type="button" class="theme-toggle-option" @click="apply('light')">
|
||||
<span class="material-symbols-outlined" style="font-size:16px">light_mode</span>Jasny
|
||||
</button>
|
||||
<button type="button" class="theme-toggle-option" @click="apply('dark')">
|
||||
<span class="material-symbols-outlined" style="font-size:16px">dark_mode</span>Ciemny
|
||||
</button>
|
||||
<button type="button" class="theme-toggle-option" @click="apply('auto')">
|
||||
<span class="material-symbols-outlined" style="font-size:16px">brightness_auto</span>Auto
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
22
src/resources/views/components/topbar.blade.php
Normal file
22
src/resources/views/components/topbar.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
@php
|
||||
$panelLabel = match (true) {
|
||||
request()->routeIs('client.*') => 'Panel Klienta',
|
||||
request()->routeIs('operator.*') => 'Panel Operatora',
|
||||
request()->routeIs('admin.*') => 'Panel Administratora',
|
||||
default => null,
|
||||
};
|
||||
@endphp
|
||||
|
||||
<div class="nav" style="position:relative;padding:16px 28px;border-bottom:1px solid var(--color-divider)">
|
||||
<span class="nav-brand">{{ \App\Support\Settings::get('company_name') }}</span>
|
||||
|
||||
@if ($panelLabel)
|
||||
<span class="nav-panel-label" style="position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-weight:500;font-size:13.5px;white-space:nowrap">{{ $panelLabel }}</span>
|
||||
@endif
|
||||
|
||||
<x-theme-toggle />
|
||||
|
||||
{{ $slot }}
|
||||
|
||||
<x-profile-menu />
|
||||
</div>
|
||||
11
src/resources/views/emails/ticket-notification.blade.php
Normal file
11
src/resources/views/emails/ticket-notification.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ \App\Support\Settings::get('company_name') }}</title>
|
||||
</head>
|
||||
<body style="margin:0;padding:24px 12px;background:#f2f2f5;font-family:Arial,Helvetica,sans-serif">
|
||||
{!! $html !!}
|
||||
</body>
|
||||
</html>
|
||||
82
src/resources/views/layouts/app.blade.php
Normal file
82
src/resources/views/layouts/app.blade.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ $title ?? \App\Support\Settings::get('company_name') }}</title>
|
||||
<link rel="icon" type="image/svg+xml" href="{{ \App\Support\Settings::faviconUrl() }}">
|
||||
|
||||
<link rel="manifest" href="{{ route('manifest') }}">
|
||||
<meta name="theme-color" content="{{ \App\Support\Settings::accentColor() }}">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ \App\Support\Settings::get('company_name') }}">
|
||||
<link rel="apple-touch-icon" href="{{ asset('pwa-icons/icon-192.png') }}">
|
||||
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function () {
|
||||
navigator.serviceWorker.register('/sw.js');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
function applyStoredTheme() {
|
||||
var stored = localStorage.getItem('theme') || 'auto';
|
||||
var systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
var resolved = stored === 'auto' ? (systemDark ? 'dark' : 'light') : stored;
|
||||
document.documentElement.setAttribute('data-theme', resolved);
|
||||
}
|
||||
|
||||
// Apply immediately (avoids a flash of the wrong theme on first paint).
|
||||
applyStoredTheme();
|
||||
|
||||
// wire:navigate swaps the page via AJAX and morphs <html> to match the
|
||||
// freshly rendered (unthemed) markup, which can wipe the data-theme
|
||||
// attribute back out — reapply the stored choice after every such swap,
|
||||
// and again if the page is restored from the back/forward cache.
|
||||
document.addEventListener('livewire:navigated', applyStoredTheme);
|
||||
window.addEventListener('pageshow', function (e) {
|
||||
if (e.persisted) applyStoredTheme();
|
||||
});
|
||||
|
||||
// Keep "auto" in sync if the OS theme changes while the page is open.
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function () {
|
||||
if ((localStorage.getItem('theme') || 'auto') === 'auto') applyStoredTheme();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20,400,0,0">
|
||||
<style>.material-symbols-outlined{font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 20;line-height:1;vertical-align:middle;font-size:18px}</style>
|
||||
|
||||
{{-- QuillJS — powers the rich-text (HTML) editors for e-mail templates in Admin -> Szablony e-mail. --}}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/quill@2/dist/quill.snow.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/quill@2/dist/quill.js"></script>
|
||||
<style>
|
||||
.ql-toolbar.ql-snow { border-color: var(--color-divider); background: color-mix(in srgb, var(--color-text) 4%, var(--color-bg)); border-radius: 8px 8px 0 0; }
|
||||
.ql-container.ql-snow { border-color: var(--color-divider); border-radius: 0 0 8px 8px; font-family: inherit; font-size: 13.5px; }
|
||||
.ql-editor { color: var(--color-text); min-height: 160px; }
|
||||
.ql-editor.ql-blank::before { color: color-mix(in srgb, var(--color-text) 45%, transparent); font-style: normal; }
|
||||
.ql-snow .ql-picker { color: var(--color-text); }
|
||||
.ql-snow .ql-stroke { stroke: color-mix(in srgb, var(--color-text) 75%, transparent); }
|
||||
.ql-snow .ql-fill { fill: color-mix(in srgb, var(--color-text) 75%, transparent); }
|
||||
.ql-snow .ql-picker-options { background: var(--color-surface); border-color: var(--color-divider); }
|
||||
.ql-snow.ql-toolbar button:hover, .ql-snow .ql-toolbar button:hover { color: var(--color-accent); }
|
||||
.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke { stroke: var(--color-accent); }
|
||||
.ql-editor hr { border: none; border-top: 1px solid var(--color-divider); margin: 10px 0; }
|
||||
</style>
|
||||
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
<style>:root{--color-accent: {{ \App\Support\Settings::accentColor() }};}</style>
|
||||
@livewireStyles
|
||||
</head>
|
||||
<body style="min-height:100vh;display:flex;flex-direction:column">
|
||||
{{ $slot }}
|
||||
|
||||
@livewireScripts
|
||||
</body>
|
||||
</html>
|
||||
114
src/resources/views/livewire/admin/api-keys.blade.php
Normal file
114
src/resources/views/livewire/admin/api-keys.blade.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<div>
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:14px">
|
||||
<h3 style="margin:0">Klucze API</h3>
|
||||
<div style="display:flex;gap:8px">
|
||||
<a class="btn btn-secondary" href="/admin/api-docs" target="_blank" rel="noopener">Dokumentacja API</a>
|
||||
<button class="btn btn-primary" type="button" wire:click="openForm">+ Nowy klucz</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-muted" style="font-size:12.5px;margin:0 0 14px">
|
||||
Klucze API reprezentują niezależne integracje zewnętrzne (nie są przypisane do konkretnego użytkownika). Zgłoszenia i wiadomości utworzone przez klucz zachowują się jak zgłoszenia gościa — identyfikowane e-mailem i imieniem podanym w żądaniu.
|
||||
</p>
|
||||
|
||||
@if ($newTokenPlaintext)
|
||||
<div class="card" style="padding:14px 16px;margin-bottom:16px;border-color:var(--color-success);gap:8px"
|
||||
x-data="{ copied: false }">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;gap:8px">
|
||||
<span class="card-title" style="color:var(--color-success)">Klucz „{{ $newTokenClientName }}” utworzony</span>
|
||||
<button type="button" class="btn btn-ghost" wire:click="dismissNewToken">Zamknij</button>
|
||||
</div>
|
||||
<p class="text-muted" style="font-size:12.5px;margin:0">Skopiuj ten token teraz — nie zostanie ponownie pokazany.</p>
|
||||
<div style="display:flex;gap:8px;align-items:center">
|
||||
<code style="flex:1;padding:8px 10px;border:1px solid var(--color-divider);border-radius:6px;background:color-mix(in srgb, var(--color-text) 5%, var(--color-bg));font-size:12.5px;word-break:break-all">{{ $newTokenPlaintext }}</code>
|
||||
<button type="button" class="btn btn-secondary" style="white-space:nowrap"
|
||||
x-on:click="navigator.clipboard.writeText(@js($newTokenPlaintext)); copied = true; setTimeout(() => copied = false, 1500)"
|
||||
x-text="copied ? 'Skopiowano!' : 'Kopiuj'"></button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($this->apiClients->isNotEmpty())
|
||||
<div class="table-wrap">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nazwa</th>
|
||||
<th>Opis</th>
|
||||
<th>Uprawnienia</th>
|
||||
<th>Utworzono</th>
|
||||
<th>Ostatnio użyto</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($this->apiClients as $client)
|
||||
@php $token = $client->tokens->first(); @endphp
|
||||
<tr>
|
||||
<td style="white-space:nowrap">{{ $client->name }}</td>
|
||||
<td class="text-muted">{{ $client->description ?: '—' }}</td>
|
||||
<td style="min-width:220px">
|
||||
@foreach ($token?->abilities ?? [] as $ability)
|
||||
<span class="tag tag-outline" style="margin:0 4px 4px 0">{{ $ability }}</span>
|
||||
@endforeach
|
||||
</td>
|
||||
<td style="white-space:nowrap">{{ $client->created_at->format('Y-m-d H:i') }}</td>
|
||||
<td style="white-space:nowrap">{{ $token?->last_used_at?->format('Y-m-d H:i') ?? 'Nigdy' }}</td>
|
||||
<td>
|
||||
@if ($client->isRevoked() || ! $token)
|
||||
<span class="tag" style="background:color-mix(in srgb, var(--color-danger) 18%, transparent);color:var(--color-danger)">Odwołany</span>
|
||||
@else
|
||||
<span class="tag" style="background:color-mix(in srgb, var(--color-success) 18%, transparent);color:var(--color-success)">Aktywny</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div style="display:flex;gap:6px;justify-content:flex-end">
|
||||
<button class="btn btn-ghost" type="button" wire:click="regenerate({{ $client->id }})" wire:confirm="Odwołać bieżący token i wygenerować nowy?">Regeneruj</button>
|
||||
@unless ($client->isRevoked())
|
||||
<button class="btn btn-ghost" type="button" wire:click="revoke({{ $client->id }})" wire:confirm="Odwołać ten klucz? Token przestanie działać natychmiast.">Odwołaj</button>
|
||||
@endunless
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<p class="text-muted" style="font-size:13px">Brak kluczy API. Utwórz pierwszy używając przycisku wyżej.</p>
|
||||
@endif
|
||||
|
||||
@if ($formOpen)
|
||||
<div class="dialog-backdrop">
|
||||
<form wire:submit="submit" class="dialog" style="max-width:480px">
|
||||
<div class="dialog-title">Nowy klucz API</div>
|
||||
<div class="field">
|
||||
<label>Nazwa</label>
|
||||
<input class="input" wire:model="form.name" placeholder="np. Integracja z systemem monitoringu">
|
||||
</div>
|
||||
@error('form.name') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
<div class="field">
|
||||
<label>Opis (opcjonalnie)</label>
|
||||
<textarea class="input" style="min-height:70px" wire:model="form.description"></textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Uprawnienia</label>
|
||||
<div style="display:flex;flex-direction:column;gap:6px">
|
||||
@foreach (static::availableAbilities() as $key => $label)
|
||||
<label style="display:flex;align-items:center;gap:8px;font-size:13px;font-weight:400">
|
||||
<input type="checkbox" wire:model="form.abilities" value="{{ $key }}">
|
||||
{{ $label }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@error('form.abilities') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
<div class="dialog-actions">
|
||||
<button class="btn btn-secondary" type="button" wire:click="closeForm">Anuluj</button>
|
||||
<button class="btn btn-primary" type="submit">Utwórz klucz</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
1004
src/resources/views/livewire/admin/panel.blade.php
Normal file
1004
src/resources/views/livewire/admin/panel.blade.php
Normal file
File diff suppressed because it is too large
Load Diff
27
src/resources/views/livewire/auth/login.blade.php
Normal file
27
src/resources/views/livewire/auth/login.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar>
|
||||
<a href="{{ url('/') }}" wire:navigate class="btn btn-secondary" style="font-size:12px;padding:6px 12px;text-decoration:none">Nowe zgłoszenie bez logowania</a>
|
||||
</x-topbar>
|
||||
|
||||
<div class="page-pad" style="flex:1;display:flex;justify-content:center;align-items:center;padding:40px 20px">
|
||||
<form wire:submit="submit" class="card elev-md" style="width:100%;max-width:380px;padding:28px;gap:16px">
|
||||
<img src="{{ \App\Support\Settings::logoUrl() }}" alt="{{ \App\Support\Settings::get('company_name') }}" style="height:56px;width:auto;align-self:center">
|
||||
<h2 style="margin:0;text-align:center">Zaloguj się</h2>
|
||||
<x-login-notice :html="\App\Support\Settings::get('login_notice_html')" :type="\App\Support\Settings::loginNoticeType()" />
|
||||
|
||||
@if ($error)
|
||||
<div class="tag" style="background:color-mix(in srgb, var(--color-danger) 18%, transparent);color:var(--color-danger)">{{ $error }}</div>
|
||||
@endif
|
||||
|
||||
<div class="field">
|
||||
<label>Nazwa użytkownika</label>
|
||||
<input class="input" wire:model="username" autofocus>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Hasło</label>
|
||||
<input class="input" type="password" wire:model="password">
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block" type="submit">Zaloguj się</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
34
src/resources/views/livewire/client/dashboard.blade.php
Normal file
34
src/resources/views/livewire/client/dashboard.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar />
|
||||
|
||||
<div class="page-pad" style="flex:1;padding:28px;display:flex;flex-direction:column;gap:20px;max-width:920px;width:100%;margin:0 auto;box-sizing:border-box">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap">
|
||||
<h2 style="margin:0">Moje zgłoszenia</h2>
|
||||
<a href="{{ route('client.new') }}" wire:navigate class="btn btn-primary">+ Nowe zgłoszenie</a>
|
||||
</div>
|
||||
|
||||
<div class="seg" style="align-self:flex-start">
|
||||
<label class="seg-opt"><input type="radio" name="ctab" @checked($tab === 'current') wire:click="setTab('current')">Aktualne ({{ $this->currentTickets->count() }})</label>
|
||||
<label class="seg-opt"><input type="radio" name="ctab" @checked($tab === 'archive') wire:click="setTab('archive')">Archiwalne ({{ $this->archiveTickets->count() }})</label>
|
||||
</div>
|
||||
|
||||
<div style="display:flex;flex-direction:column;gap:10px">
|
||||
@foreach (($tab === 'current' ? $this->currentTickets : $this->archiveTickets) as $ticket)
|
||||
<a href="{{ route('client.ticket', $ticket) }}" wire:navigate class="card elev-sm" style="padding:16px;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;text-decoration:none;color:inherit">
|
||||
<div>
|
||||
<div style="font-weight:500">#{{ $ticket->number }} — {{ $ticket->subject }}</div>
|
||||
<div class="card-meta">{{ $ticket->categoryLabel() }} · {{ \App\Support\Rel::format($ticket->updated_at) }}</div>
|
||||
</div>
|
||||
<div style="display:flex;gap:6px">
|
||||
<span style="{{ $ticket->priorityStyle() }}">{{ $ticket->priorityLabel() }}</span>
|
||||
<span style="{{ $ticket->statusStyle() }}">{{ $ticket->statusLabel() }}</span>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
@if (($tab === 'current' ? $this->currentTickets : $this->archiveTickets)->isEmpty())
|
||||
<p class="text-muted" style="font-size:13px">Brak zgłoszeń w tej zakładce.</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
96
src/resources/views/livewire/client/new-ticket.blade.php
Normal file
96
src/resources/views/livewire/client/new-ticket.blade.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar />
|
||||
|
||||
<div class="page-pad" style="flex:1;padding:28px;display:flex;flex-direction:column;gap:20px;max-width:920px;width:100%;margin:0 auto;box-sizing:border-box">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap">
|
||||
<h2 style="margin:0">Nowe zgłoszenie</h2>
|
||||
<a href="{{ route('client.dashboard') }}" wire:navigate class="btn btn-ghost">← Wróć do zgłoszeń</a>
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:16px 20px">
|
||||
<div class="field" style="margin:0">
|
||||
<label>Adres e-mail</label>
|
||||
<input class="input" value="{{ auth()->user()->email }}" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:flex;align-items:flex-start;justify-content:center;padding:4px 8px">
|
||||
@foreach (['Dział', 'Kategoria', 'Szczegóły'] as $i => $label)
|
||||
@php $n = $i + 1; @endphp
|
||||
<div style="display:flex;align-items:center;flex:none">
|
||||
<div class="wizard-step" style="display:flex;flex-direction:column;align-items:center;gap:6px">
|
||||
<div style="width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;flex:none;border:1.5px solid {{ $n <= $step ? 'var(--color-accent)' : 'var(--color-divider)' }};background:{{ $n < $step ? 'var(--color-accent-700)' : 'transparent' }};color:{{ $n < $step ? 'var(--color-accent-100)' : ($n === $step ? 'var(--color-accent)' : 'color-mix(in srgb, var(--color-text) 50%, transparent)') }}">{{ $n }}</div>
|
||||
<div style="font-size:11px;text-align:center">{{ $label }}</div>
|
||||
</div>
|
||||
@if (! $loop->last)
|
||||
<div class="wizard-connector" style="height:1px;margin:15px 8px 0;background:{{ $n < $step ? 'var(--color-accent)' : 'var(--color-divider)' }}"></div>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@if ($step === 1)
|
||||
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px">
|
||||
@foreach ($this->categories as $category)
|
||||
<div class="card elev-sm" style="padding:20px;gap:10px;cursor:pointer" wire:click="selectCategory({{ $category->id }})">
|
||||
<div style="width:40px;height:40px;border-radius:50%;background:var(--color-accent-700);color:var(--color-accent-100);display:flex;align-items:center;justify-content:center;font-size:16px">{{ mb_strtoupper(mb_substr($category->name, 0, 1)) }}</div>
|
||||
<span class="card-title">{{ $category->name }}</span>
|
||||
<p class="card-body">{{ $category->description }}</p>
|
||||
<span class="card-meta">{{ $category->subcategories->count() }} podkategorie</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@elseif ($step === 2)
|
||||
<div style="display:flex;flex-direction:column;gap:10px">
|
||||
<button type="button" class="btn btn-ghost" style="align-self:flex-start;padding:0" wire:click="backToCategory">← Zmień kategorię</button>
|
||||
@foreach ($this->selectedCategory?->subcategories ?? [] as $sub)
|
||||
<div class="card elev-sm" style="padding:16px;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;cursor:pointer" wire:click="selectSubcategory({{ $sub->id }})">
|
||||
<div>
|
||||
<div style="font-weight:500">{{ $sub->name }}</div>
|
||||
<div class="card-meta">{{ $sub->description }}</div>
|
||||
</div>
|
||||
<span class="text-muted" style="font-size:18px">→</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@elseif ($step === 3)
|
||||
<form wire:submit="submit" class="card elev-md" style="padding:24px;gap:16px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center">
|
||||
<span class="tag tag-outline">{{ $this->selectedCategory?->name }} / {{ $this->selectedSubcategory?->name }}</span>
|
||||
<button type="button" class="btn btn-ghost" style="padding:0" wire:click="backToSubcategory">Zmień</button>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Temat</label>
|
||||
<input class="input" wire:model="subject">
|
||||
@error('subject') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Treść</label>
|
||||
<textarea class="input" wire:model="body"></textarea>
|
||||
@error('body') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
|
||||
@foreach ($this->selectedSubcategory?->customFields ?? [] as $field)
|
||||
<x-custom-field-input :field="$field" wire-model="customValues" />
|
||||
@endforeach
|
||||
|
||||
<div class="field">
|
||||
<label>Załączniki</label>
|
||||
<div style="border:1px dashed var(--color-divider);border-radius:8px;padding:14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px">
|
||||
<label class="btn btn-secondary" style="cursor:pointer">Wybierz pliki<input type="file" multiple style="display:none" wire:model="attachments"></label>
|
||||
@forelse ($attachments as $i => $file)
|
||||
<span class="text-muted" style="font-size:13px;display:flex;align-items:center;gap:6px">
|
||||
{{ $file->getClientOriginalName() }}
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7" wire:click="removeAttachment({{ $i }})">close</span>
|
||||
</span>
|
||||
@empty
|
||||
<span class="text-muted" style="font-size:13px">Brak plików</span>
|
||||
@endforelse
|
||||
</div>
|
||||
@error('attachments') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block" type="submit">Utwórz zgłoszenie</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
137
src/resources/views/livewire/client/ticket-show.blade.php
Normal file
137
src/resources/views/livewire/client/ticket-show.blade.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar />
|
||||
|
||||
<div class="page-pad" style="flex:1;padding:28px;display:flex;flex-direction:column;gap:20px;max-width:920px;width:100%;margin:0 auto;box-sizing:border-box">
|
||||
<a href="{{ route('client.dashboard') }}" wire:navigate class="btn btn-ghost" style="align-self:flex-start;padding:0">← Wróć do listy</a>
|
||||
|
||||
<div style="display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap">
|
||||
<div class="main-col" style="display:flex;flex-direction:column;gap:16px">
|
||||
@php
|
||||
$firstMessage = $this->ticketMessages->first();
|
||||
$threadMessages = $this->ticketMessages->skip(1);
|
||||
@endphp
|
||||
|
||||
<div class="card" style="padding:22px;gap:10px">
|
||||
<div class="card-kicker">Zgłoszenie #{{ $ticket->number }}</div>
|
||||
<h2 style="margin:2px 0 0">{{ $ticket->subject }}</h2>
|
||||
<div class="card-meta">{{ $ticket->categoryLabel() }} · utworzono {{ \App\Support\Rel::format($ticket->created_at) }}</div>
|
||||
<div style="white-space:pre-wrap;font-size:14px;margin-top:4px">{{ $ticket->body }}</div>
|
||||
@foreach ($firstMessage?->attachments ?? [] as $a)
|
||||
<x-message-attachment :attachment="$a" />
|
||||
@endforeach
|
||||
@if (count($ticket->customFieldEntries()))
|
||||
<div style="display:flex;flex-direction:column;gap:2px;margin-top:2px">
|
||||
@foreach ($ticket->customFieldEntries() as $cf)
|
||||
<div style="font-size:14px"><strong>{{ $cf['label'] }}:</strong> {{ $cf['value'] }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div style="display:flex;flex-direction:column;gap:10px">
|
||||
@foreach ($threadMessages as $m)
|
||||
@php $mine = $m->role === 'client' && $m->author_id === auth()->id(); @endphp
|
||||
<div style="display:flex;justify-content:{{ $mine ? 'flex-end' : 'flex-start' }}">
|
||||
<div style="max-width:75%;padding:10px 14px;border-radius:12px;font-size:14px;background:{{ $mine ? 'var(--color-accent-800)' : 'var(--color-surface)' }};color:{{ $mine ? 'var(--color-accent-100)' : 'var(--color-text)' }};border:1px solid var(--color-divider)">
|
||||
<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:10px">
|
||||
<div style="font-size:11px;opacity:0.65;margin-bottom:4px">{{ $m->author_name }} · {{ \App\Support\Rel::format($m->created_at) }}{{ $m->edited ? ' · edytowano' : '' }}</div>
|
||||
@if ($m->role === 'client' && $m->author_id === auth()->id())
|
||||
<div style="display:flex;gap:6px;flex:none">
|
||||
<span class="material-symbols-outlined" style="font-size:15px;cursor:pointer;opacity:0.7" wire:click="startEdit({{ $m->id }}, @js($m->body))">edit</span>
|
||||
<span class="material-symbols-outlined" style="font-size:15px;cursor:pointer;opacity:0.7" wire:click="requestDelete({{ $m->id }})">delete</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@if ($editingMessageId === $m->id)
|
||||
<textarea class="input" wire:model="editingDraft"></textarea>
|
||||
<div style="display:flex;gap:8px;margin-top:6px">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelEdit">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="saveEdit">Zapisz</button>
|
||||
</div>
|
||||
@else
|
||||
<div style="white-space:pre-wrap">{{ $m->body }}</div>
|
||||
@endif
|
||||
@foreach ($m->attachments as $a)
|
||||
<x-message-attachment :attachment="$a" />
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<form wire:submit="sendReply" class="card" style="padding:16px;gap:10px">
|
||||
<textarea class="input" placeholder="Napisz odpowiedź…" wire:model="reply"></textarea>
|
||||
@error('reply') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
<div style="display:flex;align-items:center;gap:10px">
|
||||
<div style="flex:1;min-width:0;border:1px dashed var(--color-divider);border-radius:8px;padding:10px 14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px">
|
||||
<label class="btn btn-secondary" style="cursor:pointer;flex:none">Załącz pliki<input type="file" multiple style="display:none" wire:model="attachments"></label>
|
||||
@forelse ($attachments as $i => $file)
|
||||
<span class="text-muted" style="font-size:13px;display:flex;align-items:center;gap:6px;min-width:0">
|
||||
<span class="material-symbols-outlined" style="font-size:16px;flex:none">attach_file</span>
|
||||
<span style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{{ $file->getClientOriginalName() }}</span>
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7;flex:none" wire:click="removeAttachment({{ $i }})">close</span>
|
||||
</span>
|
||||
@empty
|
||||
<span class="text-muted" style="font-size:13px">Brak załączników</span>
|
||||
@endforelse
|
||||
</div>
|
||||
<button class="btn btn-primary" style="flex:none" type="submit">Wyślij odpowiedź</button>
|
||||
</div>
|
||||
@error('attachments') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="aside-col" style="display:flex;flex-direction:column;gap:14px">
|
||||
<div class="card" style="padding:16px;gap:8px">
|
||||
<div class="card-kicker">Twoje dane</div>
|
||||
<div style="font-size:14px;font-weight:500">{{ auth()->user()->name }}</div>
|
||||
<div class="text-muted" style="font-size:13px">{{ auth()->user()->email }}</div>
|
||||
</div>
|
||||
<div class="card" style="padding:16px;gap:10px">
|
||||
<div class="card-kicker">Status i priorytet</div>
|
||||
<div style="display:flex;gap:6px">
|
||||
<span style="{{ $ticket->priorityStyle() }}">{{ $ticket->priorityLabel() }}</span>
|
||||
<span style="{{ $ticket->statusStyle() }}">{{ $ticket->statusLabel() }}</span>
|
||||
</div>
|
||||
@if (! $ticket->isClosed())
|
||||
<button type="button" class="btn btn-secondary btn-block" wire:click="close">Zamknij zgłoszenie</button>
|
||||
@elseif ($ticket->isClosed())
|
||||
<button type="button" class="btn btn-secondary btn-block" wire:click="reopen">Otwórz ponownie</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="card" style="padding:16px;gap:8px">
|
||||
<div class="card-kicker">Historia zmian</div>
|
||||
@forelse ($ticket->histories as $h)
|
||||
<div style="font-size:12.5px"><span>{{ $h->text }}</span><div class="text-muted" style="font-size:11px">{{ \App\Support\Rel::format($h->created_at) }}</div></div>
|
||||
@empty
|
||||
<p class="text-muted" style="font-size:12px;margin:0">Brak historii zmian.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="card" style="padding:16px;gap:8px">
|
||||
<div class="card-kicker">Inne Twoje zgłoszenia</div>
|
||||
@forelse ($this->otherTickets as $ot)
|
||||
<a href="{{ route('client.ticket', $ot) }}" wire:navigate style="display:flex;justify-content:space-between;align-items:center;gap:8px;cursor:pointer;text-decoration:none;color:inherit">
|
||||
<span style="font-size:13px">#{{ $ot->number }} — {{ $ot->subject }}</span>
|
||||
<span style="{{ $ot->statusStyle() }};flex:none">{{ $ot->statusLabel() }}</span>
|
||||
</a>
|
||||
@empty
|
||||
<p class="text-muted" style="font-size:12px;margin:0">Brak innych zgłoszeń.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($pendingDeleteMessageId)
|
||||
<div class="dialog-backdrop">
|
||||
<div class="dialog" style="max-width:400px">
|
||||
<div class="dialog-title">Potwierdź usunięcie</div>
|
||||
<div class="dialog-body">Czy na pewno usunąć tę wiadomość?</div>
|
||||
<div class="dialog-actions">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelDelete">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="confirmDelete">Usuń</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
128
src/resources/views/livewire/landing.blade.php
Normal file
128
src/resources/views/livewire/landing.blade.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar>
|
||||
<a href="{{ url('/login') }}" wire:navigate class="btn btn-secondary" style="font-size:12px;padding:6px 12px;text-decoration:none">Zaloguj się</a>
|
||||
</x-topbar>
|
||||
|
||||
<div class="page-pad" style="flex:1;display:flex;justify-content:center;padding:48px 20px 80px">
|
||||
<div style="width:100%;max-width:640px;display:flex;flex-direction:column;gap:28px">
|
||||
|
||||
@if ($this->submittedTicket)
|
||||
<div class="card elev-md" style="padding:32px;gap:14px;text-align:left">
|
||||
<span class="tag tag-accent" style="align-self:flex-start">Zgłoszenie przyjęte</span>
|
||||
<h2 style="margin:0">Zgłoszenie #{{ $this->submittedTicket->number }} zostało utworzone</h2>
|
||||
<p class="text-muted" style="margin:0">Zapisz numer zgłoszenia i adres e-mail — będziesz mógł/mogła sprawdzić status, kontaktując się z zespołem wsparcia. Aktualizacje będziemy wysyłać na Twój adres e-mail.</p>
|
||||
<div class="hr"></div>
|
||||
<div style="display:flex;flex-direction:column;gap:4px;font-size:14px">
|
||||
<div><strong>Numer zgłoszenia:</strong> #{{ $this->submittedTicket->number }}</div>
|
||||
<div><strong>Temat:</strong> {{ $this->submittedTicket->subject }}</div>
|
||||
<div><strong>Kategoria:</strong> {{ $this->submittedTicket->categoryLabel() }}</div>
|
||||
<div><strong>Zgłaszający:</strong> {{ $this->submittedTicket->email }}</div>
|
||||
<div><strong>Status:</strong> <span style="{{ $this->submittedTicket->statusStyle() }}">{{ $this->submittedTicket->statusLabel() }}</span></div>
|
||||
<div><strong>Priorytet:</strong> <span style="{{ $this->submittedTicket->priorityStyle() }}">{{ $this->submittedTicket->priorityLabel() }}</span></div>
|
||||
<div><strong>Data zgłoszenia:</strong> {{ $this->submittedTicket->created_at->format('d.m.Y H:i') }}</div>
|
||||
</div>
|
||||
|
||||
@if ($this->submittedTicket->customer_id)
|
||||
<div class="hr"></div>
|
||||
<p class="text-muted" style="margin:0;font-size:13px">Ten adres e-mail ma już konto w systemie — zaloguj się, aby śledzić postęp zgłoszenia online, otrzymywać powiadomienia w panelu i odpowiadać bezpośrednio w rozmowie.</p>
|
||||
<a href="{{ route('login', ['redirect' => route('client.ticket', $this->submittedTicket)]) }}" wire:navigate class="btn btn-primary" style="align-self:flex-start;text-decoration:none">Zaloguj się i przejdź do zgłoszenia</a>
|
||||
@endif
|
||||
|
||||
<button class="btn btn-secondary" style="align-self:flex-start" wire:click="resetForm">Utwórz kolejne zgłoszenie</button>
|
||||
</div>
|
||||
@else
|
||||
<div style="display:flex;flex-direction:column;gap:8px">
|
||||
<h1 style="margin:0">Jak możemy pomóc?</h1>
|
||||
<p class="text-muted" style="margin:0;font-size:15px">Utwórz zgłoszenie bez logowania — podaj adres e-mail, na który wyślemy aktualizacje.</p>
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:16px 20px">
|
||||
<div class="field" style="margin:0">
|
||||
<label>Adres e-mail</label>
|
||||
<input class="input" type="email" placeholder="ty@firma.pl" wire:model="email">
|
||||
@error('email') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:flex;align-items:flex-start;justify-content:center;padding:4px 8px;gap:0">
|
||||
@foreach (['Dział', 'Kategoria', 'Szczegóły'] as $i => $label)
|
||||
@php $n = $i + 1; @endphp
|
||||
<div style="display:flex;align-items:center;flex:none">
|
||||
<div class="wizard-step" style="display:flex;flex-direction:column;align-items:center;gap:6px">
|
||||
<div style="width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;flex:none;border:1.5px solid {{ $n < $step ? 'var(--color-accent)' : ($n === $step ? 'var(--color-accent)' : 'var(--color-divider)') }};background:{{ $n < $step ? 'var(--color-accent-700)' : 'transparent' }};color:{{ $n < $step ? 'var(--color-accent-100)' : ($n === $step ? 'var(--color-accent)' : 'color-mix(in srgb, var(--color-text) 50%, transparent)') }}">{{ $n }}</div>
|
||||
<div style="font-size:11px;text-align:center;color:{{ $n <= $step ? 'var(--color-text)' : 'color-mix(in srgb, var(--color-text) 50%, transparent)' }}">{{ $label }}</div>
|
||||
</div>
|
||||
@if (! $loop->last)
|
||||
<div class="wizard-connector" style="height:1px;margin:15px 8px 0;background:{{ $n < $step ? 'var(--color-accent)' : 'var(--color-divider)' }}"></div>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@if ($step === 1)
|
||||
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px">
|
||||
@foreach ($this->categories as $category)
|
||||
<div class="card elev-sm" style="padding:20px;gap:10px;cursor:pointer" wire:click="selectCategory({{ $category->id }})">
|
||||
<div style="width:40px;height:40px;border-radius:50%;background:var(--color-accent-700);color:var(--color-accent-100);display:flex;align-items:center;justify-content:center;font-size:16px">{{ mb_strtoupper(mb_substr($category->name, 0, 1)) }}</div>
|
||||
<span class="card-title">{{ $category->name }}</span>
|
||||
<p class="card-body">{{ $category->description }}</p>
|
||||
<span class="card-meta">{{ $category->subcategories->count() }} podkategorie</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@elseif ($step === 2)
|
||||
<div style="display:flex;flex-direction:column;gap:10px">
|
||||
<button type="button" class="btn btn-ghost" style="align-self:flex-start;padding:0" wire:click="backToCategory">← Zmień kategorię</button>
|
||||
@foreach ($this->selectedCategory?->subcategories ?? [] as $sub)
|
||||
<div class="card elev-sm" style="padding:16px;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;cursor:pointer" wire:click="selectSubcategory({{ $sub->id }})">
|
||||
<div>
|
||||
<div style="font-weight:500">{{ $sub->name }}</div>
|
||||
<div class="card-meta">{{ $sub->description }}</div>
|
||||
</div>
|
||||
<span class="text-muted" style="font-size:18px">→</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@elseif ($step === 3)
|
||||
<form wire:submit="submit" class="card elev-md" style="padding:24px;gap:16px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center">
|
||||
<span class="tag tag-outline">{{ $this->selectedCategory?->name }} / {{ $this->selectedSubcategory?->name }}</span>
|
||||
<button type="button" class="btn btn-ghost" style="padding:0" wire:click="backToSubcategory">Zmień</button>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Temat</label>
|
||||
<input class="input" placeholder="Krótki opis problemu" wire:model="subject">
|
||||
@error('subject') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Treść</label>
|
||||
<textarea class="input" placeholder="Opisz problem — im więcej szczegółów, tym szybciej pomożemy" wire:model="body"></textarea>
|
||||
@error('body') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
|
||||
@foreach ($this->selectedSubcategory?->customFields ?? [] as $field)
|
||||
<x-custom-field-input :field="$field" wire-model="customValues" />
|
||||
@endforeach
|
||||
|
||||
<div class="field">
|
||||
<label>Załączniki</label>
|
||||
<div style="border:1px dashed var(--color-divider);border-radius:8px;padding:14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px">
|
||||
<label class="btn btn-secondary" style="cursor:pointer">Wybierz pliki<input type="file" multiple style="display:none" wire:model="attachments"></label>
|
||||
@forelse ($attachments as $i => $file)
|
||||
<span class="text-muted" style="font-size:13px;display:flex;align-items:center;gap:6px">
|
||||
{{ $file->getClientOriginalName() }}
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7" wire:click="removeAttachment({{ $i }})">close</span>
|
||||
</span>
|
||||
@empty
|
||||
<span class="text-muted" style="font-size:13px">Brak plików</span>
|
||||
@endforelse
|
||||
</div>
|
||||
@error('attachments') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block" type="submit">Wyślij zgłoszenie</button>
|
||||
</form>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
102
src/resources/views/livewire/operator/new-ticket.blade.php
Normal file
102
src/resources/views/livewire/operator/new-ticket.blade.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar />
|
||||
|
||||
<div class="page-pad" style="flex:1;padding:28px;display:flex;flex-direction:column;gap:20px;max-width:920px;width:100%;margin:0 auto;box-sizing:border-box">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap">
|
||||
<h2 style="margin:0">Zgłoszenie w imieniu klienta</h2>
|
||||
<a href="{{ route('operator.queue') }}" wire:navigate class="btn btn-ghost">← Wróć do listy</a>
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:16px 20px">
|
||||
<div class="field" style="margin:0">
|
||||
<label>Klient</label>
|
||||
<select class="input" wire:model="customerId">
|
||||
<option value="">Wybierz klienta</option>
|
||||
@foreach ($this->clients as $cl)
|
||||
<option value="{{ $cl->id }}">{{ $cl->name }} ({{ $cl->email }})</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('customerId') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:flex;align-items:flex-start;justify-content:center;padding:4px 8px">
|
||||
@foreach (['Dział', 'Kategoria', 'Szczegóły'] as $i => $label)
|
||||
@php $n = $i + 1; @endphp
|
||||
<div style="display:flex;align-items:center;flex:none">
|
||||
<div class="wizard-step" style="display:flex;flex-direction:column;align-items:center;gap:6px">
|
||||
<div style="width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;flex:none;border:1.5px solid {{ $n <= $step ? 'var(--color-accent)' : 'var(--color-divider)' }};background:{{ $n < $step ? 'var(--color-accent-700)' : 'transparent' }};color:{{ $n < $step ? 'var(--color-accent-100)' : ($n === $step ? 'var(--color-accent)' : 'color-mix(in srgb, var(--color-text) 50%, transparent)') }}">{{ $n }}</div>
|
||||
<div style="font-size:11px;text-align:center">{{ $label }}</div>
|
||||
</div>
|
||||
@if (! $loop->last)
|
||||
<div class="wizard-connector" style="height:1px;margin:15px 8px 0;background:{{ $n < $step ? 'var(--color-accent)' : 'var(--color-divider)' }}"></div>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@if ($step === 1)
|
||||
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px">
|
||||
@foreach ($this->categories as $category)
|
||||
<div class="card elev-sm" style="padding:20px;gap:10px;cursor:pointer" wire:click="selectCategory({{ $category->id }})">
|
||||
<div style="width:40px;height:40px;border-radius:50%;background:var(--color-accent-700);color:var(--color-accent-100);display:flex;align-items:center;justify-content:center;font-size:16px">{{ mb_strtoupper(mb_substr($category->name, 0, 1)) }}</div>
|
||||
<span class="card-title">{{ $category->name }}</span>
|
||||
<p class="card-body">{{ $category->description }}</p>
|
||||
<span class="card-meta">{{ $category->subcategories->count() }} podkategorie</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@elseif ($step === 2)
|
||||
<div style="display:flex;flex-direction:column;gap:10px">
|
||||
<button type="button" class="btn btn-ghost" style="align-self:flex-start;padding:0" wire:click="backToCategory">← Zmień kategorię</button>
|
||||
@foreach ($this->selectedCategory?->subcategories ?? [] as $sub)
|
||||
<div class="card elev-sm" style="padding:16px;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;cursor:pointer" wire:click="selectSubcategory({{ $sub->id }})">
|
||||
<div>
|
||||
<div style="font-weight:500">{{ $sub->name }}</div>
|
||||
<div class="card-meta">{{ $sub->description }}</div>
|
||||
</div>
|
||||
<span class="text-muted" style="font-size:18px">→</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@elseif ($step === 3)
|
||||
<form wire:submit="submit" class="card elev-md" style="padding:24px;gap:16px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center">
|
||||
<span class="tag tag-outline">{{ $this->selectedCategory?->name }} / {{ $this->selectedSubcategory?->name }}</span>
|
||||
<button type="button" class="btn btn-ghost" style="padding:0" wire:click="backToSubcategory">Zmień</button>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Temat</label>
|
||||
<input class="input" wire:model="subject">
|
||||
@error('subject') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Treść</label>
|
||||
<textarea class="input" wire:model="body"></textarea>
|
||||
@error('body') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
|
||||
@foreach ($this->selectedSubcategory?->customFields ?? [] as $field)
|
||||
<x-custom-field-input :field="$field" wire-model="customValues" />
|
||||
@endforeach
|
||||
|
||||
<div class="field">
|
||||
<label>Załączniki</label>
|
||||
<div style="border:1px dashed var(--color-divider);border-radius:8px;padding:14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px">
|
||||
<label class="btn btn-secondary" style="cursor:pointer">Wybierz pliki<input type="file" multiple style="display:none" wire:model="attachments"></label>
|
||||
@forelse ($attachments as $i => $file)
|
||||
<span class="text-muted" style="font-size:13px;display:flex;align-items:center;gap:6px">
|
||||
{{ $file->getClientOriginalName() }}
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7" wire:click="removeAttachment({{ $i }})">close</span>
|
||||
</span>
|
||||
@empty
|
||||
<span class="text-muted" style="font-size:13px">Brak plików</span>
|
||||
@endforelse
|
||||
</div>
|
||||
@error('attachments') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block" type="submit">Utwórz zgłoszenie</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
167
src/resources/views/livewire/operator/queue.blade.php
Normal file
167
src/resources/views/livewire/operator/queue.blade.php
Normal file
@@ -0,0 +1,167 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar />
|
||||
|
||||
<div class="app-split" style="flex:1;display:flex;min-height:0">
|
||||
<div
|
||||
class="side-rail"
|
||||
style="padding:10px;gap:6px;background:color-mix(in srgb, var(--color-text) 5%, var(--color-bg))"
|
||||
x-data="{ collapsed: localStorage.getItem('operatorSidebarCollapsed') === '1' }"
|
||||
x-effect="localStorage.setItem('operatorSidebarCollapsed', collapsed ? '1' : '0')"
|
||||
:class="collapsed ? 'side-rail-collapsed' : ''"
|
||||
>
|
||||
<button type="button" class="side-rail-toggle" @click="collapsed = ! collapsed" :title="collapsed ? 'Rozwiń panel' : 'Zwiń panel'">
|
||||
<span class="material-symbols-outlined" style="font-size:18px" x-text="collapsed ? 'left_panel_open' : 'left_panel_close'"></span>
|
||||
<span class="side-rail-toggle-label" x-text="collapsed ? 'Przegląd' : 'Zwiń panel'"></span>
|
||||
</button>
|
||||
|
||||
<div class="side-rail-scroll">
|
||||
@foreach ($this->queueGroups as $groupLabel => $items)
|
||||
<div style="display:flex;flex-direction:column;gap:1px">
|
||||
<div class="side-rail-group-label" style="font-size:10px;letter-spacing:0.09em;text-transform:uppercase;color:color-mix(in srgb, var(--color-text) 45%, transparent);padding:4px 12px 6px;white-space:nowrap">{{ $groupLabel }}</div>
|
||||
@foreach ($items as $item)
|
||||
<button type="button" class="side-rail-item" wire:click="setQueue('{{ $item['key'] }}')" title="{{ $item['label'] }}" style="display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border-radius:6px;border:none;cursor:pointer;font-size:13.5px;text-align:left;white-space:nowrap;background:{{ $item['active'] ? 'color-mix(in srgb, var(--color-accent) 14%, transparent)' : 'transparent' }};color:{{ $item['active'] ? 'var(--color-accent)' : 'var(--color-text)' }}">
|
||||
<span class="material-symbols-outlined" style="font-size:18px">{{ $item['icon'] }}</span>
|
||||
<span class="side-rail-label">{{ $item['label'] }}</span>
|
||||
<span class="side-rail-count" style="margin-left:auto;font-size:11px;padding:1px 7px;border-radius:10px;background:{{ $item['active'] ? 'color-mix(in srgb, var(--color-accent) 25%, transparent)' : 'color-mix(in srgb, var(--color-text) 12%, transparent)' }};color:{{ $item['active'] ? 'var(--color-accent)' : 'color-mix(in srgb, var(--color-text) 70%, transparent)' }}">{{ $item['count'] }}</span>
|
||||
</button>
|
||||
@endforeach
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-pad" style="flex:1;min-width:0;padding:20px 24px;overflow:auto">
|
||||
<div class="queue-toolbar">
|
||||
@if ($this->filteredCustomer)
|
||||
<button type="button" class="btn btn-ghost" wire:click="clearCustomerFilter">Wyczyść filtr</button>
|
||||
@endif
|
||||
<div class="queue-actions">
|
||||
<div class="queue-actions-pair">
|
||||
<button type="button" class="btn btn-secondary" @disabled(count($selectedIds) < 2) wire:click="mergeSelected">Scal zgłoszenia ({{ count($selectedIds) }})</button>
|
||||
<button type="button" class="btn btn-secondary" @disabled(count($selectedIds) < 1) wire:click="requestDeleteSelected" style="color:var(--color-danger)">Usuń zgłoszenia ({{ count($selectedIds) }})</button>
|
||||
</div>
|
||||
<a href="{{ route('operator.stats') }}" wire:navigate class="btn btn-secondary" style="display:flex;align-items:center;gap:6px">
|
||||
<span class="material-symbols-outlined" style="font-size:18px">bar_chart</span>
|
||||
Statystyki
|
||||
</a>
|
||||
<a href="{{ route('operator.new') }}" wire:navigate class="btn btn-primary">+ Zgłoszenie w imieniu klienta</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$columnDefs = $this->columnDefs();
|
||||
$sortableColumns = $this->sortableColumns();
|
||||
@endphp
|
||||
|
||||
<div class="queue-filters">
|
||||
<input class="input queue-filters-search" type="search" placeholder="Szukaj po numerze, temacie, kliencie…" wire:model.live.debounce.400ms="search">
|
||||
<select class="input" style="width:auto" wire:model.live="filterStatus">
|
||||
<option value="all">Wszystkie statusy</option>
|
||||
@foreach ($this->filterableStatuses as $s)
|
||||
<option value="{{ $s->key }}">{{ $s->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<select class="input" style="width:auto" wire:model.live="filterPriority">
|
||||
<option value="all">Wszystkie priorytety</option>
|
||||
@foreach ($this->priorities as $p)
|
||||
<option value="{{ $p->key }}">{{ $p->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<select class="input" style="width:auto" wire:model.live="filterCategory">
|
||||
<option value="all">Wszystkie kategorie</option>
|
||||
@foreach ($this->categories as $c)
|
||||
<option value="{{ $c->id }}">{{ $c->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<div class="queue-filters-columns" x-data="{ open: false }">
|
||||
<button type="button" class="btn btn-secondary" @click="open = ! open" style="display:flex;align-items:center;justify-content:center;gap:6px">
|
||||
<span class="material-symbols-outlined" style="font-size:18px">view_column</span>
|
||||
Kolumny
|
||||
</button>
|
||||
<div x-show="open" x-cloak @click.outside="open = false" style="position:absolute;top:100%;right:0;margin-top:4px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:8px;box-shadow:var(--shadow-md);z-index:30;padding:6px;min-width:180px">
|
||||
@foreach ($columnDefs as $key => $label)
|
||||
<label style="display:flex;align-items:center;gap:8px;font-size:13px;font-weight:400;padding:6px 8px;border-radius:5px;cursor:pointer">
|
||||
<input type="checkbox" @checked(in_array($key, $visibleColumns)) wire:click="toggleColumn('{{ $key }}')">
|
||||
{{ $label }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrap">
|
||||
<table class="table table-cards-mobile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
@foreach ($columnDefs as $key => $label)
|
||||
@continue(! in_array($key, $visibleColumns))
|
||||
<th>
|
||||
@if (in_array($key, $sortableColumns))
|
||||
<button type="button" wire:click="sortByColumn('{{ $key }}')" style="display:inline-flex;align-items:center;gap:2px;background:none;border:none;cursor:pointer;padding:0;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit">
|
||||
{{ $label }}
|
||||
@if ($sortBy === $key)
|
||||
<span class="material-symbols-outlined" style="font-size:15px">{{ $sortDir === 'asc' ? 'arrow_upward' : 'arrow_downward' }}</span>
|
||||
@endif
|
||||
</button>
|
||||
@else
|
||||
{{ $label }}
|
||||
@endif
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($this->filteredTickets as $t)
|
||||
@php $sla = $t->slaInfo(); @endphp
|
||||
<tr>
|
||||
<td class="td-select"><input type="checkbox" @checked(in_array($t->id, $selectedIds)) wire:click="toggleSelect({{ $t->id }})"></td>
|
||||
@if (in_array('number', $visibleColumns))
|
||||
<td data-label="Numer" class="td-title"><a href="{{ route('operator.ticket', $t) }}" wire:navigate style="color:inherit;text-decoration:none;cursor:pointer">{{ $t->number }}</a></td>
|
||||
@endif
|
||||
@if (in_array('subject', $visibleColumns))
|
||||
<td data-label="Temat" class="td-title"><a href="{{ route('operator.ticket', $t) }}" wire:navigate style="color:inherit;text-decoration:none;cursor:pointer;white-space:nowrap">{{ $t->subject }}</a></td>
|
||||
@endif
|
||||
@if (in_array('customer', $visibleColumns))
|
||||
<td data-label="Klient" style="white-space:nowrap">{{ $t->name }}</td>
|
||||
@endif
|
||||
@if (in_array('category', $visibleColumns))
|
||||
<td data-label="Kategoria" style="white-space:nowrap">{{ $t->categoryLabel() }}</td>
|
||||
@endif
|
||||
@if (in_array('priority', $visibleColumns))
|
||||
<td data-label="Priorytet"><span style="{{ $t->priorityStyle() }}">{{ $t->priorityLabel() }}</span></td>
|
||||
@endif
|
||||
@if (in_array('status', $visibleColumns))
|
||||
<td data-label="Status"><span style="{{ $t->statusStyle() }}">{{ $t->statusLabel() }}</span></td>
|
||||
@endif
|
||||
@if (in_array('sla', $visibleColumns))
|
||||
<td data-label="SLA"><span class="{{ $sla['cls'] }}">{{ $sla['short'] }}</span></td>
|
||||
@endif
|
||||
@if (in_array('assignee', $visibleColumns))
|
||||
<td data-label="Przypisany" style="white-space:nowrap">{{ $t->assignee?->name ?? 'Nieprzypisane' }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($pendingDeleteSelected)
|
||||
<div class="dialog-backdrop">
|
||||
<div class="dialog" style="max-width:400px">
|
||||
<div class="dialog-title">Potwierdź usunięcie</div>
|
||||
<div class="dialog-body">
|
||||
{{ count($selectedIds) === 1 ? 'Wybrane zgłoszenie zostanie trwale usunięte.' : 'Wybrane zgłoszenia ('.count($selectedIds).') zostaną trwale usunięte.' }}
|
||||
</div>
|
||||
<div class="dialog-actions">
|
||||
<button class="btn btn-secondary" wire:click="cancelDeleteSelected">Anuluj</button>
|
||||
<button class="btn btn-primary" wire:click="confirmDeleteSelected">Usuń</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
217
src/resources/views/livewire/operator/stats.blade.php
Normal file
217
src/resources/views/livewire/operator/stats.blade.php
Normal file
@@ -0,0 +1,217 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar />
|
||||
|
||||
<div class="page-pad" style="flex:1;padding:20px 24px;overflow:auto;display:flex;flex-direction:column;gap:20px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap">
|
||||
<h2 style="margin:0">Statystyki</h2>
|
||||
<a href="{{ route('operator.queue') }}" wire:navigate class="btn btn-ghost">← Wróć do listy</a>
|
||||
</div>
|
||||
|
||||
{{-- Filters --}}
|
||||
<div class="card" style="padding:14px 16px;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:center">
|
||||
<select class="input" style="width:auto" wire:model.live="range">
|
||||
<option value="today">Dziś</option>
|
||||
<option value="7d">Ostatnie 7 dni</option>
|
||||
<option value="30d">Ostatnie 30 dni</option>
|
||||
<option value="90d">Ostatnie 90 dni</option>
|
||||
<option value="all">Cały okres</option>
|
||||
<option value="custom">Zakres niestandardowy</option>
|
||||
</select>
|
||||
|
||||
@if ($range === 'custom')
|
||||
<input type="date" class="input" style="width:auto" wire:model.live="from">
|
||||
<span style="color:color-mix(in srgb, var(--color-text) 50%, transparent)">–</span>
|
||||
<input type="date" class="input" style="width:auto" wire:model.live="to">
|
||||
@endif
|
||||
|
||||
<select class="input" style="width:auto" wire:model.live="filterTeam">
|
||||
<option value="all">Wszystkie zespoły</option>
|
||||
@foreach ($this->teams as $t)
|
||||
<option value="{{ $t->id }}">{{ $t->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<select class="input" style="width:auto" wire:model.live="filterPriority">
|
||||
<option value="all">Wszystkie priorytety</option>
|
||||
@foreach ($this->priorities as $p)
|
||||
<option value="{{ $p->key }}">{{ $p->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<select class="input" style="width:auto" wire:model.live="filterCategory">
|
||||
<option value="all">Wszystkie kategorie</option>
|
||||
@foreach ($this->categories as $c)
|
||||
<option value="{{ $c->id }}">{{ $c->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<select class="input" style="width:auto" wire:model.live="filterAssignee">
|
||||
<option value="all">Wszyscy operatorzy</option>
|
||||
<option value="unassigned">Nieprzypisane</option>
|
||||
@foreach ($this->operators as $u)
|
||||
<option value="{{ $u->id }}">{{ $u->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{-- KPI tiles --}}
|
||||
@php($kpis = $this->kpis)
|
||||
<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(160px, 1fr));gap:12px">
|
||||
<div class="stat-tile">
|
||||
<div class="stat-tile-label">Łącznie zgłoszeń</div>
|
||||
<div class="stat-tile-value">{{ $kpis['total'] }}</div>
|
||||
</div>
|
||||
<div class="stat-tile">
|
||||
<div class="stat-tile-label">Otwarte</div>
|
||||
<div class="stat-tile-value">{{ $kpis['open'] }}</div>
|
||||
</div>
|
||||
<div class="stat-tile">
|
||||
<div class="stat-tile-label">Zamknięte</div>
|
||||
<div class="stat-tile-value">{{ $kpis['closed'] }}</div>
|
||||
<div class="stat-tile-meta">{{ $kpis['closedPct'] !== null ? $kpis['closedPct'].'% wszystkich' : 'Brak danych' }}</div>
|
||||
</div>
|
||||
<div class="stat-tile">
|
||||
<div class="stat-tile-label">Śr. czas 1. odpowiedzi</div>
|
||||
<div class="stat-tile-value">{{ $kpis['avgFirstResponseHours'] !== null ? $kpis['avgFirstResponseHours'].' godz.' : '—' }}</div>
|
||||
</div>
|
||||
<div class="stat-tile">
|
||||
<div class="stat-tile-label">Śr. czas rozwiązania</div>
|
||||
<div class="stat-tile-value">{{ $kpis['avgResolutionHours'] !== null ? $kpis['avgResolutionHours'].' godz.' : '—' }}</div>
|
||||
</div>
|
||||
<div class="stat-tile">
|
||||
<div class="stat-tile-label">Naruszenia SLA</div>
|
||||
<div class="stat-tile-value" style="{{ ($kpis['sla']['rate'] ?? 0) > 0 ? 'color:var(--color-danger)' : '' }}">
|
||||
{{ $kpis['sla']['rate'] !== null ? $kpis['sla']['rate'].'%' : '—' }}
|
||||
</div>
|
||||
<div class="stat-tile-meta">{{ $kpis['sla']['breached'] }} / {{ $kpis['sla']['total'] }} zgłoszeń</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(340px, 1fr));gap:16px;align-items:start">
|
||||
{{-- By status --}}
|
||||
<div class="card" style="padding:16px">
|
||||
<div class="card-title" style="margin-bottom:12px">Zgłoszenia wg statusu</div>
|
||||
@php($max = max($this->byStatus->max('count'), 1))
|
||||
@forelse ($this->byStatus as $row)
|
||||
<div class="bar-row" title="{{ $row['label'] }}: {{ $row['count'] }}">
|
||||
<div class="bar-row-label">{{ $row['label'] }}</div>
|
||||
<div class="bar-track"><div class="bar-fill" style="width:{{ $row['count'] / $max * 100 }}%;background:{{ $row['color'] }}"></div></div>
|
||||
<div class="bar-row-value">{{ $row['count'] }}</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="card-meta">Brak danych w wybranym okresie.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
{{-- By priority --}}
|
||||
<div class="card" style="padding:16px">
|
||||
<div class="card-title" style="margin-bottom:12px">Zgłoszenia wg priorytetu</div>
|
||||
@php($max = max($this->byPriority->max('count'), 1))
|
||||
@forelse ($this->byPriority as $row)
|
||||
<div class="bar-row" title="{{ $row['label'] }}: {{ $row['count'] }}">
|
||||
<div class="bar-row-label">{{ $row['label'] }}</div>
|
||||
<div class="bar-track"><div class="bar-fill" style="width:{{ $row['count'] / $max * 100 }}%;background:{{ $row['color'] }}"></div></div>
|
||||
<div class="bar-row-value">{{ $row['count'] }}</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="card-meta">Brak danych w wybranym okresie.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
{{-- By category --}}
|
||||
<div class="card" style="padding:16px">
|
||||
<div class="card-title" style="margin-bottom:12px">Zgłoszenia wg kategorii</div>
|
||||
@php($cats = $this->byCategory)
|
||||
@php($max = max($cats->max('count') ?? 0, 1))
|
||||
@forelse ($cats as $row)
|
||||
<div class="bar-row" title="{{ $row['label'] }}: {{ $row['count'] }}">
|
||||
<div class="bar-row-label">{{ $row['label'] }}</div>
|
||||
<div class="bar-track"><div class="bar-fill" style="width:{{ $row['count'] / $max * 100 }}%;background:var(--color-accent)"></div></div>
|
||||
<div class="bar-row-value">{{ $row['count'] }}</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="card-meta">Brak danych w wybranym okresie.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
{{-- By team --}}
|
||||
<div class="card" style="padding:16px">
|
||||
<div class="card-title" style="margin-bottom:12px">Obciążenie zespołów</div>
|
||||
@php($teamRows = $this->byTeam)
|
||||
@php($max = max($teamRows->max('count') ?? 0, 1))
|
||||
@forelse ($teamRows as $row)
|
||||
<div class="bar-row" title="{{ $row['label'] }}: {{ $row['count'] }}">
|
||||
<div class="bar-row-label">{{ $row['label'] }}</div>
|
||||
<div class="bar-track"><div class="bar-fill" style="width:{{ $row['count'] / $max * 100 }}%;background:var(--color-accent-2)"></div></div>
|
||||
<div class="bar-row-value">{{ $row['count'] }}</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="card-meta">Brak danych w wybranym okresie.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
{{-- By assignee --}}
|
||||
<div class="card" style="padding:16px">
|
||||
<div class="card-title" style="margin-bottom:12px">Obciążenie operatorów</div>
|
||||
@php($opRows = $this->byAssignee)
|
||||
@php($max = max($opRows->max('count') ?? 0, 1))
|
||||
@forelse ($opRows as $row)
|
||||
<div class="bar-row" title="{{ $row['label'] }}: {{ $row['count'] }}">
|
||||
<div class="bar-row-label">{{ $row['label'] }}</div>
|
||||
<div class="bar-track"><div class="bar-fill" style="width:{{ $row['count'] / $max * 100 }}%;background:var(--color-accent-2)"></div></div>
|
||||
<div class="bar-row-value">{{ $row['count'] }}</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="card-meta">Brak danych w wybranym okresie.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Trend --}}
|
||||
@php($trend = $this->trend)
|
||||
@php($trendMax = max(collect($trend)->max('created'), collect($trend)->max('closed'), 1))
|
||||
@php($labelStep = max((int) ceil(count($trend) / 12), 1))
|
||||
<div class="card" style="padding:16px">
|
||||
<div class="card-title">Trend zgłoszeń</div>
|
||||
<div class="card-meta" style="margin-bottom:12px">Utworzone i zamknięte w czasie (maks. ostatnie 60 dni okresu).</div>
|
||||
|
||||
@if (count($trend) === 0)
|
||||
<div class="card-meta">Brak danych w wybranym okresie.</div>
|
||||
@else
|
||||
<div style="display:flex;flex-direction:column;gap:18px">
|
||||
<div class="trend-chart">
|
||||
<div class="card-meta" style="margin-bottom:2px">Nowe zgłoszenia</div>
|
||||
<div class="trend-cols">
|
||||
@foreach ($trend as $day)
|
||||
<div class="trend-col-track" title="{{ $day['label'] }}: {{ $day['created'] }}">
|
||||
<div class="trend-col" style="height:{{ $day['created'] / $trendMax * 100 }}%;background:var(--color-accent)"></div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="trend-x-labels">
|
||||
@foreach ($trend as $i => $day)
|
||||
<div class="trend-x-label">{{ $i % $labelStep === 0 ? $day['label'] : '' }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="trend-chart">
|
||||
<div class="card-meta" style="margin-bottom:2px">Zamknięte zgłoszenia</div>
|
||||
<div class="trend-cols">
|
||||
@foreach ($trend as $day)
|
||||
<div class="trend-col-track" title="{{ $day['label'] }}: {{ $day['closed'] }}">
|
||||
<div class="trend-col" style="height:{{ $day['closed'] / $trendMax * 100 }}%;background:{{ $this->closedColor }}"></div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="trend-x-labels">
|
||||
@foreach ($trend as $i => $day)
|
||||
<div class="trend-x-label">{{ $i % $labelStep === 0 ? $day['label'] : '' }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
401
src/resources/views/livewire/operator/ticket-show.blade.php
Normal file
401
src/resources/views/livewire/operator/ticket-show.blade.php
Normal file
@@ -0,0 +1,401 @@
|
||||
<div style="flex:1;display:flex;flex-direction:column">
|
||||
<x-topbar />
|
||||
|
||||
<div class="page-pad" style="flex:1;padding:20px 24px;overflow:auto">
|
||||
<div style="display:flex;flex-direction:column;gap:16px;max-width:1020px;margin:0 auto">
|
||||
<a href="{{ route('operator.queue') }}" wire:navigate class="btn btn-ghost" style="align-self:flex-start;padding:0">← Wróć do listy</a>
|
||||
|
||||
<div style="display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap">
|
||||
<div class="main-col" style="display:flex;flex-direction:column;gap:16px">
|
||||
<div class="card" style="padding:20px;gap:8px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:8px">
|
||||
<div class="card-kicker">Zgłoszenie #{{ $ticket->number }}</div>
|
||||
@unless ($editingDetails)
|
||||
<button type="button" class="btn btn-ghost" style="padding:0" wire:click="toggleEditDetails">Edytuj</button>
|
||||
@endunless
|
||||
</div>
|
||||
|
||||
@unless ($editingDetails)
|
||||
<h3 style="margin:2px 0 0">{{ $ticket->subject }}</h3>
|
||||
<div class="card-meta">{{ $ticket->categoryLabel() }}</div>
|
||||
<div style="white-space:pre-wrap;font-size:14px;margin-top:4px">{{ $ticket->body }}</div>
|
||||
@foreach ($this->publicMessages->first()?->attachments ?? [] as $a)
|
||||
<x-message-attachment :attachment="$a" />
|
||||
@endforeach
|
||||
@if (count($ticket->customFieldEntries()))
|
||||
<div style="display:flex;flex-direction:column;gap:2px;margin-top:2px">
|
||||
@foreach ($ticket->customFieldEntries() as $cf)
|
||||
<div style="font-size:14px"><strong>{{ $cf['label'] }}:</strong> {{ $cf['value'] }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<div class="field"><label>Temat</label><input class="input" wire:model="editDetailsForm.subject"></div>
|
||||
<div class="field"><label>Treść</label><textarea class="input" wire:model="editDetailsForm.body"></textarea></div>
|
||||
<div style="display:flex;gap:10px">
|
||||
<div class="field" style="flex:1">
|
||||
<label>Kategoria</label>
|
||||
<select class="input" wire:model.live="editDetailsForm.categoryId">
|
||||
<option value="">Wybierz</option>
|
||||
@foreach ($this->categories as $c)
|
||||
<option value="{{ $c->id }}">{{ $c->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="field" style="flex:1">
|
||||
<label>Podkategoria</label>
|
||||
<select class="input" wire:model.live="editDetailsForm.subcategoryId" @disabled(! $editDetailsForm['categoryId'])>
|
||||
<option value="">Wybierz</option>
|
||||
@foreach ($this->editDetailsSubcategoryOptions as $s)
|
||||
<option value="{{ $s->id }}">{{ $s->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($this->editDetailsSelectedSubcategory?->customFields ?? [] as $field)
|
||||
<x-custom-field-input :field="$field" wire-model="editDetailsForm.customValues" />
|
||||
@endforeach
|
||||
|
||||
<div style="display:flex;gap:8px;margin-top:6px">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelEditDetails">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="saveDetails">Zapisz</button>
|
||||
</div>
|
||||
@endunless
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:16px;gap:10px">
|
||||
<div class="card-kicker">Notatki wewnętrzne</div>
|
||||
@forelse ($this->internalMessages as $m)
|
||||
<div style="padding:10px 12px;border-left:3px solid var(--color-accent);background:var(--color-surface);border-radius:4px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:8px">
|
||||
<div style="font-size:11px;opacity:0.65;margin-bottom:4px">{{ $m->author_name }} · {{ \App\Support\Rel::format($m->created_at) }}</div>
|
||||
@if ($m->role === 'operator')
|
||||
<div style="display:flex;gap:6px;flex:none">
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7" wire:click="startEditNote({{ $m->id }}, @js($m->body))">edit</span>
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7" wire:click="requestDeleteMessage({{ $m->id }})">delete</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@if ($editingNoteId === $m->id)
|
||||
<textarea class="input" wire:model="editingNoteDraft"></textarea>
|
||||
<div style="display:flex;gap:8px;margin-top:6px">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelEditNote">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="saveEditNote">Zapisz</button>
|
||||
</div>
|
||||
@else
|
||||
<div style="white-space:pre-wrap">{{ $m->body }}</div>
|
||||
@endif
|
||||
@foreach ($m->attachments as $a)
|
||||
<x-message-attachment :attachment="$a" />
|
||||
@endforeach
|
||||
</div>
|
||||
@empty
|
||||
<p class="text-muted" style="font-size:13px;margin:0">Brak notatek wewnętrznych.</p>
|
||||
@endforelse
|
||||
@if ($addingNote)
|
||||
<textarea class="input" placeholder="Dodaj notatkę widoczną tylko dla zespołu…" wire:model="noteDraft"></textarea>
|
||||
<div style="display:flex;align-items:center;gap:10px">
|
||||
<div style="flex:1;min-width:0;border:1px dashed var(--color-divider);border-radius:8px;padding:10px 14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px">
|
||||
<label class="btn btn-secondary" style="cursor:pointer;flex:none">Załącz pliki<input type="file" multiple style="display:none" wire:model="noteAttachments"></label>
|
||||
@forelse ($noteAttachments as $i => $file)
|
||||
<span class="text-muted" style="font-size:13px;display:flex;align-items:center;gap:6px;min-width:0">
|
||||
<span class="material-symbols-outlined" style="font-size:16px;flex:none">attach_file</span>
|
||||
<span style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{{ $file->getClientOriginalName() }}</span>
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7;flex:none" wire:click="removeNoteAttachment({{ $i }})">close</span>
|
||||
</span>
|
||||
@empty
|
||||
<span class="text-muted" style="font-size:13px">Brak załączników</span>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
@error('noteAttachments') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
<div style="display:flex;gap:8px">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelAddNote">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="addNote">Dodaj notatkę</button>
|
||||
</div>
|
||||
@else
|
||||
<button type="button" class="btn btn-secondary" wire:click="startAddNote">Dodaj notatkę</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@php $threadMessages = $this->publicMessages->skip(1); @endphp
|
||||
<div style="display:flex;flex-direction:column;gap:10px">
|
||||
@foreach ($threadMessages as $m)
|
||||
@php $mine = $m->role === 'operator'; @endphp
|
||||
<div style="display:flex;justify-content:{{ $mine ? 'flex-end' : 'flex-start' }}">
|
||||
<div style="max-width:75%;padding:10px 14px;border-radius:12px;font-size:14px;background:{{ $mine ? 'var(--color-accent-800)' : 'var(--color-surface)' }};color:{{ $mine ? 'var(--color-accent-100)' : 'var(--color-text)' }};border:1px solid var(--color-divider)">
|
||||
<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:10px">
|
||||
<div style="font-size:11px;opacity:0.65;margin-bottom:4px">{{ $m->author_name }} · {{ \App\Support\Rel::format($m->created_at) }}{{ $m->edited ? ' · edytowano' : '' }}</div>
|
||||
@if ($m->role === 'operator')
|
||||
<div style="display:flex;gap:6px;flex:none">
|
||||
<span class="material-symbols-outlined" style="font-size:15px;cursor:pointer;opacity:0.7" wire:click="startEditMessage({{ $m->id }}, @js($m->body))">edit</span>
|
||||
<span class="material-symbols-outlined" style="font-size:15px;cursor:pointer;opacity:0.7" wire:click="requestDeleteMessage({{ $m->id }})">delete</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@if ($editingMessageId === $m->id)
|
||||
<textarea class="input" wire:model="editingMessageDraft"></textarea>
|
||||
<div style="display:flex;gap:8px;margin-top:6px">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelEditMessage">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="saveEditMessage">Zapisz</button>
|
||||
</div>
|
||||
@else
|
||||
<div style="white-space:pre-wrap">{{ $m->body }}</div>
|
||||
@endif
|
||||
@foreach ($m->attachments as $a)
|
||||
<x-message-attachment :attachment="$a" />
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<form wire:submit="sendReply" class="card" style="padding:16px;gap:10px">
|
||||
<select class="input" wire:change="setTemplate($event.target.value)">
|
||||
<option value="">Wstaw szablon odpowiedzi…</option>
|
||||
@foreach ($this->responseTemplates as $rt)
|
||||
<option value="{{ $rt->id }}" @selected($templateId === (string) $rt->id)>{{ $rt->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<textarea class="input" placeholder="Napisz odpowiedź do klienta…" wire:model="reply"></textarea>
|
||||
<div style="display:flex;align-items:center;gap:10px">
|
||||
<div style="flex:1;min-width:0;border:1px dashed var(--color-divider);border-radius:8px;padding:10px 14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px">
|
||||
<label class="btn btn-secondary" style="cursor:pointer;flex:none">Załącz pliki<input type="file" multiple style="display:none" wire:model="replyAttachments"></label>
|
||||
@forelse ($replyAttachments as $i => $file)
|
||||
<span class="text-muted" style="font-size:13px;display:flex;align-items:center;gap:6px;min-width:0">
|
||||
<span class="material-symbols-outlined" style="font-size:16px;flex:none">attach_file</span>
|
||||
<span style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{{ $file->getClientOriginalName() }}</span>
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7;flex:none" wire:click="removeReplyAttachment({{ $i }})">close</span>
|
||||
</span>
|
||||
@empty
|
||||
<span class="text-muted" style="font-size:13px">Brak załączników</span>
|
||||
@endforelse
|
||||
</div>
|
||||
<div style="display:flex;position:relative;flex:none" x-data="{ open: false }" @click.outside="open = false">
|
||||
<button class="btn btn-primary" style="border-top-right-radius:0;border-bottom-right-radius:0" type="submit">Wyślij odpowiedź</button>
|
||||
<button class="btn btn-primary" type="button" style="border-top-left-radius:0;border-bottom-left-radius:0;border-left:1px solid var(--color-bg);padding:0 6px" @click="open = !open">
|
||||
<span class="material-symbols-outlined" style="font-size:16px">expand_more</span>
|
||||
</button>
|
||||
<div x-show="open" x-cloak style="position:absolute;bottom:100%;right:0;margin-bottom:6px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:8px;box-shadow:var(--shadow-md);min-width:220px;overflow:hidden;z-index:10">
|
||||
@forelse ($this->replyQuickActions as $qa)
|
||||
<button type="button" class="theme-toggle-option" @click="open = false" wire:click="sendAndTransition({{ $qa->id }})">{{ $qa->label }}</button>
|
||||
@empty
|
||||
<div class="text-muted" style="font-size:12.5px;padding:8px 12px">Brak skonfigurowanych szybkich akcji.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@error('replyAttachments') <span style="color:var(--color-danger);font-size:12px">{{ $message }}</span> @enderror
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="aside-col" style="display:flex;flex-direction:column;gap:14px">
|
||||
<div class="card" style="padding:16px;gap:6px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:8px">
|
||||
<div class="card-kicker">Zgłaszający</div>
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7" wire:click="startEditReporter">edit</span>
|
||||
</div>
|
||||
<div style="font-weight:500">{{ $ticket->name }}</div>
|
||||
<div class="text-muted" style="font-size:13px">{{ $ticket->email }}</div>
|
||||
@if ($ticket->customer_id)
|
||||
<a href="{{ route('operator.queue', ['filterCustomerId' => $ticket->customer_id]) }}" wire:navigate class="text-muted" style="font-size:12px;color:var(--color-accent);text-decoration:none">Zobacz zgłoszenia tej osoby →</a>
|
||||
@php $reporterFields = $ticket->customer?->customFieldEntries() ?? []; @endphp
|
||||
@if (count($reporterFields))
|
||||
<div style="display:flex;flex-direction:column;gap:2px;margin-top:6px;padding-top:8px;border-top:1px solid var(--color-divider)">
|
||||
@foreach ($reporterFields as $cf)
|
||||
<div class="card-meta"><strong>{{ $cf['label'] }}:</strong> {{ $cf['value'] }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($editingReporter)
|
||||
<div class="card" style="padding:16px;gap:10px">
|
||||
<div class="field">
|
||||
<label>Zmień zgłaszającego</label>
|
||||
<select class="input" wire:model="editReporterCustomerId">
|
||||
<option value="">Wybierz klienta</option>
|
||||
@foreach ($this->clients as $cl)
|
||||
<option value="{{ $cl->id }}">{{ $cl->name }} — {{ $cl->email }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div style="display:flex;gap:8px">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelEditReporter">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="saveReporter">Zapisz</button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card" style="padding:16px;gap:10px">
|
||||
<div class="card-kicker">Status i przypisanie</div>
|
||||
<div class="field">
|
||||
<label>Status</label>
|
||||
<select class="input" wire:change="setStatus($event.target.value)">
|
||||
@foreach ($this->statuses as $s)
|
||||
<option value="{{ $s->key }}" @selected($ticket->status_key === $s->key)>{{ $s->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Priorytet</label>
|
||||
<select class="input" wire:change="setPriority($event.target.value)">
|
||||
@foreach ($this->priorities as $p)
|
||||
<option value="{{ $p->key }}" @selected($ticket->priority_key === $p->key)>{{ $p->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Zespół</label>
|
||||
<select class="input" wire:change="setTeam($event.target.value)">
|
||||
<option value="">Brak</option>
|
||||
@foreach ($this->teams as $tm)
|
||||
<option value="{{ $tm->id }}" @selected($ticket->team_id === $tm->id)>{{ $tm->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Przypisany do</label>
|
||||
<div style="display:flex;gap:6px">
|
||||
<select class="input" wire:change="setAssignee($event.target.value)" style="flex:1">
|
||||
<option value="">Nieprzypisane</option>
|
||||
@foreach ($this->operators as $o)
|
||||
<option value="{{ $o->id }}" @selected($ticket->assignee_id === $o->id)>{{ $o->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@if ($ticket->assignee_id !== auth()->id())
|
||||
<button type="button" class="btn btn-secondary" style="flex:none" wire:click="assignToMe">Przypisz do mnie</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:16px;gap:8px">
|
||||
<div class="card-kicker">SLA</div>
|
||||
<div style="font-size:12.5px">{{ $ticket->slaInfo()['text'] }}</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:16px;gap:8px">
|
||||
<div class="card-kicker">MONITOR CZASU PRACY</div>
|
||||
<div
|
||||
style="display:flex;flex-direction:column;gap:6px"
|
||||
x-data="{
|
||||
seconds: {{ $ticket->timerElapsedSeconds() }},
|
||||
running: @js((bool) $ticket->timer_started_at),
|
||||
tick: null,
|
||||
navigatingHandler: null,
|
||||
pagehideHandler: null,
|
||||
format() {
|
||||
const h = Math.floor(this.seconds / 3600);
|
||||
const m = Math.floor((this.seconds % 3600) / 60);
|
||||
const s = this.seconds % 60;
|
||||
return [h, m, s].map(n => String(n).padStart(2, '0')).join(':');
|
||||
},
|
||||
start() {
|
||||
clearInterval(this.tick);
|
||||
if (this.running) {
|
||||
this.tick = setInterval(() => { this.seconds++ }, 1000);
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.start();
|
||||
|
||||
// The timer only tracks time this ticket is actually open in
|
||||
// the browser: stop it server-side the moment the operator
|
||||
// navigates elsewhere in the app (wire:navigate — a normal
|
||||
// Livewire call, since the document itself isn't unloading)…
|
||||
this.navigatingHandler = () => {
|
||||
if (this.running) $wire.call('stopTimer');
|
||||
};
|
||||
document.addEventListener('livewire:navigating', this.navigatingHandler);
|
||||
|
||||
// …or closes/reloads the tab. Regular fetch/Livewire calls
|
||||
// can get cut off mid-flight during an actual page unload, so
|
||||
// this uses sendBeacon against a plain endpoint instead, which
|
||||
// browsers guarantee to deliver.
|
||||
this.pagehideHandler = () => {
|
||||
if (this.running) {
|
||||
navigator.sendBeacon(@js(route('operator.ticket.stop-timer', $ticket)));
|
||||
}
|
||||
};
|
||||
window.addEventListener('pagehide', this.pagehideHandler);
|
||||
},
|
||||
destroy() {
|
||||
clearInterval(this.tick);
|
||||
document.removeEventListener('livewire:navigating', this.navigatingHandler);
|
||||
window.removeEventListener('pagehide', this.pagehideHandler);
|
||||
},
|
||||
}"
|
||||
>
|
||||
@if ($editingTimer)
|
||||
<div style="display:flex;align-items:center;gap:4px;font-size:12px">
|
||||
<input class="input" type="number" min="0" style="width:60px" wire:model="editTimerHours"> godz.
|
||||
<input class="input" type="number" min="0" max="59" style="width:52px" wire:model="editTimerMinutes"> min.
|
||||
<input class="input" type="number" min="0" max="59" style="width:52px" wire:model="editTimerSeconds"> sek.
|
||||
</div>
|
||||
<div style="display:flex;gap:6px">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelEditTimer">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="saveEditTimer">Zapisz</button>
|
||||
</div>
|
||||
@else
|
||||
<div style="font-size:12px;display:flex;align-items:center;gap:6px">
|
||||
<span>Czas w zgłoszeniu: <strong x-text="format()"></strong></span>
|
||||
<span class="material-symbols-outlined" style="font-size:16px;cursor:pointer;opacity:0.7" wire:click="startEditTimer">edit</span>
|
||||
</div>
|
||||
<div style="display:flex;gap:6px">
|
||||
@if ($ticket->timer_started_at)
|
||||
<button type="button" class="btn btn-secondary" wire:click="stopTimer" @click="running = false; clearInterval(tick)">Zatrzymaj</button>
|
||||
@else
|
||||
<button type="button" class="btn btn-secondary" wire:click="resumeTimer" @click="running = true; start()">Wznów</button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-secondary" wire:click="resetTimer" @click="seconds = 0; running = false; clearInterval(tick)">Resetuj</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:16px;gap:8px">
|
||||
<div class="card-kicker">Historia zmian</div>
|
||||
@forelse ($ticket->histories as $h)
|
||||
<div style="font-size:12.5px"><span>{{ $h->text }}</span><div class="text-muted" style="font-size:11px">{{ \App\Support\Rel::format($h->created_at) }}</div></div>
|
||||
@empty
|
||||
<p class="text-muted" style="font-size:12px;margin:0">Brak historii zmian.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:16px;gap:8px">
|
||||
<button type="button" class="btn btn-secondary btn-block" wire:click="requestDeleteTicket">Usuń zgłoszenie</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($pendingDeleteMessageId)
|
||||
<div class="dialog-backdrop">
|
||||
<div class="dialog" style="max-width:400px">
|
||||
<div class="dialog-title">Potwierdź usunięcie</div>
|
||||
<div class="dialog-body">Czy na pewno usunąć tę wiadomość?</div>
|
||||
<div class="dialog-actions">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelDeleteMessage">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="confirmDeleteMessage">Usuń</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($pendingDeleteTicket)
|
||||
<div class="dialog-backdrop">
|
||||
<div class="dialog" style="max-width:400px">
|
||||
<div class="dialog-title">Potwierdź usunięcie</div>
|
||||
<div class="dialog-body">Czy na pewno usunąć zgłoszenie #{{ $ticket->number }}?</div>
|
||||
<div class="dialog-actions">
|
||||
<button type="button" class="btn btn-secondary" wire:click="cancelDeleteTicket">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary" wire:click="confirmDeleteTicket">Usuń</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
0
src/resources/views/vendor/l5-swagger/.gitkeep
vendored
Normal file
0
src/resources/views/vendor/l5-swagger/.gitkeep
vendored
Normal file
174
src/resources/views/vendor/l5-swagger/index.blade.php
vendored
Normal file
174
src/resources/views/vendor/l5-swagger/index.blade.php
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ $documentationTitle }}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ l5_swagger_asset($documentation, 'swagger-ui.css') }}">
|
||||
<link rel="icon" type="image/png" href="{{ l5_swagger_asset($documentation, 'favicon-32x32.png') }}" sizes="32x32"/>
|
||||
<link rel="icon" type="image/png" href="{{ l5_swagger_asset($documentation, 'favicon-16x16.png') }}" sizes="16x16"/>
|
||||
<style>
|
||||
html
|
||||
{
|
||||
box-sizing: border-box;
|
||||
overflow: -moz-scrollbars-vertical;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
*,
|
||||
*:before,
|
||||
*:after
|
||||
{
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
margin:0;
|
||||
background: #fafafa;
|
||||
}
|
||||
</style>
|
||||
@if(config('l5-swagger.defaults.ui.display.dark_mode'))
|
||||
<style>
|
||||
body#dark-mode,
|
||||
#dark-mode .scheme-container {
|
||||
background: #1b1b1b;
|
||||
}
|
||||
#dark-mode .scheme-container,
|
||||
#dark-mode .opblock .opblock-section-header{
|
||||
box-shadow: 0 1px 2px 0 rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
#dark-mode .operation-filter-input,
|
||||
#dark-mode .dialog-ux .modal-ux,
|
||||
#dark-mode input[type=email],
|
||||
#dark-mode input[type=file],
|
||||
#dark-mode input[type=password],
|
||||
#dark-mode input[type=search],
|
||||
#dark-mode input[type=text],
|
||||
#dark-mode textarea{
|
||||
background: #343434;
|
||||
color: #e7e7e7;
|
||||
}
|
||||
#dark-mode .title,
|
||||
#dark-mode li,
|
||||
#dark-mode p,
|
||||
#dark-mode table,
|
||||
#dark-mode label,
|
||||
#dark-mode .opblock-tag,
|
||||
#dark-mode .opblock .opblock-summary-operation-id,
|
||||
#dark-mode .opblock .opblock-summary-path,
|
||||
#dark-mode .opblock .opblock-summary-path__deprecated,
|
||||
#dark-mode h1,
|
||||
#dark-mode h2,
|
||||
#dark-mode h3,
|
||||
#dark-mode h4,
|
||||
#dark-mode h5,
|
||||
#dark-mode .btn,
|
||||
#dark-mode .tab li,
|
||||
#dark-mode .parameter__name,
|
||||
#dark-mode .parameter__type,
|
||||
#dark-mode .prop-format,
|
||||
#dark-mode .loading-container .loading:after{
|
||||
color: #e7e7e7;
|
||||
}
|
||||
#dark-mode .opblock-description-wrapper p,
|
||||
#dark-mode .opblock-external-docs-wrapper p,
|
||||
#dark-mode .opblock-title_normal p,
|
||||
#dark-mode .response-col_status,
|
||||
#dark-mode table thead tr td,
|
||||
#dark-mode table thead tr th,
|
||||
#dark-mode .response-col_links,
|
||||
#dark-mode .swagger-ui{
|
||||
color: wheat;
|
||||
}
|
||||
#dark-mode .parameter__extension,
|
||||
#dark-mode .parameter__in,
|
||||
#dark-mode .model-title{
|
||||
color: #949494;
|
||||
}
|
||||
#dark-mode table thead tr td,
|
||||
#dark-mode table thead tr th{
|
||||
border-color: rgba(120,120,120,.2);
|
||||
}
|
||||
#dark-mode .opblock .opblock-section-header{
|
||||
background: transparent;
|
||||
}
|
||||
#dark-mode .opblock.opblock-post{
|
||||
background: rgba(73,204,144,.25);
|
||||
}
|
||||
#dark-mode .opblock.opblock-get{
|
||||
background: rgba(97,175,254,.25);
|
||||
}
|
||||
#dark-mode .opblock.opblock-put{
|
||||
background: rgba(252,161,48,.25);
|
||||
}
|
||||
#dark-mode .opblock.opblock-delete{
|
||||
background: rgba(249,62,62,.25);
|
||||
}
|
||||
#dark-mode .loading-container .loading:before{
|
||||
border-color: rgba(255,255,255,10%);
|
||||
border-top-color: rgba(255,255,255,.6);
|
||||
}
|
||||
#dark-mode svg:not(:root){
|
||||
fill: #e7e7e7;
|
||||
}
|
||||
#dark-mode .opblock-summary-description {
|
||||
color: #fafafa;
|
||||
}
|
||||
</style>
|
||||
@endif
|
||||
</head>
|
||||
|
||||
<body @if(config('l5-swagger.defaults.ui.display.dark_mode')) id="dark-mode" @endif>
|
||||
<div id="swagger-ui"></div>
|
||||
|
||||
<script src="{{ l5_swagger_asset($documentation, 'swagger-ui-bundle.js') }}"></script>
|
||||
<script src="{{ l5_swagger_asset($documentation, 'swagger-ui-standalone-preset.js') }}"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const urls = [];
|
||||
|
||||
@foreach($urlsToDocs as $title => $url)
|
||||
urls.push({name: "{{ $title }}", url: "{{ $url }}"});
|
||||
@endforeach
|
||||
|
||||
// Build a system
|
||||
const ui = SwaggerUIBundle({
|
||||
dom_id: '#swagger-ui',
|
||||
urls: urls,
|
||||
"urls.primaryName": "{{ $documentationTitle }}",
|
||||
operationsSorter: {!! isset($operationsSorter) ? '"' . $operationsSorter . '"' : 'null' !!},
|
||||
configUrl: {!! isset($configUrl) ? '"' . $configUrl . '"' : 'null' !!},
|
||||
validatorUrl: {!! isset($validatorUrl) ? '"' . $validatorUrl . '"' : 'null' !!},
|
||||
oauth2RedirectUrl: "{{ route('l5-swagger.'.$documentation.'.oauth2_callback', [], $useAbsolutePath) }}",
|
||||
|
||||
requestInterceptor: function(request) {
|
||||
request.headers['X-CSRF-TOKEN'] = '{{ csrf_token() }}';
|
||||
return request;
|
||||
},
|
||||
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
|
||||
plugins: [
|
||||
SwaggerUIBundle.plugins.DownloadUrl
|
||||
],
|
||||
|
||||
layout: "StandaloneLayout",
|
||||
docExpansion : "{!! config('l5-swagger.defaults.ui.display.doc_expansion', 'none') !!}",
|
||||
deepLinking: true,
|
||||
filter: {!! config('l5-swagger.defaults.ui.display.filter') ? 'true' : 'false' !!},
|
||||
persistAuthorization: "{!! config('l5-swagger.defaults.ui.authorization.persist_authorization') ? 'true' : 'false' !!}",
|
||||
|
||||
})
|
||||
|
||||
window.ui = ui
|
||||
|
||||
@if(in_array('oauth2', array_column(config('l5-swagger.defaults.securityDefinitions.securitySchemes'), 'type')))
|
||||
ui.initOAuth({
|
||||
usePkceWithAuthorizationCodeGrant: "{!! (bool)config('l5-swagger.defaults.ui.authorization.oauth2.use_pkce_with_authorization_code_grant') !!}"
|
||||
})
|
||||
@endif
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
223
src/resources/views/welcome.blade.php
Normal file
223
src/resources/views/welcome.blade.php
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user