Link campaign interventions to configured help
This commit is contained in:
@@ -12,9 +12,10 @@ type InterventionHintProps = {
|
||||
summary: string;
|
||||
requiredAction: string;
|
||||
destination: string;
|
||||
documentationTopicId: string;
|
||||
};
|
||||
|
||||
function InterventionHint({ tone, summary, requiredAction, destination }: InterventionHintProps) {
|
||||
function InterventionHint({ tone, summary, requiredAction, destination, documentationTopicId }: InterventionHintProps) {
|
||||
const requiredActionLabel = i18nMessage("i18n:govoplan-campaign.required_action.f2429497");
|
||||
const actorLabel = i18nMessage("i18n:govoplan-campaign.who_can_resolve_this.e60939b2");
|
||||
const destinationLabel = i18nMessage("i18n:govoplan-campaign.where_to_go.bb1c6969");
|
||||
@@ -30,6 +31,7 @@ function InterventionHint({ tone, summary, requiredAction, destination }: Interv
|
||||
<ActionBlockerHint
|
||||
tone={tone}
|
||||
reason={reason}
|
||||
documentation={{ topicId: documentationTopicId }}
|
||||
labels={{
|
||||
requiredAction: requiredActionLabel,
|
||||
actor: actorLabel,
|
||||
@@ -56,6 +58,7 @@ export function ValidationWorkflowGuidance({
|
||||
summary={i18nMessage("i18n:govoplan-campaign.value0_blocking_validation_issue_s_prevent_building.b1b18d9a", { value0: errors })}
|
||||
requiredAction={i18nMessage("i18n:govoplan-campaign.correct_the_affected_campaign_data_then_validate_again.ae956e99")}
|
||||
destination={i18nMessage("i18n:govoplan-campaign.campaign_identity_sender_recipients_template_or_files.69bc29f0")}
|
||||
documentationTopicId="campaigns.workflow.prepare-validate-and-build"
|
||||
/>
|
||||
)}
|
||||
{stale && (
|
||||
@@ -64,6 +67,7 @@ export function ValidationWorkflowGuidance({
|
||||
summary={i18nMessage("i18n:govoplan-campaign.the_validation_evidence_is_stale.408e8930")}
|
||||
requiredAction={i18nMessage("i18n:govoplan-campaign.run_validation_again_before_relying_on_this_result.97116fc9")}
|
||||
destination={i18nMessage("i18n:govoplan-campaign.review_send_validate.c1b403c7")}
|
||||
documentationTopicId="campaigns.workflow.prepare-validate-and-build"
|
||||
/>
|
||||
)}
|
||||
{warnings > 0 && (
|
||||
@@ -72,6 +76,7 @@ export function ValidationWorkflowGuidance({
|
||||
summary={i18nMessage("i18n:govoplan-campaign.value0_validation_warning_s_need_review_but_do_not_block.ff03efd1", { value0: warnings })}
|
||||
requiredAction={i18nMessage("i18n:govoplan-campaign.inspect_the_warning_details_correct_the_data_or_accept_t.a558e0d4")}
|
||||
destination={i18nMessage("i18n:govoplan-campaign.review_send_validate.c1b403c7")}
|
||||
documentationTopicId="campaigns.workflow.prepare-validate-and-build"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
@@ -134,6 +139,7 @@ export function BuiltMessageWorkflowGuidance({
|
||||
summary={i18nMessage("i18n:govoplan-campaign.value0_built_message_s_are_blocked_or_failed.8061ea60", { value0: progress.blocking })}
|
||||
requiredAction={i18nMessage("i18n:govoplan-campaign.correct_the_affected_recipient_template_mail_or_attachme.5a65e373")}
|
||||
destination={i18nMessage("i18n:govoplan-campaign.sender_recipients_template_mail_settings_or_files.bdd91b62")}
|
||||
documentationTopicId="campaigns.workflow.complete-review"
|
||||
/>
|
||||
)}
|
||||
{progress.remaining > 0 && (
|
||||
@@ -146,6 +152,7 @@ export function BuiltMessageWorkflowGuidance({
|
||||
})}
|
||||
requiredAction={i18nMessage("i18n:govoplan-campaign.open_every_critical_message_and_record_a_decision_then_e.9e08c029")}
|
||||
destination={i18nMessage("i18n:govoplan-campaign.review_send_built_messages.6b030946")}
|
||||
documentationTopicId="campaigns.workflow.complete-review"
|
||||
/>
|
||||
)}
|
||||
{showUnacknowledgedWarning && (
|
||||
@@ -154,6 +161,7 @@ export function BuiltMessageWorkflowGuidance({
|
||||
summary={i18nMessage("i18n:govoplan-campaign.value0_built_message_warning_s_need_acknowledgement.7d8e30a2", { value0: buildWarnings })}
|
||||
requiredAction={i18nMessage("i18n:govoplan-campaign.inspect_the_warning_details_correct_the_data_or_accept_t.a558e0d4")}
|
||||
destination={i18nMessage("i18n:govoplan-campaign.review_send_built_messages.6b030946")}
|
||||
documentationTopicId="campaigns.workflow.complete-review"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,9 @@ assert.match(guidance, /tone="danger"/);
|
||||
assert.match(guidance, /tone="warning"/);
|
||||
assert.match(guidance, /requiredAction: requiredActionLabel/);
|
||||
assert.match(guidance, /target: destinationLabel/);
|
||||
assert.match(guidance, /documentation=\{\{ topicId: documentationTopicId \}\}/);
|
||||
assert.match(guidance, /campaigns\.workflow\.prepare-validate-and-build/);
|
||||
assert.match(guidance, /campaigns\.workflow\.complete-review/);
|
||||
assert.match(page, /calculateBuildReviewProgress/);
|
||||
assert.match(page, /<WorkflowFact label="i18n:govoplan-campaign\.remaining\.cc632b5e"/);
|
||||
assert.doesNotMatch(page, /blocked_or_failed_message_s_must_be_resolved_bef/);
|
||||
|
||||
Reference in New Issue
Block a user