mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-04 00:30:27 +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",
|
||||
ref: "insured",
|
||||
},
|
||||
{
|
||||
type: "checkbox",
|
||||
label: "Archived",
|
||||
ref: "archived",
|
||||
},
|
||||
];
|
||||
|
||||
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 parent = ref();
|
||||
</script>
|
||||
|
@ -427,11 +420,6 @@
|
|||
</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>
|
||||
|
||||
<BaseCard>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue