<%- include('partials/sidebar', { activePage: 'tickets', company }) %>
<%= t('admin.nav.customer_tickets', 'Keluhan Pelanggan') %>
<%= (typeof session !== 'undefined' && session && session.isCashier) ? t('admin.role.cashier', 'Kasir') : t('admin.role.admin', 'Admin') %>
<% if (msg) { %>
<%= msg.text %>
<% } %>
<%= t('admin.tickets.stats.total', 'Total Tiket') %>
<%= stats.total %>
<%= t('admin.tickets.status.open', 'Belum Ditangani') %>
<%= stats.open %>
<%= t('admin.tickets.status.in_progress', 'Sedang Dikerjakan') %>
<%= stats.inProgress %>
<%= t('admin.tickets.status.resolved', 'Selesai') %>
<%= stats.resolved %>
<%= t('admin.tickets.list_title', 'Daftar Keluhan & Tugas') %> (<%= tickets.length %>)
<% if ((typeof filterSearch!=='undefined' && filterSearch) || (typeof filterTech!=='undefined' && filterTech) || (filterStatus && filterStatus!=='all')) { %> Reset<% } %>
<% if (tickets.length===0) { %> <% } %> <% tickets.forEach((ticket) => { %> <% }) %>
#ID <%= t('admin.tickets.table.time', 'Waktu') %> <%= t('admin.tickets.table.customer', 'Pelanggan') %> <%= t('admin.tickets.table.issue', 'Kendala') %> <%= t('admin.tickets.table.technician', 'Teknisi') %> <%= t('admin.tickets.table.status', 'Status') %> <%= t('common.actions', 'Aksi') %>
<%= t('admin.tickets.empty', 'Tidak ada tiket keluhan') %>
#<%= ticket.id %> <%= typeof formatDateLocal === 'function' ? formatDateLocal(ticket.created_at) : (ticket.created_at ? new Date(ticket.created_at).toLocaleString('id-ID', {dateStyle:'short', timeStyle:'short'}) : '-') %>
<%= ticket.customer_name %>
<%= ticket.customer_phone || '-' %>
<%= ticket.subject %> <% if (ticket.technician_name) { %>
<%= ticket.technician_name %>
<% } else { %> <%= t('admin.tickets.no_technician', 'Belum ada') %> <% } %>
<% if(ticket.status==='open'){%><%= t('admin.tickets.status.open', 'Belum Ditangani') %> <%}else if(ticket.status==='in_progress'){%><%= t('admin.tickets.status.working_short', 'Dikerjakan') %> <%}else{%><%= t('admin.tickets.status.resolved', 'Selesai') %><%}%>
<% if ((ticket.photos && ticket.photos !== '' && ticket.photos !== '[]') || (ticket.customer_photos && ticket.customer_photos !== '' && ticket.customer_photos !== '[]')) { %> <% } %>
Buat Tiket / Tugas Teknisi Baru
<%= t('admin.tickets.modal.title', 'Update Status Keluhan') %>
Foto Pekerjaan