improve(wizard): better messaging when website not found + show missing contact hint
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
KRS for PROS POLAND has no www/email/phone. All Brave results are directory sites (filtered). Show clear message about what's missing from registry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6657bf228f
commit
60b2abb2b2
@ -477,7 +477,10 @@ def wizard_discover_website():
|
||||
company.name = original_name # Restore
|
||||
|
||||
if result and result.get('error'):
|
||||
return jsonify({'success': False, 'error': result['error']})
|
||||
error_msg = result['error']
|
||||
if error_msg == 'Brak wyników':
|
||||
error_msg = 'Nie znaleziono strony internetowej tej firmy w internecie. Firma może nie posiadać strony WWW.'
|
||||
return jsonify({'success': False, 'error': error_msg})
|
||||
|
||||
# Apply discovered website to company
|
||||
website = result.get('url')
|
||||
@ -488,7 +491,7 @@ def wizard_discover_website():
|
||||
return jsonify({
|
||||
'success': bool(website),
|
||||
'website': website,
|
||||
'error': 'Nie znaleziono strony internetowej' if not website else None,
|
||||
'error': 'Nie znaleziono strony internetowej tej firmy.' if not website else None,
|
||||
'confidence': result.get('confidence'),
|
||||
})
|
||||
|
||||
|
||||
@ -732,11 +732,27 @@
|
||||
roSection.style.display = 'block';
|
||||
}
|
||||
if (c.people && c.people.length) {
|
||||
document.getElementById('peopleList').innerHTML = '<strong>Zarzad:</strong> ' + c.people.map(function(p) {
|
||||
document.getElementById('peopleList').innerHTML = '<strong>Zarząd:</strong> ' + c.people.map(function(p) {
|
||||
return p.name + ' (' + p.role + ')';
|
||||
}).join(' | ');
|
||||
roSection.style.display = 'block';
|
||||
}
|
||||
|
||||
// Show hint if contact data is missing from registry
|
||||
var missing = [];
|
||||
if (!c.website) missing.push('strony WWW');
|
||||
if (!c.email) missing.push('adresu email');
|
||||
if (!c.phone) missing.push('telefonu');
|
||||
if (missing.length > 0) {
|
||||
var hint = document.getElementById('discoverStatus');
|
||||
if (hint) {
|
||||
hint.style.display = 'block';
|
||||
hint.className = 'lookup-status';
|
||||
hint.innerHTML = 'Rejestr ' + (wizardState.registrySource || 'KRS') +
|
||||
' nie zawiera: ' + missing.join(', ') +
|
||||
'. Użyj przycisku <strong>Wyszukaj stronę</strong> lub uzupełnij ręcznie.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function discoverWebsite() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user