This commit is contained in:
Андрей Дувакин 2024-10-08 12:10:11 +05:00
parent 709d72523d
commit a457e5daec
2 changed files with 12 additions and 5 deletions

View File

@ -546,7 +546,10 @@ export const calculateTotalOrder = async (deadline, robotsCount) => {
try {
const response = await axios.post(
`${API_URL}/total-orders/calculate`,
null,
{
deadline,
robotsCount,
},
{
headers: {
Authorization: `Bearer ${getAuthToken()}`,

View File

@ -121,7 +121,7 @@ const Home = () => {
onClick={() => handleToggleAccordion(order.id)}
>
<span>
Заказ от {new Date(order.order_datetime).toLocaleString()}
Заказ от {new Date(order.order_datetime).toLocaleString("ru-RU")}
</span>
<span>
<strong>Создатель:</strong>{" "}
@ -135,6 +135,7 @@ const Home = () => {
<thead>
<tr>
<th>Статус</th>
<th>Дедлайн</th>
<th>Количество роботов</th>
<th>Количество этапов</th>
<th>Итоговая цена</th>
@ -144,6 +145,9 @@ const Home = () => {
<tbody>
<tr>
<td>{order.status_name || "Неизвестный статус"}</td>
<td>
{new Date(order.deadline).toLocaleDateString("ru-RU")}
</td>
<td>{order.count_robots}</td>
<td>{deliveryOrdersCount || 0}</td>
<td>{order.price || 0} </td>