Orga Fix und bugfix by Moduleeinstellung

This commit is contained in:
Holger Trampe 2020-05-13 13:03:52 +02:00
parent 8fb06efa63
commit 668d063f05
38 changed files with 38 additions and 33 deletions

View File

@ -13,7 +13,9 @@
dynorga: $("#id_dynamicprofile").prop('checked')
},
success: function( data )
{}
{
console.log(data)
}
});
}
</script>

View File

@ -397,7 +397,7 @@ def SettingsAjaxRouter(request):
todelarea = Areas.objects.get(pk=request.GET['id'], agency=request.user.profile.agency)
# REMOVE STANDARDS AREA
tempstandards = Standards.objects.filter(agency=request.user.profile.agency, area=todelarea)
if(request.user.has_perm('standardmanager')):
if(request.user.has_perm('users.standardmanager')):
for s in tempstandards:
s.area = None
s.task = None
@ -445,7 +445,7 @@ def SettingsAjaxRouter(request):
todeltask = Tasks.objects.get(pk=request.GET['id'], agency=request.user.profile.agency)
# REMOVE STANDARDS AREA
tempstandards = Standards.objects.filter(agency=request.user.profile.agency, task=todeltask)
if(request.user.has_perm('standardmanager')):
if(request.user.has_perm('users.standardmanager')):
for s in tempstandards:
s.task = None
s.public = False
@ -485,7 +485,7 @@ def SettingsAjaxRouter(request):
# UPDATE USER MAIL
elif request.method == 'GET' and request.GET['action'] == "update_usermail" :
tempuser = User.objects.get(pk=request.GET['userid'])
if(request.user.profile.agency == tempuser.profile.agency and request.user.has_perm('usermanager')):
if(request.user.profile.agency == tempuser.profile.agency and request.user.has_perm('users.usermanager')):
tempmail = tempuser.email
regex = '^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$'
if(re.search(regex,request.GET['newmail'])):
@ -506,7 +506,7 @@ def SettingsAjaxRouter(request):
# UPDATE USERNAME
elif request.method == 'GET' and request.GET['action'] == "update_usernames" :
tempuser = User.objects.get(pk=request.GET['userid'])
if(request.user.profile.agency == tempuser.profile.agency and request.user.has_perm('usermanager')):
if(request.user.profile.agency == tempuser.profile.agency and request.user.has_perm('users.usermanager')):
regex = '^[a-zA-Z0-9_.-üöäÜÖÄ ]+$'
if(re.search(regex,request.GET['new_first_name']) and re.search(regex,request.GET['new_last_name'])):
tempuser.first_name = request.GET['new_first_name']
@ -906,8 +906,8 @@ def AgencyNetworkAjaxSettings(request):
return JsonResponse(data)
@login_required
def ModSettingsOrga(request):
if request.method == 'GET' and request.user.has_perm("modulesconfig"):
def ModSettingsOrga(request):
if request.method == 'GET' and request.user.has_perm("users.modulesconfig"):
if(request.GET['dynorga'] == "true"):
ag = request.user.profile.agency
ag.dynamicprofile = True
@ -922,7 +922,7 @@ def ModSettingsOrga(request):
@login_required
def ModSettingsTm(request):
if request.method == 'GET' and request.user.has_perm("modulesconfig"):
if request.method == 'GET' and request.user.has_perm("users.modulesconfig"):
if(request.GET['aze'] == "true"):
ag = request.user.profile.agency
ag.module_timemanagement_ze = True

View File

