feat(budget): further implementation with modal for editing
Some checks failed
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Failing after 1m9s
Some checks failed
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Failing after 1m9s
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
menuButton.addEventListener("click", function (e) {
|
||||
menuButton.addEventListener("click", function() {
|
||||
menu.showModal();
|
||||
});
|
||||
menuButtonClose.addEventListener("click", function (e) {
|
||||
menuButtonClose.addEventListener("click", function() {
|
||||
menu.close();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
htmx.on("htmx:afterSwap", () => {
|
||||
dialogs = dialogContainer.getElementsByClassName("openDialogModal");
|
||||
Array.from(dialogs).forEach((dialog) => {
|
||||
dialog.showModal()
|
||||
// buttons = dialog.getElementsByClassName("closeModalDialog");
|
||||
// Array.from(buttons).forEach((button) => button.addEventListener("click", closeModalDialog))
|
||||
})
|
||||
});
|
||||
|
||||
// function closeModalDialog(e) {
|
||||
// e.preventDefault();
|
||||
// console.log(e)
|
||||
// e.target.close()
|
||||
// }
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ function updateTime() {
|
||||
document.querySelectorAll(".datetime").forEach((el) => {
|
||||
if (el.textContent !== "") {
|
||||
el.textContent = el.textContent.includes("UTC") ? new Date(el.textContent).toLocaleString([], { day: 'numeric', month: 'short', year: 'numeric' }) : el.textContent;
|
||||
} else if (el.attributes['value'] !== "") {
|
||||
} else if (el.attributes['value'] && el.attributes['value'] !== "") {
|
||||
const value = el.attributes['value'].value;
|
||||
const newDate = value.includes("UTC") ? new Date(value) : value;
|
||||
el.valueAsDate = newDate;
|
||||
|
||||
Reference in New Issue
Block a user