diff --git a/Models/NullSession.php b/Models/NullSession.php index 74709aa..c571216 100644 --- a/Models/NullSession.php +++ b/Models/NullSession.php @@ -24,4 +24,16 @@ namespace Modules\HumanResourceTimeRecording\Models; */ final class NullSession extends Session { + /** + * Constructor + * + * @param int $id Model id + * + * @since 1.0.0 + */ + public function __construct(int $id = 0) + { + $this->id = $id; + parent::__construct(); + } } diff --git a/Models/Session.php b/Models/Session.php index 1325303..9773119 100644 --- a/Models/Session.php +++ b/Models/Session.php @@ -32,7 +32,7 @@ class Session implements ArrayableInterface, \JsonSerializable * @var int * @since 1.0.0 */ - private int $id = 0; + protected int $id = 0; /** * Session start diff --git a/Models/SessionMapper.php b/Models/SessionMapper.php index 03a2137..7ccefbf 100644 --- a/Models/SessionMapper.php +++ b/Models/SessionMapper.php @@ -191,11 +191,14 @@ final class SessionMapper extends DataMapperAbstract $sth->execute(); $results = $sth->fetchAll(\PDO::FETCH_ASSOC); - $obj = self::populateIterable($results === false ? [] : $results); + $objs = self::populateIterable($results === false ? [] : $results); + + foreach ($objs as $obj) { + self::fillRelations($obj, RelationType::ALL, 6); + } - self::fillRelations($obj, RelationType::ALL, 6); self::clear(); - return $obj; + return $objs; } } diff --git a/Theme/Backend/Lang/Navigation.de.lang.php b/Theme/Backend/Lang/Navigation.de.lang.php new file mode 100644 index 0000000..b8c30b8 --- /dev/null +++ b/Theme/Backend/Lang/Navigation.de.lang.php @@ -0,0 +1,21 @@ + [ + 'Create' => 'Erstellen', + 'List' => 'Liste', + 'Stats' => 'Statsitiken', + 'TimeRecording' => 'Zeiterfassung', + 'Today' => 'Heute', +]]; diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php new file mode 100644 index 0000000..dd5016c --- /dev/null +++ b/Theme/Backend/Lang/de.lang.php @@ -0,0 +1,42 @@ + [ + 'Break' => 'Pause', + 'CS1' => 'Start', + 'CS2' => 'Pause', + 'CS3' => 'Weiter', + 'CS4' => 'Ende', + 'CT1' => 'Büro', + 'CT2' => 'Zuhause', + 'CT3' => 'Remote', + 'CT4' => 'Urlaub', + 'CT5' => 'Krank', + 'CT6' => 'Unterwegs', + 'D0' => 'Sonntag', + 'D1' => 'Montag', + 'D2' => 'Dienstag', + 'D3' => 'Mittwoch', + 'D4' => 'Donnerstag', + 'D5' => 'Freitag', + 'D6' => 'Samstag', + 'Date' => 'Datum', + 'End' => 'Ende', + 'Recordings' => 'Aufzeichnungen', + 'Start' => 'Start', + 'Status' => 'Status', + 'Time' => 'Zeit', + 'Total' => 'Gesamt', + 'Type' => 'Typ', +]]; diff --git a/Theme/Backend/private-dashboard.tpl.php b/Theme/Backend/private-dashboard.tpl.php index f716488..2f0ec6b 100644 --- a/Theme/Backend/private-dashboard.tpl.php +++ b/Theme/Backend/private-dashboard.tpl.php @@ -44,8 +44,8 @@ $busy = [ echo $this->getData('nav')->render(); ?>