mirror of
https://github.com/Karaka-Management/oms-Marketing.git
synced 2026-02-10 15:38:41 +00:00
autofixes
This commit is contained in:
parent
3787703c9c
commit
8ee2071d8d
|
|
@ -34,7 +34,6 @@ use phpOMS\Views\View;
|
|||
* While costs are universal the goal for promotions, events etc. is not.
|
||||
* In some cases it could be sales in others it could be response rate etc.
|
||||
* Implement a way to define goals and allow manual+system side evaluation.
|
||||
*
|
||||
*/
|
||||
final class BackendController extends Controller
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class PermissionState extends Enum
|
||||
{
|
||||
public const PROMOTION = 1;
|
||||
|
||||
public const EVENT = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class ProgressType extends Enum
|
||||
{
|
||||
public const MANUAL = 0;
|
||||
|
||||
public const LINEAR = 1;
|
||||
|
||||
public const EXPONENTIAL = 2;
|
||||
|
||||
public const LOG = 3;
|
||||
|
||||
public const TASKS = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class Promotion
|
|||
* @since 1.0.0
|
||||
*/
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* Description.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tbody>
|
||||
<tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td colspan="2"><select></select>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Title') ?></label>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Title'); ?></label>
|
||||
<tr><td colspan="2"><input type="text">
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Description') ?></label>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Description'); ?></label>
|
||||
<tr><td colspan="2"><textarea></textarea>
|
||||
<tr><td><label for="iTitle"><?= $this->getHtml('Start'); ?></label><td><label for="iTitle"><?= $this->getHtml('End'); ?></label>
|
||||
<tr><td><input type="datetime-local"><td><input type="datetime-local">
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Budget') ?></label>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Budget'); ?></label>
|
||||
<tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder="">
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -27,15 +27,15 @@ echo $this->getData('nav')->render(); ?>
|
|||
<table class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Status') ?>
|
||||
<td><?= $this->getHtml('Type') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Title') ?>
|
||||
<td><?= $this->getHtml('Start') ?>
|
||||
<td><?= $this->getHtml('End') ?>
|
||||
<td><?= $this->getHtml('Location') ?>
|
||||
<td><?= $this->getHtml('Expenses') ?>
|
||||
<td><?= $this->getHtml('Sales') ?>
|
||||
<td><?= $this->getHtml('Budget') ?>
|
||||
<td><?= $this->getHtml('Status'); ?>
|
||||
<td><?= $this->getHtml('Type'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?>
|
||||
<td><?= $this->getHtml('Start'); ?>
|
||||
<td><?= $this->getHtml('End'); ?>
|
||||
<td><?= $this->getHtml('Location'); ?>
|
||||
<td><?= $this->getHtml('Expenses'); ?>
|
||||
<td><?= $this->getHtml('Sales'); ?>
|
||||
<td><?= $this->getHtml('Budget'); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ([] as $key => $value) : ++$count; ?>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
|||
|
|
@ -28,15 +28,15 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tbody>
|
||||
<tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td colspan="2"><select></select>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Title') ?></label>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Title'); ?></label>
|
||||
<tr><td colspan="2"><input type="text">
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Description') ?></label>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Description'); ?></label>
|
||||
<tr><td colspan="2"><textarea></textarea>
|
||||
<tr><td><label for="iTitle"><?= $this->getHtml('Start') ?></label><td><label for="iTitle"><?= $this->getHtml('End') ?></label>
|
||||
<tr><td><label for="iTitle"><?= $this->getHtml('Start'); ?></label><td><label for="iTitle"><?= $this->getHtml('End'); ?></label>
|
||||
<tr><td><input type="datetime-local"><td><input type="datetime-local">
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Budget') ?></label>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Budget'); ?></label>
|
||||
<tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder="">
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Limit') ?></label>
|
||||
<tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Limit'); ?></label>
|
||||
<tr><td colspan="2"><input type="text">
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@ echo $this->getData('nav')->render(); ?>
|
|||
<table class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="wf-100"><?= $this->getHtml('Title') ?>
|
||||
<td><?= $this->getHtml('Start') ?>
|
||||
<td><?= $this->getHtml('Due') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?>
|
||||
<td><?= $this->getHtml('Start'); ?>
|
||||
<td><?= $this->getHtml('Due'); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($list as $key => $value) : ++$count;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}marketing/promotion/profile?{?}&id=' . $value->getId());?>
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}marketing/promotion/profile?{?}&id=' . $value->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Start') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getStart()->format('Y-m-d')); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Due') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getEnd()->format('Y-m-d')); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Start'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getStart()->format('Y-m-d')); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Due'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getEnd()->format('Y-m-d')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@ echo $this->getData('nav')->render(); ?>
|
|||
<form id="fProject" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/api}marketing/promotion?{?}&csrf={$CSRF}'); ?>">
|
||||
<table class="layout wf-100">
|
||||
<tbody>
|
||||
<tr><td colspan="2"><label for="iName"><?= $this->getHtml('Name') ?></label>
|
||||
<tr><td colspan="2"><label for="iName"><?= $this->getHtml('Name'); ?></label>
|
||||
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder=" Name" value="<?= $this->printHtml($promotion->getName()); ?>" required>
|
||||
<tr><td><label for="iStart"><?= $this->getHtml('Start') ?></label>
|
||||
<td><label for="iEnd"><?= $this->getHtml('End') ?></label>
|
||||
<tr><td><label for="iStart"><?= $this->getHtml('Start'); ?></label>
|
||||
<td><label for="iEnd"><?= $this->getHtml('End'); ?></label>
|
||||
<tr><td><input type="datetime-local" id="iStart" name="start" value="<?= $this->printHtml($promotion->getStart()->format('Y-m-d\TH:i:s')); ?>">
|
||||
<td><input type="datetime-local" id="iEnd" name="end" value="<?= $this->printHtml($promotion->getEnd()->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td colspan="2"><label for="iDescription"><?= $this->getHtml('Description') ?></label>
|
||||
<tr><td colspan="2"><label for="iDescription"><?= $this->getHtml('Description'); ?></label>
|
||||
<tr><td colspan="2"><textarea id="iDescription" name="desc"><?= $this->printHtml($promotion->getDescription()); ?></textarea>
|
||||
<tr><td><label for="iBudget"><?= $this->getHtml('Budget') ?></label><td><label for="iActual"><?= $this->getHtml('Actual') ?></label>
|
||||
<tr><td><label for="iBudget"><?= $this->getHtml('Budget'); ?></label><td><label for="iActual"><?= $this->getHtml('Actual'); ?></label>
|
||||
<tr><td><input type="text" id="iBudget" name="budget" placeholder=""><td><input type="text" id="iActual" name="actual">
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ namespace Modules\Marketing\tests\Admin;
|
|||
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected const MODULE_NAME = 'Marketing';
|
||||
|
||||
protected const URI_LOAD = '';
|
||||
|
||||
use \Modules\tests\ModuleTestTrait;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user