Initial Ladill Queue release — enterprise QMS standalone app.
Deploy Ladill Queue / deploy (push) Successful in 56s
Deploy Ladill Queue / deploy (push) Successful in 56s
Phases 1–6: tickets, counters, displays, appointments, workflows, rules, analytics, reports, feedback, admin, device API, and Gitea deploy workflow for queue.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<x-app-layout title="New workflow">
|
||||
<div class="mx-auto max-w-2xl" x-data="{
|
||||
steps: [{ name: '', service_queue_id: '' }],
|
||||
templates: @js($workflowTemplates),
|
||||
applyTemplate(key) {
|
||||
if (!this.templates[key]) return;
|
||||
this.steps = this.templates[key].map(s => ({ name: s.name, service_queue_id: '' }));
|
||||
}
|
||||
}">
|
||||
<h1 class="text-2xl font-semibold">Create workflow</h1>
|
||||
<form method="POST" action="{{ route('qms.workflows.store') }}" class="mt-6 space-y-4 rounded-2xl border bg-white p-6 dark:border-slate-700 dark:bg-slate-900">
|
||||
@csrf
|
||||
<div>
|
||||
<label class="block text-sm font-medium">Industry template</label>
|
||||
<select @change="applyTemplate($event.target.value)" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
||||
<option value="">Custom</option>
|
||||
@foreach ($templates as $key => $label)
|
||||
<option value="{{ $key }}">{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium">Name</label>
|
||||
<input name="name" required class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium">Description</label>
|
||||
<textarea name="description" rows="2" class="mt-1 w-full rounded-lg border-slate-300 text-sm"></textarea>
|
||||
</div>
|
||||
<div class="border-t pt-4">
|
||||
<div class="mb-2 flex items-center justify-between">
|
||||
<h2 class="text-sm font-semibold">Steps</h2>
|
||||
<button type="button" @click="steps.push({ name: '', service_queue_id: '' })" class="text-xs text-indigo-600">Add step</button>
|
||||
</div>
|
||||
<template x-for="(step, index) in steps" :key="index">
|
||||
<div class="mb-3 grid grid-cols-2 gap-3 rounded-lg border p-3">
|
||||
<input :name="'steps['+index+'][name]'" x-model="step.name" placeholder="Step name" required class="rounded-lg border-slate-300 text-sm">
|
||||
<select :name="'steps['+index+'][service_queue_id]'" x-model="step.service_queue_id" class="rounded-lg border-slate-300 text-sm">
|
||||
<option value="">Select queue</option>
|
||||
@foreach ($queues as $queue)
|
||||
<option value="{{ $queue->id }}">{{ $queue->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<button type="submit" class="btn-primary w-full">Create workflow</button>
|
||||
</form>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,22 @@
|
||||
<x-app-layout :title="'Edit '.$workflow->name">
|
||||
<div class="mx-auto max-w-2xl" x-data="{ steps: @js($workflow->steps->map(fn($s) => ['name' => $s->name, 'service_queue_id' => $s->service_queue_id])->values()) }">
|
||||
<h1 class="text-2xl font-semibold">Edit workflow</h1>
|
||||
<form method="POST" action="{{ route('qms.workflows.update', $workflow) }}" class="mt-6 space-y-4 rounded-2xl border bg-white p-6">
|
||||
@csrf @method('PUT')
|
||||
<div><label class="block text-sm font-medium">Name</label><input name="name" value="{{ $workflow->name }}" required class="mt-1 w-full rounded-lg border-slate-300 text-sm"></div>
|
||||
<div><label class="block text-sm font-medium">Description</label><textarea name="description" rows="2" class="mt-1 w-full rounded-lg border-slate-300 text-sm">{{ $workflow->description }}</textarea></div>
|
||||
<label class="flex items-center gap-2 text-sm"><input type="checkbox" name="is_active" value="1" @checked($workflow->is_active)> Active</label>
|
||||
<template x-for="(step, index) in steps" :key="index">
|
||||
<div class="grid grid-cols-2 gap-3 rounded-lg border p-3">
|
||||
<input :name="'steps['+index+'][name]'" x-model="step.name" required class="rounded-lg border-slate-300 text-sm">
|
||||
<select :name="'steps['+index+'][service_queue_id]'" x-model="step.service_queue_id" class="rounded-lg border-slate-300 text-sm">
|
||||
<option value="">Select queue</option>
|
||||
@foreach ($queues as $queue)<option value="{{ $queue->id }}">{{ $queue->name }}</option>@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</template>
|
||||
<button type="button" @click="steps.push({name:'',service_queue_id:''})" class="text-sm text-indigo-600">Add step</button>
|
||||
<button type="submit" class="btn-primary w-full">Save workflow</button>
|
||||
</form>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,29 @@
|
||||
<x-app-layout title="Workflows">
|
||||
<div class="mb-6 flex items-center justify-between">
|
||||
<h1 class="text-2xl font-semibold text-slate-900 dark:text-white">Workflows</h1>
|
||||
@if(app(\App\Services\Qms\QmsPermissions::class)->can(app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()), 'workflows.manage'))
|
||||
<a href="{{ route('qms.workflows.create') }}" class="btn-primary">New workflow</a>
|
||||
@endif
|
||||
</div>
|
||||
@include('partials.flash')
|
||||
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Name</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Steps</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Status</th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@forelse ($workflows as $workflow)
|
||||
<tr>
|
||||
<td class="px-4 py-3"><a href="{{ route('qms.workflows.show', $workflow) }}" class="text-sm font-medium text-indigo-600">{{ $workflow->name }}</a></td>
|
||||
<td class="px-4 py-3 text-sm">{{ $workflow->steps_count }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $workflow->is_active ? 'Active' : 'Inactive' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="3" class="px-6 py-12 text-center text-sm text-slate-500">No workflows configured.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,21 @@
|
||||
<x-app-layout :title="$workflow->name">
|
||||
<div class="mb-6">
|
||||
<a href="{{ route('qms.workflows.index') }}" class="text-sm text-indigo-600">← Workflows</a>
|
||||
<h1 class="mt-2 text-2xl font-semibold">{{ $workflow->name }}</h1>
|
||||
@if ($workflow->description)<p class="mt-1 text-sm text-slate-600">{{ $workflow->description }}</p>@endif
|
||||
</div>
|
||||
<div class="rounded-2xl border bg-white p-6 dark:border-slate-700 dark:bg-slate-900">
|
||||
<h2 class="text-sm font-semibold uppercase text-slate-500">Steps</h2>
|
||||
<ol class="mt-4 space-y-3">
|
||||
@foreach ($workflow->steps as $step)
|
||||
<li class="flex items-center gap-3 rounded-lg border px-4 py-3">
|
||||
<span class="flex h-8 w-8 items-center justify-center rounded-full bg-indigo-50 text-sm font-semibold text-indigo-700">{{ $step->sort_order }}</span>
|
||||
<div>
|
||||
<div class="font-medium">{{ $step->name }}</div>
|
||||
<div class="text-sm text-slate-500">{{ $step->serviceQueue?->name ?? 'No queue linked' }}</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user