- Add a new 'system' type to dynamic forms, first one defined = 'tenant_make'
- Add active field to Specialist model - Improve Specialists view - Propagate make for Role Definition Specialist to Selection Specialist (make is defined at the role level) - Ensure a make with a given name can only be defined once
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import json
|
||||
import uuid
|
||||
from datetime import datetime as dt, timezone as tz
|
||||
from flask import request, redirect, flash, render_template, Blueprint, session, current_app
|
||||
@@ -627,15 +628,17 @@ def delete_tenant_project(tenant_project_id):
|
||||
@roles_accepted('Super User', 'Partner Admin', 'Tenant Admin')
|
||||
def tenant_make():
|
||||
form = TenantMakeForm()
|
||||
customisation_config = cache_manager.customisations_config_cache.get_config("CHAT_CLIENT_CUSTOMISATION")
|
||||
default_customisation_options = create_default_config_from_type_config(customisation_config["configuration"])
|
||||
form.add_dynamic_fields("configuration", customisation_config, default_customisation_options)
|
||||
|
||||
if form.validate_on_submit():
|
||||
tenant_id = session['tenant']['id']
|
||||
new_tenant_make = TenantMake()
|
||||
form.populate_obj(new_tenant_make)
|
||||
new_tenant_make.tenant_id = tenant_id
|
||||
customisation_config = cache_manager.customisations_config_cache.get_config("CHAT_CLIENT_CUSTOMISATION")
|
||||
new_tenant_make.chat_customisation_options = create_default_config_from_type_config(
|
||||
customisation_config["configuration"])
|
||||
form.add_dynamic_fields("configuration", customisation_config, new_tenant_make.chat_customisation_options)
|
||||
customisation_options = form.get_dynamic_data("configuration")
|
||||
new_tenant_make.chat_customisation_options = json.dumps(customisation_options)
|
||||
set_logging_information(new_tenant_make, dt.now(tz.utc))
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user