mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
add iso dates to result object of profile updates api endpoint, use iso date in tabulator to sort correctly and format with luxon js
This commit is contained in:
@@ -235,8 +235,11 @@ class Profil_update_model extends DB_Model
|
||||
private function formatProfilRequest($request)
|
||||
{
|
||||
$request->requested_change = json_decode($request->requested_change);
|
||||
$request->insertamum_iso = !is_null($request->insertamum) ? date_create($request->insertamum)->format('Y-m-d') : null;
|
||||
$request->insertamum = !is_null($request->insertamum) ? date_create($request->insertamum)->format('d.m.Y') : null;
|
||||
$request->updateamum_iso = !is_null($request->updateamum) ? date_create($request->updateamum)->format('Y-m-d') : null;
|
||||
$request->updateamum = !is_null($request->updateamum) ? date_create($request->updateamum)->format('d.m.Y') : null;
|
||||
$request->status_timestamp_iso = !is_null($request->status_timestamp) ? date_create($request->status_timestamp)->format('Y-m-d') : null;
|
||||
$request->status_timestamp = !is_null($request->status_timestamp) ? date_create($request->status_timestamp)->format('d.m.Y') : null;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
$includesArray = array(
|
||||
'title' => 'Profil Änderungen',
|
||||
'vue3' => true,
|
||||
'primevue3' => true,
|
||||
'bootstrap5' => true,
|
||||
'fontawesome6'=> true,
|
||||
'axios027' => true,
|
||||
'tabulator5' => true,
|
||||
'customJSs' => array(
|
||||
'vendor/moment/luxonjs/luxon.min.js'
|
||||
),
|
||||
'customJSModules' => array(
|
||||
'public/js/apps/Cis/ProfilUpdateRequests.js'
|
||||
),
|
||||
|
||||
@@ -4,6 +4,7 @@ import Alert from "../../../components/Bootstrap/Alert.js";
|
||||
import Loading from "../../../components/Loader.js";
|
||||
|
||||
import ApiProfilUpdate from '../../../api/factory/profilUpdate.js';
|
||||
import { dateFilter } from '../../../tabulator/filters/Dates.js';
|
||||
|
||||
const sortProfilUpdates = (ele1, ele2, thisPointer) => {
|
||||
let result = 0;
|
||||
@@ -241,10 +242,13 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$p.t("profilUpdate", "insertamum"),
|
||||
field: "insertamum",
|
||||
field: "insertamum_iso",
|
||||
resizable: true,
|
||||
headerFilter: true,
|
||||
headerFilterFunc: 'dates',
|
||||
headerFilter: dateFilter,
|
||||
minWidth: 200,
|
||||
formatter:"datetime",
|
||||
formatterParams: this.datetimeFormatterParams(),
|
||||
//responsive:0,
|
||||
},
|
||||
{
|
||||
@@ -377,6 +381,15 @@ export default {
|
||||
this.showAcceptDenyModal(arrayRowData[0]);
|
||||
}
|
||||
}
|
||||
},
|
||||
datetimeFormatterParams: function() {
|
||||
const params = {
|
||||
inputFormat:"yyyy-MM-dd",
|
||||
outputFormat:"dd.MM.yyyy",
|
||||
invalidPlaceholder:"(invalid date)",
|
||||
timezone:FHC_JS_DATA_STORAGE_OBJECT.timezone
|
||||
};
|
||||
return params;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user