add archived field

This commit is contained in:
Hayden 2022-10-31 21:40:54 -08:00
parent 010a15b927
commit eff6b56c9f
No known key found for this signature in database
GPG key ID: 17CF79474E257545

View file

@ -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>