mirror of
https://github.com/Karaka-Management/oms-Auditor.git
synced 2026-02-05 16:58:40 +00:00
use nicer chagne printing
This commit is contained in:
parent
d170b5b8fe
commit
7440a2d57a
|
|
@ -59,7 +59,7 @@ final class ApiController extends Controller
|
|||
string $content = null
|
||||
) : void
|
||||
{
|
||||
$newString = StringUtils::stringify($new);
|
||||
$newString = StringUtils::stringify($new, \JSON_PRETTY_PRINT);
|
||||
$audit = new Audit($account, null, $newString, $type, $subtype, $module, $ref, $content);
|
||||
|
||||
AuditMapper::create($audit);
|
||||
|
|
@ -94,8 +94,8 @@ final class ApiController extends Controller
|
|||
string $content = null
|
||||
) : void
|
||||
{
|
||||
$oldString = StringUtils::stringify($old);
|
||||
$newString = StringUtils::stringify($new);
|
||||
$oldString = StringUtils::stringify($old, \JSON_PRETTY_PRINT);
|
||||
$newString = StringUtils::stringify($new, \JSON_PRETTY_PRINT);
|
||||
$audit = new Audit($account, $oldString, $newString, $type, $subtype, $module, $ref, $content);
|
||||
|
||||
AuditMapper::create($audit);
|
||||
|
|
@ -130,7 +130,7 @@ final class ApiController extends Controller
|
|||
string $content = null
|
||||
) : void
|
||||
{
|
||||
$oldString = StringUtils::stringify($old);
|
||||
$oldString = StringUtils::stringify($old, \JSON_PRETTY_PRINT);
|
||||
$audit = new Audit($account, $oldString, null, $type, $subtype, $module, $ref, $content);
|
||||
|
||||
AuditMapper::create($audit);
|
||||
|
|
|
|||
|
|
@ -21,10 +21,12 @@ echo $this->getData('nav')->render();
|
|||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<article>
|
||||
<?= \phpOMS\Utils\StringUtils::createDiffMarkup(
|
||||
\phpOMS\Views\ViewAbstract::html($this->getData('audit')->getOld() ?? ''),
|
||||
\phpOMS\Views\ViewAbstract::html($this->getData('audit')->getNew() ?? '')
|
||||
); ?>
|
||||
<pre><?= \phpOMS\Utils\StringUtils::createDiffMarkup(
|
||||
\phpOMS\Views\ViewAbstract::html($this->getData('audit')->getOld() ?? ''),
|
||||
\phpOMS\Views\ViewAbstract::html($this->getData('audit')->getNew() ?? ''),
|
||||
"\n"
|
||||
); ?>
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user