feat: enhance Letzshop jobs and order management

- Add job cancellation and retry functionality
- Improve jobs table with better status display
- Add background task improvements
- Update Letzshop order service
- Update documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-21 14:12:26 +01:00
parent 5c0c92e94b
commit a118edced5
7 changed files with 163 additions and 9 deletions

View File

@@ -1375,6 +1375,44 @@ function adminMarketplaceLetzshop() {
// JOBS TABLE
// ═══════════════════════════════════════════════════════════════
/**
* Get total pages for jobs pagination
*/
get jobsTotalPages() {
return Math.ceil(this.jobsPagination.total / this.jobsPagination.per_page);
},
/**
* Get array of page numbers to display for jobs pagination
*/
getPageNumbers() {
const total = this.jobsTotalPages;
const current = this.jobsPagination.page;
const maxVisible = 5;
if (total <= maxVisible) {
return Array.from({length: total}, (_, i) => i + 1);
}
const half = Math.floor(maxVisible / 2);
let start = Math.max(1, current - half);
let end = Math.min(total, start + maxVisible - 1);
if (end - start < maxVisible - 1) {
start = Math.max(1, end - maxVisible + 1);
}
return Array.from({length: end - start + 1}, (_, i) => start + i);
},
/**
* Go to specific page for jobs
*/
goToPage(page) {
this.jobsPagination.page = page;
this.loadJobs();
},
/**
* Load jobs for selected vendor
* Note: Jobs are vendor-specific, so we need a vendor selected to show them