74bd1a89e5
feat(db): edit database schema and item insertion logic
...
* Added a junction table for custom properties to improve data normalization
* Modified the `insert_item_by_url` function to handle custom properties through the junction table
* Introduced `get_url_id` and `get_or_create_property` helper functions for improved code organization
* Updated the `insert_item_by_url` function to use the new helper functions and handle custom properties correctly
* Improved error handling and logging throughout the database module
2025-02-18 23:38:45 +03:00
9beb997125
feat(item_list): update save_item_to_db
function to take current_url
as an argument.
...
Changes:
* Replaced `let current_url = get_current_url();` with `let current_url = Rc::new(get_current_url());` to share the current URL between closures.
* Wrapped `add_property` and `update_item` functions in Arc to share them between closures.
* Updated `save_item_to_db` function to take `current_url` as an argument and use it to construct the ItemToSend struct.
* Updated `fetch_property_labels` function to use the `property_ids` vector instead of a single property ID.
* Updated `fetch_item_properties` function to use the `wikidata_id` parameter instead of a hardcoded value.
* Updated `WikidataResponse` struct to use a `Vec<WikidataSuggestion>` instead of a single `WikidataSuggestion`.
2025-02-18 20:01:45 +03:00
63f11f6a2d
feat(db): move function to lead items from db outside the items list component.
2025-02-17 20:19:54 +03:00
eba20abf5a
feat(app): add router and dynamic item loading to app component
2025-02-17 17:04:43 +03:00
ecc991cc24
feat(db): add properties table and junction table for custom properties
2025-02-17 17:04:16 +03:00
8860ace51f
feat(url): Added API handlers for item management by URL
2025-02-14 17:50:58 +03:00
7939c9e7b6
feat(url): add server-side rendering feature with URL routing
2025-02-13 23:07:27 +03:00
fddec7f728
feat(url): edit items list component to include current URL in database query
2025-02-13 23:06:26 +03:00
1a5c245250
feat(api): add URL parameter support to API endpoints
2025-02-12 16:12:33 +03:00
e72ed778a2
feat(item): remove reviews from item struct.
2025-02-12 15:56:11 +03:00
bfded464c9
feat(db): update db.rs to save url specific items and properties
2025-02-12 15:55:17 +03:00
ce1e93fc49
feat(db): create new URL table and update the existing table to include a foreign key to the URLs table
2025-02-11 23:36:43 +03:00
443c7a7e0c
build(files): remove unused item_form.rs and wikidata_lookup.rs files
2025-02-06 22:19:42 +03:00
4bfd47d8c4
feat(item_list): normalize property labels to display the right labels on the item list
2025-02-04 14:29:11 +03:00
94ed4c46b9
feat(item_list): succesfully fetch property labels using SPARQL
2025-02-03 19:48:50 +03:00
25b3128181
feat(item_list): use sparql to fetch properties
2025-02-03 14:58:56 +03:00
23cd674e31
feat(item_list): implement querying using GRAPHQL
2025-02-01 05:28:36 +03:00
af921088f9
feat(wikidata): enhance property value parsing and improve time handling
...
- Refactor `fetch_item_properties` to handle nested JSON types efficiently
- Introduce `parse_property_value` for structured processing of various value types
- Handle time values with varying precision (year, month, day)
- Parse and format dates from RFC 3339 format
- Support fetching and displaying labels for Wikidata entity references
- Replace raw JSON object handling with cleaner structured parsing
- Update property label fetching and signal updates for better UI data synchronization
2025-01-30 14:59:55 +03:00
a40e9c98c4
feat(Item_list): auto-add property on dropdown selection
...
-No need for an "Add Property" button
2025-01-29 19:42:53 +03:00
2d072f3303
feat(item_list): move delete buttons next to item name
2025-01-29 16:07:10 +03:00
792b4daf04
feat(item_list): put item names into the header
2025-01-29 15:51:11 +03:00
9eb930da19
build(gitignore): update .gitignore to ignore compareware.db
2025-01-29 15:34:59 +03:00
e0c49ffa86
build(merge): merge branch 'db' into main
2025-01-29 15:30:35 +03:00
1318319ad1
fix(properties): reflect added properties in real time in the ui
2025-01-28 23:45:27 +03:00
ac8eb8118d
fix(item_list):initialize with one empty item if the database is empty
2025-01-28 20:44:52 +03:00
4ff9928a94
buid(toolchain): update rust-toolchain.toml to use Rust 1.82.0 instead of 1.83.0
2025-01-28 15:19:31 +03:00
68b458df5e
feat(db): enable user to delete items and properties from the database.
2025-01-28 14:36:17 +03:00
afa3bd3ece
feat(Item_list): update ItemsList component to include delete button for property input fields
2025-01-28 02:43:07 +03:00
c38f19d76c
feat(labels): persist property labels on refresh.
2025-01-27 16:48:28 +03:00
49315128f8
build(git): add compareware.db file to .gitignore
2025-01-27 16:38:23 +03:00
2455619735
build(git): add compareware.db file to .gitignore
2025-01-27 16:37:32 +03:00
3fa56abc83
feat(db): persist custom properties from db
2025-01-27 16:34:25 +03:00
e0e5fc49c2
feat(db): load items from database on startup.
...
-successfully loading names and description
2025-01-24 15:10:25 +03:00
c1207f613d
feat(db): add selected properties state and update save_item_to_db function to include selected properties
2025-01-24 02:23:24 +03:00
fc13b0dae6
feat(db): enable db to update items keeping track of the item's id
2025-01-24 01:54:25 +03:00
3ed12c80a6
feat(db): integrate the database with the frontend.
2025-01-23 21:36:30 +03:00
0ac35c3ca5
fix(db): register custom API routes before the Leptos server function handler
2025-01-23 14:29:42 +03:00
e46b693e56
build(toolchain): update rust-toolchain.toml to use Rust 1.82.0 instead of 1.83.0
2025-01-23 00:02:48 +03:00
291cb05847
feat(db): run db on backend using actix web
2025-01-22 20:16:43 +03:00
af3f89c561
feat(db): add API endpoint for updating items to db and implement server-side functionality
2025-01-22 14:14:18 +03:00
5bd19803fe
feat(ssr): add SSR feature to ItemsList component
2025-01-22 02:50:00 +03:00
29434dc37c
feat(db): revert to previous working commit.
2025-01-20 19:14:34 +03:00
dc70316bae
fix(db): db debugging (in progress)
2025-01-20 18:49:54 +03:00
4760364491
feat(reviews): remove reviews from Item struct
2025-01-17 18:52:20 +03:00
c8f32d027f
feat(db): add a database using rusqlite.
2025-01-17 18:51:59 +03:00
a99b5164d8
feat(item_list): add property labels fetching and displaying in ItemsList component
2025-01-16 15:06:16 +03:00
1f81eae135
feat(items_list): populate new item cells with related property values based on their wikidata_id
2025-01-16 02:29:27 +03:00
765227e7aa
fix(items_list): modify add_property to fetch and populate relevant values per item
2025-01-16 01:43:51 +03:00
8fed7eeafe
feat(items_list): add cache to store fetched properties and use it for auto completion of newly added properties
2025-01-14 17:25:57 +03:00
ca97f74854
feat(item list): fetch properties of selected wiki suggestions.
2025-01-14 14:48:02 +03:00