mirror of
https://github.com/kbenestad/reimburse.git
synced 2026-06-18 08:04:31 +00:00
Preserve staff name when starting a new form
https://claude.ai/code/session_01MbwfxnjLA9KdFTrfzB55HM
This commit is contained in:
parent
c09aca7cd3
commit
6be776ccd2
1 changed files with 0 additions and 2 deletions
|
|
@ -1221,13 +1221,11 @@ async function onNewForm() {
|
||||||
const confirmed = await showConfirmModal('This will clear all current form data and start a fresh form.<br><br>Are you sure you want to continue?');
|
const confirmed = await showConfirmModal('This will clear all current form data and start a fresh form.<br><br>Are you sure you want to continue?');
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
try { localStorage.removeItem('reimb-state'); } catch(e) {}
|
try { localStorage.removeItem('reimb-state'); } catch(e) {}
|
||||||
try { localStorage.removeItem('reimb-staff'); } catch(e) {}
|
|
||||||
if (db) {
|
if (db) {
|
||||||
const keys = await dbAllKeys();
|
const keys = await dbAllKeys();
|
||||||
if (Array.isArray(keys)) for (const k of keys) await dbDel(k);
|
if (Array.isArray(keys)) for (const k of keys) await dbDel(k);
|
||||||
}
|
}
|
||||||
const p = defaultPeriod();
|
const p = defaultPeriod();
|
||||||
state.staff = '';
|
|
||||||
state.periodFrom = p.from;
|
state.periodFrom = p.from;
|
||||||
state.periodTo = p.to;
|
state.periodTo = p.to;
|
||||||
state.baseCurrency = CFG['currency-base'];
|
state.baseCurrency = CFG['currency-base'];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue