Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 61cfd689f8 | |||
| 82a54022b2 | |||
| f28c644da5 | |||
| 50bf5b31b6 | |||
| 5670a96696 | |||
| 3a13b68a3d | |||
| fc3366d52a |
@@ -12,7 +12,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
features: {
|
features: {
|
||||||
journal: {
|
journal: {
|
||||||
// add your features here in the format [featureName]: { value: string }
|
|
||||||
'lesson.bar': {
|
'lesson.bar': {
|
||||||
on: true,
|
on: true,
|
||||||
value: '',
|
value: '',
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "journal.pl",
|
"name": "journal.pl",
|
||||||
"version": "2.4.1",
|
"version": "2.4.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "journal.pl",
|
"name": "journal.pl",
|
||||||
"version": "2.4.1",
|
"version": "2.4.4",
|
||||||
"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.4.1",
|
"version": "2.4.4",
|
||||||
"description": "inno-js platform journal ui repo",
|
"description": "inno-js platform journal ui repo",
|
||||||
"main": "./src/index.tsx",
|
"main": "./src/index.tsx",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ const LessonList = () => {
|
|||||||
const toastRef = useRef(null)
|
const toastRef = useRef(null)
|
||||||
const createdLessonRef = useRef(null)
|
const createdLessonRef = useRef(null)
|
||||||
const [editLesson, setEditLesson] = useState<Lesson>(null)
|
const [editLesson, setEditLesson] = useState<Lesson>(null)
|
||||||
const sorted = useMemo(() => [...(data?.body || [])]?.sort((a, b) => a.date < b.date ? 1 : -1), [data, data?.body])
|
const sorted = useMemo(() => [...(data?.body || [])]?.sort((a, b) => a.date > b.date ? 1 : -1), [data, data?.body])
|
||||||
|
|
||||||
const lessonCalc = useMemo(() => {
|
const lessonCalc = useMemo(() => {
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
@@ -223,7 +223,7 @@ const LessonList = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return lessonsData
|
return lessonsData.sort((a, b) => a.date < b.date? 1 : -1)
|
||||||
}, [groupByDate, isSuccess, sorted])
|
}, [groupByDate, isSuccess, sorted])
|
||||||
|
|
||||||
const onSubmit = (lessonData) => {
|
const onSubmit = (lessonData) => {
|
||||||
@@ -453,7 +453,7 @@ const LessonList = () => {
|
|||||||
</Td>
|
</Td>
|
||||||
)}
|
)}
|
||||||
<Td textAlign="center">
|
<Td textAlign="center">
|
||||||
{dayjs(lesson.date).format('H:mm DD.MM.YY')}
|
{dayjs(lesson.date).format(groupByDate ? 'HH:mm' : 'HH:mm DD.MM.YY')}
|
||||||
</Td>
|
</Td>
|
||||||
<Td>{lesson.name}</Td>
|
<Td>{lesson.name}</Td>
|
||||||
{isTeacher(user) && (
|
{isTeacher(user) && (
|
||||||
|
|||||||
Reference in New Issue
Block a user