feat(t242): delete unused freight orders

This commit is contained in:
QiuSW
2026-07-29 16:10:45 +08:00
parent c80a5c26ed
commit e5f403ff7d
20 changed files with 915 additions and 27 deletions
@@ -119,4 +119,23 @@
openCancel.focus();
});
}
const openFreightDelete = document.querySelector(
"[data-open-freight-delete]",
);
const freightDeleteDialog = document.querySelector(
"[data-freight-delete-dialog]",
);
if (openFreightDelete && freightDeleteDialog) {
openFreightDelete.addEventListener("click", () => {
freightDeleteDialog.showModal();
freightDeleteDialog.querySelector("[data-keep-freight-order]").focus();
});
freightDeleteDialog
.querySelector("[data-keep-freight-order]")
.addEventListener("click", () => {
freightDeleteDialog.close();
openFreightDelete.focus();
});
}
})();