update get student name in attendance

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-12-12 11:17:38 +03:00
parent 9509f12d73
commit 0aebb87210
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ export default (props) => <App {...props} />;
let rootElement: ReactDOM.Root let rootElement: ReactDOM.Root
export const mount = async (Сomponent, element = document.getElementById('app')) => { export const mount = async (Component, element = document.getElementById('app')) => {
let user = null; let user = null;
try { try {
await keycloak.init({ onLoad: "login-required" }); await keycloak.init({ onLoad: "login-required" });
@ -26,11 +26,11 @@ export const mount = async (Сomponent, element = document.getElementById('app')
const store = createStore({ user }); const store = createStore({ user });
rootElement = ReactDOM.createRoot(element); rootElement = ReactDOM.createRoot(element);
rootElement.render(<Сomponent store={store} />); rootElement.render(<Component store={store} />);
if(module.hot) { if(module.hot) {
module.hot.accept('./app', ()=> { module.hot.accept('./app', ()=> {
rootElement.render(<Сomponent store={store} />); rootElement.render(<Component store={store} />);
}) })
} }
}; };

View File

@ -29,7 +29,7 @@ export const Attendance = () => {
value: value:
student.family_name && student.given_name student.family_name && student.given_name
? `${student.family_name} ${student.given_name}` ? `${student.family_name} ${student.given_name}`
: student.name || student.email, : student.name || student.email || student.preferred_username || student.family_name || student.given_name,
}) })
}) })
}) })