2026-02-04 23:31:53 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var array<int, string> $errors
|
|
|
|
|
* @var array $form
|
|
|
|
|
* @var array $department
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
use MintyPHP\Session;
|
|
|
|
|
|
|
|
|
|
$values = $form ?? $department ?? [];
|
2026-03-04 15:56:58 +01:00
|
|
|
$pageAuth = is_array($viewAuth['page'] ?? null) ? $viewAuth['page'] : [];
|
|
|
|
|
$canUpdateDepartment = (bool) ($pageAuth['can_update_department'] ?? false);
|
|
|
|
|
$canDeleteDepartment = (bool) ($pageAuth['can_delete_department'] ?? false);
|
|
|
|
|
$isReadOnly = !$canUpdateDepartment;
|
2026-03-22 22:28:19 +01:00
|
|
|
$titleText = $isReadOnly ? t('View department') : t('Edit department');
|
2026-02-04 23:31:53 +01:00
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<div class="app-details-container">
|
|
|
|
|
<section>
|
2026-02-11 19:28:12 +01:00
|
|
|
<?php
|
2026-03-13 09:49:11 +01:00
|
|
|
$hasTenantOptions = !empty($tenants);
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
$titlebar = [
|
2026-03-22 22:28:19 +01:00
|
|
|
'title' => $titleText,
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
'backHref' => 'admin/departments',
|
|
|
|
|
'backTitle' => t('Cancel'),
|
2026-03-04 15:56:58 +01:00
|
|
|
'actions' => $canUpdateDepartment ? [
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
[
|
|
|
|
|
'form' => 'department-form',
|
|
|
|
|
'name' => 'action',
|
|
|
|
|
'value' => 'save',
|
|
|
|
|
'class' => 'secondary outline',
|
|
|
|
|
'label' => t('Save'),
|
2026-03-13 09:49:11 +01:00
|
|
|
'disabled' => !$hasTenantOptions,
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'form' => 'department-form',
|
|
|
|
|
'name' => 'action',
|
|
|
|
|
'value' => 'save_close',
|
|
|
|
|
'class' => 'primary',
|
|
|
|
|
'label' => t('Save & close'),
|
2026-03-13 09:49:11 +01:00
|
|
|
'disabled' => !$hasTenantOptions,
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
],
|
|
|
|
|
] : [],
|
|
|
|
|
];
|
|
|
|
|
require templatePath('partials/app-details-titlebar.phtml');
|
2026-02-11 19:28:12 +01:00
|
|
|
?>
|
2026-03-04 15:56:58 +01:00
|
|
|
<?php
|
|
|
|
|
$validationSummaryErrors = $validationSummaryErrors ?? ($errors ?? []);
|
|
|
|
|
require templatePath('partials/app-details-validation-summary.phtml');
|
|
|
|
|
?>
|
2026-02-11 19:28:12 +01:00
|
|
|
<?php if (!empty($warnings)): ?>
|
|
|
|
|
<div class="app-details-warnings">
|
|
|
|
|
<div class="notice" data-variant="info">
|
|
|
|
|
<ul>
|
|
|
|
|
<?php foreach ($warnings as $warning): ?>
|
|
|
|
|
<li><?php e($warning); ?></li>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
2026-02-04 23:31:53 +01:00
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
$detailsOpenAll = false;
|
|
|
|
|
$isReadOnly = $isReadOnly ?? false;
|
2026-03-04 15:56:58 +01:00
|
|
|
$showDangerZone = $canDeleteDepartment;
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
$dangerZoneDeleteFormId = $showDangerZone ? 'department-delete-form' : '';
|
|
|
|
|
$dangerZoneWarning = t('This will permanently delete this department.');
|
|
|
|
|
$dangerZoneActionLabel = t('Delete department');
|
2026-02-04 23:31:53 +01:00
|
|
|
require __DIR__ . '/_form.phtml';
|
|
|
|
|
?>
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
<?php if ($showDangerZone): ?>
|
|
|
|
|
<form
|
|
|
|
|
id="department-delete-form"
|
|
|
|
|
method="post"
|
|
|
|
|
action="admin/departments/delete/<?php e($values['uuid'] ?? ''); ?>"
|
|
|
|
|
hidden
|
2026-03-04 15:56:58 +01:00
|
|
|
data-detail-confirm-message="<?php e(t('Delete this department?')); ?>"
|
|
|
|
|
data-detail-action-kind="delete"
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
>
|
|
|
|
|
<?php Session::getCsrfInput(); ?>
|
|
|
|
|
</form>
|
|
|
|
|
<?php endif; ?>
|
2026-02-04 23:31:53 +01:00
|
|
|
</section>
|
|
|
|
|
<aside id="app-details-aside-section">
|
|
|
|
|
<div class="app-details-aside-section">
|
|
|
|
|
<hgroup>
|
|
|
|
|
<h2><?php e($values['description'] ?? ''); ?></h2>
|
|
|
|
|
<p><?php e(t('Department')); ?></p>
|
|
|
|
|
</hgroup>
|
2026-02-11 19:28:12 +01:00
|
|
|
<div class="badge-list">
|
|
|
|
|
<?php if ((string) ($values['active'] ?? '1') === '0'): ?>
|
|
|
|
|
<span class="badge" data-variant="danger"><?php e(t('Inactive')); ?></span>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<span class="badge" data-variant="success"><?php e(t('Active')); ?></span>
|
|
|
|
|
<?php endif; ?>
|
2026-02-04 23:31:53 +01:00
|
|
|
</div>
|
2026-02-11 19:28:12 +01:00
|
|
|
<?php if (!empty($values['code']) || !empty($values['cost_center'])): ?>
|
|
|
|
|
<hr>
|
|
|
|
|
<?php if (!empty($values['code'])): ?>
|
|
|
|
|
<p><small><?php e(t('Code')); ?></small><br><?php e($values['code']); ?></p>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php if (!empty($values['cost_center'])): ?>
|
|
|
|
|
<p><small><?php e(t('Cost center')); ?></small><br><?php e($values['cost_center']); ?></p>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php endif; ?>
|
2026-02-04 23:31:53 +01:00
|
|
|
<?php
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
$asideAuditDetailsName = 'department-audit';
|
|
|
|
|
$asideAuditCreated = (string) ($values['created'] ?? '');
|
|
|
|
|
$asideAuditCreatedByLabel = (string) ($values['created_by_label'] ?? '');
|
|
|
|
|
$asideAuditCreatedById = $values['created_by'] ?? null;
|
|
|
|
|
$asideAuditCreatedByUuid = (string) ($values['created_by_uuid'] ?? '');
|
|
|
|
|
$asideAuditModified = (string) ($values['modified'] ?? '');
|
|
|
|
|
$asideAuditModifiedByLabel = (string) ($values['modified_by_label'] ?? '');
|
|
|
|
|
$asideAuditModifiedById = $values['modified_by'] ?? null;
|
|
|
|
|
$asideAuditModifiedByUuid = (string) ($values['modified_by_uuid'] ?? '');
|
|
|
|
|
|
|
|
|
|
$asideIdsDetailsName = 'department-ids';
|
|
|
|
|
$asideIdValue = $values['id'] ?? '';
|
|
|
|
|
$asideUuidValue = (string) ($values['uuid'] ?? '');
|
2026-02-04 23:31:53 +01:00
|
|
|
?>
|
2026-02-11 19:28:12 +01:00
|
|
|
<hr>
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
<?php require templatePath('partials/app-details-aside-audit.phtml'); ?>
|
2026-02-11 19:28:12 +01:00
|
|
|
<hr>
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
<?php require templatePath('partials/app-details-aside-ids.phtml'); ?>
|
2026-02-11 19:28:12 +01:00
|
|
|
<hr>
|
2026-02-04 23:31:53 +01:00
|
|
|
</div>
|
|
|
|
|
</aside>
|
|
|
|
|
</div>
|