From 5fff45e302d2fa303a5af6a46cf5402c7455ad6d Mon Sep 17 00:00:00 2001 From: Ivymaster Date: Thu, 27 Aug 2026 11:00:43 +0200 Subject: [PATCH] Added check for date existence --- cis/private/profile/index.php | 7 ++++++- locale/de-AT/profil.php | 1 + locale/en-US/profil.php | 1 + locale/it-IT/profil.php | 1 + .../ProfilComponents/FhAusweisStatus.js | 11 +++++----- system/phrasesupdate.php | 20 +++++++++++++++++++ 6 files changed, 35 insertions(+), 6 deletions(-) diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php index 26312d5be..6e082e5c0 100644 --- a/cis/private/profile/index.php +++ b/cis/private/profile/index.php @@ -394,7 +394,12 @@ if (!$ansicht && (!defined('CIS_PROFIL_FHAUSWEIS_ANZEIGEN') || CIS_PROFIL_FHAUSW //wenn es mehr Zutrittskarten gab, wird das letzte Ausgabedatum erhalten $ausgegeben_am = $bm->result; $ausgegeben_am = $datum_obj->formatDatum($ausgegeben_am, 'd.m.Y'); - echo '
'.$p->t('profil/fhausweisWurdeBereitsAusgegeben', array($ausgegeben_am)); + + if ($ausgegeben_am) { + echo '
'.$p->t('profil/fhausweisWurdeBereitsAusgegeben', array($ausgegeben_am)); + } else { + echo '
'.$p->t('profil/fhAusweisStatusKeine'); + } } else { diff --git a/locale/de-AT/profil.php b/locale/de-AT/profil.php index 1be1549ff..065338f06 100644 --- a/locale/de-AT/profil.php +++ b/locale/de-AT/profil.php @@ -70,6 +70,7 @@ $this->phrasen['profil/profilfotoGesperrt']='Profilfoto gesperrt'; $this->phrasen['profil/profilfotoUploadGesperrt']='Der Upload des Profilfotos ist nicht mehr möglich'; $this->phrasen['profil/fhausweisStatus']='FH-Ausweis Status'; $this->phrasen['profil/fhausweisWurdeBereitsAusgegeben']='Der FH Ausweis ist am %s ausgegeben worden.'; +$this->phrasen['profil/fhAusweisStatusKeine']='Der FH Ausweis wurde noch nicht ausgegeben.'; $this->phrasen['profil/ladenSieBitteEinGueltigesFotoHoch']='Laden Sie bitte ein gültiges Foto hoch'; $this->phrasen['profil/fotoWurdeNochNichtAkzeptiert']='Foto wurde noch nicht akzeptiert'; $this->phrasen['profil/fhausweisGedrucktAm']='FH-Ausweis gedruckt am'; diff --git a/locale/en-US/profil.php b/locale/en-US/profil.php index fda433106..74827660d 100644 --- a/locale/en-US/profil.php +++ b/locale/en-US/profil.php @@ -68,6 +68,7 @@ $this->phrasen['profil/profilfotoGesperrt']='Profile photo locked'; $this->phrasen['profil/profilfotoUploadGesperrt']='It is no longer possible to upload a profile photo'; $this->phrasen['profil/fhausweisStatus']='UAS ID card status'; $this->phrasen['profil/fhausweisWurdeBereitsAusgegeben']='UAS ID card has already been issued on %s.'; +$this->phrasen['profil/fhAusweisStatusKeine']='The FH ID card has not been issued yet.'; $this->phrasen['profil/ladenSieBitteEinGueltigesFotoHoch']='Please upload a valid photo'; $this->phrasen['profil/fotoWurdeNochNichtAkzeptiert']='Photo has not yet been accepted'; $this->phrasen['profil/fhausweisGedrucktAm']='UAS ID card printed on'; diff --git a/locale/it-IT/profil.php b/locale/it-IT/profil.php index fc4d3bd6f..680f562f2 100644 --- a/locale/it-IT/profil.php +++ b/locale/it-IT/profil.php @@ -21,6 +21,7 @@ $this->phrasen['profil/fhausweisAbholbereitAmEmpfangAb']=''; $this->phrasen['profil/fhausweisGedrucktAm']=''; $this->phrasen['profil/fhausweisStatus']=''; $this->phrasen['profil/fhausweisWurdeBereitsAusgegeben']='Tesserino consegnato il %s.'; +$this->phrasen['profil/fhAusweisStatusKeine']='Der FH-Ausweis wurde noch nicht ausgestellt.'; $this->phrasen['profil/fhausweisWurdeNochNichtGedruckt']=''; $this->phrasen['profil/fotoAuswählen']=''; $this->phrasen['profil/fotofreigeben']=''; diff --git a/public/js/components/Cis/Profil/ProfilComponents/FhAusweisStatus.js b/public/js/components/Cis/Profil/ProfilComponents/FhAusweisStatus.js index 21e05e525..dcf870890 100644 --- a/public/js/components/Cis/Profil/ProfilComponents/FhAusweisStatus.js +++ b/public/js/components/Cis/Profil/ProfilComponents/FhAusweisStatus.js @@ -2,15 +2,16 @@ export default { props: { data: { type: String, - } + }, }, data() { - return {} + return {}; }, - template: /*html*/` + template: /*html*/ `
- {{$p.t('profil','fhAusweisStatus',[data])}} + {{$p.t('profil','fhAusweisStatus',[data])}} + {{$p.t('profil','fhAusweisStatusKeine')}}
`, -} \ No newline at end of file +}; diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 280a1cf42..408e9babf 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -29363,6 +29363,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'profil', + 'phrase' => 'fhAusweisStatusKeine', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Der FH Ausweis wurde noch nicht ausgegeben.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The FH ID card has not been issued yet.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'profil',