Updated apps
This commit is contained in:
@@ -151,6 +151,9 @@ export class MaintenancePartsSection extends LitElement {
|
||||
}
|
||||
|
||||
private async _delete(part: MaintenancePart): Promise<void> {
|
||||
// Deleting a part drops its stock tracking, task links and buy reminder —
|
||||
// destructive enough to warrant an explicit confirmation (user request).
|
||||
if (!window.confirm(t("part_delete_confirm", this._lang).replace("{name}", part.name))) return;
|
||||
const result = await this._send<{ success: boolean }>({
|
||||
type: "maintenance_supporter/part/delete",
|
||||
entry_id: this.entryId,
|
||||
@@ -160,7 +163,7 @@ export class MaintenancePartsSection extends LitElement {
|
||||
}
|
||||
|
||||
private async _restock(part: MaintenancePart): Promise<void> {
|
||||
const qty = parseInt(this._restockQty, 10);
|
||||
const qty = parseFloat(this._restockQty);
|
||||
if (!Number.isFinite(qty) || qty === 0) {
|
||||
// Don't silently swallow a no-op amount — keep the input open and mark
|
||||
// it so the user sees WHY nothing happened (0 / empty / not a number).
|
||||
|
||||
Reference in New Issue
Block a user