[FIX] register.html: ?invite= auto-fill + placeholder corretto; lookup-piva: 500->404 graceful
This commit is contained in:
parent
4143dd31d3
commit
d603f3563f
@ -163,8 +163,8 @@ class OnboardingController extends BaseController
|
|||||||
], 'Azienda trovata');
|
], 'Azienda trovata');
|
||||||
|
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
error_log('[PIVA_LOOKUP_ERROR] ' . $e->getMessage());
|
// CertiSource non raggiungibile o endpoint cambiato — trattato come "non trovato"
|
||||||
$this->jsonError('Errore nel recupero dati', 500, 'LOOKUP_ERROR');
|
$this->jsonError('Azienda non trovata nel registro. Inserisci i dati manualmente.', 404, 'COMPANY_NOT_FOUND');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -209,7 +209,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label" for="invite-code">Codice Invito</label>
|
<label class="form-label" for="invite-code">Codice Invito</label>
|
||||||
<input type="text" id="invite-code" class="form-input"
|
<input type="text" id="invite-code" class="form-input"
|
||||||
placeholder="es. NIS2-XXXX-YYYY" autocomplete="off"
|
placeholder="es. inv_a1b2c3d4e5f6..." autocomplete="off"
|
||||||
oninput="validateInvite(this.value)">
|
oninput="validateInvite(this.value)">
|
||||||
<div class="lookup-status" id="invite-status"></div>
|
<div class="lookup-status" id="invite-status"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -344,8 +344,9 @@
|
|||||||
if (document.getElementById('card-' + r)) selectRole(r);
|
if (document.getElementById('card-' + r)) selectRole(r);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (params.get('invite_token')) {
|
const _inviteTok = params.get('invite_token') || params.get('invite') || params.get('token');
|
||||||
inviteToken = params.get('invite_token');
|
if (_inviteTok) {
|
||||||
|
inviteToken = _inviteTok;
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const details = document.getElementById('invite-details');
|
const details = document.getElementById('invite-details');
|
||||||
details.open = true;
|
details.open = true;
|
||||||
@ -372,7 +373,7 @@
|
|||||||
(function() {
|
(function() {
|
||||||
const r = params.get('role');
|
const r = params.get('role');
|
||||||
if (r && document.getElementById('card-' + r)) selectRole(r);
|
if (r && document.getElementById('card-' + r)) selectRole(r);
|
||||||
const tok = params.get('invite_token');
|
const tok = params.get('invite_token') || params.get('invite') || params.get('token');
|
||||||
if (tok) {
|
if (tok) {
|
||||||
inviteToken = tok;
|
inviteToken = tok;
|
||||||
document.getElementById('invite-details').open = true;
|
document.getElementById('invite-details').open = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user