From 8ffec49c93fb5dac81c78ad521efcc3cb30f727c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 18 Jul 2025 19:56:54 +0530 Subject: [PATCH] Fix wallet balance update after job posting generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace complex updateWalletBalance function with simple, working implementation - Use correct selector (getElementById('walletBalance')) instead of wrong selectors - Match the working implementation from Data Analyzer - Wallet balance now updates immediately after job posting generation - No page refresh required to see updated balance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../templates/job_posting_generator/detail.html | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/job_posting_generator/templates/job_posting_generator/detail.html b/job_posting_generator/templates/job_posting_generator/detail.html index 29de3bf..541655d 100644 --- a/job_posting_generator/templates/job_posting_generator/detail.html +++ b/job_posting_generator/templates/job_posting_generator/detail.html @@ -709,19 +709,9 @@ const JobPostingUtils = { * Update wallet balance display - Job Posting Generator specific */ updateWalletBalance(newBalance) { - // Update header balance (anchor tag with emoji) - const headerBalance = document.querySelector('a[data-wallet-balance]'); - if (headerBalance) { - headerBalance.textContent = `💰 ${newBalance.toFixed(2)} AED`; + if (newBalance !== undefined) { + document.getElementById('walletBalance').textContent = newBalance.toFixed(2); } - - // Update page balance (div without emoji) - const pageBalance = document.querySelector('div[data-wallet-balance]'); - if (pageBalance) { - pageBalance.textContent = `${newBalance.toFixed(2)} AED`; - } - - window.currentWalletBalance = newBalance; }, /**