diff --git a/docs/implementation/letzshop-jobs-improvements.md b/docs/implementation/letzshop-jobs-improvements.md new file mode 100644 index 00000000..4f34bd04 --- /dev/null +++ b/docs/implementation/letzshop-jobs-improvements.md @@ -0,0 +1,709 @@ +# Letzshop Jobs & Tables Improvements + +Implementation plan for improving the Letzshop management page jobs display and table harmonization. + +## Status: Planned + +--- + +## Overview + +This plan addresses 6 improvements: + +1. Job details modal with proper display +2. Tab visibility fix when filters cleared +3. Add vendor column to jobs table +4. Harmonize all tables with table macro +5. Platform-wide rows per page setting +6. Build admin customer page + +--- + +## 1. Job Details Modal + +### Current Issue +- "View Details" shows a browser alert instead of a proper modal +- No detailed breakdown of export results + +### Requirements +- Create a proper modal for job details +- For exports: show products exported per language file +- Show vendor name/code +- Show full timestamps and duration +- Show error details if any + +### Implementation + +#### 1.1 Create Job Details Modal Template + +**File:** `app/templates/admin/partials/letzshop-jobs-table.html` + +Add modal after the table: + +```html + +
+
+
+

Job Details

+ +
+ +
+ +
+
Job ID: #
+
Type:
+
Status:
+
Vendor:
+
+ + +
+

Started:

+

Completed:

+

Duration:

+
+ + + + + + +
+
+
+``` + +#### 1.2 Update JavaScript State + +**File:** `static/admin/js/marketplace-letzshop.js` + +Add state variables: +```javascript +showJobDetailsModal: false, +selectedJobDetails: null, +``` + +Update `viewJobDetails` method: +```javascript +viewJobDetails(job) { + this.selectedJobDetails = job; + this.showJobDetailsModal = true; +}, +``` + +#### 1.3 Update API to Return Full Details + +**File:** `app/services/letzshop/order_service.py` + +Update `list_letzshop_jobs` to include `error_details` in the response for export jobs. + +--- + +## 2. Tab Visibility Fix + +### Current Issue +- When vendor filter is cleared, only 2 tabs appear (Orders, Exceptions) +- Should show all tabs: Products, Orders, Exceptions, Jobs, Settings + +### Root Cause +- Products, Jobs, and Settings tabs are wrapped in `