- Add Specialist Magic Links
- correction of some bugs: - dynamic fields for adding documents / urls to dossier catalog - tabs in latest bootstrap version no longer functional - partner association of license tier not working when no partner selected - data-type dynamic field needs conversion to isoformat - Add public tables to env.py of tenant schema
This commit is contained in:
@@ -19,17 +19,17 @@
|
||||
<div class="nav-wrapper position-relative end-0">
|
||||
<ul class="nav nav-pills nav-fill p-1" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link mb-0 px-0 py-1 active" data-toggle="tab" href="#storage-tab" role="tab" aria-controls="model-info" aria-selected="true">
|
||||
<a class="nav-link mb-0 px-0 py-1 active" data-bs-toggle="tab" href="#storage-tab" role="tab" aria-controls="model-info" aria-selected="true">
|
||||
Storage
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-toggle="tab" href="#embedding-tab" role="tab" aria-controls="license-info" aria-selected="false">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-bs-toggle="tab" href="#embedding-tab" role="tab" aria-controls="license-info" aria-selected="false">
|
||||
Embedding
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-toggle="tab" href="#interaction-tab" role="tab" aria-controls="chunking" aria-selected="false">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-bs-toggle="tab" href="#interaction-tab" role="tab" aria-controls="chunking" aria-selected="false">
|
||||
Interaction
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -19,17 +19,17 @@
|
||||
<div class="nav-wrapper position-relative end-0">
|
||||
<ul class="nav nav-pills nav-fill p-1" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link mb-0 px-0 py-1 active" data-toggle="tab" href="#storage-tab" role="tab" aria-controls="model-info" aria-selected="true">
|
||||
<a class="nav-link mb-0 px-0 py-1 active" data-bs-toggle="tab" href="#storage-tab" role="tab" aria-controls="model-info" aria-selected="true">
|
||||
Storage
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-toggle="tab" href="#embedding-tab" role="tab" aria-controls="license-info" aria-selected="false">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-bs-toggle="tab" href="#embedding-tab" role="tab" aria-controls="license-info" aria-selected="false">
|
||||
Embedding
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-toggle="tab" href="#interaction-tab" role="tab" aria-controls="chunking" aria-selected="false">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-bs-toggle="tab" href="#interaction-tab" role="tab" aria-controls="chunking" aria-selected="false">
|
||||
Interaction
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -107,17 +107,17 @@
|
||||
<!-- Nav Tabs -->
|
||||
<ul class="nav nav-tabs" id="periodTabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="status-tab" data-toggle="tab" href="#status" role="tab">
|
||||
<a class="nav-link active" id="status-tab" data-bs-toggle="tab" href="#status" role="tab">
|
||||
Status & Timeline
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="usage-tab" data-toggle="tab" href="#usage" role="tab">
|
||||
<a class="nav-link" id="usage-tab" data-bs-toggle="tab" href="#usage" role="tab">
|
||||
Usage
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="financial-tab" data-toggle="tab" href="#financial" role="tab">
|
||||
<a class="nav-link" id="financial-tab" data-bs-toggle="tab" href="#financial" role="tab">
|
||||
Financial
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
{% extends 'base.html' %}
|
||||
{% from "macros.html" import render_field, render_included_field %}
|
||||
|
||||
@@ -19,17 +20,17 @@
|
||||
<div class="nav-wrapper position-relative end-0">
|
||||
<ul class="nav nav-pills nav-fill p-1" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link mb-0 px-0 py-1 active" data-toggle="tab" href="#storage-tab" role="tab" aria-controls="model-info" aria-selected="true">
|
||||
<a class="nav-link mb-0 px-0 py-1 active" data-bs-toggle="tab" href="#storage-tab" role="tab" aria-controls="storage-tab" aria-selected="true">
|
||||
Storage
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-toggle="tab" href="#embedding-tab" role="tab" aria-controls="license-info" aria-selected="false">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-bs-toggle="tab" href="#embedding-tab" role="tab" aria-controls="embedding-tab" aria-selected="false">
|
||||
Embedding
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-toggle="tab" href="#interaction-tab" role="tab" aria-controls="chunking" aria-selected="false">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-bs-toggle="tab" href="#interaction-tab" role="tab" aria-controls="interaction-tab" aria-selected="false">
|
||||
Interaction
|
||||
</a>
|
||||
</li>
|
||||
@@ -68,4 +69,4 @@
|
||||
|
||||
{% block content_footer %}
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,33 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from "macros.html" import render_field %}
|
||||
|
||||
{% block title %}Edit Specialist Magic Link{% endblock %}
|
||||
|
||||
{% block content_title %}Edit Specialist Magic Link{% endblock %}
|
||||
{% block content_description %}Edit a Specialist Magic Link{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{{ form.hidden_tag() }}
|
||||
{% set disabled_fields = ['magic_link_code'] %}
|
||||
{% set exclude_fields = [] %}
|
||||
<!-- Render Static Fields -->
|
||||
{% for field in form.get_static_fields() %}
|
||||
{{ render_field(field, disabled_fields, exclude_fields) }}
|
||||
{% endfor %}
|
||||
<!-- Render Dynamic Fields -->
|
||||
{% for collection_name, fields in form.get_dynamic_fields().items() %}
|
||||
{% if fields|length > 0 %}
|
||||
<h4 class="mt-4">{{ collection_name }}</h4>
|
||||
{% endif %}
|
||||
{% for field in fields %}
|
||||
{{ render_field(field, disabled_fields, exclude_fields) }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn btn-primary">Save Specialist Magic Link</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_footer %}
|
||||
|
||||
{% endblock %}
|
||||
23
eveai_app/templates/interaction/specialist_magic_link.html
Normal file
23
eveai_app/templates/interaction/specialist_magic_link.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from "macros.html" import render_field %}
|
||||
|
||||
{% block title %}Specialist Magic Link{% endblock %}
|
||||
|
||||
{% block content_title %}Register Specialist Magic Link{% endblock %}
|
||||
{% block content_description %}Define a new specialist magic link{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{{ form.hidden_tag() }}
|
||||
{% set disabled_fields = [] %}
|
||||
{% set exclude_fields = [] %}
|
||||
{% for field in form %}
|
||||
{{ render_field(field, disabled_fields, exclude_fields) }}
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn btn-primary">Register Specialist Magic Link</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_footer %}
|
||||
|
||||
{% endblock %}
|
||||
26
eveai_app/templates/interaction/specialist_magic_links.html
Normal file
26
eveai_app/templates/interaction/specialist_magic_links.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from 'macros.html' import render_selectable_table, render_pagination %}
|
||||
|
||||
{% block title %}Specialist Magic Links{% endblock %}
|
||||
|
||||
{% block content_title %}Specialist Magic Links{% endblock %}
|
||||
{% block content_description %}View Specialists Magic Links{% endblock %}
|
||||
{% block content_class %}<div class="col-xl-12 col-lg-5 col-md-7 mx-auto"></div>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<form method="POST" action="{{ url_for('interaction_bp.handle_specialist_magic_link_selection') }}" id="specialistMagicLinksForm">
|
||||
{{ render_selectable_table(headers=["Specialist ML ID", "Name", "Magic Link Code"], rows=rows, selectable=True, id="specialistMagicLinksTable") }}
|
||||
<div class="form-group mt-3 d-flex justify-content-between">
|
||||
<div>
|
||||
<button type="submit" name="action" value="edit_specialist_magic_link" class="btn btn-primary" onclick="return validateTableSelection('specialistMagicLinksForm')">Edit Specialist Magic Link</button>
|
||||
</div>
|
||||
<button type="submit" name="action" value="create_specialist_magic_link" class="btn btn-success">Register Specialist Magic Link</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_footer %}
|
||||
{{ render_pagination(pagination, 'interaction_bp.specialist_magic_links') }}
|
||||
{% endblock %}
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from 'macros.html' import render_selectable_table, render_pagination %}
|
||||
|
||||
{% block title %}Retrievers{% endblock %}
|
||||
{% block title %}Specialists{% endblock %}
|
||||
|
||||
{% block content_title %}Specialists{% endblock %}
|
||||
{% block content_description %}View Specialists for Tenant{% endblock %}
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
{% elif cell.type == 'badge' %}
|
||||
<span class="badge badge-sm {{ cell.badge_class }}">{{ cell.value }}</span>
|
||||
{% elif cell.type == 'link' %}
|
||||
<a href="{{ cell.href }}" class="text-secondary font-weight-normal text-xs" data-toggle="tooltip" data-original-title="{{ cell.title }}">{{ cell.value }}</a>
|
||||
<a href="{{ cell.href }}" class="text-secondary font-weight-normal text-xs" data-bs-toggle="tooltip" data-original-title="{{ cell.title }}">{{ cell.value }}</a>
|
||||
{% else %}
|
||||
{{ cell.value }}
|
||||
{% endif %}
|
||||
@@ -192,7 +192,7 @@
|
||||
{% elif cell.type == 'badge' %}
|
||||
<span class="badge badge-sm {{ cell.badge_class }}">{{ cell.value }}</span>
|
||||
{% elif cell.type == 'link' %}
|
||||
<a href="{{ cell.href }}" class="text-secondary font-weight-normal text-xs" data-toggle="tooltip" data-original-title="{{ cell.title }}">{{ cell.value }}</a>
|
||||
<a href="{{ cell.href }}" class="text-secondary font-weight-normal text-xs" data-bs-toggle="tooltip" data-original-title="{{ cell.title }}">{{ cell.value }}</a>
|
||||
{% else %}
|
||||
{{ cell.value }}
|
||||
{% endif %}
|
||||
@@ -357,7 +357,7 @@
|
||||
{% elif cell.type == 'badge' %}
|
||||
<span class="badge badge-sm {{ cell.badge_class }}">{{ cell.value }}</span>
|
||||
{% elif cell.type == 'link' %}
|
||||
<a href="{{ cell.href }}" class="text-secondary font-weight-normal text-xs" data-toggle="tooltip" data-original-title="{{ cell.title }}">{{ cell.value }}</a>
|
||||
<a href="{{ cell.href }}" class="text-secondary font-weight-normal text-xs" data-bs-toggle="tooltip" data-original-title="{{ cell.title }}">{{ cell.value }}</a>
|
||||
{% else %}
|
||||
{{ cell.value }}
|
||||
{% endif %}
|
||||
@@ -450,3 +450,10 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro debug_to_console(var_name, var_value) %}
|
||||
<script>
|
||||
console.log('{{ var_name }}:', {{ var_value|tojson }});
|
||||
</script>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
{% if current_user.is_authenticated %}
|
||||
{{ dropdown('Interactions', 'hub', [
|
||||
{'name': 'Specialists', 'url': '/interaction/specialists', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
{'name': 'Specialist Magic Links', 'url': '/interaction/specialist_magic_links', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
{'name': 'Chat Sessions', 'url': '/interaction/chat_sessions', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
]) }}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "macros.html" import render_field %}
|
||||
{% block title %}Register Partner Service{% endblock %}
|
||||
{% from "macros.html" import render_field, debug_to_console %}
|
||||
{% block title %}Edit Partner Service{% endblock %}
|
||||
|
||||
{% block content_title %}Register Partner Service{% endblock %}
|
||||
{% block content_description %}Register Partner Service{% endblock %}
|
||||
{% block content_title %}Edit Partner Service{% endblock %}
|
||||
{% block content_description %}Edit Partner Service{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
@@ -16,6 +16,8 @@
|
||||
{% endfor %}
|
||||
<!-- Render Dynamic Fields -->
|
||||
{% for collection_name, fields in form.get_dynamic_fields().items() %}
|
||||
{{ debug_to_console('collection_name', collection_name) }}
|
||||
{{ debug_to_console('fields', fields) }}
|
||||
{% if fields|length > 0 %}
|
||||
<h4 class="mt-4">{{ collection_name }}</h4>
|
||||
{% endif %}
|
||||
@@ -23,6 +25,6 @@
|
||||
{{ render_field(field, disabled_fields, exclude_fields) }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn btn-primary">Register Partner Service</button>
|
||||
<button type="submit" class="btn btn-primary">Save Partner Service</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -19,3 +19,37 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content_footer %} {% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
// JavaScript om de gebruiker's timezone te detecteren
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
// Detect timezone
|
||||
const userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
// Send timezone to the server via a POST request
|
||||
fetch('/set_user_timezone', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ timezone: userTimezone })
|
||||
}).then(response => {
|
||||
if (response.ok) {
|
||||
console.log('Timezone sent to server successfully');
|
||||
} else {
|
||||
console.error('Failed to send timezone to server');
|
||||
}
|
||||
});
|
||||
|
||||
// Initialiseer Select2 voor timezone selectie
|
||||
$('#timezone').select2({
|
||||
placeholder: 'Selecteer een timezone...',
|
||||
allowClear: true,
|
||||
maximumSelectionLength: 10,
|
||||
theme: 'bootstrap',
|
||||
width: '100%'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
// JavaScript to detect user's timezone
|
||||
// JavaScript om de gebruiker's timezone te detecteren
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
// Detect timezone
|
||||
const userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
@@ -45,6 +45,31 @@
|
||||
console.error('Failed to send timezone to server');
|
||||
}
|
||||
});
|
||||
|
||||
$('#timezone').select2({
|
||||
placeholder: 'Selecteer een timezone...',
|
||||
allowClear: true,
|
||||
theme: 'bootstrap',
|
||||
width: '100%',
|
||||
dropdownAutoWidth: true,
|
||||
dropdownCssClass: 'timezone-dropdown', // Een custom class voor specifieke styling
|
||||
scrollAfterSelect: false,
|
||||
// Verbeterd scroll gedrag
|
||||
dropdownParent: $('body')
|
||||
});
|
||||
|
||||
// Stel de huidige waarde in als de dropdown wordt geopend
|
||||
$('#timezone').on('select2:open', function() {
|
||||
if ($(this).val()) {
|
||||
setTimeout(function() {
|
||||
let selectedOption = $('.select2-results__option[aria-selected=true]');
|
||||
if (selectedOption.length) {
|
||||
selectedOption[0].scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="nav-wrapper position-relative end-0">
|
||||
<ul class="nav nav-pills nav-fill p-1" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-toggle="tab" href="#license-info-tab" role="tab" aria-controls="license-info" aria-selected="false">
|
||||
<a class="nav-link mb-0 px-0 py-1" data-bs-toggle="tab" href="#license-info-tab" role="tab" aria-controls="license-info" aria-selected="false">
|
||||
License Information
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user