@ -14,32 +14,35 @@ import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
############################################## PROD #####################################
BASE_URL = "https://digitale-agentur.com/"
############################################## LOCAL #####################################
BASE_URL = "http://localhost:8000/"
CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
MAILINFOKEY = "jka7sd8iukashdna78skduJAHDsu6dilaksdjba65a68iadbhjak"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True
# MAIL PROD
EMAIL_HOST = 'smtp.strato.de'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "noreply@digitale-agentur.com"
EMAIL_HOST_PASSWORD = "48c3n6YggZBuPyShtqOQ"
DEFAULT_FROM_EMAIL = "noreply@digitale-agentur.com"
# PROD
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
# DEV
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME' : 'digitaleagentur',
'USER' : 'digitaleagentur',
'PASSWORD' : 'H9hzbzyBqtUCnZlIwL1qSrzh',
'USER' : 'root',
'PASSWORD' : '',
'PORT' : 3306
}
}
############################################## PROD #####################################
# MAIL DEV
EMAIL_HOST = 'gymhum.de'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "holger.trampe"
EMAIL_HOST_PASSWORD = "Motte2016_!"
DEFAULT_FROM_EMAIL = "holger.trampe@gymhum.de"
################################################### LOCAL ###############################

Binary file not shown.

Binary file not shown.

View File

