Aggiunta data creazione per elenco Ricevute FE
This commit is contained in:
parent
d140b2d003
commit
93f0e41c4b
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
use Plugins\ReceiptFE\Interaction;
|
use Plugins\ReceiptFE\Interaction;
|
||||||
use Plugins\ReceiptFE\Ricevuta;
|
use Plugins\ReceiptFE\Ricevuta;
|
||||||
|
|
||||||
|
@ -31,7 +32,8 @@ if (!empty($list)) {
|
||||||
<table class="table table-striped table-hover table-condensed table-bordered datatables">
|
<table class="table table-striped table-hover table-condensed table-bordered datatables">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="80%">'.tr('Nome').'</th>
|
<th width="60%">'.tr('Nome').'</th>
|
||||||
|
<th width="15%" class="text-center">'.tr('Data di caricamento').'</th>
|
||||||
<th width="20%" class="text-center">#</th>
|
<th width="20%" class="text-center">#</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -39,13 +41,18 @@ if (!empty($list)) {
|
||||||
|
|
||||||
foreach ($list as $element) {
|
foreach ($list as $element) {
|
||||||
$name = $element['name'];
|
$name = $element['name'];
|
||||||
|
$file = $directory.'/'.$name;
|
||||||
|
|
||||||
|
$local = file_exists($file);
|
||||||
|
$data_modifica = $local ? Carbon::createFromTimestamp(filemtime($file)) : null;
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.$name.'</td>
|
<td>'.$name.'</td>
|
||||||
|
<td class="text-center">'.($local ? dateFormat($data_modifica) : '-').'</td>
|
||||||
<td class="text-center">';
|
<td class="text-center">';
|
||||||
|
|
||||||
if (file_exists($directory.'/'.$name)) {
|
if ($local) {
|
||||||
echo '
|
echo '
|
||||||
<button type="button" class="btn btn-danger" onclick="delete_fe(this, \''.$element['id'].'\')">
|
<button type="button" class="btn btn-danger" onclick="delete_fe(this, \''.$element['id'].'\')">
|
||||||
<i class="fa fa-trash"></i>
|
<i class="fa fa-trash"></i>
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Interaction extends Services
|
||||||
// Aggiornamento cache hook
|
// Aggiornamento cache hook
|
||||||
Cache::pool('Ricevute Elettroniche')->set($result);
|
Cache::pool('Ricevute Elettroniche')->set($result);
|
||||||
|
|
||||||
return $list;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getRemoteList()
|
public static function getRemoteList()
|
||||||
|
|
Loading…
Reference in New Issue