|
|
|
@@ -25,6 +25,7 @@ import { |
|
|
|
mergeWorkbenchTickets, |
|
|
|
type WorkbenchMergeTicketCandidate, |
|
|
|
} from "@/app/api/doworkbench/actions"; |
|
|
|
import { isWorkbenchMergeTicketNo } from "@/utils/workbenchReleaseType"; |
|
|
|
|
|
|
|
const SWAL_ABOVE_DIALOG = { |
|
|
|
customClass: { container: "swal2-custom-zindex" }, |
|
|
|
@@ -306,15 +307,21 @@ const WorkbenchEtraMergeDialog: React.FC<Props> = ({ |
|
|
|
const extra = filteredExtraTickets.find((x) => x.id === selectedExtraId); |
|
|
|
if (!batch || !extra) return; |
|
|
|
|
|
|
|
const intoExistingTiM = isWorkbenchMergeTicketNo(batch.ticketNo); |
|
|
|
const leftLabel = intoExistingTiM ? t("Merge ticket TI-M") : t("Batch/Single ticket"); |
|
|
|
const confirmHint = intoExistingTiM |
|
|
|
? t("Merge Etra ticket confirm hint into TI-M") |
|
|
|
: t("Merge Etra ticket confirm hint"); |
|
|
|
|
|
|
|
const confirm = await Swal.fire({ |
|
|
|
...SWAL_ABOVE_DIALOG, |
|
|
|
icon: "question", |
|
|
|
title: t("Merge Etra ticket confirm title"), |
|
|
|
html: ` |
|
|
|
<div style="text-align:left;font-size:0.95em;"> |
|
|
|
<p><b>${t("Batch/Single ticket")}:</b> ${batch.ticketNo ?? batch.id}</p> |
|
|
|
<p><b>${leftLabel}:</b> ${batch.ticketNo ?? batch.id}</p> |
|
|
|
<p><b>${t("Etra ticket")}:</b> ${extra.ticketNo ?? extra.id}</p> |
|
|
|
<p style="margin-top:0.75em;color:#666;">${t("Merge Etra ticket confirm hint")}</p> |
|
|
|
<p style="margin-top:0.75em;color:#666;">${confirmHint}</p> |
|
|
|
</div> |
|
|
|
`, |
|
|
|
showCancelButton: true, |
|
|
|
@@ -406,7 +413,7 @@ const WorkbenchEtraMergeDialog: React.FC<Props> = ({ |
|
|
|
) : ( |
|
|
|
<Stack direction={{ xs: "column", md: "row" }} spacing={2}> |
|
|
|
<MergeTicketCarousel |
|
|
|
title={t("Batch/Single ticket")} |
|
|
|
title={t("Merge left column title")} |
|
|
|
items={batchTickets} |
|
|
|
selectedId={selectedBatchId} |
|
|
|
onSelect={(id) => { |
|
|
|
|