mirror of
https://github.com/Karaka-Management/oms-BusinessExpenses.git
synced 2026-01-11 15:18:44 +00:00
update
This commit is contained in:
parent
746a867ab9
commit
09a7d825e9
|
|
@ -32,7 +32,7 @@ use phpOMS\Views\View;
|
||||||
final class BackendController extends Controller
|
final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -60,7 +60,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -80,16 +80,22 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$expense = ExpenseMapper::get()
|
$expense = ExpenseMapper::get()
|
||||||
->with('from')
|
->with('from')
|
||||||
|
->with('notes')
|
||||||
|
->with('elements')
|
||||||
|
->with('elements/type')
|
||||||
|
->with('elements/type/l11n')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', (int) $request->getData('id'))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$view->data['expense'] = $expense;
|
$view->data['expense'] = $expense;
|
||||||
|
|
||||||
|
$view->data['expense-notes'] = new \Modules\Editor\Theme\Backend\Components\Compound\BaseView($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -118,7 +124,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -147,7 +153,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -176,7 +182,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
|
||||||
3
Docs/Dev/en/SUMMARY.md
Normal file
3
Docs/Dev/en/SUMMARY.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Developer Content
|
||||||
|
|
||||||
|
* [Structure]({%}&page=Dev/structure)
|
||||||
5
Docs/Dev/en/structure.md
Normal file
5
Docs/Dev/en/structure.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Structure
|
||||||
|
|
||||||
|
## ER
|
||||||
|
|
||||||
|

|
||||||
BIN
Docs/Dev/img/er.png
Normal file
BIN
Docs/Dev/img/er.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
|
|
@ -17,7 +17,7 @@ namespace Modules\BusinessExpenses\Models;
|
||||||
use phpOMS\Stdlib\Base\Enum;
|
use phpOMS\Stdlib\Base\Enum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permision state enum.
|
* Permission category enum.
|
||||||
*
|
*
|
||||||
* @package Modules\BusinessExpenses\Models
|
* @package Modules\BusinessExpenses\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
|
||||||
|
|
@ -31,4 +31,7 @@ return ['BusinessExpenses' => [
|
||||||
'Start' => 'Start',
|
'Start' => 'Start',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
'Title' => 'Titel',
|
'Title' => 'Titel',
|
||||||
|
'Overview' => 'Übersicht',
|
||||||
|
'Clocking' => 'Zeiterfassung',
|
||||||
|
'Type' => 'Typ',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -31,4 +31,7 @@ return ['BusinessExpenses' => [
|
||||||
'Start' => 'Start',
|
'Start' => 'Start',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
'Title' => 'Title',
|
'Title' => 'Title',
|
||||||
|
'Overview' => 'Overview',
|
||||||
|
'Clocking' => 'Clocking',
|
||||||
|
'Type' => 'Type',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -14,123 +14,286 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Modules\BusinessExpenses\Models\NullExpense;
|
use Modules\BusinessExpenses\Models\NullExpense;
|
||||||
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/** @var \phpOMS\Views\View $this */
|
/** @var \phpOMS\Views\View $this */
|
||||||
$expense = $this->getData('expense') ?? new NullExpense();
|
$expense = $this->getData('expense') ?? new NullExpense();
|
||||||
|
$sessions = $this->data['sessions'] ?? [];
|
||||||
|
|
||||||
echo $this->data['nav']->render(); ?>
|
echo $this->data['nav']->render(); ?>
|
||||||
|
<div class="tabview tab-2">
|
||||||
<div class="row">
|
<div class="box">
|
||||||
<div class="col-xs-12 col-lg-6">
|
<ul class="tab-links">
|
||||||
<section class="portlet highlight-2">
|
<li><label for="c-tab-1"><?= $this->getHtml('Overview'); ?></label>
|
||||||
<div class="portlet-body">
|
<li><label for="c-tab-2"><?= $this->getHtml('Notes'); ?></label>
|
||||||
<table class="wf-100">
|
<li><label for="c-tab-3"><?= $this->getHtml('Expenses'); ?></label>
|
||||||
<tr><td><?= $this->getHtml('Net'); ?>:
|
<li><label for="c-tab-4"><?= $this->getHtml('Clocking'); ?></label>
|
||||||
<td>
|
</ul>
|
||||||
<tr><td><?= $this->getHtml('Gross'); ?>:
|
|
||||||
<td>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tab-content">
|
||||||
<div class="col-xs-12 col-lg-6">
|
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
|
||||||
<section class="portlet highlight-3">
|
<div class="tab">
|
||||||
<div class="portlet-body">
|
<div class="row">
|
||||||
<table class="wf-100">
|
<div class="col-xs-12 col-lg-6">
|
||||||
<tr><td><?= $this->getHtml('Approved'); ?>:
|
<section class="portlet highlight-2">
|
||||||
<td>
|
<div class="portlet-body">
|
||||||
<tr><td><?= $this->getHtml('Paid'); ?>:
|
<table class="wf-100">
|
||||||
<td>
|
<tr><td><?= $this->getHtml('Net'); ?>:
|
||||||
</table>
|
<td>
|
||||||
</div>
|
<tr><td><?= $this->getHtml('Gross'); ?>:
|
||||||
</section>
|
<td>
|
||||||
</div>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="portlet">
|
|
||||||
<div class="portlet-head"><?= $this->getHtml('Report'); ?></div>
|
|
||||||
<div class="portlet-body">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="iReportFrom"><?= $this->getHtml('From'); ?></label>
|
|
||||||
<input type="text" id="iReportFrom" name="name" value="<?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$expense->from->name1, $expense->from->name2, $expense->from->name3])); ?>" disabled>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="col-xs-12 col-lg-6">
|
||||||
<label for="iCreatedAt"><?= $this->getHtml('CreatedAt'); ?></label>
|
<section class="portlet highlight-3">
|
||||||
<input type="datetime-local" id="iCreatedAt" name="created" value="<?= $expense->createdAt->format('Y-m-d\TH:i'); ?>" disabled>
|
<div class="portlet-body">
|
||||||
</div>
|
<table class="wf-100">
|
||||||
|
<tr><td><?= $this->getHtml('Approved'); ?>:
|
||||||
<div class="form-group">
|
<td>
|
||||||
<label for="iExpenseStart"><?= $this->getHtml('Start'); ?></label>
|
<tr><td><?= $this->getHtml('Paid'); ?>:
|
||||||
<input type="datetime-local" id="iExpenseStart" name="start" value="<?= $expense->start->format('Y-m-d\TH:i'); ?>">
|
<td>
|
||||||
</div>
|
</table>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
</section>
|
||||||
<label for="iExpenseEnd"><?= $this->getHtml('End'); ?></label>
|
|
||||||
<input type="datetime-local" id="iExpenseEnd" name="end" value="<?= $expense->end->format('Y-m-d\TH:i'); ?>">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="iDescription"><?= $this->getHtml('Description'); ?></label>
|
|
||||||
<textarea id="iDescription" name="description"><?= $this->printHtml($expense->description); ?></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-foot"></div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="row">
|
||||||
<section class="portlet">
|
<div class="col-xs-12 col-md-6">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Notes'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<section class="portlet">
|
||||||
<div class="slider">
|
<div class="portlet-head"><?= $this->getHtml('Report'); ?></div>
|
||||||
<table id="iSalesClientList" class="default sticky">
|
<div class="portlet-body">
|
||||||
<thead>
|
<div class="form-group">
|
||||||
<tr>
|
<label for="iReportFrom"><?= $this->getHtml('From'); ?></label>
|
||||||
<td>
|
<input type="text" id="iReportFrom" name="name" value="<?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$expense->from->name1, $expense->from->name2, $expense->from->name3])); ?>" disabled>
|
||||||
<td class="wf-100"><?= $this->getHtml('Title'); ?>
|
</div>
|
||||||
<label for="iSalesClientList-sort-1">
|
|
||||||
<input type="radio" name="iSalesClientList-sort" id="iSalesClientList-sort-1">
|
<div class="form-group">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<label for="iCreatedAt"><?= $this->getHtml('CreatedAt'); ?></label>
|
||||||
</label>
|
<input type="datetime-local" id="iCreatedAt" name="created" value="<?= $expense->createdAt->format('Y-m-d\TH:i'); ?>" disabled>
|
||||||
<label for="iSalesClientList-sort-2">
|
</div>
|
||||||
<input type="radio" name="iSalesClientList-sort" id="iSalesClientList-sort-2">
|
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
<div class="form-group">
|
||||||
</label>
|
<label for="iExpenseStart"><?= $this->getHtml('Start'); ?></label>
|
||||||
<label>
|
<input type="datetime-local" id="iExpenseStart" name="start" value="<?= $expense->start->format('Y-m-d\TH:i'); ?>">
|
||||||
<i class="filter g-icon">filter_alt</i>
|
</div>
|
||||||
</label>
|
|
||||||
<tbody>
|
<div class="form-group">
|
||||||
</table>
|
<label for="iExpenseEnd"><?= $this->getHtml('End'); ?></label>
|
||||||
</section>
|
<input type="datetime-local" id="iExpenseEnd" name="end" value="<?= $expense->end->format('Y-m-d\TH:i'); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="form-group">
|
||||||
<div class="row">
|
<label for="iDescription"><?= $this->getHtml('Description'); ?></label>
|
||||||
<div class="col-xs-12">
|
<textarea id="iDescription" name="description"><?= $this->printHtml($expense->description); ?></textarea>
|
||||||
<section class="portlet">
|
</div>
|
||||||
<div class="portlet-head"><?= $this->getHtml('Expenses'); ?><i class="g-icon download btn end-xs">download</i></div>
|
</div>
|
||||||
<div class="slider">
|
<div class="portlet-foot"></div>
|
||||||
<table id="iSalesClientList" class="default sticky">
|
</section>
|
||||||
<thead>
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td>
|
</div>
|
||||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
|
||||||
<label for="iSalesClientList-sort-1">
|
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>>
|
||||||
<input type="radio" name="iSalesClientList-sort" id="iSalesClientList-sort-1">
|
<div class="tab">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<?= $this->data['expense-notes']->render('expense-notes', '', $expense->notes); ?>
|
||||||
</label>
|
</div>
|
||||||
<label for="iSalesClientList-sort-2">
|
|
||||||
<input type="radio" name="iSalesClientList-sort" id="iSalesClientList-sort-2">
|
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>>
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
<div class="tab">
|
||||||
</label>
|
<div class="row">
|
||||||
<label>
|
<div class="col-xs-12">
|
||||||
<i class="filter g-icon">filter_alt</i>
|
<section class="portlet">
|
||||||
</label>
|
<div class="portlet-head"><?= $this->getHtml('Expenses'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<tbody>
|
<div class="slider">
|
||||||
</table>
|
<table id="iSalesClientList" class="default sticky">
|
||||||
</section>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||||
|
<label for="iSalesClientList-sort-1">
|
||||||
|
<input type="radio" name="iSalesClientList-sort" id="iSalesClientList-sort-1">
|
||||||
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
</label>
|
||||||
|
<label for="iSalesClientList-sort-2">
|
||||||
|
<input type="radio" name="iSalesClientList-sort" id="iSalesClientList-sort-2">
|
||||||
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter g-icon">filter_alt</i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Start'); ?>
|
||||||
|
<td><?= $this->getHtml('End'); ?>
|
||||||
|
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($expense->elements as $element) : ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<td><?= $element->id; ?>
|
||||||
|
<td><?= $element->start->format('Y-m-d H:i'); ?>
|
||||||
|
<td><?= $element->end?->format('Y-m-d H:i'); ?>
|
||||||
|
<td><?= $this->printHtml($element->type->l11n); ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
|
||||||
|
<div class="tab">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<section class="portlet">
|
||||||
|
<div class="portlet-head"><?= $this->getHtml('Recordings', 'HumanResourceTimeRecording', 'Backend'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
|
<table id="recordingList" class="default sticky">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><?= $this->getHtml('Date', 'HumanResourceTimeRecording', 'Backend'); ?>
|
||||||
|
<label for="recordingList-sort-1">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-1">
|
||||||
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
</label>
|
||||||
|
<label for="recordingList-sort-2">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-2">
|
||||||
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter g-icon">filter_alt</i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Type', 'HumanResourceTimeRecording', 'Backend'); ?>
|
||||||
|
<label for="recordingList-sort-3">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-3">
|
||||||
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
</label>
|
||||||
|
<label for="recordingList-sort-4">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-4">
|
||||||
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter g-icon">filter_alt</i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Status', 'HumanResourceTimeRecording', 'Backend'); ?>
|
||||||
|
<label for="recordingList-sort-5">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-5">
|
||||||
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
</label>
|
||||||
|
<label for="recordingList-sort-6">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-6">
|
||||||
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter g-icon">filter_alt</i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Start', 'HumanResourceTimeRecording', 'Backend'); ?>
|
||||||
|
<label for="recordingList-sort-7">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-7">
|
||||||
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
</label>
|
||||||
|
<label for="recordingList-sort-8">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-8">
|
||||||
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter g-icon">filter_alt</i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Break', 'HumanResourceTimeRecording', 'Backend'); ?>
|
||||||
|
<label for="recordingList-sort-9">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-9">
|
||||||
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
</label>
|
||||||
|
<label for="recordingList-sort-10">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-10">
|
||||||
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter g-icon">filter_alt</i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('End', 'HumanResourceTimeRecording', 'Backend'); ?>
|
||||||
|
<label for="recordingList-sort-11">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-11">
|
||||||
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
</label>
|
||||||
|
<label for="recordingList-sort-12">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-12">
|
||||||
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter g-icon">filter_alt</i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Total', 'HumanResourceTimeRecording', 'Backend'); ?>
|
||||||
|
<label for="recordingList-sort-13">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-13">
|
||||||
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
</label>
|
||||||
|
<label for="recordingList-sort-14">
|
||||||
|
<input type="radio" name="recordingList-sort" id="recordingList-sort-14">
|
||||||
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter g-icon">filter_alt</i>
|
||||||
|
</label>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$count = 0;
|
||||||
|
foreach ($sessions as $session) : ++$count;
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if ($lastOpenSession !== null
|
||||||
|
&& $session->getStart()->format('Y-m-d') === $lastOpenSession->getStart()->format('Y-m-d')
|
||||||
|
) : ?>
|
||||||
|
<span class="tag">Today</span>
|
||||||
|
<?php else : ?>
|
||||||
|
<?= $session->getStart()->format('Y-m-d'); ?> - <?= $this->getHtml('D' . $session->getStart()->format('w')); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<td><span class="tag"><?= $this->getHtml('CT' . $session->getType()); ?></span>
|
||||||
|
<td><span class="tag"><?= $this->getHtml('CS' . $session->getStatus()); ?></span>
|
||||||
|
<td><?= $session->getStart()->format('H:i'); ?>
|
||||||
|
<td><?= (int) ($session->getBreak() / 3600); ?>h <?= ((int) ($session->getBreak() / 60) % 60); ?>m
|
||||||
|
<td><?= $session->getEnd() !== null ? $session->getEnd()->format('H:i') : ''; ?>
|
||||||
|
<td><?= (int) ($session->getBusy() / 3600); ?>h <?= ((int) ($session->getBusy() / 60) % 60); ?>m
|
||||||
|
<?php
|
||||||
|
$busy['week'] += $session->getBusy();
|
||||||
|
if ($session->getStart()->getTimestamp() < $startWeek->getTimestamp()
|
||||||
|
|| $count === $sessionCount
|
||||||
|
) : ?>
|
||||||
|
<tr>
|
||||||
|
<th colspan="6"> <?= $startWeek->format('Y/m/d'); ?> - <?= $endWeek->format('Y/m/d'); ?>
|
||||||
|
<th><?= (int) ($busy['week'] / 3600); ?>h <?= ((int) ($busy['week'] / 60) % 60); ?>m
|
||||||
|
<?php
|
||||||
|
$endWeek = $startWeek;
|
||||||
|
$startWeek = $startWeek->createModify(0, 0, -7);
|
||||||
|
$busy['week'] = 0;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
$busy['month'] += $session->getBusy();
|
||||||
|
if ($session->getStart()->getTimestamp() < $startMonth->getTimestamp()
|
||||||
|
|| $count === $sessionCount
|
||||||
|
) : ?>
|
||||||
|
<tr>
|
||||||
|
<th colspan="6"> <?= $startMonth->format('Y/m/d'); ?> - <?= $endMonth->format('Y/m/d'); ?>
|
||||||
|
<th><?= (int) ($busy['month'] / 3600); ?>h <?= ((int) ($busy['month'] / 60) % 60); ?>m
|
||||||
|
<?php
|
||||||
|
$endMonth = $startMonth;
|
||||||
|
$startMonth = $startMonth->createModify(0, -1, 0);
|
||||||
|
$busy['month'] = 0;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php if ($count === 0) : ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
"name": "Jingga",
|
"name": "Jingga",
|
||||||
"website": "jingga.app"
|
"website": "jingga.app"
|
||||||
},
|
},
|
||||||
"description": "Accounting module.",
|
|
||||||
"directory": "BusinessExpenses",
|
"directory": "BusinessExpenses",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Admin": "1.0.0",
|
"Admin": "1.0.0",
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,10 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\BusinessExpenses\tests\Controller\Api;
|
namespace Modules\BusinessExpenses\tests\Controller\Api;
|
||||||
|
|
||||||
use phpOMS\Account\AccountStatus;
|
|
||||||
use phpOMS\Account\AccountType;
|
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
use phpOMS\Message\Http\HttpResponse;
|
use phpOMS\Message\Http\HttpResponse;
|
||||||
use phpOMS\Message\Http\RequestStatusCode;
|
|
||||||
use phpOMS\System\File\Local\Directory;
|
use phpOMS\System\File\Local\Directory;
|
||||||
use phpOMS\Uri\HttpUri;
|
use phpOMS\Uri\HttpUri;
|
||||||
use phpOMS\Utils\RnG\DateTime;
|
|
||||||
use phpOMS\Utils\TestUtils;
|
use phpOMS\Utils\TestUtils;
|
||||||
|
|
||||||
trait ApiExpenseControllerTrait
|
trait ApiExpenseControllerTrait
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user