fix: show the real freight status on the Kanban
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 2m16s
Build and deploy / Secret scan and release gate (push) Successful in 18s
Build and deploy / Publish images (push) Failing after 1m25s
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 2m16s
Build and deploy / Secret scan and release gate (push) Successful in 18s
Build and deploy / Publish images (push) Failing after 1m25s
The Integrations tab always said freight was not configured. It now reads the server's adapter and, with Jadlog on, shows the package weight rule and the production days the Site prices with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -657,7 +657,12 @@ function renderIntegrations(){
|
||||
const mp=board.providers?.payment;
|
||||
cards.push(integration('Mercado Pago',mp==='mercadopago'?'Ativo':'Não configurado',mp==='mercadopago'?'ok':'off',
|
||||
mp==='mercadopago'?'PIX e cartão ativos.':'Aguardando credenciais.'));
|
||||
cards.push(integration('Frete','Não configurado','off','Somente retirada.'));
|
||||
const fr=board.providers?.freight||{};
|
||||
const kg=v=>String(v).replace('.',',')+' kg';
|
||||
cards.push(fr.provider==='jadlog'
|
||||
? integration('Frete','Ativo','ok','Entrega pela Jadlog e retirada em Franca. Pacote: '+kg(fr.base_kg)+
|
||||
' + '+kg(fr.per_metre_kg)+' por metro · prazo da Jadlog + '+fr.production_days+' dia(s) de produção.')
|
||||
: integration('Frete','Não configurado','off','Somente retirada.'));
|
||||
cards.push(integration('WhatsApp','Não configurado','off','Mensagens registradas, sem envio.'));
|
||||
$('integrations').replaceChildren(...cards);
|
||||
eventFilters();
|
||||
|
||||
Reference in New Issue
Block a user