Fix wallet balance update after job posting generation

- 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 <noreply@anthropic.com>
This commit is contained in:
Claude 2025-07-18 19:56:54 +05:30
parent 6bb07d16ae
commit 8ffec49c93

View File

@ -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;
},
/**