Любовь, ненависть, боль, наслаждение, жизнь, смерть. Здесь есть всё... Вот что значит — быть человеком.

This commit is contained in:
Кашин Максим 2023-05-15 15:37:31 +04:00
parent 0c672ab5e9
commit 1186635546
5 changed files with 12 additions and 11 deletions

Binary file not shown.

View File

@ -41,13 +41,13 @@ export default function App() {
<div className="content-div">
<Routes>
<Route element={<PrivateRoutes role="USER"/>}>
<Route element={<CatalogStores />} path="catalogs/store"/>
<Route element={<CatalogBuyers/>} path="catalogs/buyer"/>
<Route element={<CarInfo/>} path="catalogs/car"/>
<Route element={<Find/>} path="catalogs/find"/>
</Route>
<Route element={<PrivateRoutes role="ADMIN"/>}>
<Route element={<Users/>} path="catalog/users"/>
<Route element={<CatalogStores />} path="catalogs/store"/>
<Route element={<CatalogBuyers/>} path="catalogs/buyer"/>
<Route element={<CarInfo/>} path="catalogs/car"/>
</Route>
<Route element={<LoginPage/>} path="/login"/>
<Route element={<SignUpPage/>} path="catalog/signup"/>

View File

@ -34,12 +34,12 @@ export default function Modal(props) {
</form>
</div>
<div className="modal-footer">
<button className="btn btn-secondary" type="button" onClick={hide}>ь</button>
{localStorage.getItem("role") == "ADMIN" && (
<button className="btn btn-secondary" type="button" onClick={hide}>Отменить</button>
<button className="btn btn-primary" type="button" onClick={done}>
{props.confirm}
</button>
)}
</div>
</div>
</div>

View File

@ -16,6 +16,11 @@ export default function Toolbar(props) {
return (
<main className="form-group" style={{ backgroundColor: "white" }}>
{localStorage.getItem("role") == "ADMIN" && (
<a type="button" className="btn btn-light d-flex justify-content-center align-items-center" onClick={add}>
Добавить
</a>
)}
{(
<a type="button" className="btn btn-light d-flex justify-content-center align-items-center" onClick={add}>
Добавить
</a>

View File

@ -24,11 +24,7 @@ public class WebConfiguration implements WebMvcConfigurer {
registration.setViewName("forward:/index.html");
registration.setStatusCode(HttpStatus.OK);
}
//@Override
//public void addViewControllers(ViewControllerRegistry registry) {
// WebMvcConfigurer.super.addViewControllers(registry);
// registry.addViewController("rest-test");
//}
@Bean
public WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> containerCustomizer() {
return container -> {