update get student name in attendance
This commit is contained in:
parent
9509f12d73
commit
0aebb87210
@ -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} />);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -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,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user