Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
728 changes: 368 additions & 360 deletions lib/modules/customer_service/web/details.html.heex

Large diffs are not rendered by default.

350 changes: 179 additions & 171 deletions lib/modules/customer_service/web/edit.html.heex

Large diffs are not rendered by default.

650 changes: 329 additions & 321 deletions lib/modules/customer_service/web/list.html.heex

Large diffs are not rendered by default.

242 changes: 125 additions & 117 deletions lib/modules/customer_service/web/settings.html.heex
Original file line number Diff line number Diff line change
@@ -1,137 +1,145 @@
<div class="container flex flex-col mx-auto px-4 py-6">
<.admin_page_header
back={PhoenixKit.Utils.Routes.path("/admin/settings")}
title="Customer Service Settings"
subtitle="Configure customer service module behavior and features"
/>
<PhoenixKitWeb.Components.LayoutWrapper.app_layout
flash={@flash}
phoenix_kit_current_scope={assigns[:phoenix_kit_current_scope]}
page_title="Customer Service Settings"
current_path={@url_path}
project_title={@project_title}
>
<div class="container flex flex-col mx-auto px-4 py-6">
<.admin_page_header
back={PhoenixKit.Utils.Routes.path("/admin/settings")}
title="Customer Service Settings"
subtitle="Configure customer service module behavior and features"
/>

<%!-- Main Content --%>
<div class="max-w-4xl mx-auto space-y-8">
<%!-- Stats Overview --%>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl mb-4">
<.icon name="hero-chart-bar" class="w-6 h-6" /> Statistics
</h2>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
<div class="stat bg-base-200 rounded-lg p-4">
<div class="stat-title text-xs">Total</div>
<div class="stat-value text-2xl">{@stats.total}</div>
</div>
<div class="stat bg-info/20 rounded-lg p-4">
<div class="stat-title text-xs">Open</div>
<div class="stat-value text-2xl text-info">{@stats.open}</div>
</div>
<div class="stat bg-warning/20 rounded-lg p-4">
<div class="stat-title text-xs">In Progress</div>
<div class="stat-value text-2xl text-warning">{@stats.in_progress}</div>
</div>
<div class="stat bg-success/20 rounded-lg p-4">
<div class="stat-title text-xs">Resolved</div>
<div class="stat-value text-2xl text-success">{@stats.resolved}</div>
<%!-- Main Content --%>
<div class="max-w-4xl mx-auto space-y-8">
<%!-- Stats Overview --%>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl mb-4">
<.icon name="hero-chart-bar" class="w-6 h-6" /> Statistics
</h2>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
<div class="stat bg-base-200 rounded-lg p-4">
<div class="stat-title text-xs">Total</div>
<div class="stat-value text-2xl">{@stats.total}</div>
</div>
<div class="stat bg-info/20 rounded-lg p-4">
<div class="stat-title text-xs">Open</div>
<div class="stat-value text-2xl text-info">{@stats.open}</div>
</div>
<div class="stat bg-warning/20 rounded-lg p-4">
<div class="stat-title text-xs">In Progress</div>
<div class="stat-value text-2xl text-warning">{@stats.in_progress}</div>
</div>
<div class="stat bg-success/20 rounded-lg p-4">
<div class="stat-title text-xs">Resolved</div>
<div class="stat-value text-2xl text-success">{@stats.resolved}</div>
</div>
</div>
</div>
</div>
</div>

<%!-- Module Settings --%>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl mb-4">
<.icon name="hero-cog-6-tooth" class="w-6 h-6" /> Module Configuration
</h2>
<%!-- Module Settings --%>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl mb-4">
<.icon name="hero-cog-6-tooth" class="w-6 h-6" /> Module Configuration
</h2>

