aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/templates/server/doc_list.html12
-rw-r--r--server/templates/server/doc_list_readonly.html12
-rw-r--r--server/templates/server/doc_list_table.html20
-rw-r--r--server/views.py6
4 files changed, 19 insertions, 31 deletions
diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html
index db1ee4e..28511e7 100644
--- a/server/templates/server/doc_list.html
+++ b/server/templates/server/doc_list.html
@@ -156,7 +156,7 @@
<ul class="collapsible">
{% for doc in docs %}
<li class="item">
- <input value="{{doc.user|user_primary_group}}" type="hidden">
+ <input value="{{doc.usercode.branca}}" type="hidden">
<div class="collapsible-header">
<label>
<input name={{doc.id}} type="checkbox" class="filled-in allselect"/>
@@ -179,7 +179,7 @@
{{doc.id}}:
{% endif %}
{{doc.document_type.name}}
- <span class="badge" data-badge-caption="">{{doc.user.first_name}} {{doc.user.last_name}}</span>
+ <span class="badge" data-badge-caption="">{{doc.usercode.first_name}} {{doc.usercode.last_name}}</span>
</div>
<div class="collapsible-body"><span>
{% if doc.status == "ok" or doc.status == 'archive' %}
@@ -211,11 +211,11 @@
<div class="collapsible-body"><span>
<div class="row">
<div class="input-field col l4 s12">
- <input disabled value="{{doc.user.first_name}}" id="first_name" type="text" >
+ <input disabled value="{{doc.usercode.first_name}}" id="first_name" type="text" >
<label for="first_name">Nome</label>
</div>
<div class="input-field col l4 s12">
- <input disabled value="{{doc.user.last_name}}" id="last_name" type="text" >
+ <input disabled value="{{doc.usercode.last_name}}" id="last_name" type="text" >
<label for="last_name">Cognome</label>
</div>
<div class="input-field col l4 s12">
@@ -223,7 +223,7 @@
<label for="birth_date">Data di nascita</label>
</div>
<div class="input-field col l4 s12">
- <input disabled value="{{doc.user|user_primary_group}}" id="branca" type="text">
+ <input disabled value="{{doc.usercode.branca}}" id="branca" type="text">
<label for="branca">Branca</label>
</div>
<div class="input-field col l4 s12">
@@ -536,7 +536,7 @@ $('#chips_owner').chips({
autocompleteOptions: {
data: {
{% for user in users %}
- '{{user.user__username}} ({{user.user__first_name}} {{user.user__last_name}})': null,
+ '{{user.usercode__first_name}} {{user.usercode__last_name}}': null,
{% endfor %}
},
limit: Infinity,
diff --git a/server/templates/server/doc_list_readonly.html b/server/templates/server/doc_list_readonly.html
index ab80242..0ae80e2 100644
--- a/server/templates/server/doc_list_readonly.html
+++ b/server/templates/server/doc_list_readonly.html
@@ -136,7 +136,7 @@
<ul class="collapsible">
{% for doc in docs %}
<li class="item">
- <input value="{{doc.user|user_primary_group}}" type="hidden">
+ <input value="{{doc.usercode.branca}}" type="hidden">
<div class="collapsible-header">
<label>
<input name={{doc.id}} type="checkbox" class="filled-in allselect"/>
@@ -159,7 +159,7 @@
{{doc.id}}:
{% endif %}
{{doc.document_type.name}}
- <span class="badge" data-badge-caption="">{{doc.user.first_name}} {{doc.user.last_name}}</span>
+ <span class="badge" data-badge-caption="">{{doc.usercode.first_name}} {{doc.usercode.last_name}}</span>
</div>
<div class="collapsible-body"><span>
{% if doc.status == "ok" or doc.status == 'archive' %}
@@ -191,11 +191,11 @@
<div class="collapsible-body"><span>
<div class="row">
<div class="input-field col l4 s12">
- <input disabled value="{{doc.user.first_name}}" id="first_name" type="text" >
+ <input disabled value="{{doc.usercode.first_name}}" id="first_name" type="text" >
<label for="first_name">Nome</label>
</div>
<div class="input-field col l4 s12">
- <input disabled value="{{doc.user.last_name}}" id="last_name" type="text" >
+ <input disabled value="{{doc.usercode.last_name}}" id="last_name" type="text" >
<label for="last_name">Cognome</label>
</div>
<div class="input-field col l4 s12">
@@ -203,7 +203,7 @@
<label for="birth_date">Data di nascita</label>
</div>
<div class="input-field col l4 s12">
- <input disabled value="{{doc.user|user_primary_group}}" id="branca" type="text">
+ <input disabled value="{{doc.usercode.branca}}" id="branca" type="text">
<label for="branca">Branca</label>
</div>
<div class="input-field col l4 s12">
@@ -516,7 +516,7 @@ $('#chips_owner').chips({
autocompleteOptions: {
data: {
{% for user in users %}
- '{{user.user__username}} ({{user.user__first_name}} {{user.user__last_name}})': null,
+ '{{user.usercode__first_name}} {{user.usercode__last_name}}': null,
{% endfor %}
},
limit: Infinity,
diff --git a/server/templates/server/doc_list_table.html b/server/templates/server/doc_list_table.html
index 0096380..6b3556b 100644
--- a/server/templates/server/doc_list_table.html
+++ b/server/templates/server/doc_list_table.html
@@ -110,16 +110,6 @@
$(document).ready(function(){
$('#modal1').modal();
$('#modal2').modal();
- var elemsMapping = {};
- var rows = table.getRows();
- for (var i = 0; i < rows.length; i++) {
- var cell = rows[i].getCell("username");
- if (cell.getValue() == "col_row") {
- var group = rows[i].getCell("type").getValue();
- elemsMapping[group] = rows[i].getElement();
- }
- }
-
$(".tabulator-col-resize-handle").css("margin-left", "-3px");
});
@@ -146,13 +136,12 @@
type: "{{doc.document_type.name}}",
code: {% if doc.status == "ok" or doc.status == "archive" %} "{{doc.code}}" {% else %} "???" {% endif %},
compilation_date: "{{doc.compilation_date}}",
- capo: {% if "capi" in doc.user|user_groups %}true{% else %}false{% endif %},
- username: "{{doc.user.username}}",
- name: "{{doc.user.first_name}}",
- last_name: "{{doc.user.last_name}}",
+ capo: {% if "capi" in doc.usercode.user|user_groups %}true{% else %}false{% endif %},
+ name: "{{doc.usercode.first_name}}",
+ last_name: "{{doc.usercode.last_name}}",
email: "{{doc.personal_data.email}}",
birth_date: "{{doc.personal_data.born_date}}",
- branca: "{{ doc.user|user_primary_group }}",
+ branca: "{{ doc.usercode.branca }}",
parent_name: "{{doc.personal_data.parent_name}}",
avs_number: "{{doc.personal_data.avs_number}}",
via: "{{doc.personal_data.via}}",
@@ -190,7 +179,6 @@
var col_categories = [
{field: "base", name: "Informazioni base", cols:
[
- {title: "Username", field: "username"},
{title: "Stato", field: "status", formatter: iconFormatter},
{title: "Tipo", field: "type"},
{title: "Codice", field: "code"},
diff --git a/server/views.py b/server/views.py
index edb9d0c..b7a8094 100644
--- a/server/views.py
+++ b/server/views.py
@@ -1182,7 +1182,7 @@ def doclist(request):
# run query
documents = Document.objects.filter(q_obj).select_related("personal_data", "medical_data", "document_type", "user")
- users = documents.values("user__username", "user__first_name", "user__last_name")
+ users = documents.values("usercode__first_name", "usercode__last_name")
vac_file = ["/server/media/", "/vac_certificate/doc"]
health_file = ["/server/media/", "/health_care_certificate/doc"]
@@ -1347,7 +1347,7 @@ def doclist_table(request):
# run query
documents = Document.objects.filter(q_obj).select_related("personal_data", "medical_data", "document_type", "user")
- users = documents.values("user__username", "user__first_name", "user__last_name")
+ users = documents.values("usercode__first_name", "usercode__last_name")
# get types and users for chips autocompletation
if request.user.is_staff:
@@ -1552,7 +1552,7 @@ def doclist_readonly(request):
# run query
documents = Document.objects.filter(q_obj).select_related("personal_data", "medical_data", "document_type", "user")
- users = documents.values("user__username", "user__first_name", "user__last_name")
+ users = documents.values("usercode__first_name", "usercode__last_name")
vac_file = ["/server/media/", "/vac_certificate/doc"]
health_file = ["/server/media/", "/health_care_certificate/doc"]