diff --git a/db_classes.py b/db_classes.py index d0b9328..877cb9d 100644 --- a/db_classes.py +++ b/db_classes.py @@ -195,6 +195,11 @@ def update_item(fullname, serial, officename, barcode, locationid=None, descript def delete_item(itm): #item.delete(itm) itm.delete_instance() + +def delete_item_id(barcode): + #item.delete(itm) + itm = get_item(barcode) + itm.delete_instance() def item_location_str(itm): try: diff --git a/inventory/components/footer.py b/inventory/components/footer.py index 90b727c..371a664 100644 --- a/inventory/components/footer.py +++ b/inventory/components/footer.py @@ -16,9 +16,9 @@ class Footer(rio.Component): def build(self) -> rio.Component: return rio.Card( content=rio.Column( - rio.Text("Buzzwordz Inc."), + rio.Text("Validation Lab"), rio.Text( - "Hyper Dyper Website", + "Inventory Management system", style="dim", ), spacing=1, diff --git a/inventory/pages/add_location.py b/inventory/pages/add_location.py index d6c768f..da51f83 100644 --- a/inventory/pages/add_location.py +++ b/inventory/pages/add_location.py @@ -54,7 +54,7 @@ class AddLocationPage(rio.Component): await asyncio.sleep(2) self.popup_show = False else: - self.popup_message = "\n Part added! \n\n" + self.popup_message = "\n Location added! \n\n" self.popup_show = True self.popup_color = 'success' self.name: str = "" @@ -76,7 +76,7 @@ class AddLocationPage(rio.Component): return rio.Column( rio.Popup( anchor=rio.Text( - text="Add a part below:", + text="Add a location below:", style='heading1', align_x = 0.5 ), diff --git a/inventory/pages/browse_page.py b/inventory/pages/browse_page.py index 817b2d0..5adcc72 100644 --- a/inventory/pages/browse_page.py +++ b/inventory/pages/browse_page.py @@ -130,9 +130,13 @@ class BrowsePage(rio.Component): async def _delete_edit_popup(self): self.edit_show = False - self.info_show = False - # TODO: delete here + self.info_show = True await self.force_refresh() + await delete_item_id(self.ibarcode) + await self._search() + await asyncio.sleep(1) + self.popup_show = False + await self._search() async def _open_edit_popup(self, code: str) -> str | None: