refactor(webui): select Mail-owned profiles for campaigns
This commit is contained in:
@@ -43,6 +43,9 @@ export default function LockedVersionNotice({ settings, campaignId, version, cur
|
||||
const permanentUserLock = isPermanentUserLockedVersion(version);
|
||||
const finalLock = isFinalLockedVersion(version);
|
||||
const canCreateEditableCopy = !historicalVersion && (permanentUserLock || finalLock);
|
||||
const mailProfileMigrationRequired = Boolean(
|
||||
version && "mail_profile_migration_required" in version && version.mail_profile_migration_required
|
||||
);
|
||||
const presentation = lockPresentation(version, {
|
||||
historicalVersion,
|
||||
validationLock,
|
||||
@@ -83,7 +86,8 @@ export default function LockedVersionNotice({ settings, campaignId, version, cur
|
||||
try {
|
||||
const result = await forkCampaignVersion(settings, campaignId, version.id, {
|
||||
current_flow: "manual",
|
||||
current_step: version.current_step ?? null
|
||||
current_step: version.current_step ?? null,
|
||||
migrate_legacy_mail_settings: mailProfileMigrationRequired
|
||||
});
|
||||
setLocalMessage(`Created editable version #${result.version.version_number}.`);
|
||||
await reload();
|
||||
@@ -100,6 +104,7 @@ export default function LockedVersionNotice({ settings, campaignId, version, cur
|
||||
<strong>{presentation.title}</strong>{" "}
|
||||
<span>{presentation.description}</span>
|
||||
{message && <span className="locked-version-context"> {message}</span>}
|
||||
{mailProfileMigrationRequired && <span className="locked-version-context"> i18n:govoplan-campaign.the_editable_copy_will_preserve_this_audit_recor.aac956f1</span>}
|
||||
{presentation.info && <span className="locked-version-reason"> {presentation.info}</span>}
|
||||
{localMessage && <span className="locked-version-feedback"> {localMessage}</span>}
|
||||
{localError && <span className="locked-version-error"> {localError}</span>}
|
||||
@@ -232,4 +237,4 @@ function confirmDialogLabel(action: ConfirmAction): string {
|
||||
if (action === "unlock-user") return "i18n:govoplan-campaign.unlock.1526a17e";
|
||||
if (action === "permanent") return "i18n:govoplan-campaign.lock_permanently.cc0ce9e7";
|
||||
return "i18n:govoplan-campaign.confirm.04a21221";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user