Compare commits

..

No commits in common. 'main' and 'backup' have entirely different histories.
main ... backup

2
.gitignore vendored

@ -1,5 +1,3 @@
venv/
*/__pycache__*
*/migrations*
*/.DS_Store

@ -52,7 +52,7 @@ async function exportIndexedDBData() {
try {
const data = await getAllDataFromIndexedDB(dbName, storeName);
const jsonData = convertToJSON(data);
downloadData("piomint_backup.json", jsonData);
downloadData("exported_data.json", jsonData);
} catch (error) {
console.error("Fehler beim Exportieren der Daten:", error);
}

@ -6,6 +6,8 @@ const SETStudySaveButton = document.getElementById('SETStudySaveButton')
const SETMonthGoalSaveButton = document.getElementById('SETMonthGoalSaveButton')
var allowToSend = false;
const monate = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"];
const aktuellerMonat = monate[new Date().getMonth()];
// Aktuelles Datum
const currentDate = new Date();
@ -155,13 +157,11 @@ SETMonthGoalSaveButton.addEventListener('click', () => {
})
async function getActualDataAndFillView(monat = currentDate.getMonth(), jahr = currentDate.getFullYear()) {
async function getActualDataAndFillView(monat = currentDate.getMonth() + 1, jahr = currentDate.getFullYear()) {
try {
// Einfüfen des aktuellen Monats
document.getElementById('actualMonthName').innerHTML = monate[monat !== 12 ? monat : 0];
console.log("AKTUELLER MONAT SYSTEM: ", monat)
console.log("AKTUELLER MONAT REAL: ", currentDate.getMonth())
document.getElementById('actualMonthName').innerHTML = monate[monat - 1];
// Settings vor ausfüllen
@ -177,9 +177,7 @@ async function getActualDataAndFillView(monat = currentDate.getMonth(), jahr = c
});
// Filter funktion aufrufen und entsprechend mit dem aktuellen Datum füllen
const filteredEntries = await filterEntriesByMonthYear(monat === 12 ? 1 : monat + 1, monat + 1 >= 9 ? jahr + 1 : jahr);
console.log("update-complete")
const filteredEntries = await filterEntriesByMonthYear(monat, jahr);
// Tabelle mit den aktuellen informationen füllen (funktion triggern und Daten übergeben)
fillTableWithEntries(filteredEntries)
@ -383,36 +381,30 @@ document.getElementById('dashbord_month_area').addEventListener('click', () =>{
document.getElementById('MonthNameOfActual').innerHTML = "Monat:"
// document.getElementById('actualMonthName').innerHTML = monate[new Date().getMonth()];
diffMonth = 0;
getActualDataAndFillView(new Date().getMonth() + diffMonth)
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
}
})
document.getElementById('btn-month-before').addEventListener('click', () =>{
console.log("CLICK-BEFORE: ", diffMonth)
if (new Date().getMonth() + diffMonth == 0) {
diffMonth = 11 - new Date().getMonth();
getActualDataAndFillView(new Date().getMonth() + diffMonth)
console.log("CLICK-BEFRORE-0TO11: ", diffMonth)
if (diffMonth === 0) {
diffMonth = 11;
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
} else {
diffMonth = ((monate[new Date().getMonth() + diffMonth]) != 'September') ? diffMonth - 1 : diffMonth;
// document.getElementById('actualMonthName').innerHTML = monate[new Date().getMonth() + diffMonth];
getActualDataAndFillView(new Date().getMonth() + diffMonth)
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
};
console.log("CLICK-BEFORE-AFTER: ", diffMonth)
});
document.getElementById('btn-month-next').addEventListener('click', () =>{
console.log("CLICK-NEXT: ", diffMonth)
if (new Date().getMonth() + diffMonth == 11) {
diffMonth = 0 - new Date().getMonth();
getActualDataAndFillView(new Date().getMonth() + diffMonth)
console.log("CLICK-NEXT-11TO0: ", diffMonth)
if (diffMonth === 11) {
diffMonth = 0;
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
} else {
diffMonth = ((monate[new Date().getMonth() + diffMonth]) != 'August') ? diffMonth + 1 : diffMonth;
// document.getElementById('actualMonthName').innerHTML = monate[new Date().getMonth() + diffMonth];
getActualDataAndFillView(new Date().getMonth() + diffMonth)
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
};
console.log("CLICK-NEXT-AFTER: ", diffMonth)
})
function setNewCalsOfMonth(TheMonth) {

@ -7,6 +7,7 @@ self.addEventListener("install", event => {
'/static/app/css/bootstrap.css',
'/static/app/css/custom.css',
'/static/app/js/dbcontrol.js',
'/static/app/js/home.js',
'/static/app/js/timer.js',
'/static/app/js/welcomeControl.js',
'/static/app/js/exportDB.js',
@ -55,15 +56,15 @@ self.addEventListener('activate', event => {
);
});
// // Serve from Cache
// self.addEventListener("fetch", event => {
// event.respondWith(
// caches.match(event.request)
// .then(response => {
// return response || fetch(event.request);
// })
// .catch(() => {
// return caches.match('/app/home');
// })
// )
// });
// Serve from Cache
self.addEventListener("fetch", event => {
event.respondWith(
caches.match(event.request)
.then(response => {
return response || fetch(event.request);
})
.catch(() => {
return caches.match('/app/home');
})
)
});

@ -291,7 +291,7 @@
})
</script>
<script src="{% static 'app/js/home01.js' %}"></script>
<script src="{% static 'app/js/home.js' %}"></script>
<script src="{% static 'app/js/timer.js' %}"></script>
<script src="{% static 'app/js/welcomeControl.js' %}"></script>
<script src="{% static 'app/js/UpdateInfoControl.js' %}"></script>

@ -1,22 +1,21 @@
<br>
<h1>Update Time!</h1>
<br>
<h5>v1.3.3</h5>
<h5>v1.2.1</h5>
<p>
<b style="color: red">Fehler Behebung! 🔥</b>
<br>Anicht vom falschen Jahr!
<b style="color: red">SORRY! 😬</b>
<br>Da ist mir was durch die lappen gegangen!
<br>
<br><b>Was ist neu?</b>
<br> Aufrund des Dienstjahres was nicht mit Kalender
<br> übereinstimmt, geht es gegen die Natur.
<br> Unter Einstellungen WhatsApp Community beitreten!
<br>
<!-- <br><b>Hinweise:</b>
<br> 1. Backup muss Manuell gemacht werden (aktuell)!
<br> 2. Backup muss Gespeichert werden! */}}
<br> -->
<br>Danke für die Geduld und das du Piomint nutzt!
<br><b>BugFix:</b>
<br> 1. Der Monatswechsel hat nicht in den Dezember geklappt.
<br> 2. Die Jahresanzeige war auf Kalenderjahr und nichts dienstjahr.
<br>
<br>Viel Freude und schön das du piomint nutz,
<br><b>Gruß Samuel</b>
</p>
<br>
<input type="text" name="versionnumber" id="versionnumber" class="d-none" value="1.3.3-5">
<input type="text" name="versionnumber" id="versionnumber" class="d-none" value="1.2.1">

@ -9,12 +9,5 @@ urlpatterns = [
path("login", views.login),
path("home/", views.home),
path('offline/', TemplateView.as_view(template_name="offline.html")),
path("install/", views.install),
path("v1321/", views.v1322),
path("v1322/", views.v1322),
path("v133/", views.v133),
path("v1332/", views.v1332),
path("v1333/", views.v1333),
path("v1334/", views.v1334),
path("v1335/", views.v1335),
path("install/", views.install)
]

@ -8,28 +8,7 @@ def install(request):
return render(request, "app/install.html")
def home(request):
return redirect("/app/v1335")
return render(request, "app/home.html")
def login(request):
return render(request, "app/login.html")
def v1321(request):
return redirect("/app/v1335")
def v1322(request):
return redirect("/app/v1335")
def v133(request):
return redirect("/app/v1335")
def v1332(request):
return redirect("/app/v1335")
def v1333(request):
return redirect("/app/v1335")
def v1334(request):
return redirect("/app/v1335")
def v1335(request):
return render(request, "app/home.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/v1335/'
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 = [

@ -27,7 +27,7 @@ SECRET_KEY = 'django-insecure-h^$jdg0n_yarg*l#r3fd_7=7_)-!0bspac70f$1#b7w8gmkc-*
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['*'] if DEBUG else ['localhost', 'app.piomint.de']
ALLOWED_HOSTS = ['*'] if DEBUG else ['localhost']
# Application definition
@ -138,7 +138,6 @@ USE_TZ = True
# https://docs.djangoproject.com/en/5.1/howto/static-files/
STATIC_URL = 'static/'
STATIC_ROOT = '/var/www/piomint/static/' # Directory to collect static files.
# Default primary key field type
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field

@ -1,7 +0,0 @@
asgiref==3.8.1
Django==5.1.1
django-pwa==2.0.0
gunicorn==23.0.0
mysqlclient==2.2.4
packaging==24.1
sqlparse==0.5.1
Loading…
Cancel
Save

Powered by TurnKey Linux.