mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-01-26 02:28:42 +00:00
autofixes
This commit is contained in:
parent
2d6024f226
commit
ef84597578
|
|
@ -48,7 +48,7 @@ $dispatch = $this->getData('dispatch') ?? [];
|
|||
</head>
|
||||
<body>
|
||||
<div class="vh" id="dim"></div>
|
||||
<header><div id="t-nav-container"><?= $top ?></div></header>
|
||||
<header><div id="t-nav-container"><?= $top; ?></div></header>
|
||||
<main id="content" class="container-fluid" role="main">
|
||||
<?php
|
||||
foreach ($dispatch as $view) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class ClockingStatus extends Enum
|
||||
{
|
||||
public const START = 1;
|
||||
|
||||
public const PAUSE = 2;
|
||||
|
||||
public const CONTINUE = 3;
|
||||
|
||||
public const END = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,14 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class ClockingType extends Enum
|
||||
{
|
||||
public const OFFICE = 1;
|
||||
|
||||
public const HOME = 2;
|
||||
|
||||
public const REMOTE = 3;
|
||||
|
||||
public const VACATION = 4;
|
||||
|
||||
public const SICK = 5;
|
||||
|
||||
public const ON_THE_MOVE = 6;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,14 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class PermissionState extends Enum
|
||||
{
|
||||
public const DASHBOARD = 1;
|
||||
|
||||
public const PRIVATE_DASHBOARD = 2;
|
||||
|
||||
public const SESSION = 3;
|
||||
|
||||
public const SESSION_FOREIGN = 4;
|
||||
|
||||
public const SESSION_ELEMENT = 5;
|
||||
|
||||
public const SESSION_ELEMENT_FOREIGN = 6;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use phpOMS\Contract\ArrayableInterface;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Session implements ArrayableInterface, \JsonSerializable
|
||||
class Session implements \JsonSerializable, ArrayableInterface
|
||||
{
|
||||
/**
|
||||
* Session ID.
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use phpOMS\Contract\ArrayableInterface;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class SessionElement implements ArrayableInterface, \JsonSerializable
|
||||
class SessionElement implements \JsonSerializable, ArrayableInterface
|
||||
{
|
||||
/**
|
||||
* Session element ID.
|
||||
|
|
|
|||
|
|
@ -20,23 +20,23 @@ echo $this->getData('nav')->render(); ?>
|
|||
<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>
|
||||
<caption><?= $this->getHtml('Recordings'); ?><i class="fa fa-download floatRight download btn"></i></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
<td><?= $this->getHtml('Type'); ?>
|
||||
<td>Employee
|
||||
<td><?= $this->getHtml('Start') ?>
|
||||
<td><?= $this->getHtml('Break') ?>
|
||||
<td><?= $this->getHtml('End') ?>
|
||||
<td><?= $this->getHtml('Total') ?>
|
||||
<td><?= $this->getHtml('Start'); ?>
|
||||
<td><?= $this->getHtml('Break'); ?>
|
||||
<td><?= $this->getHtml('End'); ?>
|
||||
<td><?= $this->getHtml('Total'); ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="5">
|
||||
<tbody>
|
||||
<?php foreach ($sessions as $session) : ?>
|
||||
<tr>
|
||||
<td><?= $session->getStart()->format('Y-m-d'); ?>
|
||||
<td><span class="tag"><?= $this->getHtml('CT' . $session->getType()) ?></span>
|
||||
<td><span class="tag"><?= $this->getHtml('CT' . $session->getType()); ?></span>
|
||||
<td>
|
||||
<?= $this->printHtml($session->getEmployee()->getProfile()->getAccount()->getName1()); ?>,
|
||||
<?= $this->printHtml($session->getEmployee()->getProfile()->getAccount()->getName2()); ?>
|
||||
|
|
|
|||
|
|
@ -48,23 +48,23 @@ echo $this->getData('nav')->render(); ?>
|
|||
<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>
|
||||
<tr><td><label for="iType"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td>
|
||||
<select id="iType" name="type">
|
||||
<option value="<?= ClockingType::OFFICE; ?>"<?= $type === ClockingType::OFFICE ? ' selected': ''; ?>><?= $this->getHtml('CT1') ?>
|
||||
<option value="<?= ClockingType::REMOTE; ?>"<?= $type === ClockingType::REMOTE ? ' selected': ''; ?>><?= $this->getHtml('CT3') ?>
|
||||
<option value="<?= ClockingType::HOME; ?>"<?= $type === ClockingType::HOME ? ' selected': ''; ?>><?= $this->getHtml('CT2') ?>
|
||||
<option value="<?= ClockingType::VACATION; ?>"<?= $type === ClockingType::VACATION ? ' selected': ''; ?>><?= $this->getHtml('CT4') ?>
|
||||
<option value="<?= ClockingType::SICK; ?>"<?= $type === ClockingType::SICK ? ' selected': ''; ?>><?= $this->getHtml('CT5') ?>
|
||||
<option value="<?= ClockingType::ON_THE_MOVE; ?>"<?= $type === ClockingType::ON_THE_MOVE ? ' selected': ''; ?>><?= $this->getHtml('CT6') ?>
|
||||
<option value="<?= ClockingType::OFFICE; ?>"<?= $type === ClockingType::OFFICE ? ' selected': ''; ?>><?= $this->getHtml('CT1'); ?>
|
||||
<option value="<?= ClockingType::REMOTE; ?>"<?= $type === ClockingType::REMOTE ? ' selected': ''; ?>><?= $this->getHtml('CT3'); ?>
|
||||
<option value="<?= ClockingType::HOME; ?>"<?= $type === ClockingType::HOME ? ' selected': ''; ?>><?= $this->getHtml('CT2'); ?>
|
||||
<option value="<?= ClockingType::VACATION; ?>"<?= $type === ClockingType::VACATION ? ' selected': ''; ?>><?= $this->getHtml('CT4'); ?>
|
||||
<option value="<?= ClockingType::SICK; ?>"<?= $type === ClockingType::SICK ? ' selected': ''; ?>><?= $this->getHtml('CT5'); ?>
|
||||
<option value="<?= ClockingType::ON_THE_MOVE; ?>"<?= $type === ClockingType::ON_THE_MOVE ? ' selected': ''; ?>><?= $this->getHtml('CT6'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
||||
<tr><td>
|
||||
<select id="iStatus" name="status">
|
||||
<option value="<?= ClockingStatus::START; ?>"<?= $status === ClockingStatus::END ? ' selected' : ''; ?>><?= $this->getHtml('CS1') ?>
|
||||
<option value="<?= ClockingStatus::PAUSE; ?>"<?= $status === ClockingStatus::START ? ' selected' : ''; ?>><?= $this->getHtml('CS2') ?>
|
||||
<option value="<?= ClockingStatus::CONTINUE; ?>"<?= $status === ClockingStatus::PAUSE ? ' selected' : ''; ?>><?= $this->getHtml('CS3') ?>
|
||||
<option value="<?= ClockingStatus::END; ?>"<?= $status === ClockingStatus::CONTINUE ? ' selected' : ''; ?>><?= $this->getHtml('CS4') ?>
|
||||
<option value="<?= ClockingStatus::START; ?>"<?= $status === ClockingStatus::END ? ' selected' : ''; ?>><?= $this->getHtml('CS1'); ?>
|
||||
<option value="<?= ClockingStatus::PAUSE; ?>"<?= $status === ClockingStatus::START ? ' selected' : ''; ?>><?= $this->getHtml('CS2'); ?>
|
||||
<option value="<?= ClockingStatus::CONTINUE; ?>"<?= $status === ClockingStatus::PAUSE ? ' selected' : ''; ?>><?= $this->getHtml('CS3'); ?>
|
||||
<option value="<?= ClockingStatus::END; ?>"<?= $status === ClockingStatus::CONTINUE ? ' selected' : ''; ?>><?= $this->getHtml('CS4'); ?>
|
||||
</select>
|
||||
<tr><td>
|
||||
<input type="hidden" name="session" value="<?= $lastOpenSession !== null ? $lastOpenSession->getId() : ''; ?>">
|
||||
|
|
@ -111,7 +111,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Recordings') ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Recordings'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<table id="accountList" class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -134,8 +134,8 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php else : ?>
|
||||
<?= $session->getStart()->format('Y-m-d'); ?> - <?= $this->getHtml('D' . $session->getStart()->format('w')); ?>
|
||||
<?php endif; ?></a>
|
||||
<td><a href="<?= $url; ?>"><span class="tag"><?= $this->getHtml('CT' . $session->getType()) ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><span class="tag"><?= $this->getHtml('CS' . $session->getStatus()) ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><span class="tag"><?= $this->getHtml('CT' . $session->getType()); ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><span class="tag"><?= $this->getHtml('CS' . $session->getStatus()); ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><?= $session->getStart()->format('H:i'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= (int) ($session->getBreak() / 3600); ?>h <?= ((int) ($session->getBreak() / 60) % 60); ?>m</a>
|
||||
<td><a href="<?= $url; ?>"><?= $session->getEnd() !== null ? $session->getEnd()->format('H:i') : ''; ?></a>
|
||||
|
|
|
|||
|
|
@ -26,23 +26,23 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="inner">
|
||||
<form id="clocking" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}task/element?{?}&csrf={$CSRF}'); ?>">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tr><td><label for="iType"><?= $this->getHtml('Type') ?></label>
|
||||
<tr><td><label for="iType"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td>
|
||||
<select id="iType" name="Type">
|
||||
<option value="<?= ClockingType::OFFICE; ?>"><?= $this->getHtml('CT0') ?>
|
||||
<option value="<?= ClockingType::REMOTE; ?>"><?= $this->getHtml('CT1') ?>
|
||||
<option value="<?= ClockingType::HOME; ?>"><?= $this->getHtml('CT2') ?>
|
||||
<option value="<?= ClockingType::VACATION; ?>"><?= $this->getHtml('CT3') ?>
|
||||
<option value="<?= ClockingType::SICK; ?>"><?= $this->getHtml('CT4') ?>
|
||||
<option value="<?= ClockingType::ON_THE_MOVE; ?>"><?= $this->getHtml('CT5') ?>
|
||||
<option value="<?= ClockingType::OFFICE; ?>"><?= $this->getHtml('CT0'); ?>
|
||||
<option value="<?= ClockingType::REMOTE; ?>"><?= $this->getHtml('CT1'); ?>
|
||||
<option value="<?= ClockingType::HOME; ?>"><?= $this->getHtml('CT2'); ?>
|
||||
<option value="<?= ClockingType::VACATION; ?>"><?= $this->getHtml('CT3'); ?>
|
||||
<option value="<?= ClockingType::SICK; ?>"><?= $this->getHtml('CT4'); ?>
|
||||
<option value="<?= ClockingType::ON_THE_MOVE; ?>"><?= $this->getHtml('CT5'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
||||
<tr><td>
|
||||
<select id="iStatus" name="Status">
|
||||
<option value="<?= ClockingStatus::START; ?>"><?= $this->getHtml('CS0') ?>
|
||||
<option value="<?= ClockingStatus::PAUSE; ?>"><?= $this->getHtml('CS1') ?>
|
||||
<option value="<?= ClockingStatus::CONTINUE; ?>"><?= $this->getHtml('CS2') ?>
|
||||
<option value="<?= ClockingStatus::END; ?>"><?= $this->getHtml('CS3') ?>
|
||||
<option value="<?= ClockingStatus::START; ?>"><?= $this->getHtml('CS0'); ?>
|
||||
<option value="<?= ClockingStatus::PAUSE; ?>"><?= $this->getHtml('CS1'); ?>
|
||||
<option value="<?= ClockingStatus::CONTINUE; ?>"><?= $this->getHtml('CS2'); ?>
|
||||
<option value="<?= ClockingStatus::END; ?>"><?= $this->getHtml('CS3'); ?>
|
||||
</select>
|
||||
<tr><td>
|
||||
<input type="submit" id="iclockingButton" name="clockingButton" value="<?= $this->getHtml('Submit', '0', '0'); ?>">
|
||||
|
|
@ -83,15 +83,15 @@ echo $this->getData('nav')->render(); ?>
|
|||
<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>
|
||||
<caption><?= $this->getHtml('Recordings'); ?><i class="fa fa-download floatRight download btn"></i></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
<td>Status
|
||||
<td><?= $this->getHtml('Start') ?>
|
||||
<td><?= $this->getHtml('Break') ?>
|
||||
<td><?= $this->getHtml('End') ?>
|
||||
<td><?= $this->getHtml('Total') ?>
|
||||
<td><?= $this->getHtml('Start'); ?>
|
||||
<td><?= $this->getHtml('Break'); ?>
|
||||
<td><?= $this->getHtml('End'); ?>
|
||||
<td><?= $this->getHtml('Total'); ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="5">
|
||||
<tbody>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ namespace Modules\HumanResourceTimeRecording\tests\Admin;
|
|||
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected const MODULE_NAME = 'HumanResourceTimeRecording';
|
||||
|
||||
protected const URI_LOAD = '';
|
||||
|
||||
use \Modules\tests\ModuleTestTrait;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user