changes how to display the hr table with all the user update requests and the update request table in the profil view, also adds some new columns to the cis_profil_update table to store the status, status date and status message

This commit is contained in:
SimonGschnell
2024-01-22 14:45:32 +01:00
parent 0d5e8e89a6
commit fb9b65b138
14 changed files with 372 additions and 92 deletions
+2 -2
View File
@@ -94,7 +94,7 @@ class Profil extends Auth_Controller
$payload = $json->payload;
$type = isset($json->payload->kontakt_id)? "kontakt_id" : "adresse_id";
$data = ["topic"=>$json->topic,"uid" => $this->uid, "requested_change" => json_encode($payload), "change_timestamp" => "NOW()" ];
$data = ["topic"=>$json->topic,"uid" => $this->uid, "requested_change" => json_encode($payload), "change_timestamp" => "NOW()","status"=>"pending" ];
//? loops over all updateRequests from a user to validate if the new request is valid
$res = $this->ProfilChangeModel->loadWhere(["uid"=>$this->uid]);
@@ -148,7 +148,7 @@ class Profil extends Auth_Controller
$json = json_decode($this->input->raw_input_stream);
$data = ["topic"=>$json->topic,"uid" => $this->uid, "requested_change" => json_encode($json->payload), "change_timestamp" => "NOW()" ];
$data = ["topic"=>$json->topic,"uid" => $this->uid, "requested_change" => json_encode($json->payload), "change_timestamp" => "NOW()","status"=>"pending" ];
//? gets all the requested changes from a user