From f3527dc8fff3ff167a76f882e7da658de9ab8ea1 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 19 Feb 2025 16:37:30 +0100 Subject: [PATCH] bugfix function getMitarbeiterUid --- .../controllers/api/frontend/v1/vertraege/Vertraege.php | 9 ++++----- application/models/ressource/Mitarbeiter_model.php | 1 + public/js/api/vertraege/person.js | 2 +- public/js/components/Vertraege/Vertraege.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/controllers/api/frontend/v1/vertraege/Vertraege.php b/application/controllers/api/frontend/v1/vertraege/Vertraege.php index b593a1f3e..02d0ab5f9 100644 --- a/application/controllers/api/frontend/v1/vertraege/Vertraege.php +++ b/application/controllers/api/frontend/v1/vertraege/Vertraege.php @@ -29,7 +29,7 @@ class Vertraege extends FHCAPI_Controller 'getHeader' => ['vertrag/mitarbeiter:r'], 'getPersonAbteilung' => ['vertrag/mitarbeiter:r'], 'getLeitungOrg' => ['vertrag/mitarbeiter:r'], - 'getMitarbeiter_uid' => ['vertrag/mitarbeiter:r'], + 'getMitarbeiterUid' => ['vertrag/mitarbeiter:r'], ]); //Load Models and Libraries @@ -702,10 +702,9 @@ class Vertraege extends FHCAPI_Controller { $this->load->model('ressource/Mitarbeiter_model', 'Mitarbeitermodel'); - $result = $this->Mitarbeitermodel->getMitarbeiter_uid($person_id); + $result = $this->Mitarbeitermodel->getMitarbeiterUid($person_id); - $data = $this->getDataOrTerminateWithError($result); - - $this->terminateWithSuccess($data); + //no error here: ma_uid | null as result + $this->terminateWithSuccess($result); } } diff --git a/application/models/ressource/Mitarbeiter_model.php b/application/models/ressource/Mitarbeiter_model.php index f7951083c..e67635538 100644 --- a/application/models/ressource/Mitarbeiter_model.php +++ b/application/models/ressource/Mitarbeiter_model.php @@ -387,5 +387,6 @@ class Mitarbeiter_model extends DB_Model $uid = isset($data[0]->uid) ? $data[0]->uid : null; return $uid; + } } diff --git a/public/js/api/vertraege/person.js b/public/js/api/vertraege/person.js index 01ba309f0..c2f82b9e7 100644 --- a/public/js/api/vertraege/person.js +++ b/public/js/api/vertraege/person.js @@ -63,7 +63,7 @@ export default { return this.$fhcApi.post('api/frontend/v1/vertraege/vertraege/getLeitungOrg/' + oekurzbz); }, getMitarbeiterUid(person_id){ - return this.$fhcApi.get('api/frontend/v1/vertraege/vertraege/getMitarbeiter_uid/' + person_id); + return this.$fhcApi.get('api/frontend/v1/vertraege/vertraege/getMitarbeiterUid/' + person_id); }, } \ No newline at end of file diff --git a/public/js/components/Vertraege/Vertraege.js b/public/js/components/Vertraege/Vertraege.js index 67a779638..94104e3c5 100644 --- a/public/js/components/Vertraege/Vertraege.js +++ b/public/js/components/Vertraege/Vertraege.js @@ -194,7 +194,7 @@ export default { contractSelected: [], listContractStati: [], contractFormData: { - vertragsstatus_kurzbz: 'test', + vertragsstatus_kurzbz: '', datum: new Date(), }, dataPrintHonorar: [],