Skip to content

Commit

Permalink
Release 2023-11-06 (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannaPeanut authored Nov 7, 2023
2 parents 4d619a5 + 7f27023 commit e52e0a6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center"><br><br>
<h1 align="center">Trassenscout (Alpha)</h1>
<h1 align="center">Trassenscout (beta)</h1>
</div>

> Trassenscout (Alpha) supports administrations in the process of evaluating and building cycle highways and other route based infrastructure.
> Trassenscout (beta) supports administrations in the process of evaluating and building cycle highways and in perspective other route based infrastructure.
>
> Please contact [email protected] to learn more.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import getSurveyResponseTopicsByProject from "src/survey-response-topics/queries
import getFeedbackSurveyResponses from "src/survey-responses/queries/getFeedbackSurveyResponses"
import { getSurveyResponseCategoryById } from "src/survey-responses/utils/getSurveyResponseCategoryById"
import { EditableSurveyResponseForm } from "./EditableSurveyResponseForm"
import feedbackDefinition from "src/participation/data/feedback.json"

export type EditableSurveyResponseListItemProps = {
response: Prettify<Awaited<ReturnType<typeof getFeedbackSurveyResponses>>[number]>
Expand Down Expand Up @@ -45,6 +46,12 @@ const EditableSurveyResponseListItem: React.FC<EditableSurveyResponseListItemPro
const operatorSlugWitFallback = response.operator?.slug || "k.A."
// @ts-expect-error `data` is of type unkown
const userText = response.data["34"] || response.data["35"]
let userAdditionalText = null
// @ts-expect-error `data` is of type unkown
if (response.data["34"] && response.data["35"]) {
// @ts-expect-error `data` is of type unkown
userAdditionalText = response.data["35"]
}
const userCategory =
// @ts-expect-error `data` is of type unkown
response.data["21"] && getSurveyResponseCategoryById(Number(response.data["21"]))
Expand Down Expand Up @@ -83,10 +90,24 @@ const EditableSurveyResponseListItem: React.FC<EditableSurveyResponseListItemPro
{open && (
<div className={clsx("overflow-clip p-6", open ? "border-b border-gray-300" : "")}>
<div className="flex gap-12 mb-10 flex-col md:flex-row justify-between">
<blockquote className="bg-yellow-100 p-4 mb-6">
<Markdown markdown={userText} />
<div className="text-right text-gray-500">{`Bürgerbeitrag vom: ${response.surveySession.createdAt.toLocaleDateString()} um ${response.surveySession.createdAt.toLocaleTimeString()}`}</div>
</blockquote>
<div>
<blockquote className="bg-yellow-100 p-4 mb-2">
<h4 className="font-semibold mb-2">
{/* @ts-expect-error `data` is of type unkown */}
{response.data["34"]
? "Was gefällt Ihnen hier besonders?"
: "Was wünschen Sie sich?"}
</h4>
<Markdown markdown={userText} />
</blockquote>
{userAdditionalText && (
<blockquote className="bg-blue-50 p-4">
<h4 className="font-semibold mb-2">Was wünschen Sie sich?</h4>
<Markdown markdown={userAdditionalText} />
</blockquote>
)}
<div className="mt-2 text-right text-gray-500">{`Bürgerbeitrag vom: ${response.surveySession.createdAt.toLocaleDateString()} um ${response.surveySession.createdAt.toLocaleTimeString()}`}</div>
</div>
<div>
<h4 className="font-semibold mb-5">Kategorie</h4>
<div className="w-48 flex-shrink-0">
Expand Down

0 comments on commit e52e0a6

Please sign in to comment.