From a747d9a968324a57901cdc15777f2c04414cf396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Thu, 15 Oct 2026 14:41:23 -0300 Subject: [PATCH] fix: shorter delivery texts: "Jadlog", and the time only in its option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- app/jadlog.py | 2 +- tests/test_correios.py | 2 +- web/index.html | 2 +- web/kanban.js | 2 +- web/site-cart.js | 7 +++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/jadlog.py b/app/jadlog.py index 23f5daf..64c02ef 100644 --- a/app/jadlog.py +++ b/app/jadlog.py @@ -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__() diff --git a/tests/test_correios.py b/tests/test_correios.py index 690b40c..4c9ab0f 100644 --- a/tests/test_correios.py +++ b/tests/test_correios.py @@ -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') diff --git a/web/index.html b/web/index.html index 37f4090..bd7b5ee 100644 --- a/web/index.html +++ b/web/index.html @@ -1041,7 +1041,7 @@ h2 em{font-style:normal;color:var(--laranja)}
Receber em casa - Jadlog ou Correios (PAC e SEDEX), para todo o Brasil. Informe o CEP para ver as opções. + Informe o CEP para ver o valor e o prazo.
— diff --git a/web/kanban.js b/web/kanban.js index fc0d7b1..2dce19f 100644 --- a/web/kanban.js +++ b/web/kanban.js @@ -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'], diff --git a/web/site-cart.js b/web/site-cart.js index a250e8a..f4399fc 100644 --- a/web/site-cart.js +++ b/web/site-cart.js @@ -63,10 +63,9 @@ function pintaPedido(){ '
'+n+(n===1?' item':' itens')+''+rs(itens+eco)+'
'+ (eco>0.01? '
Desconto pela nota'+ '− '+rs(eco)+'
' : '')+ - '
'+(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' : '')+''+ + '
Frete'+(entrega.tipo==='frete' && entrega.cotado + ? ' · '+escapeHTML((entrega.opcoes||[]).find(o=>o.service===entrega.servico)?.description||'') : '')+ + ''+ (entrega.tipo==='retira' ? 'Grátis' : entrega.cotado ? rs(frete) : 'a cotar')+'
'+ '
Revisão e reencaixe'+