Добавлен mock для таблицы клиентов

This commit is contained in:
DwCay
2022-10-17 11:18:27 +03:00
parent 5a94912ebe
commit d0cc2e8196
6 changed files with 455 additions and 32 deletions

40
server.js Normal file
View File

@@ -0,0 +1,40 @@
import { createServer } from "miragejs";
export function clientsServer() {
createServer({
routes() {
this.get("/api/clients", () => ({
dataClients: [
{
id: "1",
fullName: "Вильгейльм Арнольд Витальевич",
age: "34",
jobTitle: "Менеджер",
priority: "Высокий",
phone: "+7 (915) 6572114",
email: "Superboyband@yandex.ru",
networks: [],
meetingTime: {
date: "02.06.22",
time: "18:3019:30",
},
},
{
id: "2",
fullName: "Астафоркина Екатерина Геннадьевна",
age: "54",
jobTitle: "Менеджер",
priority: "-",
phone: "+7 (574) 3645336",
email: "antimag@gmail.com",
networks: [],
meetingTime: {
date: "14.07.22",
time: "17:3021:30",
},
},
],
}));
},
});
}