урааааа, сдана 4
This commit is contained in:
parent
4f93068cce
commit
a36c6e9130
@ -12,7 +12,8 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class _Order {
|
@Table(name = "tab_order")
|
||||||
|
public class Order {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
@ -36,12 +37,12 @@ public class _Order {
|
|||||||
public Long getId(){
|
public Long getId(){
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public _Order(Date dateOfOrder) {
|
public Order(Date dateOfOrder) {
|
||||||
this.dateOfOrder = dateOfOrder;
|
this.dateOfOrder = dateOfOrder;
|
||||||
products = new ArrayList<>();
|
products = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Order() {
|
public Order() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDateOfOrder() {
|
public Date getDateOfOrder() {
|
||||||
@ -81,7 +82,7 @@ public class _Order {
|
|||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
_Order order = (_Order) o;
|
Order order = (Order) o;
|
||||||
if(!Objects.equals(id, order.id)) return false;
|
if(!Objects.equals(id, order.id)) return false;
|
||||||
|
|
||||||
if(!Objects.equals(dateOfOrder.toString(), order.dateOfOrder.toString())) return false;
|
if(!Objects.equals(dateOfOrder.toString(), order.dateOfOrder.toString())) return false;
|
@ -34,15 +34,10 @@ public class OrderController {
|
|||||||
return orderService.findAllOrderProducts(id).stream().map(ProductDto::new).toList();
|
return orderService.findAllOrderProducts(id).stream().map(ProductDto::new).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @PostMapping("/someSuppliers/")
|
@GetMapping("/someSuppliers/{id}")
|
||||||
// public List<SupplierDto> getSomeSuppliers(@RequestBody() List<Product> products) {
|
public List<SupplierDto> getSomeSuppliers(@PathVariable Long id) {
|
||||||
// return orderService.suppliers(products).stream().map(SupplierDto::new).toList();
|
return orderService.suppliers(id).stream().map(SupplierDto::new).toList();
|
||||||
// }
|
}
|
||||||
|
|
||||||
// @PostMapping("/someSuppliers/")
|
|
||||||
// public List<ProductDto> getSomeSuppliers(@RequestBody() List<ProductDto> products) {
|
|
||||||
// return products;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@PostMapping("/")
|
@PostMapping("/")
|
||||||
public Long createOrder(@RequestParam() Long supplierId) {
|
public Long createOrder(@RequestParam() Long supplierId) {
|
||||||
|
@ -14,7 +14,7 @@ public class OrderDto {
|
|||||||
private Supplier supplier;
|
private Supplier supplier;
|
||||||
private List<Product> products;
|
private List<Product> products;
|
||||||
|
|
||||||
public OrderDto(_Order order){
|
public OrderDto(Order order){
|
||||||
this.id = order.getId();
|
this.id = order.getId();
|
||||||
this.dateOfOrder = order.getDateOfOrder();
|
this.dateOfOrder = order.getDateOfOrder();
|
||||||
this.supplier = order.getSupplier();
|
this.supplier = order.getSupplier();
|
||||||
|
@ -7,8 +7,9 @@ import org.springframework.data.jpa.repository.Query;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface OrderRepository extends JpaRepository<_Order, Long> {
|
public interface OrderRepository extends JpaRepository<Order, Long> {
|
||||||
@Query("SELECT distinct o.supplier FROM _Order o join Product p where p in (?1)")
|
@Query("SELECT distinct o.supplier FROM Order o join Product p where p = ?1")
|
||||||
List<Supplier> getSomeSuppliers(List<Product> products);
|
// @Query("SELECT distinct o.supplier FROM Order o where ?1 member of o.products")
|
||||||
|
List<Supplier> getSomeSuppliers(Product product);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,58 +28,52 @@ public class OrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public _Order addOrder(Long supplierId){
|
public Order addOrder(Long supplierId){
|
||||||
final _Order order = new _Order(new Date());
|
final Order order = new Order(new Date());
|
||||||
order.setSupplier(supplierService.findSupplier(supplierId));
|
order.setSupplier(supplierService.findSupplier(supplierId));
|
||||||
return orderRepository.save(order);
|
return orderRepository.save(order);
|
||||||
}
|
}
|
||||||
|
|
||||||
//поставщики, у которых есть заказ на конкретный товар или несколько товаров
|
|
||||||
// @Transactional
|
|
||||||
// public List<Supplier> suppliers(List<Product> products){
|
|
||||||
// return em.createQuery("SELECT distinct o.supplier FROM Orders o join Product p where p in (:products) ", Supplier.class)
|
|
||||||
// .setParameter("products", products).getResultList();
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public List<Supplier> suppliers(List<Product> products){
|
public List<Supplier> suppliers(Long productId){
|
||||||
return orderRepository.getSomeSuppliers(products);
|
final Product product = productService.findProduct(productId);
|
||||||
|
return orderRepository.getSomeSuppliers(product);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public _Order addProduct(Long id, Long productId) {
|
public Order addProduct(Long id, Long productId) {
|
||||||
final _Order currentOrder = findOrder(id);
|
final Order currentOrder = findOrder(id);
|
||||||
currentOrder.addProduct(productService.findProduct(productId));
|
currentOrder.addProduct(productService.findProduct(productId));
|
||||||
return orderRepository.save(currentOrder);
|
return orderRepository.save(currentOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public _Order removeProduct(Long id, Long productId) {
|
public Order removeProduct(Long id, Long productId) {
|
||||||
final _Order currentOrder = findOrder(id);
|
final Order currentOrder = findOrder(id);
|
||||||
currentOrder.addProduct(productService.findProduct(productId));
|
currentOrder.addProduct(productService.findProduct(productId));
|
||||||
return orderRepository.save(currentOrder);
|
return orderRepository.save(currentOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
public _Order findOrder(Long id) {
|
public Order findOrder(Long id) {
|
||||||
final Optional<_Order> order = orderRepository.findById(id);
|
final Optional<Order> order = orderRepository.findById(id);
|
||||||
return order.orElseThrow(() -> new OrderNotFoundException(id));
|
return order.orElseThrow(() -> new OrderNotFoundException(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
public List<_Order> findAllOrders() {
|
public List<Order> findAllOrders() {
|
||||||
return orderRepository.findAll();
|
return orderRepository.findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
public List<Product> findAllOrderProducts(Long orderId) {
|
public List<Product> findAllOrderProducts(Long orderId) {
|
||||||
final Optional<_Order> order = orderRepository.findById(orderId);
|
final Optional<Order> order = orderRepository.findById(orderId);
|
||||||
return order.orElseThrow(() -> new OrderNotFoundException(orderId)).getProducts();
|
return order.orElseThrow(() -> new OrderNotFoundException(orderId)).getProducts();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public _Order deleteOrder(Long id) {
|
public Order deleteOrder(Long id) {
|
||||||
final _Order currentOrder = findOrder(id);
|
final Order currentOrder = findOrder(id);
|
||||||
orderRepository.delete(currentOrder);
|
orderRepository.delete(currentOrder);
|
||||||
return currentOrder;
|
return currentOrder;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.example.demo.supply.Product;
|
package com.example.demo.supply.Product;
|
||||||
|
|
||||||
import com.example.demo.supply.Order._Order;
|
import com.example.demo.supply.Order.Order;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ public class Product {
|
|||||||
private double cost;
|
private double cost;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToMany(fetch = FetchType.EAGER, mappedBy = "products")
|
@ManyToMany(fetch = FetchType.EAGER, mappedBy = "products")
|
||||||
private List<_Order> orders;
|
private List<Order> orders;
|
||||||
|
|
||||||
public Product(){}
|
public Product(){}
|
||||||
|
|
||||||
@ -48,11 +48,11 @@ public class Product {
|
|||||||
this.cost = cost;
|
this.cost = cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<_Order> getOrders() {
|
public List<Order> getOrders() {
|
||||||
return orders;
|
return orders;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOrders(List<_Order> orders) {
|
public void setOrders(List<Order> orders) {
|
||||||
this.orders = orders;
|
this.orders = orders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.example.demo.supply.Product;
|
package com.example.demo.supply.Product;
|
||||||
|
|
||||||
import com.example.demo.supply.Order._Order;
|
import com.example.demo.supply.Order.Order;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ public class ProductDto {
|
|||||||
private long id;
|
private long id;
|
||||||
private String name;
|
private String name;
|
||||||
private double cost;
|
private double cost;
|
||||||
private List<_Order> orders;
|
private List<Order> orders;
|
||||||
|
|
||||||
public ProductDto(Product product) {
|
public ProductDto(Product product) {
|
||||||
this.id = product.getId();
|
this.id = product.getId();
|
||||||
@ -26,7 +26,7 @@ public class ProductDto {
|
|||||||
public double getCost() {
|
public double getCost() {
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
public List<_Order> getOrders() {
|
public List<Order> getOrders() {
|
||||||
return orders;
|
return orders;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package com.example.demo.supply.Supplier;
|
package com.example.demo.supply.Supplier;
|
||||||
|
|
||||||
import com.example.demo.supply.Order._Order;
|
import com.example.demo.supply.Order.Order;
|
||||||
import com.example.demo.supply.Product.Product;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
|
|
||||||
@ -22,7 +21,7 @@ public class Supplier {
|
|||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@OneToMany(fetch = FetchType.EAGER, mappedBy = "supplier", cascade = CascadeType.REMOVE)
|
@OneToMany(fetch = FetchType.EAGER, mappedBy = "supplier", cascade = CascadeType.REMOVE)
|
||||||
private List<_Order> orders;
|
private List<Order> orders;
|
||||||
|
|
||||||
public Supplier(){}
|
public Supplier(){}
|
||||||
|
|
||||||
@ -49,11 +48,11 @@ public class Supplier {
|
|||||||
this.license = license;
|
this.license = license;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<_Order> getOrders() {
|
public List<Order> getOrders() {
|
||||||
return orders;
|
return orders;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOrders(List<_Order> orders) {
|
public void setOrders(List<Order> orders) {
|
||||||
this.orders = orders;
|
this.orders = orders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.example.demo.supply.Supplier;
|
package com.example.demo.supply.Supplier;
|
||||||
|
|
||||||
import com.example.demo.supply.Order._Order;
|
import com.example.demo.supply.Order.Order;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ public class SupplierDto {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private String name;
|
private String name;
|
||||||
private int license;
|
private int license;
|
||||||
private List<_Order> orders;
|
private List<Order> orders;
|
||||||
|
|
||||||
public SupplierDto(Supplier supplier){
|
public SupplierDto(Supplier supplier){
|
||||||
this.id = supplier.getId();
|
this.id = supplier.getId();
|
||||||
@ -24,7 +24,7 @@ public class SupplierDto {
|
|||||||
public int getLicense() {
|
public int getLicense() {
|
||||||
return license;
|
return license;
|
||||||
}
|
}
|
||||||
public List<_Order> getOrders() {
|
public List<Order> getOrders() {
|
||||||
return orders;
|
return orders;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ import CatalogProducts from "./Pages/CatalogProducts";
|
|||||||
import CatalogSuppliers from "./Pages/CatalogSuppliers";
|
import CatalogSuppliers from "./Pages/CatalogSuppliers";
|
||||||
import OrderPage from "./Pages/OrdersPage";
|
import OrderPage from "./Pages/OrdersPage";
|
||||||
import CreateOrderPage from "./Pages/CreateOrderPage";
|
import CreateOrderPage from "./Pages/CreateOrderPage";
|
||||||
|
import GetSomeSuppliers from "./Pages/GetSomeSuppliers";
|
||||||
import Header from "./general/Header";
|
import Header from "./general/Header";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
@ -16,6 +17,7 @@ function App() {
|
|||||||
<Route path="/suppliers" Component={CatalogSuppliers} />
|
<Route path="/suppliers" Component={CatalogSuppliers} />
|
||||||
<Route path="/orders" Component={OrderPage} />
|
<Route path="/orders" Component={OrderPage} />
|
||||||
<Route path="/createOrder" Component={CreateOrderPage} />
|
<Route path="/createOrder" Component={CreateOrderPage} />
|
||||||
|
<Route path="/dop" Component={GetSomeSuppliers} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
|
@ -6,7 +6,6 @@ function getFullUrl(url, data) {
|
|||||||
const fields = Object.getOwnPropertyNames(data);
|
const fields = Object.getOwnPropertyNames(data);
|
||||||
//проходимся по каждому полю
|
//проходимся по каждому полю
|
||||||
for (const field of fields) {
|
for (const field of fields) {
|
||||||
|
|
||||||
if (field === undefined) continue
|
if (field === undefined) continue
|
||||||
if (field === 'id') continue
|
if (field === 'id') continue
|
||||||
if (field === 'date') continue
|
if (field === 'date') continue
|
||||||
@ -51,26 +50,12 @@ export default class DataService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async getSomeSuppliers(){
|
static async getSomeSuppliers(url){
|
||||||
const arr =[
|
const response = await fetch(this.mainUrl + url, {
|
||||||
{
|
method: 'GET',
|
||||||
"id":104,
|
}).catch(e => console.log(e))
|
||||||
"name":"prod3",
|
const res = response.json()
|
||||||
"cost":3333
|
return res
|
||||||
},
|
|
||||||
{
|
|
||||||
"id":153,
|
|
||||||
"name":"prod3",
|
|
||||||
"cost":5555
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
//const resArr = JSON.stringify(arr)
|
|
||||||
//console.log(resArr)
|
|
||||||
const response = await axios.post(this.mainUrl + `order/someSuppliers/`, {
|
|
||||||
body: {arr}
|
|
||||||
});
|
|
||||||
console.log(response)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static async update(url, data) {
|
static async update(url, data) {
|
||||||
|
@ -4,7 +4,6 @@ import Order from '../models/Order';
|
|||||||
import Supplier from '../models/Supplier';
|
import Supplier from '../models/Supplier';
|
||||||
import Product from '../models/Product';
|
import Product from '../models/Product';
|
||||||
import DataService from '../DataService';
|
import DataService from '../DataService';
|
||||||
import Modal from '../general/Modal';
|
|
||||||
|
|
||||||
export default function CatalogOrders(props) {
|
export default function CatalogOrders(props) {
|
||||||
const url = 'order/'
|
const url = 'order/'
|
||||||
|
97
front/src/Pages/GetSomeSuppliers.jsx
Normal file
97
front/src/Pages/GetSomeSuppliers.jsx
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
import React, { useState, useEffect } from "react";
|
||||||
|
import Modal from "../general/Modal";
|
||||||
|
import Table from "../general/Table";
|
||||||
|
import DataService from "../DataService";
|
||||||
|
import Product from "../models/Product";
|
||||||
|
import Supplier from "../models/Supplier";
|
||||||
|
|
||||||
|
export default function GetSomeSuppliers(props) {
|
||||||
|
const url = 'order/someSuppliers/'
|
||||||
|
const productUrl = 'product/'
|
||||||
|
|
||||||
|
const headers = [
|
||||||
|
{ name: 'name', label: 'Поставщик' },
|
||||||
|
{ name: 'license', label: 'Лицензия' }
|
||||||
|
];
|
||||||
|
|
||||||
|
const transformer = (data) => new Supplier(data)
|
||||||
|
const transformerProduct = (data) => new Product(data)
|
||||||
|
|
||||||
|
const [suppliers, setSuppliers] = useState([])
|
||||||
|
const [products, setProducts] = useState([])
|
||||||
|
const [product, setProduct] = useState(new Product())
|
||||||
|
|
||||||
|
const [modalHeader, setModalHeader] = useState('')
|
||||||
|
const [modalConfirm, setModalConfirm] = useState('')
|
||||||
|
const [modalVisible, setModalVisible] = useState(false)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
loadItems()
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const loadItems = () => {
|
||||||
|
DataService.readAll(productUrl, transformerProduct).then(data =>{
|
||||||
|
console.log(data)
|
||||||
|
setProducts(data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const chooseProduct = () => {
|
||||||
|
setModalHeader('Добавление')
|
||||||
|
setModalConfirm('Добавить')
|
||||||
|
setModalVisible(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
const save = () => {
|
||||||
|
console.log(product)
|
||||||
|
DataService.getSomeSuppliers(`${url}${product.id}`)
|
||||||
|
.then(data => setSuppliers(data))
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleChooseProduct = (event) => {
|
||||||
|
// console.log(event.target.id)
|
||||||
|
// console.log(event.target.value)
|
||||||
|
setProduct({ ...product, [event.target.id]: event.target.value })
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleTableClick = (tableSelectedItems) => console.log("")
|
||||||
|
const handleTableDblClick = (tableSelectedItem) => console.log("")
|
||||||
|
|
||||||
|
const hideModal = () => {
|
||||||
|
setModalVisible(false)
|
||||||
|
}
|
||||||
|
const modalDone = () => save()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<button type="button" className="btn btn-success" onClick={chooseProduct}>Выбрать продукт</button>
|
||||||
|
|
||||||
|
<Table
|
||||||
|
headers={headers}
|
||||||
|
items={suppliers}
|
||||||
|
selectable={false}
|
||||||
|
onClick={handleTableClick}
|
||||||
|
onDblClick={handleTableDblClick}/>
|
||||||
|
<Modal
|
||||||
|
header={modalHeader}
|
||||||
|
confirm={modalConfirm}
|
||||||
|
visible={modalVisible}
|
||||||
|
onHide={hideModal}
|
||||||
|
onDone={modalDone}>
|
||||||
|
<div className="mb-3">
|
||||||
|
<p className="h4" htmlFor="id">Продукт</p>
|
||||||
|
<select id="id" className="form-select" required
|
||||||
|
value={product.id} onChange={handleChooseProduct}>
|
||||||
|
<option disabled value="">Укажите продукт</option>
|
||||||
|
{
|
||||||
|
products.map(product =>
|
||||||
|
<option key={product.id} value={product.id}>{product.name}</option>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
@ -12,7 +12,6 @@ function Catalog(props) {
|
|||||||
const [modalVisible, setModalVisible] = useState(false)
|
const [modalVisible, setModalVisible] = useState(false)
|
||||||
const [addProdVisible, setAddProdVisible] = useState(false)
|
const [addProdVisible, setAddProdVisible] = useState(false)
|
||||||
const [isEdit, setEdit] = useState(false)
|
const [isEdit, setEdit] = useState(false)
|
||||||
const [isAddProd, setIsAddProd] = useState(false)
|
|
||||||
|
|
||||||
|
|
||||||
let selectedItems = [];
|
let selectedItems = [];
|
||||||
@ -24,7 +23,10 @@ function Catalog(props) {
|
|||||||
|
|
||||||
const loadItems = () => {
|
const loadItems = () => {
|
||||||
DataService.readAll(props.url, props.transformer)
|
DataService.readAll(props.url, props.transformer)
|
||||||
.then(data => setItems(data))
|
.then(data =>{
|
||||||
|
console.log(data)
|
||||||
|
setItems(data)
|
||||||
|
} )
|
||||||
}
|
}
|
||||||
|
|
||||||
const saveItem = () => {
|
const saveItem = () => {
|
||||||
|
@ -27,6 +27,11 @@ export default function Header() {
|
|||||||
Заказы
|
Заказы
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
<li className="nav-item">
|
||||||
|
<Link className="nav-link" to="/dop">
|
||||||
|
Доп задание
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,7 +43,7 @@ export default function Table(props) {
|
|||||||
return data
|
return data
|
||||||
else{
|
else{
|
||||||
let prod = ''
|
let prod = ''
|
||||||
data.map(product => prod += ` <${product.name}> `)
|
data.map(product => prod += ` ${product.name},`)
|
||||||
return prod
|
return prod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user