Show scope identity for client service subscriptions

This commit is contained in:
A R R R Associates
2026-08-07 12:49:17 +05:30
parent 986479d3a2
commit eb9d65cd8b
5 changed files with 288 additions and 8 deletions
@@ -9,10 +9,13 @@
<div class="flex flex-wrap items-center justify-between gap-3">
<div>
<h2 class="text-xl font-semibold text-slate-900">
{{ plan.client.client_name }} — {{ plan.catalogue.service_name }}
{{ scope_display.primary if scope_display else plan.client.client_name }} — {{ plan.catalogue.service_name }}
</h2>
<p class="text-sm text-slate-500">
Client service subscription master and its period-wise engagements.
{% if scope_display and scope_display.context %}
<span class="block">{{ scope_display.context }}</span>
{% endif %}
</p>
</div>
<div class="flex flex-wrap gap-2">
@@ -10,7 +10,10 @@
<div>
<h2 class="text-xl font-semibold text-slate-900">Edit Client Service Subscription</h2>
<p class="text-sm text-slate-500">
{{ plan.client.client_name }} — {{ plan.catalogue.service_name }}
{{ scope_display.primary if scope_display else plan.client.client_name }} — {{ plan.catalogue.service_name }}
{% if scope_display and scope_display.context %}
<span class="block text-xs text-slate-400">{{ scope_display.context }}</span>
{% endif %}
</p>
</div>
<a href="/services/subscriptions/{{ plan.id }}"
@@ -10,7 +10,7 @@
<div>
<h2 class="text-xl font-semibold text-slate-900">Client Service Subscriptions</h2>
<p class="text-sm text-slate-500">
Persistent client-level services. Period-wise engagements are generated and tracked separately.
Persistent client services shown by their assigned scope. Period-wise engagements are generated and tracked separately.
</p>
</div>
<a href="/services/engagements/new"
@@ -25,7 +25,7 @@
<input type="text"
name="q"
value="{{ q or '' }}"
placeholder="Client or service"
placeholder="Client, scope or service"
class="w-72 rounded-xl border border-slate-300 px-3 py-2 text-sm">
</div>
<label class="inline-flex items-center gap-2 pb-2 text-sm text-slate-700">
@@ -47,7 +47,7 @@
<table class="min-w-full divide-y divide-slate-200">
<thead class="bg-slate-50">
<tr>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">Client</th>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">Client / Scope</th>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">Service</th>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">Recurrence</th>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">Default Team</th>
@@ -60,8 +60,25 @@
{% for plan, count, latest_due in rows %}
<tr class="align-top">
<td class="px-4 py-3 text-sm">
<div class="font-medium text-slate-900">{{ plan.client.client_name }}</div>
<div class="text-xs text-slate-500">{{ plan.client.client_code or '' }}</div>
{% set display = scope_displays.get(plan.id) %}
<div class="font-medium text-slate-900">
{{ display.primary if display else plan.client.client_name }}
</div>
{% if display and display.secondary %}
<div class="text-xs text-slate-500">{{ display.secondary }}</div>
{% elif plan.client.client_code %}
<div class="text-xs text-slate-500">{{ plan.client.client_code }}</div>
{% endif %}
{% if display and display.context %}
<div class="mt-0.5 text-xs text-slate-400">{{ display.context }}</div>
{% endif %}
{% if display and display.scope_label != 'Client' %}
<div class="mt-1">
<span class="rounded-full bg-slate-100 px-2 py-0.5 text-[11px] font-medium text-slate-600">
{{ display.scope_label }}
</span>
</div>
{% endif %}
</td>
<td class="px-4 py-3 text-sm">
<div class="font-medium text-slate-900">{{ plan.catalogue.service_name }}</div>
@@ -10,7 +10,10 @@
<div>
<h2 class="text-xl font-semibold text-slate-900">Map Subscription Scope</h2>
<p class="text-sm text-slate-500">
{{ plan.client.client_name }} — {{ plan.catalogue.service_name }}
{{ scope_display.primary if scope_display else plan.client.client_name }} — {{ plan.catalogue.service_name }}
{% if scope_display and scope_display.context %}
<span class="block text-xs text-slate-400">{{ scope_display.context }}</span>
{% endif %}
</p>
</div>
<a href="/services/subscriptions/{{ plan.id }}"