<%!-- Per Page --%>
<div class="form-control">
<label class="label">
<span class="label-text font-medium">Tickets Per Page</span>
</label>
<select
class="select select-bordered w-full max-w-xs"
phx-change="update_per_page"
name="per_page"
>
<option value="10" selected={@per_page == 10}>10</option>
<option value="20" selected={@per_page == 20}>20</option>
<option value="50" selected={@per_page == 50}>50</option>
<option value="100" selected={@per_page == 100}>100</option>
</select>
<%!-- Per Page --%>
<div class="form-control">
<label class="label">
<span class="label-text font-medium">Tickets Per Page</span>
</label>
<select
class="select select-bordered w-full max-w-xs"
phx-change="update_per_page"
name="per_page"
>
<option value="10" selected={@per_page == 10}>10</option>
<option value="20" selected={@per_page == 20}>20</option>
<option value="50" selected={@per_page == 50}>50</option>
<option value="100" selected={@per_page == 100}>100</option>
</select>
</div>
</div>
</div>
</div>

<%!-- Feature Toggles --%>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl mb-4">
<.icon name="hero-sparkles" class="w-6 h-6" /> Features
</h2>
<%!-- Feature Toggles --%>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl mb-4">
<.icon name="hero-sparkles" class="w-6 h-6" /> Features
</h2>

<%!-- Internal Notes --%>
<div class="form-control">
<label class="label cursor-pointer justify-start gap-4">
<input
type="checkbox"
class="toggle toggle-warning"
checked={@internal_notes_enabled}
phx-click="toggle_internal_notes"
/>
<div>
<span class="label-text font-medium">Internal Notes</span>
<p class="text-sm text-base-content/50">
Allow staff-only notes that are hidden from customers
</p>
</div>
</label>
</div>
<%!-- Internal Notes --%>
<div class="form-control">
<label class="label cursor-pointer justify-start gap-4">
<input
type="checkbox"
class="toggle toggle-warning"
checked={@internal_notes_enabled}
phx-click="toggle_internal_notes"
/>
<div>
<span class="label-text font-medium">Internal Notes</span>
<p class="text-sm text-base-content/50">
Allow staff-only notes that are hidden from customers
</p>
</div>
</label>
</div>

<div class="divider my-2"></div>
<div class="divider my-2"></div>

<%!-- Attachments --%>
<div class="form-control">
<label class="label cursor-pointer justify-start gap-4">
<input
type="checkbox"
class="toggle toggle-info"
checked={@attachments_enabled}
phx-click="toggle_attachments"
/>
<div>
<span class="label-text font-medium">Attachments</span>
<p class="text-sm text-base-content/50">
Allow uploading files to tickets and comments
</p>
</div>
</label>
<%!-- Attachments --%>
<div class="form-control">
<label class="label cursor-pointer justify-start gap-4">
<input
type="checkbox"
class="toggle toggle-info"
checked={@attachments_enabled}
phx-click="toggle_attachments"
/>
<div>
<span class="label-text font-medium">Attachments</span>
<p class="text-sm text-base-content/50">
Allow uploading files to tickets and comments
</p>
</div>
</label>
</div>
</div>
</div>
</div>

<%!-- Workflow Settings --%>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl mb-4">
<.icon name="hero-arrow-path" class="w-6 h-6" /> Workflow
</h2>
<%!-- Workflow Settings --%>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl mb-4">
<.icon name="hero-arrow-path" class="w-6 h-6" /> Workflow
</h2>

<%!-- Allow Reopen --%>
<div class="form-control">
<label class="label cursor-pointer justify-start gap-4">
<input
type="checkbox"
class="toggle"
checked={@allow_reopen}
phx-click="toggle_allow_reopen"
/>
<div>
<span class="label-text font-medium">Allow Reopening Tickets</span>
<p class="text-sm text-base-content/50">
Allow resolved or closed tickets to be reopened
</p>
</div>
</label>
<%!-- Allow Reopen --%>
<div class="form-control">
<label class="label cursor-pointer justify-start gap-4">
<input
type="checkbox"
class="toggle"
checked={@allow_reopen}
phx-click="toggle_allow_reopen"
/>
<div>
<span class="label-text font-medium">Allow Reopening Tickets</span>
<p class="text-sm text-base-content/50">
Allow resolved or closed tickets to be reopened
</p>
</div>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</PhoenixKitWeb.Components.LayoutWrapper.app_layout>
Loading
Loading