Compare commits
3 Commits
4c8d06e2c5
...
0200b4ef38
Author | SHA1 | Date | |
---|---|---|---|
0200b4ef38 | |||
7c3f1d45de | |||
d89f64f123 |
@ -33,7 +33,7 @@ classifiers = [
|
|||||||
"Topic :: Office/Business :: Financial :: Accounting",
|
"Topic :: Office/Business :: Financial :: Accounting",
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"flask",
|
"Flask",
|
||||||
"SQLAlchemy >= 2",
|
"SQLAlchemy >= 2",
|
||||||
"Flask-SQLAlchemy",
|
"Flask-SQLAlchemy",
|
||||||
"Flask-WTF",
|
"Flask-WTF",
|
||||||
@ -42,8 +42,7 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
test = [
|
devel = [
|
||||||
"unittest",
|
|
||||||
"httpx",
|
"httpx",
|
||||||
"OpenCC",
|
"OpenCC",
|
||||||
]
|
]
|
||||||
|
@ -67,7 +67,6 @@ def show_add_journal_entry_form(journal_entry_type: JournalEntryType) -> str:
|
|||||||
form.validate()
|
form.validate()
|
||||||
else:
|
else:
|
||||||
form = journal_entry_op.form()
|
form = journal_entry_op.form()
|
||||||
form.date.data = dt.date.today()
|
|
||||||
return journal_entry_op.render_create_template(form)
|
return journal_entry_op.render_create_template(form)
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,6 +135,13 @@ class JournalEntryForm {
|
|||||||
};
|
};
|
||||||
this.#resetDeleteCurrencyButtons();
|
this.#resetDeleteCurrencyButtons();
|
||||||
this.#initializeDragAndDropReordering();
|
this.#initializeDragAndDropReordering();
|
||||||
|
if (this.#date.value === "") {
|
||||||
|
const now = new Date();
|
||||||
|
const year = String(now.getFullYear()).padStart(4, "0");
|
||||||
|
const month = String(now.getMonth() + 1).padStart(2, "0");
|
||||||
|
const day = String(now.getDate()).padStart(2, "0");
|
||||||
|
this.#date.value = `${year}-${month}-${day}`;
|
||||||
|
}
|
||||||
this.#date.onchange = () => this.#validateDate();
|
this.#date.onchange = () => this.#validateDate();
|
||||||
this.#note.onchange = () => this.#validateNote();
|
this.#note.onchange = () => this.#validateNote();
|
||||||
this.#element.onsubmit = () => {
|
this.#element.onsubmit = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user