mirror of
https://github.com/Karaka-Management/oms-QualityManagement.git
synced 2026-02-03 15:48:40 +00:00
bug fixes
This commit is contained in:
parent
d1ff07bad3
commit
2a422a7222
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
|
|
@ -9,5 +9,5 @@ jobs:
|
|||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: 'Thank you for createing this issue. We will check it as soon as possible.'
|
||||
issue-message: 'Thank you for creating this issue. We will check it as soon as possible.'
|
||||
pr-message: 'Thank you for your pull request. We will check it as soon as possible.'
|
||||
|
|
|
|||
|
|
@ -14,9 +14,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\QualityManagement\Controller;
|
||||
|
||||
use Attribute;
|
||||
use Modules\Admin\Models\NullAccount;
|
||||
use Modules\Notification\Models\NotificationType;
|
||||
use Modules\QualityManagement\Models\Report;
|
||||
use Modules\QualityManagement\Models\ReportMapper;
|
||||
use Modules\Tasks\Models\Attribute\TaskAttributeTypeMapper;
|
||||
use Modules\Tasks\Models\TaskElementMapper;
|
||||
use Modules\Tasks\Models\TaskMapper;
|
||||
use Modules\Tasks\Models\TaskStatus;
|
||||
|
|
@ -101,9 +104,52 @@ final class ApiController extends Controller
|
|||
private function createReportFromRequest(RequestAbstract $request) : Report
|
||||
{
|
||||
$request->setData('redirect', 'qualitymanagement/report/view?for={$id}');
|
||||
/** @var \Modules\Tasks\Models\Task $task */
|
||||
$task = $this->app->moduleManager->get('Tasks', 'Api')->createTaskFromRequest($request);
|
||||
$task->type = TaskType::HIDDEN;
|
||||
$task->unit ??= $this->app->unitId;
|
||||
$task->for = $request->hasData('account') ? new NullAccount((int) $request->getData('account')) : null;
|
||||
|
||||
if (($value = $request->getDataString('bill')) !== null) {
|
||||
$attrType = TaskAttributeTypeMapper::get()
|
||||
->where('name', 'bill')
|
||||
->execute();
|
||||
|
||||
if ($attrType->id !== 0) {
|
||||
$internalRequest = new RequestAbstract();
|
||||
$internalRequest->setData('value', $value);
|
||||
$attribute = $this->app->moduleManager->get('Attribute', 'Api')->createAttributeFromRequest($internalRequest, $attrType);
|
||||
|
||||
$task->attributes[] = $attribute;
|
||||
}
|
||||
}
|
||||
|
||||
if (($value = $request->getDataString('item')) !== null) {
|
||||
$attrType = TaskAttributeTypeMapper::get()
|
||||
->where('name', 'item')
|
||||
->execute();
|
||||
|
||||
if ($attrType->id !== 0) {
|
||||
$internalRequest = new RequestAbstract();
|
||||
$internalRequest->setData('value', $value);
|
||||
$attribute = $this->app->moduleManager->get('Attribute', 'Api')->createAttributeFromRequest($internalRequest, $attrType);
|
||||
|
||||
$task->attributes[] = $attribute;
|
||||
}
|
||||
}
|
||||
|
||||
if (($value = $request->getDataString('lot')) !== null) {
|
||||
$attrType = TaskAttributeTypeMapper::get()
|
||||
->where('name', 'lot_internal')
|
||||
->execute();
|
||||
|
||||
if ($attrType->id !== 0) {
|
||||
$internalRequest = new RequestAbstract();
|
||||
$internalRequest->setData('value', $value);
|
||||
$attribute = $this->app->moduleManager->get('Attribute', 'Api')->createAttributeFromRequest($internalRequest, $attrType);
|
||||
|
||||
$task->attributes[] = $attribute;
|
||||
}
|
||||
}
|
||||
|
||||
return new Report($task);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,6 @@ final class BackendController extends Controller
|
|||
->query($openQuery)
|
||||
->executeGetArray();
|
||||
|
||||
$view->data['stats'] = ReportMapper::getStatOverview();
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
|
|
@ -145,6 +143,8 @@ final class BackendController extends Controller
|
|||
->with('task/taskElements/createdBy')
|
||||
->with('task/taskElements/files')
|
||||
->with('task/attributes')
|
||||
->with('task/attributes/type')
|
||||
->with('task/attributes/value')
|
||||
->with('task/for')
|
||||
->where('id', (int) $request->getData('id'))
|
||||
->where('task/tags/title/language', $request->header->l11n->language)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ echo $this->data['nav']->render(); ?>
|
|||
|
||||
<div class="form-group">
|
||||
<label for="iLotSN"><?= $this->getHtml('LotSN'); ?></label>
|
||||
<input id="iLotSN" type="text" name="lot">
|
||||
<input id="iLotSN" type="text" name="lot_internal">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ $reports = $this->data['reports'];
|
|||
echo $this->data['nav']->render(); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-9">
|
||||
<div class="col-xs-12">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Open'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||
<div class="slider">
|
||||
|
|
@ -34,7 +34,6 @@ echo $this->data['nav']->render(); ?>
|
|||
<td><?= $this->getHtml('Creator'); ?>
|
||||
<td><?= $this->getHtml('Assigned'); ?>
|
||||
<td><?= $this->getHtml('For'); ?>
|
||||
<td><?= $this->getHtml('Item'); ?>
|
||||
<td><?= $this->getHtml('Created'); ?>
|
||||
<tbody>
|
||||
<?php
|
||||
|
|
@ -56,7 +55,6 @@ echo $this->data['nav']->render(); ?>
|
|||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td><a class="content"><?= $this->printHtml($report->task->for->name1); ?> <?= $this->printHtml($report->task->for->name2); ?>
|
||||
<td><a href="<?= $url; ?>"><?= $this->getHtml('P' . $report->task->priority, 'Tasks'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($report->task->createdAt->format('Y-m-d H:i')); ?></a>
|
||||
<?php endforeach; if ($c == 0) : ?>
|
||||
<tr><td colspan="7" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
@ -75,7 +73,6 @@ echo $this->data['nav']->render(); ?>
|
|||
<td><?= $this->getHtml('Creator'); ?>
|
||||
<td><?= $this->getHtml('Assigned'); ?>
|
||||
<td><?= $this->getHtml('For'); ?>
|
||||
<td><?= $this->getHtml('Item'); ?>
|
||||
<td><?= $this->getHtml('Created'); ?>
|
||||
<tbody>
|
||||
<?php
|
||||
|
|
@ -97,7 +94,6 @@ echo $this->data['nav']->render(); ?>
|
|||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td><a class="content"><?= $this->printHtml($report->task->for->name1); ?> <?= $this->printHtml($report->task->for->name2); ?>
|
||||
<td><a href="<?= $url; ?>"><?= $this->getHtml('P' . $report->task->priority, 'Tasks'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($report->task->createdAt->format('Y-m-d H:i')); ?></a>
|
||||
<?php endforeach; if ($c == 0) : ?>
|
||||
<tr><td colspan="7" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
@ -106,19 +102,4 @@ echo $this->data['nav']->render(); ?>
|
|||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-3">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Stats'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="list">
|
||||
<tr><th><?= $this->getHtml('Unassigned'); ?><td><?= $this->data['stats']['unassigned'] ?? 0; ?>
|
||||
<tr><th><?= $this->getHtml('Open'); ?><td><?= $this->data['stats']['open'] ?? 0; ?>
|
||||
<tr><th><?= $this->getHtml('InProgress'); ?><td><?= $this->data['stats']['inprogress'] ?? 0; ?>
|
||||
<tr><th><?= $this->getHtml('Closed'); ?><td><?= $this->data['stats']['closed'] ?? 0; ?>
|
||||
<tr><th><?= $this->getHtml('Total'); ?><td><?= $this->data['stats']['total'] ?? 0; ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -371,13 +371,13 @@ echo $this->data['nav']->render(); ?>
|
|||
|
||||
<div class="form-group wf-100">
|
||||
<div class="more-container wf-100">
|
||||
<input id="more-customer-sales" type="checkbox" name="more-container">
|
||||
<label for="more-customer-sales">
|
||||
<input id="more-customer-sales" class="more" type="checkbox" name="more-container">
|
||||
<label class="more" for="more-customer-sales">
|
||||
<span><?= $this->getHtml('Advanced'); ?></span>
|
||||
<i class="g-icon expand">chevron_right</i>
|
||||
</label>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group more">
|
||||
<label for="iPriority"><?= $this->getHtml('Priority'); ?></label>
|
||||
<select id="iPriority" name="priority">
|
||||
<option value="<?= TaskPriority::NONE; ?>"<?= $task->priority === TaskPriority::NONE ? ' selected' : '';?>><?= $this->getHtml('P0', 'Tasks'); ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user