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

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"> <div className="content-div">
<Routes> <Routes>
<Route element={<PrivateRoutes role="USER"/>}> <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 element={<Find/>} path="catalogs/find"/>
</Route> </Route>
<Route element={<PrivateRoutes role="ADMIN"/>}> <Route element={<PrivateRoutes role="ADMIN"/>}>
<Route element={<Users/>} path="catalog/users"/> <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>
<Route element={<LoginPage/>} path="/login"/> <Route element={<LoginPage/>} path="/login"/>
<Route element={<SignUpPage/>} path="catalog/signup"/> <Route element={<SignUpPage/>} path="catalog/signup"/>

View File

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

View File

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

View File

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