mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-01-28 07:38:41 +00:00
fix urls
This commit is contained in:
parent
00b607562c
commit
af88c0dd94
|
|
@ -19,7 +19,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Organigram",
|
||||
"uri": "{/prefix}organization/organigram?{?}",
|
||||
"uri": "{/lang}/{/app}/organization/organigram?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Units",
|
||||
"uri": "{/prefix}organization/unit/list",
|
||||
"uri": "{/lang}/{/app}/organization/unit/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "{/prefix}organization/unit/list",
|
||||
"uri": "{/lang}/{/app}/organization/unit/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "{/prefix}organization/unit/create?{?}",
|
||||
"uri": "{/lang}/{/app}/organization/unit/create?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 25,
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Departments",
|
||||
"uri": "{/prefix}organization/department/list",
|
||||
"uri": "{/lang}/{/app}/organization/department/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 10,
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "{/prefix}organization/department/list",
|
||||
"uri": "{/lang}/{/app}/organization/department/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "{/prefix}organization/department/create?{?}",
|
||||
"uri": "{/lang}/{/app}/organization/department/create?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 25,
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Positions",
|
||||
"uri": "{/prefix}organization/position/list",
|
||||
"uri": "{/lang}/{/app}/organization/position/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 20,
|
||||
|
|
@ -144,7 +144,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "{/prefix}organization/position/list",
|
||||
"uri": "{/lang}/{/app}/organization/position/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "{/prefix}organization/position/create?{?}",
|
||||
"uri": "{/lang}/{/app}/organization/position/create?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 25,
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ final class ApiController extends Controller
|
|||
if ($this->app->appSettings->get(null, SettingsEnum::GROUP_GENERATE_AUTOMATICALLY_POSITION)->content === '1') {
|
||||
$newRequest = new HttpRequest();
|
||||
$newRequest->header->account = $request->header->account;
|
||||
$newRequest->setData('name', 'org:pos:' . \strtolower($position->name));
|
||||
$newRequest->setData('name', 'org:pos:' . \str_replace(' ', '_', \strtolower($position->name)));
|
||||
$newRequest->setData('status', GroupStatus::ACTIVE);
|
||||
$this->app->moduleManager->get('Admin')->apiGroupCreate($newRequest, $response, $data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->getId(); ?>"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
{
|
||||
"key": 1, "listener": "click", "action": [
|
||||
{"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->getId(); ?>"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
|
||||
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,12 +90,12 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tbody>
|
||||
<?php $c = 0;
|
||||
foreach ($departments as $key => $value) : ++$c;
|
||||
$url = UriFactory::build('organization/department/profile?{?}&id=' . $value->getId()); ?>
|
||||
$url = UriFactory::build('{/lang}/{/app}/organization/department/profile?{?}&id=' . $value->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('organization/department/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a class="content" href="<?= UriFactory::build('organization/unit/profile?{?}&id=' . $value->unit->getId()); ?>"><?= $this->printHtml($value->unit->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/department/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/unit/profile?{?}&id=' . $value->unit->getId()); ?>"><?= $this->printHtml($value->unit->name); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($c === 0) : ?>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory;
|
|||
*/
|
||||
$positions = $this->getData('positions') ?? [];
|
||||
|
||||
$previous = empty($positions) ? 'organization/position/list' : 'organization/position/list?{?}&id=' . \reset($positions)->getId() . '&ptype=p';
|
||||
$next = empty($positions) ? 'organization/position/list' : 'organization/position/list?{?}&id=' . \end($positions)->getId() . '&ptype=n';
|
||||
$previous = empty($positions) ? 'organization/position/list' : '{/lang}/{/app}/organization/position/list?{?}&id=' . \reset($positions)->getId() . '&ptype=p';
|
||||
$next = empty($positions) ? 'organization/position/list' : '{/lang}/{/app}/organization/position/list?{?}&id=' . \end($positions)->getId() . '&ptype=n';
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
|
|
@ -87,8 +87,8 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('organization/position/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Department'); ?>"><a class="content" href="<?= UriFactory::build('organization/department/profile?{?}&id=' . $value->department->getId()); ?>"><?= $this->printHtml($value->department->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/position/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Department'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/department/profile?{?}&id=' . $value->department->getId()); ?>"><?= $this->printHtml($value->department->name); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ use phpOMS\Uri\UriFactory;
|
|||
*/
|
||||
$units = $this->getData('units') ?? [];
|
||||
|
||||
$previous = empty($units) ? 'organization/unit/list' : 'organization/unit/list?{?}&id=' . \reset($units)->getId() . '&ptype=p';
|
||||
$next = empty($units) ? 'organization/unit/list' : 'organization/unit/list?{?}&id=' . \end($units)->getId() . '&ptype=n';
|
||||
$previous = empty($units) ? 'organization/unit/list' : '{/lang}/{/app}/organization/unit/list?{?}&id=' . \reset($units)->getId() . '&ptype=p';
|
||||
$next = empty($units) ? 'organization/unit/list' : '{/lang}/{/app}/organization/unit/list?{?}&id=' . \end($units)->getId() . '&ptype=n';
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
|
|
@ -84,14 +84,14 @@ echo $this->getData('nav')->render(); ?>
|
|||
</label>
|
||||
<tbody>
|
||||
<?php foreach ($units as $key => $value) :
|
||||
$url = UriFactory::build('organization/unit/profile?{?}&id=' . $value->getId()); ?>
|
||||
$url = UriFactory::build('{/lang}/{/app}/organization/unit/profile?{?}&id=' . $value->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><img alt="<?= $this->getHtml('IMG_alt_profile'); ?>" class="profile-image" src="<?= $value->image instanceof NullMedia ?
|
||||
UriFactory::build('Web/Backend/img/user_default_' . \mt_rand(1, 6) .'.png') :
|
||||
UriFactory::build('' . $value->image->getPath()); ?>"></a>
|
||||
UriFactory::build('{/lang}/{/app}/' . $value->image->getPath()); ?>"></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('organization/unit/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/unit/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
src="<?=
|
||||
$unit->image instanceof NullMedia ?
|
||||
UriFactory::build('Web/Backend/img/user_default_' . \mt_rand(1, 6) .'.png') :
|
||||
UriFactory::build('' . $unit->image->getPath()); ?>"
|
||||
UriFactory::build('{/lang}/{/app}/' . $unit->image->getPath()); ?>"
|
||||
width="40x">
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user