BugFix: Sort table of date

sortierung
Samuel Zielke 1 year ago
parent e9ff9be99f
commit c573b9bbd4

BIN
.DS_Store vendored

Binary file not shown.

BIN
app/.DS_Store vendored

Binary file not shown.

BIN
app/static/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -249,6 +249,9 @@ function filterEntriesByMonthYear(month, year) {
function fillTableWithEntries(entries) {
const tableBody = document.getElementById('entriesTableBody');
entries.sort((a, b) => new Date(a.date) - new Date(b.date));
console.log(entries)
// Zuerst den Inhalt der Tabelle löschen (falls schon Daten da sind)
tableBody.innerHTML = '';

@ -4,6 +4,7 @@ self.addEventListener("install", event => {
this.skipWaiting();
const urlsToCache = [
'/app/login/',
'/app/home/',
'/static/app/css/bootstrap.css',
'/static/app/css/custom.css',

@ -1,9 +1,11 @@
from django.urls import path
from django.views.generic import TemplateView
from django.shortcuts import redirect
from . import views
urlpatterns = [
path("", views.login), # NORMAL login - NUR FÜR DEV TIME
# path("", views.home), # NORMAL login - NUR FÜR DEV TIME
path("", lambda request: redirect("home/", permanent=True)), # NORMAL login - NUR FÜR DEV TIME
path("login", views.login),
path("home/", views.home),
path('offline/', TemplateView.as_view(template_name="offline.html")),

@ -9,7 +9,7 @@ PWA_APP_BACKGROUND_COLOR = '#9FEDD7'
PWA_APP_DISPLAY = 'standalone'
PWA_APP_SCOPE = '/'
PWA_APP_ORIENTATION = 'portrait'
PWA_APP_START_URL = '/app/'
PWA_APP_START_URL = '/app/home/'
PWA_APP_STATUS_BAR_COLOR = 'black-translucent'
PWA_SERVICE_WORKER_PATH = os.path.join(BASE_DIR, 'app/static/app/js', 'serviceworker.js')
PWA_APP_ICONS = [

@ -83,25 +83,25 @@ WSGI_APPLICATION = 'piomint.wsgi.application'
# Database
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
# STANDART DATENBANK
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': BASE_DIR / 'db.sqlite3',
# }
# }
#STANDART DATENBANK
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'piomint',
'USER': 'piomint',
'PASSWORD': 'qZX696%F@apY',
'HOST': '192.168.10.215',
'PORT': '3306',
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'piomint',
# 'USER': 'piomint',
# 'PASSWORD': 'qZX696%F@apY',
# 'HOST': '192.168.10.215',
# 'PORT': '3306',
# }
# }
# Password validation
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators

@ -0,0 +1,24 @@
<section data-cid="slide-05-7059bc59" class="slide fade-6 kenBurns">
<div class="content">
<div class="container">
<div class="wrap">
<ul class="flex">
<li class="col-12-12">
<div class="fix-4-12">
<h1>PioMint</h1>
<a href="#" class="button hollow ae-2 cropLeft"><img src="assets/img/appstore.jpg" height="63"/></a><a href="#" class="button hollow ae-3 cropRight"><img src="assets/img/googleplay.jpg" height="63"/></a>
</div>
</li>
<li class="col-12-12">
<div class="fix-6-12 ae-2 margin-top-3">
<img class="iphone-5" width="380" src="assets/img/iphone-5.png" alt="iPhone App" data-action="zoom"/>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="background" style="background-image:url(assets/img/background/img-05.jpg)"></div>
</section>

@ -2,11 +2,4 @@ from django.shortcuts import render, HttpResponse
# Create your views here.
def index(request):
return HttpResponse('''
<h1>INDEX WEB</h1>
</br>
<a href="app/install">Installieren</a>
</br>
</br>
<a href="app/">App Öffnen</a>
''')
return render(request, 'web/index.html')
Loading…
Cancel
Save

Powered by TurnKey Linux.