You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import { STATUS_LABEL_MAPPER } from "../../../config";
export const getRegionNameById = (id, normalizedRegions) =>
normalizedRegions?.[id]?.name ?? id;
export const commonPopupConfig = [
{
name: "Адрес",
field: "address",
},
{
name: "Район",
field: "area_id",
fallbackField: "area",
render: getRegionNameById,
type: "region",
},
{
name: "Округ",
field: "district_id",
fallbackField: "district",
render: getRegionNameById,
type: "region",
},
{
name: "Название",
field: "name",
},
{
name: "Категория",
field: "category",
},
{
name: "Статус",
field: "status",
render: (value) => STATUS_LABEL_MAPPER[value],
},
{
name: "Прогнозный трафик",
field: "prediction_current",
},
];
export const residentialPopupFields = [
{
name: "Кол-во квартир",
field: "flat_cnt",
},
{
name: "Год постройки",
field: "year_bld",
},
{
name: "Кол-во этажей",
field: "levels",
},
{
name: "Материал стен",
field: "mat_nes",
},
]
export const residentialPopupConfig = [
...commonPopupConfig,
...residentialPopupFields
];
export const workingPointFields = [
{ name: "План", field: "plan_current" },
{ name: "Факт", field: "fact" },
{ name: "Расхождение с прогнозом", field: "delta_current" },
{ name: "Зрелость", field: "age_day" },
{ name: "id локации", field: "postamat_id", empty: "Не указан" },
];
export const rivalsConfig = [
{ name: "Категория", field: "category_id" },
{ name: "Группа", field: "group_id" },
];