fix: shorter delivery texts: "Jadlog", and the time only in its option
Some checks failed
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Failing after 3m52s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Has been skipped
Some checks failed
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Failing after 3m52s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Has been skipped
The cart showed Jadlog's internal service name ("Jadlog .PACKAGE"), a
"Receber em casa" line naming every carrier, and the delivery time again in
the order summary, where it wrapped. Now the option is "Jadlog", the line
says only to type the CEP, and the summary reads "Frete · Correios SEDEX".
The Kanban's Frete row lists the options and pickup in one sentence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,7 +83,7 @@ def required_settings():
|
||||
class JadlogFreight(Package):
|
||||
"""The Site's Jadlog option: Jadlog's price for the order's package."""
|
||||
name = 'jadlog'
|
||||
services = {SERVICE: 'Jadlog .PACKAGE'}
|
||||
services = {SERVICE: 'Jadlog'}
|
||||
|
||||
def __init__(self, quotes=None):
|
||||
super().__init__()
|
||||
|
||||
@@ -146,7 +146,7 @@ class FreightOptionsTest(unittest.TestCase):
|
||||
|
||||
class Broken:
|
||||
name = 'jadlog'
|
||||
services = {'jadlog': 'Jadlog .PACKAGE'}
|
||||
services = {'jadlog': 'Jadlog'}
|
||||
|
||||
def quote(self, *args):
|
||||
raise ValueError('Não foi possível cotar o frete na Jadlog agora: HTTP 500')
|
||||
|
||||
@@ -1041,7 +1041,7 @@ h2 em{font-style:normal;color:var(--laranja)}
|
||||
<span class="mk"></span>
|
||||
<div>
|
||||
<b><svg class="ic" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2"/><path d="M15 18H9"/><path d="M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.62l-3.48-4.35A1 1 0 0 0 17.52 8H14"/><circle cx="17" cy="18" r="2"/><circle cx="7" cy="18" r="2"/></svg>Receber em casa</b>
|
||||
<span>Jadlog ou Correios (PAC e SEDEX), para todo o Brasil. Informe o CEP para ver as opções.</span>
|
||||
<span>Informe o CEP para ver o valor e o prazo.</span>
|
||||
</div>
|
||||
<em id="vFrete">—</em>
|
||||
</button>
|
||||
|
||||
@@ -1591,7 +1591,7 @@ function renderIntegrations(){
|
||||
const list=names=>names.length>1?names.slice(0,-1).join(', ')+' e '+names.at(-1):names[0];
|
||||
rows.push(carriers.length
|
||||
? integration({name:'Frete',state:fr.box_cm?'Ativo':'Verificar',tone:fr.box_cm?'ok':'warn',
|
||||
summary:fr.box_cm?list(carriers)+' e retirada em Franca · prazo + '+fr.production_days+' dia(s) de produção.'
|
||||
summary:fr.box_cm?list([...carriers,'retirada em Franca'])+' · prazo + '+fr.production_days+' dia(s) de produção.'
|
||||
:'Caixa não configurada: as transportadoras podem cobrar mais que a cotação.',
|
||||
details:[['Opções',list(carriers)],['Pacote',kg(fr.base_kg)+' + '+kg(fr.per_metre_kg)+' por metro'],
|
||||
...(fr.box_cm?[['Caixa',fr.box_cm.map(n=>String(n).replace('.',',')).join(' × ')+' cm'],
|
||||
|
||||
@@ -63,10 +63,9 @@ function pintaPedido(){
|
||||
'<div class="l"><span>'+n+(n===1?' item':' itens')+'</span><b>'+rs(itens+eco)+'</b></div>'+
|
||||
(eco>0.01? '<div class="l" style="color:var(--verde-ml)"><span>Desconto pela nota</span>'+
|
||||
'<b style="color:var(--verde-ml)">− '+rs(eco)+'</b></div>' : '')+
|
||||
'<div class="l"><span>'+(entrega.tipo==='frete' && entrega.cotado
|
||||
? escapeHTML((entrega.opcoes||[]).find(o=>o.service===entrega.servico)?.description||'Frete') : 'Frete')+
|
||||
(entrega.tipo==='frete' && entrega.cotado && entrega.dias
|
||||
? ' · até '+entrega.dias+' dias úteis' : '')+'</span><b>'+
|
||||
'<div class="l"><span>Frete'+(entrega.tipo==='frete' && entrega.cotado
|
||||
? ' · '+escapeHTML((entrega.opcoes||[]).find(o=>o.service===entrega.servico)?.description||'') : '')+
|
||||
'</span><b>'+
|
||||
(entrega.tipo==='retira' ? '<span style="color:var(--verde-ml)">Grátis</span>'
|
||||
: entrega.cotado ? rs(frete) : 'a cotar')+'</b></div>'+
|
||||
'<div class="l"><span>Revisão e reencaixe</span>'+
|
||||
|
||||
Reference in New Issue
Block a user