mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-04 08:40:28 +00:00
add archived field
This commit is contained in:
parent
010a15b927
commit
eff6b56c9f
1 changed files with 5 additions and 17 deletions
|
@ -115,6 +115,11 @@
|
||||||
label: "Insured",
|
label: "Insured",
|
||||||
ref: "insured",
|
ref: "insured",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "checkbox",
|
||||||
|
label: "Archived",
|
||||||
|
ref: "archived",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const purchaseFields: FormField[] = [
|
const purchaseFields: FormField[] = [
|
||||||
|
@ -313,18 +318,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function archiveItem() {
|
|
||||||
const { isCanceled } = await confirm.open("Are you sure you want to archive this item?");
|
|
||||||
|
|
||||||
if (isCanceled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("archiving");
|
|
||||||
|
|
||||||
// TODO: Set item.archived = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const { query, results } = useItemSearch(api, { immediate: false });
|
const { query, results } = useItemSearch(api, { immediate: false });
|
||||||
const parent = ref();
|
const parent = ref();
|
||||||
</script>
|
</script>
|
||||||
|
@ -427,11 +420,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-4 flex justify-end">
|
|
||||||
<div class="tooltip" data-tip="Hide item from main view">
|
|
||||||
<BaseButton class="btn-error" size="sm" @click="archiveItem"> Archive Item </BaseButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<BaseCard>
|
<BaseCard>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue