mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-01-23 09:18:40 +00:00
fix null model bug and impl. ger language
This commit is contained in:
parent
0701a90965
commit
a768293529
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
21
Theme/Backend/Lang/Navigation.de.lang.php
Normal file
21
Theme/Backend/Lang/Navigation.de.lang.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.4
|
||||
*
|
||||
* @package Modules\HumanResourceTimeRecording
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
return ['Navigation' => [
|
||||
'Create' => 'Erstellen',
|
||||
'List' => 'Liste',
|
||||
'Stats' => 'Statsitiken',
|
||||
'TimeRecording' => 'Zeiterfassung',
|
||||
'Today' => 'Heute',
|
||||
]];
|
||||
42
Theme/Backend/Lang/de.lang.php
Normal file
42
Theme/Backend/Lang/de.lang.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.4
|
||||
*
|
||||
* @package Modules\HumanResourceTimeRecording
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
return ['HumanResourceTimeRecording' => [
|
||||
'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',
|
||||
]];
|
||||
|
|
@ -44,8 +44,8 @@ $busy = [
|
|||
echo $this->getData('nav')->render(); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<div class="inner">
|
||||
<section class="portlet">
|
||||
<div class="portlet-body">
|
||||
<form id="iClocking" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}humanresource/timerecording/element?{?}&csrf={$CSRF}'); ?>">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tr><td><label for="iType"><?= $this->getHtml('Type') ?></label>
|
||||
|
|
@ -82,9 +82,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1>Work</h1></header>
|
||||
<div class="inner">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head">Work</div>
|
||||
<div class="portlet-body">
|
||||
<table>
|
||||
<tr><td>This month<td>
|
||||
<tr><td>Last month<td>
|
||||
|
|
@ -95,9 +95,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1>Vaction</h1></header>
|
||||
<div class="inner">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head">Vacation</div>
|
||||
<div class="portlet-body">
|
||||
<table>
|
||||
<tr><td>Used Vacation<td>
|
||||
<tr><td>Last Vacation<td>
|
||||
|
|
@ -110,9 +110,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box wf-100">
|
||||
<table id="accountList" class="default">
|
||||
<caption><?= $this->getHtml('Recordings') ?><i class="fa fa-download floatRight download btn"></i></caption>
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Recordings') ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<table id="accountList" class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
|
|
@ -122,8 +122,6 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td><?= $this->getHtml('Break'); ?>
|
||||
<td><?= $this->getHtml('End'); ?>
|
||||
<td><?= $this->getHtml('Total'); ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="5">
|
||||
<tbody>
|
||||
<?php
|
||||
$count = 0; foreach ($sessions as $session) : ++$count;
|
||||
|
|
@ -164,6 +162,6 @@ echo $this->getData('nav')->render(); ?>
|
|||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user