Add edit page, dialog based item page. Consider switching to popups.

This commit is contained in:
Cole Deck
2024-12-20 21:40:24 +00:00
parent 2a8de79adb
commit 27169ff8a0
16 changed files with 686 additions and 137 deletions

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Interactions with the Meilisearch API for adding and searching cables."""
import sys
from meilisearch import Client
from meilisearch.task import TaskInfo
from meilisearch.errors import MeilisearchApiError
@@ -45,6 +47,8 @@ class InventorySearch:
# make a variable to easily reference the index
self.idxref = self.client.index(self.index)
time.sleep(0.05)
# disable typos, we have serial numbers and such that should be exact match
self.idxref.update_typo_tolerance({'enabled': False})
# update filterable attributes if needed
self.idxref.update_distinct_attribute('barcode')
self.update_filterables(filterable_attrs)
@@ -109,4 +113,4 @@ class InventorySearch:
# entrypoint
if __name__ == "__main__":
jbs = InventorySearch()
ivs = InventorySearch()