Other fixes

This commit is contained in:
Matteo Gheza 2021-02-28 20:43:38 +01:00
parent a34f64cef5
commit ad83f313f9
5 changed files with 9 additions and 8 deletions

View File

@ -11,6 +11,8 @@ $hidden = $user->hidden();
$response = [];
foreach($risultato as $row){
if(!in_array($row['changed'], $hidden) OR in_array($user->name(), $hidden)){
$date = DateTime::createFromFormat("j/m/Y G:i.s", $row['date']." ".$row['time']);
$date = $date->format('Y-m-d H:i:s');
if(!is_null($row["changed"])){
$changedName = $user->nameById($row["changed"]);
} else {
@ -25,7 +27,7 @@ foreach($risultato as $row){
$row["action"],
$changedName,
$editorName,
$row['date']." ".$row['time']
$date
];
}
}

View File

@ -105,11 +105,10 @@ var fillTable = undefined;
async function loadTable({table_page, set_interval=true, interval=10000, onlineReload=false, use_custom_table_engine=false, callback=false}){
if (typeof fillTable === "undefined"){
if ('connection' in navigator && navigator.connection.saveData) {
table_engine = "default";
}
if(use_custom_table_engine !== false){
table_engine = use_custom_table_engine;
} else if ('connection' in navigator && navigator.connection.saveData) {
table_engine = "default";
}
fillTable = await import(`./table_engine_${table_engine}.js`)
.then(({default: _}) => {

View File

@ -32,7 +32,7 @@
success: function (data) {
alert(`{{ 'Thanks, %s, you have given %s in case of alert.'|t|format(user.name, '${generate_alert_string(id)}') }}`);
clearInterval(window.loadTable_interval); //stop reloading
loadTable("list");
loadTable({table_page: "list", use_custom_table_engine: "default"});
}
});
}
@ -49,7 +49,7 @@
success: function (data) {
alert(`{{ 'Thanks, %s, you have removed %s in case of alert.'|t|format(user.name, '${generate_alert_string(id)}') }}`);
clearInterval(window.loadTable_interval); //stop reloading
loadTable("list");
loadTable({table_page: "list", use_custom_table_engine: "default"});
}
});
}

View File

@ -19,7 +19,7 @@
</tbody>
</table>
<script>
loadTable({table_page: "log", callback: function(table_dt) {
loadTable({table_page: "log", set_interval: false, callback: function(table_dt) {
table_dt
.column( '3:visible' )
.order( 'desc' )

View File

@ -15,7 +15,7 @@
<thead>
<tr>
<th>{{ 'Date'|t }}</th>
<th>{{ 'code'|t }}</th>
<th>{{ 'code'|t|capitalize }}</th>
<th>{{ 'Start time'|t }}</th>
<th>{{ 'End time'|t }}</th>
<th>{{ 'Chief'|t }}</th>