fix: mark the required fields instead of a message about the address
Some checks failed
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 2m46s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Has been cancelled

Removes "Complete o endereço de entrega para ir ao pagamento." The required
fields (CNPJ, WhatsApp, e-mail, and the delivery address except the
complement) carry a red asterisk, and aria-required for screen readers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-09-30 14:22:13 -03:00
parent 01b94da36d
commit 4ce44feb70
3 changed files with 21 additions and 25 deletions

View File

@@ -1095,14 +1095,14 @@ footer a:hover{color:var(--laranja2)}
<div class="cxE">
<h4>Seus dados</h4>
<div class="campos">
<div class="cp"><label>CNPJ</label>
<input id="fCnpj" autocomplete="off" inputmode="numeric" maxlength="18" placeholder="00.000.000/0000-00">
<div class="cp"><label>CNPJ <span class="obr" aria-hidden="true">*</span></label>
<input id="fCnpj" aria-required="true" autocomplete="off" inputmode="numeric" maxlength="18" placeholder="00.000.000/0000-00">
<span class="err" id="eCnpj"></span></div>
<div class="cp"><label>WhatsApp</label>
<input id="fZap" autocomplete="off" inputmode="numeric" maxlength="15" placeholder="(16) 99999-9999">
<div class="cp"><label>WhatsApp <span class="obr" aria-hidden="true">*</span></label>
<input id="fZap" aria-required="true" autocomplete="off" inputmode="numeric" maxlength="15" placeholder="(16) 99999-9999">
<span class="err" id="eZap"></span></div>
<div class="cp larga"><label>E-mail para a nota</label>
<input id="fMail" autocomplete="off" type="email" placeholder="voce@empresa.com.br">
<div class="cp larga"><label>E-mail para a nota <span class="obr" aria-hidden="true">*</span></label>
<input id="fMail" aria-required="true" autocomplete="off" type="email" placeholder="voce@empresa.com.br">
<span class="err" id="eMail"></span></div>
</div>
</div>
@@ -1128,28 +1128,27 @@ footer a:hover{color:var(--laranja2)}
<em id="vFrete">—</em>
</button>
<div class="cep" id="cep">
<label>CEP de entrega</label>
<label>CEP de entrega <span class="obr" aria-hidden="true">*</span></label>
<div class="cepL">
<input id="cepIn" autocomplete="off" inputmode="numeric" maxlength="9" placeholder="00000-000">
<input id="cepIn" aria-required="true" autocomplete="off" inputmode="numeric" maxlength="9" placeholder="00000-000">
</div>
<p id="cepMsg"></p>
<div class="campos endereco" id="endereco">
<div class="cp larga"><label>Quem recebe</label>
<input id="eNome" autocomplete="off" maxlength="120" placeholder="Nome ou empresa"></div>
<div class="cp larga"><label>Rua / avenida</label>
<input id="eRua" autocomplete="off" maxlength="160"></div>
<div class="cp"><label>Número</label>
<input id="eNum" autocomplete="off" maxlength="20" placeholder="123 ou S/N"></div>
<div class="cp larga"><label>Quem recebe <span class="obr" aria-hidden="true">*</span></label>
<input id="eNome" aria-required="true" autocomplete="off" maxlength="120" placeholder="Nome ou empresa"></div>
<div class="cp larga"><label>Rua / avenida <span class="obr" aria-hidden="true">*</span></label>
<input id="eRua" aria-required="true" autocomplete="off" maxlength="160"></div>
<div class="cp"><label>Número <span class="obr" aria-hidden="true">*</span></label>
<input id="eNum" aria-required="true" autocomplete="off" maxlength="20" placeholder="123 ou S/N"></div>
<div class="cp"><label>Complemento (opcional)</label>
<input id="eComp" autocomplete="off" maxlength="80"></div>
<div class="cp"><label>Bairro</label>
<input id="eBairro" autocomplete="off" maxlength="80"></div>
<div class="cp"><label>Cidade</label>
<input id="eCidade" autocomplete="off" maxlength="80"></div>
<div class="cp"><label>UF</label>
<input id="eUf" autocomplete="off" maxlength="2" placeholder="SP"></div>
<div class="cp"><label>Bairro <span class="obr" aria-hidden="true">*</span></label>
<input id="eBairro" aria-required="true" autocomplete="off" maxlength="80"></div>
<div class="cp"><label>Cidade <span class="obr" aria-hidden="true">*</span></label>
<input id="eCidade" aria-required="true" autocomplete="off" maxlength="80"></div>
<div class="cp"><label>UF <span class="obr" aria-hidden="true">*</span></label>
<input id="eUf" aria-required="true" autocomplete="off" maxlength="2" placeholder="SP"></div>
</div>
<p class="dicaEnd" id="eEnd"></p>
</div>
</div>
</div>

View File

@@ -80,8 +80,6 @@ function pintaEntrega(){
$('vFrete').textContent = entrega.tipo!=='frete' ? '—'
: entrega.cotado ? rs(entrega.valor) : 'a cotar';
$('bPagar').disabled = !entrega.cotado || !clienteOk() || !enderecoOk() || !cartPodeEnviar();
$('eEnd').textContent = entrega.tipo==='frete' && entrega.cotado && !enderecoOk()
? 'Complete o endereço de entrega para ir ao pagamento.' : '';
pintaPedido();
}

View File

@@ -372,6 +372,7 @@ html:is([data-rota="pagamento"],[data-rota="pix"]) .pagGrid{display:grid;grid-te
.envioArq .ic{width:19px;height:19px;margin:-2px 6px 0 0}
.qi .c .ic{width:15px;height:15px;stroke-width:3}
.passos a span .ic{width:17px;height:17px;stroke-width:3}
.obr{color:#B42318;font-weight:700}
.envioArq{font-size:15px;color:var(--texto2);margin-top:14px;line-height:1.5}
.envioArq.ok{color:var(--verde)}
.envioArq.erro{color:#B42318}
@@ -381,8 +382,6 @@ html:is([data-rota="pagamento"],[data-rota="pix"]) .pagGrid{display:grid;grid-te
.cartEnvio{font-size:15px;font-weight:700;color:var(--laranja-escuro);margin-left:6px}
.cartEnvio:empty{display:none}
.envioArq:empty{display:none}
.dicaEnd{font-size:15px;color:var(--texto2);margin-top:12px}
.dicaEnd:empty{display:none}
.pagCab{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:20px}
.pagCab h3{font-size:26px;font-weight:800;letter-spacing:-.02em}
.pagVolta{font-size:16px;color:var(--texto2)}