mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-20 05:29:29 +00:00
fixes little bug where status timestamp was converted from null to the current date, with create_date in php
This commit is contained in:
@@ -72,8 +72,7 @@ class Profil extends Auth_Controller
|
||||
$_GET = json_decode($this->input->raw_input_stream, true);
|
||||
$uid = $this->input->get('uid');
|
||||
$id = $this->input->get('id');
|
||||
echo $uid;
|
||||
echo $id;
|
||||
|
||||
|
||||
if($uid && $id){
|
||||
$res= $this->ProfilChangeModel->getProfilUpdate($uid, $id);
|
||||
|
||||
@@ -46,10 +46,11 @@ class Profil_change_model extends DB_Model
|
||||
// catch error
|
||||
}else{
|
||||
if(hasData($res)){
|
||||
|
||||
foreach($res->retval as $update){
|
||||
$update->requested_change = json_decode($update->requested_change);
|
||||
$update->change_timestamp = date_create($update->change_timestamp)->format('d.m.Y');
|
||||
$update->status_timestamp = date_create($update->status_timestamp)->format('d.m.Y');
|
||||
$update->change_timestamp = !is_null($update->change_timestamp)?date_create($update->change_timestamp)->format('d.m.Y'):null;
|
||||
$update->status_timestamp = !is_null($update->status_timestamp)?date_create($update->status_timestamp)->format('d.m.Y'):null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,15 +133,15 @@ export default {
|
||||
|
||||
<div class="form-underline mb-2 col">
|
||||
<div class="form-underline-titel">Date of Status: </div>
|
||||
|
||||
<span class="form-underline-content" >{{data.status_timestamp}}</span>
|
||||
<!-- only status timestamp and status message can be null in the database -->
|
||||
<span class="form-underline-content" >{{data.status_timestamp?data.status_timestamp:'-'}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-underline mb-2 col">
|
||||
<div class="form-underline-titel">Status message: </div>
|
||||
|
||||
<!-- only status timestamp and status message can be null in the database -->
|
||||
<span class="form-underline-content" >{{data.status_message? data.status_message : '-'}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user