feat(js): add app-http contracts and migrate helpdesk runtime layer

This commit is contained in:
2026-04-20 22:31:13 +02:00
parent ec2f03e0cf
commit f189ef9df6
34 changed files with 2023 additions and 1134 deletions

View File

@@ -26,6 +26,7 @@ $searchConfig = is_array($searchConfig ?? null) ? $searchConfig : null;
?>
<div class="app-details-container"
data-app-component="helpdesk-detail"
data-customer-no="<?php e($customerNo); ?>"
data-customer-name="<?php e($customerName); ?>"
data-support-dashboard-url="<?php e(lurl('helpdesk/debitor-support-dashboard-data')); ?>"
@@ -522,4 +523,3 @@ $searchConfig = is_array($searchConfig ?? null) ? $searchConfig : null;
]); ?></script>
<script src="<?php e(assetVersion('vendor/gridjs/gridjs.umd.js')); ?>"></script>
<script type="module" src="<?php e(assetVersion('modules/helpdesk/js/helpdesk-detail.js')); ?>"></script>

View File

@@ -32,6 +32,7 @@ $stateVariant = $stateVariantMap[$domainState] ?? 'neutral';
?>
<div class="app-details-container"
data-app-component="helpdesk-domain-detail"
data-domain-no="<?php e($domainNo); ?>"
data-customer-no="<?php e($customerNo); ?>"
data-customer-name="<?php e($customerName); ?>"
@@ -230,5 +231,4 @@ $stateVariant = $stateVariantMap[$domainState] ?? 'neutral';
'Hotfix' => t('Hotfix'),
]); ?></script>
<script type="module" src="<?php e(assetVersion('modules/helpdesk/js/helpdesk-domain-detail.js')); ?>"></script>
<?php endif; ?>

View File

@@ -71,7 +71,7 @@ $steps = [
</div>
</div>
<div class="app-wizard-field-group" id="wizard-domain-group"
<div class="app-wizard-field-group" id="wizard-domain-group" data-app-component="helpdesk-handover-domain-select"
data-domains-url="<?php e(lurl('helpdesk/handover-domains-data')); ?>"
data-text-initial="<?php e(t('Select a customer first...')); ?>"
data-text-loading="<?php e(t('Loading domains...')); ?>"
@@ -145,6 +145,3 @@ $steps = [
</div>
<?php endif; ?>
</div>
<script type="module" src="<?php e(assetVersion('js/components/app-lookup-field.js')); ?>"></script>
<script type="module" src="<?php e(assetVersion('modules/helpdesk/js/handover-domain-select.js')); ?>"></script>

View File

@@ -13,6 +13,7 @@ $periodLabels = [
];
?>
<div class="app-details-container"
data-app-component="helpdesk-risk-radar"
data-risk-radar-url="<?php e(lurl('helpdesk/risk-radar-data')); ?>"
data-debitor-base-url="<?php e(lurl('helpdesk/debitor/')); ?>"
data-label-high="<?php e(t('High risk')); ?>"
@@ -119,5 +120,3 @@ $periodLabels = [
</div>
</section>
</div>
<script type="module" src="<?php e(assetVersion('modules/helpdesk/js/helpdesk-risk-radar.js')); ?>"></script>

View File

@@ -63,7 +63,7 @@ $tenantHasOAuthSecret = (bool) ($tenantHasOAuthSecret ?? false);
$tenantAuthMode = trim((string) ($tenantRow['auth_mode'] ?? HelpdeskSettingsGateway::AUTH_MODE_BASIC));
$tenantIsOAuth2 = $tenantAuthMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2;
?>
<div class="app-details-container">
<div class="app-details-container" data-app-component="helpdesk-settings">
<section>
<?php
$titlebar = [
@@ -488,5 +488,3 @@ $tenantIsOAuth2 = $tenantAuthMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2;
</form>
</section>
</div>
<script type="module" src="<?php e(assetVersion('modules/helpdesk/js/helpdesk-settings.js')); ?>"></script>

View File

@@ -27,6 +27,7 @@ $handoverSchemaFields = is_array($handoverSchemaFields ?? null) ? $handoverSchem
<div class="handover-schema-split-editor">
<div
id="handover-schema-editor"
data-app-component="helpdesk-handover-schema-editor"
data-initial-fields="<?php e(json_encode($handoverSchemaFields, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); ?>"
data-translations="<?php e(json_encode([
'add_field' => t('Add field'),

View File

@@ -87,4 +87,3 @@ $active = (int) ($values['active'] ?? 1);
</div>
</aside>
</div>
<script type="module" src="<?php e(assetVersion('modules/helpdesk/js/handover-schema-editor.js')); ?>"></script>

View File

@@ -15,6 +15,7 @@ $periodLabels = [
];
?>
<div class="app-details-container"
data-app-component="helpdesk-team"
data-team-workload-url="<?php e(lurl('helpdesk/team-workload-data')); ?>"
data-label-not-assigned="<?php e(t('Not assigned')); ?>"
data-label-queue="<?php e(t('Queue')); ?>"
@@ -111,5 +112,3 @@ $periodLabels = [
</div>
</section>
</div>
<script type="module" src="<?php e(assetVersion('modules/helpdesk/js/helpdesk-team.js')); ?>"></script>

View File

@@ -22,6 +22,7 @@ $backUrl = $ticketCustomerNo !== '' ? lurl('helpdesk/debitor/' . rawurlencode($t
?>
<div class="app-details-container"
data-app-component="helpdesk-ticket"
data-ticket-no="<?php e($ticketNo); ?>"
data-ticket-communication-url="<?php e($ticketCommunicationUrl); ?>"
data-file-download-url="<?php e(lurl('helpdesk/ticket-file-data')); ?>"
@@ -158,5 +159,3 @@ $backUrl = $ticketCustomerNo !== '' ? lurl('helpdesk/debitor/' . rawurlencode($t
'logged an activity' => t('logged an activity'),
'on' => t('on'),
]); ?></script>
<script type="module" src="<?php e(assetVersion('modules/helpdesk/js/helpdesk-ticket.js')); ?>"></script>