Skip to content

Fix Won/Lost modal failure and broken dashboard chart#2491#2495

Open
willestevam wants to merge 2 commits into
krayin:2.2from
willestevam:fix/won-lost-modal-failure-and-broken-dashboard-chart
Open

Fix Won/Lost modal failure and broken dashboard chart#2491#2495
willestevam wants to merge 2 commits into
krayin:2.2from
willestevam:fix/won-lost-modal-failure-and-broken-dashboard-chart

Conversation

@willestevam

Copy link
Copy Markdown

Problem

When a new pipeline is created, the code column in the lead_pipeline_stages table is populated with a slug of the stage name. This causes the "Won/Lost" modal to fail when a lead is completed and breaks the "Won/Lost" chart on the dashboard.

image

Solution

Preserve English stage codes when locale is non-English. Use slugify(element.code ? element.code : element.name) to mirror edit.blade.php behaviour. Prevents "new"/"won"/"lost" being saved as translated slugs on pipeline creation

image

Affected files

  • packages/Webkul/Admin/src/Resources/views/settings/pipelines/create.blade.php
  • packages/Webkul/Admin/src/Resources/views/settings/pipelines/edit.blade.php

Willian Silva and others added 2 commits April 6, 2026 19:09
…plicate-name translation

Replace raw `{!! trans(...) !!}` output with `@json(trans(...))` in pipeline
create and edit views. When translations (e.g. pt_BR) contain double quotes
inside the string — such as 'O campo "Nome" não pode ser duplicado' — the
raw output broke the surrounding JavaScript string literal, causing an
`Uncaught SyntaxError: Unexpected identifier` in the browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant