Files
kupshop/admin/templates/window/userInfo.tpl
2025-08-02 16:30:27 +02:00

217 lines
9.8 KiB
Smarty

{extends "../frame.tpl"}
{block content}
{if $body.acn == 'getCallerInfo'}
<div id="info">
<div class="panel
{if ($data.incoming_data.hook_type == "ring_hook")}
panel-danger
{elseif $data.incoming_data.hook_type == "hangup_hook"}
panel-default
{elseif $data.incoming_data.hook_type == "transfer_hook"}
panel-success
{/if}">
<div class="panel-heading">
<div class="row">
<div class="col-md-2">
{if ($data.incoming_data.hook_type == "ring_hook")}
Vyzvání
{elseif $data.incoming_data.hook_type == "hangup_hook"}
Konec hovoru s
{elseif $data.incoming_data.hook_type == "transfer_hook"}
Aktuálně hovoříte s
{/if}
</div>
<div class="col-md-3">
č. {$data.incoming_data.caller_number}
</div>
<div class="col-md-3">
{if !empty($data.user.name)}
reg. <a style="color: {if $data.incoming_data.hook_type == "hangup_hook"}#111{else}#FFF{/if}; text-decoration: underline;" href="javascript:nw('user', {$data.user.id})" title="Otevřít uživatele">
{$data.user.name} {$data.user.surname}
</a>
{* (stát: {$data.user.country}) *}
{else}
Neregistrovaný zákazník
{/if}
</div>
<div class="col-md-3">
{if !empty($data.money.spended)}
Nakoupil za <strong>{$data.money.spended|format_price}</strong>
{/if}
</div>
<div class="col-md-1">
{if $data.incoming_data.hook_type != "hangup_hook"}
<a class="btn-sm btn btn-danger pull-right call-interrupt" title="Položit hovor">
<input class="hidden" name="call_id" value="{$data.incoming_data.call_id}" />
<span class="glyphicon glyphicon-remove"></span>
</a>
{/if}
</div>
</div>
</div>
<h5>Objednávky</h5>
{if empty($data.orders)}
<div class="panel-body">
Na toto telefoní číslo nebyly vytvořeny žádné objednávky.
</div>
{else}
<table class="table">
<thead>
<tr>
<th style="width: 10%;">ID</th>
<th style="width: 20%;">Datum vytvoření</th>
<th style="width: 15%;">Jméno</th>
<th style="width: 15%;">Přijmení</th>
<th class="text-right" style="width: 10%;">Částka</th>
<th class="text-center" style="width: 15%;">Status</th>
<th style="width: 15%;">Stát</th>
</tr>
</thead>
<tbody>
{function statusColor}
{if $status_storno == 1}storno{/if}
status{$status}
{/function}
{foreach $data.orders as $order}
<tr class="{statusColor status=$order.status status_storno=$order.status_storno}">
<td>
<a href="javascript:nw('order', {$order.id})" title="Otevřít objednávku">
{$order.id}
</a>
</td>
<td>{$order.date_created}</td>
<td>{$order.invoice_name}</td>
<td>{$order.invoice_surname}</td>
<td class="text-right">{$order.total_price|format_price}</td>
<td class="text-center">{$order.status_text}</td>
<td>{$order.invoice_country}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
{if findModule('reclamations')}
<h5>Reklamace</h5>
{if empty($data.reclamations)}
<div class="panel-body">
Na toto telefoní číslo nebyly vytvořeny žádné reklamace.
</div>
{else}
<table class="table">
<thead>
<tr>
<th style="width: 10%;">Kód</th>
<th style="width: 20%;">Datum vytvoření</th>
<th style="width: 15%;">Jméno</th>
<th style="width: 15%;">Přijmení</th>
<th style="width: 15%;">Položka</th>
<th style="width: 15%;">Objednávka</th>
<th class="text-center" style="width: 15%;">Status</th>
</tr>
</thead>
<tbody>
{foreach $data.reclamations as $reclamation}
<tr class="{$reclamation.class}">
<td>
<a href="javascript:nw('Reclamations', {$reclamation.id})" title="Otevřít reklamaci">
{$reclamation.code}
</a>
</td>
<td>{$reclamation.date_created}</td>
<td>{$reclamation.name}</td>
<td>{$reclamation.surname}</td>
<td>
<a href="javascript:nw('products', {$reclamation.item.id_product})">
{$reclamation.item.descr}
</a>
</td>
<td>
<a href="javascript:nw('orders', {$reclamation.id_order})" title="Otevřít objednávku">
{$reclamation.order_no}
</a>
</td>
<td class="text-center">{$reclamation.status_name}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
{/if}
{if findModule('returns')}
<h5>Vratky</h5>
{if empty($data.returns)}
<div class="panel-body">
Na toto telefoní číslo nebyly vytvořeny žádné vratky.
</div>
{else}
<table class="table">
<thead>
<tr>
<th style="width: 10%;">Kód</th>
<th style="width: 20%;">Datum vytvoření</th>
<th style="width: 15%;">Jméno</th>
<th style="width: 15%;">Přijmení</th>
<th style="width: 15%;">Objednávka</th>
<th class="text-center" style="width: 15%;">Status</th>
</tr>
</thead>
<tbody>
{foreach $data.returns as $return}
<tr class="{$return.class}">
<td>
<a href="javascript:nw('Returns', {$return.id})" title="Otevřít vratku">
{$return.code}
</a>
</td>
<td>{$return.date_created}</td>
<td>{$return.name}</td>
<td>{$return.surname}</td>
<td>
<a href="javascript:nw('orders', {$return.id_order})" title="Otevřít objednávku">
{$return.order_no}
</a>
</td>
<td class="text-center">{$return.status_name}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
{/if}
<input type="hidden" id="phone" value="{$data.incoming_data.caller_number}">
<input type="hidden" id="hook_type" value="{$data.incoming_data.hook_type}">
<input type="hidden" id="name" value="{if !empty($data.user.name)}{$data.user.name} {$data.user.surname}{else} -- {/if}">
<input type="hidden" id="spended" value="{if !empty($data.money.spended)}{$data.money.spended|format_price}{else} -- {/if}">
</div>
</div>
{/if}
{if $body.acn == 'getQueueInfo'}
<table>
<tr id="queue_row">
<td>{$data.incoming_data.caller_number}
<br/>
{if !empty($data.user.name)}{$data.user.name}{else}nezjištěno{/if}
</td>
<td>{if !empty($data.money.spended)}{$data.money.spended|format_price}{else}nezjištěno{/if}<br/>
{if !empty($data.user.surname)}{$data.user.surname}{else}nezjištěno{/if}</td>
<td>
<a class="btn-sm btn btn-danger pull-right call-interrupt" title="Položit hovor">
<input class="hidden" name="call_id" value="{$data.incoming_data.call_id}" />
<span class="glyphicon glyphicon-remove"></span>
</a>
</td>
<input type="hidden" class="phone" value="{$data.incoming_data.caller_number}">
</tr>
</table>
{/if}
{/block}