From 7759a2b1295d5bfe12868054e885e0b442e66a95 Mon Sep 17 00:00:00 2001 From: a1exsh Date: Wed, 10 Mar 2021 11:51:57 +0100 Subject: [PATCH] Add a warning about missing ordering key fields for data events (#136) * Add a warning about missing ordering key fields for data events Internal ticket #552 Closes #134 --- client/Pages/EventTypeCreate/View.elm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/client/Pages/EventTypeCreate/View.elm b/client/Pages/EventTypeCreate/View.elm index dfbef26..d310533 100644 --- a/client/Pages/EventTypeCreate/View.elm +++ b/client/Pages/EventTypeCreate/View.elm @@ -315,6 +315,30 @@ viewForm model setup = Help.orderingKeyFields Optional Enabled + , if + getValue FieldCategory formModel.values + == categories.data + && (getValue FieldOrderingKeyFields formModel.values + |> String.trim + |> String.isEmpty + ) + then + div [ class "dc-msg dc-msg--error" ] + [ h3 [ class "blinking" ] [ text "Warning!" ] + , p [ class "dc-p" ] + [ text "The 'ordering key' information defines the transactional" + , text " business order that finally leads to the event creation, and" + , text " is used e.g. for analytics change data capture, i.e. keeping" + , text " transactional data in sync as source for analytics. The" + , text " information is recommended for (external) data change events" + , text "\u{00A0}-- see " + , externalLink "API/Event Guidelines" "https://opensource.zalando.com/restful-api-guidelines/#203" + , text "." + ] + ] + + else + none , selectInput formModel FieldAudience OnInput