Use registration master for service catalogue scope types
This commit is contained in:
@@ -19,11 +19,18 @@
|
||||
<div id="registration-type-field"><label class="mb-2 block text-sm font-medium text-slate-700">Required Registration Type</label>
|
||||
<select name="required_registration_type" class="w-full rounded-xl border border-slate-300 px-4 py-2 text-sm">
|
||||
<option value="">Not applicable</option>
|
||||
{% for value in ['GST','TAN','PF','ESI','PT','IEC','FSSAI','UDYAM','OTHER'] %}
|
||||
<option value="{{ value }}" {% if catalogue and catalogue.required_registration_type == value %}selected{% endif %}>{{ value }}</option>
|
||||
{% set current_registration_type = catalogue.required_registration_type if catalogue and catalogue.required_registration_type else '' %}
|
||||
{% if current_registration_type and current_registration_type not in registration_type_codes %}
|
||||
<option value="{{ current_registration_type }}" selected>{{ current_registration_type }} — Existing legacy value</option>
|
||||
{% endif %}
|
||||
{% for registration_type in registration_types %}
|
||||
<option value="{{ registration_type.code }}" {% if current_registration_type == registration_type.code %}selected{% endif %}>{{ registration_type.code }} — {{ registration_type.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<p class="mt-1 text-xs text-slate-500">Used only for Registration-level services.</p>
|
||||
<p class="mt-1 text-xs text-slate-500">Used only for Registration-level services. Values come from the active Registration Type Master.</p>
|
||||
{% if request.query_params.get('error') == 'registration_type' %}
|
||||
<p class="mt-1 text-xs font-medium text-red-600">Select an active Registration Type Master value.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div><label class="mb-2 block text-sm font-medium text-slate-700">Sort Order</label><input type="number" name="sort_order" value="{{ catalogue.sort_order if catalogue else 100 }}" class="w-full rounded-xl border border-slate-300 px-4 py-2 text-sm"></div>
|
||||
<div class="flex items-center gap-6 pt-7 text-sm text-slate-700"><label class="inline-flex items-center gap-2"><input type="checkbox" name="is_active" {% if not catalogue or catalogue.is_active %}checked{% endif %}> Active</label><label class="inline-flex items-center gap-2"><input type="checkbox" name="is_client_requestable" {% if catalogue and catalogue.is_client_requestable %}checked{% endif %}> Client Requestable</label><label class="inline-flex items-center gap-2"><input type="checkbox" name="is_consultant_requestable" {% if catalogue and catalogue.is_consultant_requestable %}checked{% endif %}> Consultant Requestable</label></div>
|
||||
|
||||
Reference in New Issue
Block a user