jones-dev #19

Merged
corbz merged 106 commits from jones-dev into master 2024-01-26 17:39:03 +00:00
60 changed files with 101 additions and 61 deletions
Showing only changes of commit 6df16f054b - Show all commits

View File

@ -205,7 +205,7 @@
"fields": {
"password": "pbkdf2_sha256$260000$h4zLYmIeMQgJ0ko41i6dxo$Gwe0TV75ibdJTtqdTOOs5ucOEhA9DUM/bwxjagVhKKg=",
"last_login": "2024-01-13T20:53:38.159Z",
"icon": "../static/assets/images/defaultuser.webp",
"icon": "../static/images/defaultuser.webp",
"email": "admin@mail.com",
"forename": "Default",
"surname": "Admin User",

View File

@ -0,0 +1,20 @@
# Generated by Django 3.2.16 on 2024-01-18 10:46
import apps.authentication.models
from django.db import migrations, models
import pathlib
class Migration(migrations.Migration):
dependencies = [
('authentication', '0002_auto_20240112_1604'),
]
operations = [
migrations.AlterField(
model_name='user',
name='icon',
field=models.ImageField(default=pathlib.PurePosixPath('/mnt/code/ticket-website/static/images/defaultuser.webp'), storage=apps.authentication.models.OverwriteStorage(), upload_to=apps.authentication.models.IconPathGenerator(), verbose_name='profile picture'),
),
]

View File

@ -4,6 +4,7 @@ from uuid import uuid4
import os
from django.db import models
from django.conf import settings
from django.utils import timezone
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin
from django.utils.translation import gettext_lazy as _
@ -69,7 +70,7 @@ class User(AbstractBaseUser, PermissionsMixin):
icon = models.ImageField(
_("profile picture"),
upload_to=IconPathGenerator(),
default="../static/assets/images/defaultuser.webp",
default=settings.BASE_DIR / "static/images/defaultuser.webp",
storage=OverwriteStorage()
)
email = models.EmailField(

View File

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

View File

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 229 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 171 KiB

View File

Before

Width:  |  Height:  |  Size: 492 KiB

After

Width:  |  Height:  |  Size: 492 KiB

View File

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 160 B

View File

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

View File

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 146 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,5 +1,5 @@
var displayedTicketID = -1;
filters = {"ordering": "-edit_timestamp"};
filters = {"ordering": "-edit_timestamp", "page_size": 100};
editor = null;
searchTimeout = null;
loadingTickets = false;
@ -49,7 +49,7 @@ $(document).ready(function() {
})
setupFilter("#filterSidebar .filter-department", "author__department");
setupFilter("#filterSidebar .filter-tag", "tags");
setupFilter("#filterSidebar .filter-tags", "tags");
setupFilter("#filterSidebar .filter-priority", "priority");
loadFilterCounts();
@ -162,7 +162,7 @@ function getOrdinalSuffix(day) {
function updateFilterCounts(filterType, data) {
$("#filterSidebar .filter-" + filterType).each(function() {
var uuid = $(this).find("input[type=checkbox],input[type=radio]").val();
var count = data[filterType + '_counts'][uuid];
var count = data[filterType][uuid];
$(this).find(".badge").text(count);
});
}
@ -173,11 +173,12 @@ function loadFilterCounts() {
type: "GET",
success: function(data) {
updateFilterCounts('priority', data);
updateFilterCounts('tag', data);
updateFilterCounts('tags', data);
updateFilterCounts('department', data);
$("#filterPriorityAll .badge").text(data.ticket_count);
$("#filterDepartmentAll .badge").text(data.ticket_count)
$("#ticketCounts .total").text(data.ticket_count)
$("#filterPriorityAll .badge").text(data.tickets);
$("#filterDepartmentAll .badge").text(data.tickets)
$("#ticketCounts .total").text(data.tickets)
},
error: function(data) {
console.error(JSON.stringify(data, null, 4))

View File

@ -1,4 +1,5 @@
{% extends "layouts/base-authentication.html" %}
{% load static %}
{% block title %} Sign IN {% endblock title %}
@ -8,10 +9,10 @@
{% block content %}
<div class="peers ai-s fxw-nw h-100vh">
<div class="d-n@sm- peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style='background-image: url("{{ ASSETS_ROOT }}/images/bg.jpg")'>
<div class="d-n@sm- peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style='background-image: url("{% static '/images/bg.jpg' %}")'>
<div class="pos-a centerXY">
<div class="bgc-white bdrs-50p pos-r" style='width: 120px; height: 120px;'>
<img class="pos-a centerXY" src="{{ ASSETS_ROOT }}/images/logo.png" alt="">
<img class="pos-a centerXY" src="{% static '/images/logo.png' %}" alt="">
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% extends "layouts/base-authentication.html" %}
{% load static %}
{% block title %} Register {% endblock title %}
@ -8,10 +9,10 @@
{% block content %}
<div class="peers ai-s fxw-nw h-100vh">
<div class="peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style='background-image: url("{{ ASSETS_ROOT }}/images/bg.jpg")'>
<div class="peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style='background-image: url("{% static '/images/bg.jpg' %}")'>
<div class="pos-a centerXY">
<div class="bgc-white bdrs-50p pos-r" style='width: 120px; height: 120px;'>
<img class="pos-a centerXY" src="{{ ASSETS_ROOT }}/images/logo.png" alt="">
<img class="pos-a centerXY" src="{% static '/images/logo.png' %}" alt="">
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% extends "layouts/base-error.html" %}
{% load static %}
{% block title %} Error 404 {% endblock title %}
@ -9,7 +10,7 @@
<div class='pos-a t-0 l-0 bgc-white w-100 h-100 d-f fxd-r fxw-w ai-c jc-c pos-r p-30'>
<div class='mR-60'>
<img alt='#' src='{{ ASSETS_ROOT }}/images/404.png' />
<img alt='#' src="{% static '/images/404.png' %}" />
</div>
<div class='d-f jc-c fxd-c'>

View File

@ -1,4 +1,5 @@
{% extends "layouts/base-error.html" %}
{% load static %}
{% block title %} Error 500 {% endblock title %}
@ -9,7 +10,7 @@
<div class='pos-a t-0 l-0 bgc-white w-100 h-100 d-f fxd-r fxw-w ai-c jc-c pos-r p-30'>
<div class='mR-60'>
<img alt='#' src='{{ ASSETS_ROOT }}/images/500.png' />
<img alt='#' src="{% static '/images/500.png' %}" />
</div>
<div class='d-f jc-c fxd-c'>
@ -17,7 +18,7 @@
<h3 class='mB-10 fsz-lg c-grey-900 tt-c'>Internal server error</h3>
<p class='mB-30 fsz-def c-grey-700'>Something goes wrong with our servers, please try again later.</p>
<div>
<a href="index.html" type='primary' class='btn btn-primary'>Go to Home</a>
<a href="/" type='primary' class='btn btn-primary'>Go to Home</a>
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% extends "layouts/base-authentication.html" %}
{% load static %}
{% block title %} Sign IN {% endblock title %}
@ -8,10 +9,10 @@
{% block content %}
<div class="peers ai-s fxw-nw h-100vh">
<div class="d-n@sm- peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style='background-image: url("{{ ASSETS_ROOT }}/images/bg.jpg")'>
<div class="d-n@sm- peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style='background-image: url("{% static '/images/bg.jpg' %}")'>
<div class="pos-a centerXY">
<div class="bgc-white bdrs-50p pos-r" style='width: 120px; height: 120px;'>
<img class="pos-a centerXY" src="{{ ASSETS_ROOT }}/images/logo.png" alt="">
<img class="pos-a centerXY" src="{% static '/images/logo.png' %}" alt="">
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% extends "layouts/base-authentication.html" %}
{% load static %}
{% block title %} Register {% endblock title %}
@ -8,10 +9,10 @@
{% block content %}
<div class="peers ai-s fxw-nw h-100vh">
<div class="peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style='background-image: url("{{ ASSETS_ROOT }}/images/bg.jpg")'>
<div class="peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style='background-image: url("{% static '/images/bg.jpg' %}")'>
<div class="pos-a centerXY">
<div class="bgc-white bdrs-50p pos-r" style='width: 120px; height: 120px;'>
<img class="pos-a centerXY" src="{{ ASSETS_ROOT }}/images/logo.png" alt="">
<img class="pos-a centerXY" src="{% static '/images/logo.png' %}" alt="">
</div>
</div>
</div>

View File

@ -5,7 +5,7 @@
<!-- Specific CSS goes HERE -->
{% block stylesheets %}
<link rel="stylesheet" href="{{ ASSETS_ROOT }}/css/select2-bootstrap.min.css">
<link rel="stylesheet" href="{% static '/css/select2-bootstrap.min.css' %}">
{% endblock stylesheets %}
{% block content %}
@ -17,7 +17,7 @@
<div class="email-app">
<div class="email-side-nav remain-height ov-h">
<div class="h-100 layers">
<div class="p-20 bgc-grey-100 layer w-100">
<div class="p-20 bg-body-tertiary layer w-100">
<button type="button" class="btn btn-danger c-white w-100" data-bs-toggle="modal" data-bs-target="#ticketModal">New Ticket</button>
</div>
<div class="pos-r bdT layer w-100 fxg-1 bg-body overflow-y-auto">
@ -103,7 +103,7 @@
{% for tag in tags %}
<li class="nav-item filter-tag">
<li class="nav-item filter-tags">
<label for="filterTag-{{ tag.uuid }}" class="nav-link c-grey-800 cH-blue-500 actived">
<div class="peers ai-c jc-sb">
<div class="peer peer-greed">
@ -169,10 +169,10 @@
</div>
</div>
</div>
<div class="email-wrapper row remain-height bgc-white overflow-y-auto">
<div class="email-wrapper row remain-height bg-body overflow-y-auto">
<div class="email-list h-100 layers">
<div class="layer w-100">
<div class="bgc-grey-100 peers ai-c p-20 fxw-nw">
<div class="bg-body-tertiary peers ai-c p-20 fxw-nw">
<div class="peer me-auto">
<div class="btn-group" role="group">
<button type="button" class="email-side-toggle d-n@md+ btn bgc-white bdrs-2 mR-3 cur-p">
@ -453,5 +453,5 @@
const CSRFMiddlewareToken = "{{ csrf_token }}";
const CurrentUserID = "{{ request.user.uuid }}";
</script>
<script src="{{ ASSETS_ROOT }}/js/tickets.js"></script>
<script src="{% static '/js/tickets.js' %}"></script>
{% endblock javascripts %}

View File

@ -1,9 +1,11 @@
<script src="{{ ASSETS_ROOT }}/js/jquery-3.6.0.min.js"></script>
{% load static %}
<script src="{{ ASSETS_ROOT }}/js/jquery.dataTables.min.js"></script>
<script src="{% static '/js/jquery-3.6.0.min.js' %}"></script>
<script src="{{ ASSETS_ROOT }}/js/ckeditor.js"></script>
<script src="{% static '/js/jquery.dataTables.min.js' %}"></script>
<script src="{{ ASSETS_ROOT }}/js/select2.min.js"></script>
<script src="{% static '/js/ckeditor.js' %}"></script>
<script src="{{ ASSETS_ROOT }}/js/index.js"></script>
<script src="{% static '/js/select2.min.js' %}"></script>
<script src="{% static '/js/index.js' %}"></script>

View File

@ -1,4 +1,4 @@
{% load static %}
<div class="sidebar bg-body">
<div class="sidebar-inner">
<!-- ### $Sidebar Header ### -->
@ -9,7 +9,7 @@
<div class="peers ai-c fxw-nw">
<div class="peer">
<div class="logo">
<img src="{{ ASSETS_ROOT }}/images/logo.png" alt="">
<img src="{% static '/images/logo.png' %}" alt="">
</div>
</div>
<div class="peer peer-greed">

View File

@ -1,4 +1,6 @@
<!DOCTYPE html>
{% load static %}
<html>
<head>
<meta charset="utf-8">
@ -7,14 +9,16 @@
Django Adminator - {% block title %}{% endblock %} | AppSeed
</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.21/css/jquery.dataTables.min.css"
integrity="sha512-1k7mWiTNoyx2XtmI96o+hdjP8nn0f3Z2N4oF/9ZZRgijyV4omsKOXEnqL1gKQNPy2MTSP9rIEWGcH/CInulptA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link type="text/css" href="{{ ASSETS_ROOT }}/css/index.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="{% static '/css/bootstrap.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/colours.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/datepicker.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/fontawesome.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/themify-icons.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/scrollbar.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/adminator.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/jquery.dataTables.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/select2.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/index.css' %}" />
<!-- Specific Page CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}
@ -22,7 +26,7 @@
</head>
<body class="app">
<div id='loader'>
<div id='loader' class="bg-body">
<div class="spinner"></div>
</div>

