Compare commits
6 Commits
feature/st
...
v2.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 91ea7fddaf | |||
| d084870c49 | |||
| 4d498662f8 | |||
| 1320a50af0 | |||
| 4504961fa0 | |||
| 3e54f0099b |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "journal.pl",
|
"name": "journal.pl",
|
||||||
"version": "2.1.1",
|
"version": "2.2.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "journal.pl",
|
"name": "journal.pl",
|
||||||
"version": "2.1.1",
|
"version": "2.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/icons": "^2.1.1",
|
"@chakra-ui/icons": "^2.1.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "journal.pl",
|
"name": "journal.pl",
|
||||||
"version": "2.1.1",
|
"version": "2.2.1",
|
||||||
"description": "inno-js platform journal ui repo",
|
"description": "inno-js platform journal ui repo",
|
||||||
"main": "./src/index.tsx",
|
"main": "./src/index.tsx",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ interface LessonFormProps {
|
|||||||
onCancel: () => void
|
onCancel: () => void
|
||||||
onSubmit: (lesson: Lesson) => void
|
onSubmit: (lesson: Lesson) => void
|
||||||
error?: string
|
error?: string
|
||||||
|
title: string
|
||||||
|
nameButton: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const LessonForm = ({
|
const LessonForm = ({
|
||||||
@@ -73,6 +75,8 @@ const LessonForm = ({
|
|||||||
onCancel,
|
onCancel,
|
||||||
onSubmit,
|
onSubmit,
|
||||||
error,
|
error,
|
||||||
|
title,
|
||||||
|
nameButton,
|
||||||
}: LessonFormProps) => {
|
}: LessonFormProps) => {
|
||||||
const {
|
const {
|
||||||
control,
|
control,
|
||||||
@@ -90,7 +94,7 @@ const LessonForm = ({
|
|||||||
<Card align="left">
|
<Card align="left">
|
||||||
<CardHeader display="flex">
|
<CardHeader display="flex">
|
||||||
<Heading as="h2" mt="0">
|
<Heading as="h2" mt="0">
|
||||||
Создание лекции
|
{title}
|
||||||
</Heading>
|
</Heading>
|
||||||
<CloseButton
|
<CloseButton
|
||||||
ml="auto"
|
ml="auto"
|
||||||
@@ -153,7 +157,7 @@ const LessonForm = ({
|
|||||||
colorScheme="blue"
|
colorScheme="blue"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
>
|
>
|
||||||
Создать
|
{nameButton}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</VStack>
|
</VStack>
|
||||||
@@ -343,6 +347,8 @@ const LessonList = () => {
|
|||||||
}}
|
}}
|
||||||
error={(crLQuery.error as any)?.error}
|
error={(crLQuery.error as any)?.error}
|
||||||
lesson={editLesson}
|
lesson={editLesson}
|
||||||
|
title={editLesson ? 'Редактирование лекции' : 'Создание лекции'}
|
||||||
|
nameButton={editLesson ? 'Редактировать' : 'Создать'}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Box p="2" m="2">
|
<Box p="2" m="2">
|
||||||
@@ -370,7 +376,7 @@ const LessonList = () => {
|
|||||||
Дата
|
Дата
|
||||||
</Th>
|
</Th>
|
||||||
<Th>Название</Th>
|
<Th>Название</Th>
|
||||||
<Th>action</Th>
|
{isTeacher(user) && <Th>action</Th>}
|
||||||
<Th isNumeric>Отмечено</Th>
|
<Th isNumeric>Отмечено</Th>
|
||||||
</Tr>
|
</Tr>
|
||||||
</Thead>
|
</Thead>
|
||||||
@@ -395,6 +401,7 @@ const LessonList = () => {
|
|||||||
{dayjs(lesson.date).format('H:mm DD.MM.YY')}
|
{dayjs(lesson.date).format('H:mm DD.MM.YY')}
|
||||||
</Td>
|
</Td>
|
||||||
<Td>{lesson.name}</Td>
|
<Td>{lesson.name}</Td>
|
||||||
|
{isTeacher(user) && (
|
||||||
<Td>
|
<Td>
|
||||||
<Menu>
|
<Menu>
|
||||||
<MenuButton as={Button}>
|
<MenuButton as={Button}>
|
||||||
@@ -415,6 +422,7 @@ const LessonList = () => {
|
|||||||
</MenuList>
|
</MenuList>
|
||||||
</Menu>
|
</Menu>
|
||||||
</Td>
|
</Td>
|
||||||
|
)}
|
||||||
<Td isNumeric>{lesson.students.length}</Td>
|
<Td isNumeric>{lesson.students.length}</Td>
|
||||||
</Tr>
|
</Tr>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user