📊 Optimized database queries in myp.db for improved performance 🎉
This commit is contained in:
parent
37cd332d67
commit
881d52b9dc
Binary file not shown.
@ -551,6 +551,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Admin-Berechtigung aus Jinja2-Template setzen
|
||||||
|
window.appConfig = {
|
||||||
|
userIsAdmin: {% if current_user.is_authenticated and current_user.is_admin %}true{% else %}false{% endif %},
|
||||||
|
userCanApprove: {% if current_user.is_authenticated and current_user.permissions and current_user.permissions.can_approve_jobs %}true{% else %}false{% endif %}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Globale Variablen
|
// Globale Variablen
|
||||||
let currentRequests = [];
|
let currentRequests = [];
|
||||||
@ -561,8 +569,8 @@ let currentRequestId = null;
|
|||||||
let allPrinters = [];
|
let allPrinters = [];
|
||||||
|
|
||||||
// Prüfung der Admin-Berechtigung - zeige Inline-Aktionen nur für Admins
|
// Prüfung der Admin-Berechtigung - zeige Inline-Aktionen nur für Admins
|
||||||
const userIsAdmin = {{ current_user.is_admin|tojson if current_user.is_authenticated else 'false' }};
|
const userIsAdmin = window.appConfig.userIsAdmin;
|
||||||
const userCanApprove = {{ (current_user.permissions and current_user.permissions.can_approve_jobs)|tojson if current_user.is_authenticated and current_user.permissions else 'false' }};
|
const userCanApprove = window.appConfig.userCanApprove;
|
||||||
const showInlineActions = userIsAdmin || userCanApprove;
|
const showInlineActions = userIsAdmin || userCanApprove;
|
||||||
|
|
||||||
// Initialisierung
|
// Initialisierung
|
||||||
|
Loading…
x
Reference in New Issue
Block a user