View File

@ -1,4 +1,6 @@
<!DOCTYPE html>
{% load static %}
<html>
<head>
<meta charset="utf-8">
@ -7,14 +9,16 @@
Django Adminator - {% block title %}{% endblock %} | AppSeed
</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.21/css/jquery.dataTables.min.css"
integrity="sha512-1k7mWiTNoyx2XtmI96o+hdjP8nn0f3Z2N4oF/9ZZRgijyV4omsKOXEnqL1gKQNPy2MTSP9rIEWGcH/CInulptA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link type="text/css" href="{{ ASSETS_ROOT }}/css/index.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="{% static '/css/bootstrap.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/colours.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/datepicker.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/fontawesome.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/themify-icons.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/scrollbar.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/adminator.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/jquery.dataTables.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/select2.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/index.css' %}" />
<!-- Specific Page CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}

View File

@ -1,4 +1,6 @@
<!DOCTYPE html>
{% load static %}
<html>
<head>
<meta charset="utf-8">
@ -7,16 +9,16 @@
Django Adminator - {% block title %}{% endblock %}
</title>
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/colours.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/datepicker.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/fontawesome.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/themify-icons.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/scrollbar.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/adminator.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/jquery.dataTables.min.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/select2.min.css" />
<link type="text/css" rel="stylesheet" href="{{ ASSETS_ROOT }}/css/index.css" />
<link type="text/css" rel="stylesheet" href="{% static '/css/bootstrap.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/colours.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/datepicker.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/fontawesome.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/themify-icons.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/scrollbar.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/adminator.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/jquery.dataTables.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/select2.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/index.css' %}" />
<!-- Specific Page CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}
@ -40,7 +42,7 @@
<!-- @Page Loader -->
<!-- =================================================== -->
<div id='loader'>
<div id='loader' class="bg-body">
<div class="spinner"></div>
</div>