Update CreateTask UI

This commit is contained in:
klotske
2023-01-12 16:35:44 +03:00
parent 82b2693ed6
commit 4ac159ec7e
+4 -3
View File
@@ -1,11 +1,12 @@
import { Box, Stack, Text, useColorModeValue } from "@chakra-ui/react"; import { Box, Stack, Text, useColorModeValue } from "@chakra-ui/react";
import { useState } from "react"; import { useState } from "react";
import { Messages } from "src/components/Messages";
import { TrackedTextarea } from "src/components/Survey/TrackedTextarea"; import { TrackedTextarea } from "src/components/Survey/TrackedTextarea";
import { TwoColumnsWithCards } from "src/components/Survey/TwoColumnsWithCards"; import { TwoColumnsWithCards } from "src/components/Survey/TwoColumnsWithCards";
import { TaskSurveyProps } from "src/components/Tasks/Task"; import { TaskSurveyProps } from "src/components/Tasks/Task";
import { MessageTable } from "../Messages/MessageTable";
export const CreateTask = ({ task, taskType, onReplyChanged }: TaskSurveyProps<{ text: string }>) => { export const CreateTask = ({ task, taskType, onReplyChanged }: TaskSurveyProps<{ text: string }>) => {
const cardColor = useColorModeValue("gray.100", "gray.700");
const titleColor = useColorModeValue("gray.800", "gray.300"); const titleColor = useColorModeValue("gray.800", "gray.300");
const labelColor = useColorModeValue("gray.600", "gray.400"); const labelColor = useColorModeValue("gray.600", "gray.400");
@@ -30,8 +31,8 @@ export const CreateTask = ({ task, taskType, onReplyChanged }: TaskSurveyProps<{
</Text> </Text>
</Stack> </Stack>
{task.conversation ? ( {task.conversation ? (
<Box mt="4"> <Box mt="4" p="6" borderRadius="lg" bg={cardColor}>
<Messages messages={task.conversation.messages} post_id={task.id} /> <MessageTable messages={task.conversation.messages} />
</Box> </Box>
) : null} ) : null}
</> </>