Files
meguri/static/resource-details.html
T

20 lines
3.5 KiB
HTML
Raw Normal View History

2026-09-24 14:35:05 +03:00
<div class="resource-widget">
<template x-if="resourceKind==='schedule'"><div class="schedule-widget">
<div class="widget-meta"><span class="widget-type"><svg class="resource-icon" viewBox="0 0 24 24" aria-hidden="true"><path :d="resourceIcon(resource.type==='rotation'?'rotation':'schedule')"></path></svg><span x-text="label(resource.type)"></span></span><span x-show="resource.type==='rotation'" x-text="resource.type==='rotation'?t('resource_rotation_cycle',{days:resource.shift_days,date:formatDate(resource.anchor)}):''"></span><span x-text="resource.handover.slice(0,5)+' · '+doc.timezone"></span></div>
<div class="widget-chain" :class="{'rotation-chain':resource.type==='rotation'}">
<template x-for="(id,index) in resource.participants" :key="index"><div class="widget-node person-node"><span class="widget-order" x-text="index+1"></span><span x-text="person(id)"></span><small x-show="resource.type==='priority' && index===0" x-text="t('primary_a9a96e')"></small></div></template>
<template x-if="resource.type==='priority'"><div class="widget-node fallback-node"><svg class="resource-icon" viewBox="0 0 24 24" aria-hidden="true"><path :d="resourceIcon('fallback')"></path></svg><div><small x-text="t('resource_fallback_when')"></small><strong x-text="scheduleName(resource.fallback)"></strong></div></div></template>
</div>
</div></template>
<template x-if="resourceKind==='escalation'"><div class="escalation-widget">
<div class="widget-chain">
<div class="widget-node trigger-node"><svg class="resource-icon" viewBox="0 0 24 24" aria-hidden="true"><path :d="resourceIcon('escalation')"></path></svg><span x-text="t('resource_detail_trigger')"></span></div>
<template x-for="(step,index) in resource.steps" :key="index"><div class="widget-node escalation-node"><span class="widget-order" x-text="index+1"></span><div><small x-text="step.delay_minutes===0?t('immediately_21b60a'):step.delay_minutes+t('min_after_alert_8adeb2')"></small><strong x-text="describeRecipient(step.recipient)"></strong><small x-text="t(step.condition==='if-not-acked'?'if_unacknowledged_407d03':'if_still_open_c34949')"></small></div></div></template>
</div>
<div class="widget-meta widget-end"><svg class="resource-icon" viewBox="0 0 24 24" aria-hidden="true"><path :d="resourceIcon('rotation')"></path></svg><span x-text="resource.repeat.count && resource.repeat.wait_minutes?t('repeat_654579')+resource.repeat.count+t('times_wait_e1b163')+resource.repeat.wait_minutes+t('min_f4e8a8'):t('end_of_policy_no_repeats_c2ac4f')"></span></div>
</div></template>
<template x-if="resourceKind==='route'"><div class="routing-widget widget-chain">
<div class="widget-node routing-conditions"><svg class="resource-icon" viewBox="0 0 24 24" aria-hidden="true"><path :d="resourceIcon('condition')"></path></svg><div><small x-text="t('resource_all_conditions')"></small><div class="widget-condition-list"><span x-show="!resource.conditions.length" x-text="t('any_alert_4496c3')"></span><template x-for="(condition,index) in resource.conditions" :key="index"><span class="widget-condition" x-text="conditionText(condition)"></span></template><span x-show="resource.window" class="widget-condition" x-text="resource.window?workingSummary():''"></span></div></div></div>
<div class="widget-node route-destination"><svg class="resource-icon" viewBox="0 0 24 24" aria-hidden="true"><path :d="resourceIcon('route')"></path></svg><div><small x-text="t('resource_detail_destination')"></small><strong x-text="doc.escalations.find(p=>p.id===resource.escalation_id)?.name || t('do_not_notify_1a59a6')"></strong></div></div>
</div></template>
</div>