Allow partners to add staff or branch managers

This commit is contained in:
A R R R Associates
2026-08-04 22:59:18 +05:30
parent da8f49fe0a
commit 9abe68d695
3 changed files with 47 additions and 14 deletions
@@ -44,9 +44,12 @@
<div>
<label class="mb-1 block text-sm font-medium text-slate-700">Employee User Role</label>
{% if partner_staff_mode %}
<input type="hidden" name="employee_role" value="Staff">
<input value="Staff" disabled class="w-full rounded-xl border border-slate-300 bg-slate-100 px-3 py-2 text-sm text-slate-700">
<p class="mt-1 text-xs text-slate-500">Partners can create Staff users only.</p>
<select name="employee_role" class="w-full rounded-xl border border-slate-300 px-3 py-2 text-sm">
{% set selected_role = employee.get('employee_role', 'Staff') if employee and is_dict else 'Staff' %}
<option value="Staff" {% if selected_role == 'Staff' %}selected{% endif %}>Staff</option>
<option value="Branch Manager" {% if selected_role == 'Branch Manager' %}selected{% endif %}>Manager</option>
</select>
<p class="mt-1 text-xs text-slate-500">The user will be created for your branch as Staff or Manager.</p>
{% else %}
<select name="employee_role" class="w-full rounded-xl border border-slate-300 px-3 py-2 text-sm">{% for r in employee_role_names %}<option value="{{ r }}" {% if r == 'Staff' %}selected{% endif %}>{{ r }}</option>{% endfor %}</select>
{% endif %}