Show edit action for client service subscriptions

This commit is contained in:
A R R R Associates
2026-08-05 15:20:03 +05:30
parent 6a6ca2a4a7
commit 8bf409049b
2 changed files with 13 additions and 4 deletions
+1
View File
@@ -182,6 +182,7 @@ def subscription_master_list(request: Request, q: str = "", include_inactive: bo
rows=rows, rows=rows,
q=q, q=q,
include_inactive=include_inactive, include_inactive=include_inactive,
can_edit_subscription="clients.edit" in set(get_user_permissions(db, user.id)),
), ),
) )
finally: finally:
@@ -90,10 +90,18 @@
</span> </span>
</td> </td>
<td class="px-4 py-3 text-right text-sm"> <td class="px-4 py-3 text-right text-sm">
<a href="/services/subscriptions/{{ plan.id }}" <div class="inline-flex items-center gap-3">
class="font-medium text-brand-700 hover:underline"> <a href="/services/subscriptions/{{ plan.id }}"
View class="font-medium text-brand-700 hover:underline">
</a> View
</a>
{% if can_edit_subscription %}
<a href="/services/subscriptions/{{ plan.id }}/edit"
class="font-medium text-brand-700 hover:underline">
Edit
</a>
{% endif %}
</div>
</td> </td>
</tr> </tr>
{% else %} {% else %}