Files
lecture-front/src/components/services/ordersService.js

17 lines
495 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { fetchServiceItems } from "../../api/api";
const RU_STATUSES = {
done: "Готово",
issued: "Выдан",
in_progress: "В ремонте",
waiting: "Требует уточнения",
waiting_details: "В ожидании деталей",
accept: "Принят"
};
export const getServiceItemsForRender = async () => {
return (await fetchServiceItems()).map((value) => {
value.status = RU_STATUSES[value.status];
return value;
});
}