Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81533c3342 | ||
|
|
462ba85fe8 | ||
|
|
d0f7dfb87d |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "journal.pl",
|
||||
"version": "3.6.6",
|
||||
"version": "3.6.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "journal.pl",
|
||||
"version": "3.6.6",
|
||||
"version": "3.6.7",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@brojs/cli": "^1.8.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "journal.pl",
|
||||
"version": "3.6.6",
|
||||
"version": "3.6.7",
|
||||
"description": "bro-js platform journal ui repo",
|
||||
"main": "./src/index.tsx",
|
||||
"scripts": {
|
||||
|
||||
@@ -17,7 +17,7 @@ let rootElement: ReactDOM.Root
|
||||
export const mount = async (Component, element = document.getElementById('app')) => {
|
||||
let user = null;
|
||||
try {
|
||||
await keycloak.init({ onLoad: 'check-sso' }) // 'login-required' });
|
||||
await keycloak.init({ onLoad: 'login-required' })
|
||||
|
||||
const userInfo = await keycloak.loadUserInfo()
|
||||
|
||||
@@ -28,7 +28,7 @@ export const mount = async (Component, element = document.getElementById('app'))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to initialize adapter:', error)
|
||||
// keycloak.login()
|
||||
keycloak.login()
|
||||
}
|
||||
const store = createStore({ user });
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import dayjs from 'dayjs'
|
||||
import { Link as ConnectedLink } from 'react-router-dom'
|
||||
import { getNavigationsValue, getHistory } from '@brojs/cli'
|
||||
import { getNavigationValue, getHistory } from '@brojs/cli'
|
||||
import { Stack, Heading, Link, Button, Tooltip, Box } from '@chakra-ui/react'
|
||||
|
||||
import { useAppSelector } from '../../__data__/store'
|
||||
@@ -27,23 +27,23 @@ export const CourseDetails = ({ populatedCourse }: CourseDetailsProps) => {
|
||||
{isTeacher(user) && (
|
||||
<Heading as="h3" mt={4} mb={3} size="lg">
|
||||
Экзамен: {exam?.name}{' '}
|
||||
{exam && (
|
||||
{exam && getNavigationValue('exam.main') && getNavigationValue('link.exam.details') && (
|
||||
<Tooltip label="Начать экзамен" fontSize="12px" top="16px">
|
||||
<Button
|
||||
leftIcon={<LinkIcon />}
|
||||
as={'a'}
|
||||
colorScheme="blue"
|
||||
href={
|
||||
getNavigationsValue('exam.main') +
|
||||
getNavigationsValue('link.exam.details')
|
||||
getNavigationValue('exam.main') +
|
||||
getNavigationValue('link.exam.details')
|
||||
.replace(':courseId', populatedCourse.id)
|
||||
.replace(':examId', exam.id)
|
||||
}
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
history.push(
|
||||
getNavigationsValue('exam.main') +
|
||||
getNavigationsValue('link.exam.details')
|
||||
getNavigationValue('exam.main') +
|
||||
getNavigationValue('link.exam.details')
|
||||
.replace(':courseId', populatedCourse.id)
|
||||
.replace(':examId', exam.id),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user