Compare commits

..

5 Commits

Author SHA1 Message Date
Timon Ostertun
3d518847f5 . 2026-01-10 11:36:29 +01:00
b63b4c6714 Merge branch 'hotfix/fix_expenditures_approve' 2025-05-16 17:18:27 +02:00
595c684e23 fix_expenditures_approve 2025-05-16 17:18:18 +02:00
3c0c2a3f2e Merge branch 'hotfix/fix_login' 2025-05-16 17:11:10 +02:00
ac9b5ef652 gitflow-hotfix-stash: fix_login 2025-05-16 17:10:51 +02:00
3 changed files with 13 additions and 5 deletions

View File

@@ -1192,7 +1192,7 @@ function initDatabase() {
} }
db.onerror = function (event) { db.onerror = function (event) {
log("[db] DB Error: " + event.target); log("[db] DB Error: ", event.target);
}; };
canUseLocalDB = true; canUseLocalDB = true;
@@ -1343,7 +1343,14 @@ function resetDb() {
db.transaction('rankings', 'readwrite').objectStore('rankings').clear(); db.transaction('rankings', 'readwrite').objectStore('rankings').clear();
db.transaction('follows', 'readwrite').objectStore('follows').clear(); db.transaction('follows', 'readwrite').objectStore('follows').clear();
db.transaction('expenditures', 'readwrite').objectStore('expenditures').clear(); db.transaction('expenditures', 'readwrite').objectStore('expenditures').clear();
var osUpdateTimes = db.transaction('update_times', 'readwrite').objectStore('update_times'); var ta = db.transaction('update_times', 'readwrite');
ta.oncomplete = (event) => {
log('[db] resetDb: Transaction complete');
};
ta.onerror = (event) => {
log('[db] resetDb: Transaction failed');
};
var osUpdateTimes = ta.objectStore('update_times');
osUpdateTimes.put({ table: 'last_sync', time: 1 }); osUpdateTimes.put({ table: 'last_sync', time: 1 });
osUpdateTimes.put({ table: 'clubs', time: 0 }); osUpdateTimes.put({ table: 'clubs', time: 0 });
osUpdateTimes.put({ table: 'boats', time: 0 }); osUpdateTimes.put({ table: 'boats', time: 0 });
@@ -1358,6 +1365,7 @@ function resetDb() {
osUpdateTimes.put({ table: 'users', time: 0 }); osUpdateTimes.put({ table: 'users', time: 0 });
osUpdateTimes.put({ table: 'expenditures', time: 0 }); osUpdateTimes.put({ table: 'expenditures', time: 0 });
osUpdateTimes.put({ table: 'loggedin', status: isLoggedIn() }); osUpdateTimes.put({ table: 'loggedin', status: isLoggedIn() });
ta.commit();
log('[db] DB update times reset'); log('[db] DB update times reset');
hideLoader(); hideLoader();
} }

View File

@@ -31,10 +31,10 @@ async function onListClicked(id) {
if (exp.approved == 0 && (exp.direction < 0) == (exp.canceled == 0)) { if (exp.approved == 0 && (exp.direction < 0) == (exp.canceled == 0)) {
$('#menu-item-approve').show(); $('#menu-item-approve').show();
$('#menu-item-approve').attr('onclick', 'expenditureAction("approve", ' + exp['id'] + ', "' + (exp.canceled == 1 ? 'Stornierung' : 'Ausgabe') + ' genehmigt")'); $('#menu-item-approve').attr('onclick', 'expenditureAction("approve", ' + exp['id'] + ', "' + (exp.canceled == 1 ? 'Stornierung' : 'Ausgabe') + ' genehmigt")');
$('#menu-item-approve').text(exp.canceled == 1 ? 'Storno akzeptieren' : 'Akzeptieren'); $('#menu-item-approve').find('span').text(exp.canceled == 1 ? 'Storno akzeptieren' : 'Akzeptieren');
$('#menu-item-decline').show(); $('#menu-item-decline').show();
$('#menu-item-decline').attr('onclick', 'expenditureAction("decline", ' + exp['id'] + ', "Ausgabe ' + (exp.canceled == 1 ? 'erneut angefragt' : 'abgelehnt') + '")'); $('#menu-item-decline').attr('onclick', 'expenditureAction("decline", ' + exp['id'] + ', "Ausgabe ' + (exp.canceled == 1 ? 'erneut angefragt' : 'abgelehnt') + '")');
$('#menu-item-decline').text(exp.canceled == 1 ? 'Erneut anfragen' : 'Ablehnen'); $('#menu-item-decline').find('span').text(exp.canceled == 1 ? 'Erneut anfragen' : 'Ablehnen');
} else { } else {
$('#menu-item-approve').hide(); $('#menu-item-approve').hide();
$('#menu-item-decline').hide(); $('#menu-item-decline').hide();

View File

@@ -1,5 +1,5 @@
<?php <?php
define('PWA_VERSION', '1.13h4'); define('PWA_VERSION', '1.13h6');
?> ?>