Show edit action for client service subscriptions
This commit is contained in:
@@ -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 %}
|
||||||
|
|||||||
Reference in New Issue
Block a user