@ -60,7 +60,7 @@
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js"></script>
<link href="https://unpkg.com/treeflex/dist/css/treeflex.css" rel="stylesheet">
<link href="{% static 'users/css/tree.css' %}" rel="stylesheet">
<script type="text/javascript">
var data = [
{% for u in agencyuser %}

View File

@ -2,8 +2,8 @@
{% load counter_tag %}
{% load static %}
{% block content %}
<script src="{% static 'users/js/jsLists.js' %}"></script>
<link href="{% static 'users/css/jsLists.css' %}" rel="stylesheet">
<link href="{% static 'users/css/jsLists.css' %}" rel="stylesheet">
<script src="{% static 'users/js/jsLists.js' %}"></script>
<div class="content-section">
<h3>Bereiche und Tätigkeiten von {{user_first_name}} {{user_last_name}}<span style="float: right">
@ -196,7 +196,7 @@
2 - rep
*/
function initialLoad(viewmode=0){
function initialLoad(viewmode){
$.ajax({
type: "GET",
@ -231,7 +231,7 @@ function changeView(newmode){
$( document ).ready(function() {
{% if request.user.profile.agency.dynamicprofile %}
initialLoad()
initialLoad(0)
{% endif %}
});

View File

@ -62,7 +62,6 @@ var sortablearea_ids = [{% for area in areas %} {{area.pk}},{% endfor %}];
tempid = rows[i]['id'].split("_")[1];
datatoserver.push({"id" : tempid, "neworder" : i});
}
console.log(datatoserver)
$.ajax(
{
type: "GET",
@ -113,7 +112,7 @@ var sortablearea_ids = [{% for area in areas %} {{area.pk}},{% endfor %}];
*/
function initialLoad(viewmode=0){
function initialLoad(viewmode){
$.ajax({
type: "GET",
url: "{% url 'orga-ajax' %}",

View File

@ -112,7 +112,7 @@ var sortablearea_ids = [{% for area in areas %} {{area.pk}},{% endfor %}];
*/
function initialLoad(viewmode=0){
function initialLoad(viewmode){
$.ajax({
type: "GET",
url: "{% url 'orga-ajax' %}",

View File

@ -112,7 +112,7 @@ var sortablearea_ids = [{% for area in areas %} {{area.pk}},{% endfor %}];
*/
function initialLoad(viewmode=0){
function initialLoad(viewmode){
$.ajax({
type: "GET",
url: "{% url 'orga-ajax' %}",

View File

@ -73,7 +73,7 @@ def AbsenceManagmenet(request, activemonth=False, activeyear=False):
# ALL OK - START SAVING ABSENCE
else:
confirmstat = 0
if(request.user.has_perm("absencemanager") == False):
if(request.user.has_perm("users.absencemanager") == False):
confirmstat = 1
messages.success(request, f'Abwesenheit beantragt')
# SEND NOTIFICATION

View File

@ -0,0 +1 @@
.tf-tree{font-size:16px;overflow:auto}.tf-tree *{box-sizing:border-box;margin:0;padding:0}.tf-tree ul{display:inline-flex}.tf-tree li{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap;padding:0 1em;position:relative}.tf-tree li ul{margin:2em 0}.tf-tree li li:before{border-top:.0625em solid #000;content:"";display:block;height:.0625em;left:-.03125em;position:absolute;top:-1.03125em;width:100%}.tf-tree li li:first-child:before{left:calc(50% - .03125em);max-width:calc(50% + .0625em)}.tf-tree li li:last-child:before{left:auto;max-width:calc(50% + .0625em);right:calc(50% - .03125em)}.tf-tree li li:only-child:before{display:none}.tf-tree li li:only-child>.tf-nc:before,.tf-tree li li:only-child>.tf-node-content:before{height:1.0625em;top:-1.0625em}.tf-tree .tf-nc,.tf-tree .tf-node-content{border:.0625em solid #000;display:inline-block;padding:.5em 1em;position:relative}.tf-tree .tf-nc:before,.tf-tree .tf-node-content:before{top:-1.03125em}.tf-tree .tf-nc:after,.tf-tree .tf-nc:before,.tf-tree .tf-node-content:after,.tf-tree .tf-node-content:before{border-left:.0625em solid #000;content:"";display:block;height:1em;left:calc(50% - .03125em);position:absolute;width:.0625em}.tf-tree .tf-nc:after,.tf-tree .tf-node-content:after{top:calc(100% + .03125em)}.tf-tree .tf-nc:only-child:after,.tf-tree .tf-node-content:only-child:after,.tf-tree>ul>li>.tf-nc:before,.tf-tree>ul>li>.tf-node-content:before{display:none}.tf-tree.tf-gap-sm li{padding:0 .6em}.tf-tree.tf-gap-sm li>.tf-nc:before,.tf-tree.tf-gap-sm li>.tf-node-content:before{height:.6em;top:-.6em}.tf-tree.tf-gap-sm li>.tf-nc:after,.tf-tree.tf-gap-sm li>.tf-node-content:after{height:.6em}.tf-tree.tf-gap-sm li ul{margin:1.2em 0}.tf-tree.tf-gap-sm li li:before{top:-.63125em}.tf-tree.tf-gap-sm li li:only-child>.tf-nc:before,.tf-tree.tf-gap-sm li li:only-child>.tf-node-content:before{height:.6625em;top:-.6625em}.tf-tree.tf-gap-lg li{padding:0 1.5em}.tf-tree.tf-gap-lg li>.tf-nc:before,.tf-tree.tf-gap-lg li>.tf-node-content:before{height:1.5em;top:-1.5em}.tf-tree.tf-gap-lg li>.tf-nc:after,.tf-tree.tf-gap-lg li>.tf-node-content:after{height:1.5em}.tf-tree.tf-gap-lg li ul{margin:3em 0}.tf-tree.tf-gap-lg li li:before{top:-1.53125em}.tf-tree.tf-gap-lg li li:only-child>.tf-nc:before,.tf-tree.tf-gap-lg li li:only-child>.tf-node-content:before{height:1.5625em;top:-1.5625em}.tf-tree li.tf-dotted-children .tf-nc:after,.tf-tree li.tf-dotted-children .tf-nc:before,.tf-tree li.tf-dotted-children .tf-node-content:after,.tf-tree li.tf-dotted-children .tf-node-content:before{border-left-style:dotted}.tf-tree li.tf-dotted-children li:before{border-top-style:dotted}.tf-tree li.tf-dotted-children>.tf-nc:before,.tf-tree li.tf-dotted-children>.tf-node-content:before{border-left-style:solid}.tf-tree li.tf-dashed-children .tf-nc:after,.tf-tree li.tf-dashed-children .tf-nc:before,.tf-tree li.tf-dashed-children .tf-node-content:after,.tf-tree li.tf-dashed-children .tf-node-content:before{border-left-style:dashed}.tf-tree li.tf-dashed-children li:before{border-top-style:dashed}.tf-tree li.tf-dashed-children>.tf-nc:before,.tf-tree li.tf-dashed-children>.tf-node-content:before{border-left-style:solid}