Open devAsadNur opened 1 year ago
The recent updates introduce significant enhancements to the wePOS system, including improved product search functionality, product log synchronization, and database management. Key changes involve fixing variable name typos, adding new methods for product handling, and integrating IndexedDB for efficient product data management. These updates aim to streamline product searches and ensure accurate product data synchronization across the platform.
Files/Groups | Change Summary |
---|---|
assets/less/style.less |
Added new style block .refresh-products-tooltip-wrapper for tooltip styling. |
assets/src/frontend/components/CustomerSearch.vue , ProductSearch.vue |
Corrected typos in variable names (serachInput to searchInput ); updated method names for consistency and functionality. |
assets/src/frontend/components/Home.vue |
Added refresh-products section, methods for product logs management, and updated IndexedDB logic. |
assets/src/utils/Bootstrap.js |
Imported productIndexedDb and productLogs , added synchronization logic. |
assets/src/utils/productIndexedDb.js , productLogs.js |
Introduced functions for IndexedDB management and product logs synchronization. |
includes/Admin/Updates.php , upgrade-1.3.0.php |
Added updater functions for version 1.3.0, including product log database table creation. |
includes/Ajax.php , Assets.php |
Added methods for handling Heartbeat data and enqueueing scripts. |
includes/Installer.php |
Added methods for installation tasks and database table creation. |
includes/ProductsLog.php |
Added methods for managing product logs and counters. |
includes/REST/Manager.php , ProductsLogController.php |
Updated REST API manager and added ProductsLogController for product logs management. |
includes/Uninstaller.php |
Added functionality for uninstalling specific capabilities. |
includes/functions.php |
Added function to retrieve cashier data based on user ID. |
wepos.php |
Updated activation and deactivation methods to utilize Installer and Uninstaller classes. |
sequenceDiagram
participant User
participant Frontend
participant Backend
participant IndexedDB
participant WooCommerce
User->>Frontend: Search Product
Frontend->>IndexedDB: Query Products by Keyword
IndexedDB-->>Frontend: Return Matching Products
Frontend-->>User: Display Products
User->>Frontend: Refresh Products
Frontend->>Backend: Fetch Product Logs
Backend->>WooCommerce: Get Product Data
WooCommerce-->>Backend: Return Product Data
Backend->>IndexedDB: Update Product Data
IndexedDB-->>Frontend: Confirm Update
Frontend-->>User: Display Updated Products
Objective (Issue #125) | Addressed | Explanation |
---|---|---|
Ensure all products can be found by searching | ✅ | |
Improve product loading performance | ✅ | |
Handle large datasets efficiently | ✅ |
In the code where products hide, A search now swift, no need to bide. IndexedDB, a rabbit's friend, Ensures the search will never end. With logs and sync, the data flows, WePOS, the system grows. 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Scenario: The search doesn't work. Also, nothing is stored in indexedDB.
Steps to reproduce:
Screenshot:
@devAsadNur, kindly update the target upgrader version to the next release version(1.2.8).
Scenario: DB error while building the PR
DB Error:
[03-Jun-2024 06:55:45 UTC] WordPress database error Table 'wepos.pos_wepos_login' doesn't exist for query SELECT user_id, outlet_id, counter_id, is_logged_in FROM pos_wepos_login WHERE user_id=1 AND `is_logged_in`='1' made by require('wp-admin/plugins.php'), require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WePOS->init_classes, WeDevs\WePOS\ProductsLog->__construct, wepos_get_cashier_data_by_user_id
[03-Jun-2024 06:55:45 UTC] WordPress database error Table 'wepos.pos_wepos_login' doesn't exist for query SELECT user_id, outlet_id, counter_id, is_logged_in FROM pos_wepos_login WHERE user_id=1 AND `is_logged_in`='1' made by require('wp-admin/plugins.php'), require_once('wp-admin/admin-header.php'), do_action('admin_enqueue_scripts'), WP_Hook->do_action, WP_Hook->apply_filters, WeDevs\WePOS\Assets->register, WeDevs\WePOS\Assets->register_localize, wepos_get_cashier_data_by_user_id
[03-Jun-2024 06:55:45 UTC] WordPress database error Table 'wepos.pos_wepos_login' doesn't exist for query SELECT user_id, outlet_id, counter_id, is_logged_in FROM pos_wepos_login WHERE user_id=1 AND `is_logged_in`='1' made by require('wp-admin/admin-ajax.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WePOS->init_classes, WeDevs\WePOS\ProductsLog->__construct, wepos_get_cashier_data_by_user_id
[03-Jun-2024 06:55:47 UTC] WordPress database error Table 'wepos.pos_wepos_login' doesn't exist for query SELECT user_id, outlet_id, counter_id, is_logged_in FROM pos_wepos_login WHERE user_id=1 AND `is_logged_in`='1' made by require('index.php'), require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WePOS->init_classes, WeDevs\WePOS\ProductsLog->__construct, wepos_get_cashier_data_by_user_id
[03-Jun-2024 06:55:47 UTC] WordPress database error Table 'wepos.pos_wepos_login' doesn't exist for query SELECT user_id, outlet_id, counter_id, is_logged_in FROM pos_wepos_login WHERE user_id=1 AND `is_logged_in`='1' made by require('index.php'), require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WePOS->init_classes, WeDevs\WePOS\ProductsLog->__construct, wepos_get_cashier_data_by_user_id
The
IndexedDB
has been integrated to sync products over multiple counters. Also, improved frontend product searching.Summary by CodeRabbit
New Features
Bug Fixes
Improvements
Chores