WEB APP: Приведение констант, экспортируемых из компонент и провайдеров контекста, к единому формату именования
This commit is contained in:
parent
ea90de6240
commit
ce455e485b
@ -14,7 +14,7 @@ import { ApplicationСtx } from "./context/application"; //Контекст пр
|
|||||||
import { NavigationContext, NavigationCtx, getRootLocation } from "./context/navigation"; //Контекст навигации
|
import { NavigationContext, NavigationCtx, getRootLocation } from "./context/navigation"; //Контекст навигации
|
||||||
import { P8PAppErrorPage } from "./components/p8p_app_error_page"; //Страница с ошибкой
|
import { P8PAppErrorPage } from "./components/p8p_app_error_page"; //Страница с ошибкой
|
||||||
import { P8PAppWorkspace } from "./components/p8p_app_workspace"; //Рабочее пространство панели
|
import { P8PAppWorkspace } from "./components/p8p_app_workspace"; //Рабочее пространство панели
|
||||||
import { P8PPanelsMenuGrid, PANEL_SHAPE } from "./components/p8p_panels_menu"; //Меню панелей
|
import { P8PPanelsMenuGrid, P8P_PANELS_MENU_PANEL_SHAPE } from "./components/p8p_panels_menu"; //Меню панелей
|
||||||
import { TITLES, BUTTONS, ERRORS, ERRORS_HTTP } from "../app.text"; //Текстовые ресурсы и константы
|
import { TITLES, BUTTONS, ERRORS, ERRORS_HTTP } from "../app.text"; //Текстовые ресурсы и константы
|
||||||
|
|
||||||
//--------------------------
|
//--------------------------
|
||||||
@ -69,7 +69,7 @@ const MainMenu = ({ panels = [] } = {}) => {
|
|||||||
|
|
||||||
//Контроль свойств - главное меню приложения
|
//Контроль свойств - главное меню приложения
|
||||||
MainMenu.propTypes = {
|
MainMenu.propTypes = {
|
||||||
panels: PropTypes.arrayOf(PANEL_SHAPE).isRequired
|
panels: PropTypes.arrayOf(P8P_PANELS_MENU_PANEL_SHAPE).isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
//Рабочее пространство панели
|
//Рабочее пространство панели
|
||||||
@ -100,8 +100,8 @@ const Workspace = ({ panels = [], selectedPanel, children } = {}) => {
|
|||||||
|
|
||||||
//Контроль свойств - главное меню приложения
|
//Контроль свойств - главное меню приложения
|
||||||
Workspace.propTypes = {
|
Workspace.propTypes = {
|
||||||
panels: PropTypes.arrayOf(PANEL_SHAPE).isRequired,
|
panels: PropTypes.arrayOf(P8P_PANELS_MENU_PANEL_SHAPE).isRequired,
|
||||||
selectedPanel: PANEL_SHAPE,
|
selectedPanel: P8P_PANELS_MENU_PANEL_SHAPE,
|
||||||
children: PropTypes.element
|
children: PropTypes.element
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import {
|
|||||||
ListItemIcon,
|
ListItemIcon,
|
||||||
ListItemText
|
ListItemText
|
||||||
} from "@mui/material"; //Интерфейсные компоненты
|
} from "@mui/material"; //Интерфейсные компоненты
|
||||||
import { P8PPanelsMenuDrawer, PANEL_SHAPE } from "./p8p_panels_menu";
|
import { P8PPanelsMenuDrawer, P8P_PANELS_MENU_PANEL_SHAPE } from "./p8p_panels_menu";
|
||||||
|
|
||||||
//---------
|
//---------
|
||||||
//Константы
|
//Константы
|
||||||
@ -113,8 +113,8 @@ const P8PAppWorkspace = ({ children, panels = [], selectedPanel, closeCaption, h
|
|||||||
//Контроль свойств - Рабочее пространство
|
//Контроль свойств - Рабочее пространство
|
||||||
P8PAppWorkspace.propTypes = {
|
P8PAppWorkspace.propTypes = {
|
||||||
children: PropTypes.element,
|
children: PropTypes.element,
|
||||||
panels: PropTypes.arrayOf(PANEL_SHAPE).isRequired,
|
panels: PropTypes.arrayOf(P8P_PANELS_MENU_PANEL_SHAPE).isRequired,
|
||||||
selectedPanel: PANEL_SHAPE,
|
selectedPanel: P8P_PANELS_MENU_PANEL_SHAPE,
|
||||||
closeCaption: PropTypes.string.isRequired,
|
closeCaption: PropTypes.string.isRequired,
|
||||||
homeCaption: PropTypes.string.isRequired,
|
homeCaption: PropTypes.string.isRequired,
|
||||||
onHomeNavigate: PropTypes.func,
|
onHomeNavigate: PropTypes.func,
|
||||||
|
@ -10,20 +10,20 @@
|
|||||||
import React, { useState } from "react"; //Классы React
|
import React, { useState } from "react"; //Классы React
|
||||||
import PropTypes from "prop-types"; //Контроль свойств компонента
|
import PropTypes from "prop-types"; //Контроль свойств компонента
|
||||||
import { deepCopyObject } from "../core/utils"; //Вспомогательные процедуры и функции
|
import { deepCopyObject } from "../core/utils"; //Вспомогательные процедуры и функции
|
||||||
import { P8PTable, P8P_TABLE_SIZE, P8P_TABLE_DATA_TYPE, P8P_FILTER_SHAPE } from "./p8p_table"; //Таблица
|
import { P8PTable, P8P_TABLE_SIZE, P8P_TABLE_DATA_TYPE, P8P_TABLE_FILTER_SHAPE } from "./p8p_table"; //Таблица
|
||||||
|
|
||||||
//---------
|
//---------
|
||||||
//Константы
|
//Константы
|
||||||
//---------
|
//---------
|
||||||
|
|
||||||
//Размеры отступов
|
//Размеры отступов
|
||||||
const P8PDATA_GRID_SIZE = P8P_TABLE_SIZE;
|
const P8P_DATA_GRID_SIZE = P8P_TABLE_SIZE;
|
||||||
|
|
||||||
//Типы данных
|
//Типы данных
|
||||||
const P8PDATA_GRID_DATA_TYPE = P8P_TABLE_DATA_TYPE;
|
const P8P_DATA_GRID_DATA_TYPE = P8P_TABLE_DATA_TYPE;
|
||||||
|
|
||||||
//Формат фильтра
|
//Формат фильтра
|
||||||
const P8PDATA_GRID_FILTER_SHAPE = P8P_FILTER_SHAPE;
|
const P8P_DATA_GRID_FILTER_SHAPE = P8P_TABLE_FILTER_SHAPE;
|
||||||
|
|
||||||
//-----------
|
//-----------
|
||||||
//Тело модуля
|
//Тело модуля
|
||||||
@ -100,7 +100,7 @@ const P8PDataGrid = ({
|
|||||||
rows={rows}
|
rows={rows}
|
||||||
orders={orders}
|
orders={orders}
|
||||||
filters={filters}
|
filters={filters}
|
||||||
size={size || P8PDATA_GRID_SIZE.MEDIUM}
|
size={size || P8P_DATA_GRID_SIZE.MEDIUM}
|
||||||
morePages={morePages}
|
morePages={morePages}
|
||||||
reloading={reloading}
|
reloading={reloading}
|
||||||
expandable={expandable}
|
expandable={expandable}
|
||||||
@ -129,7 +129,7 @@ const P8PDataGrid = ({
|
|||||||
//Контроль свойств - Таблица данных
|
//Контроль свойств - Таблица данных
|
||||||
P8PDataGrid.propTypes = {
|
P8PDataGrid.propTypes = {
|
||||||
columnsDef: PropTypes.array.isRequired,
|
columnsDef: PropTypes.array.isRequired,
|
||||||
filtersInitial: PropTypes.arrayOf(P8PDATA_GRID_FILTER_SHAPE),
|
filtersInitial: PropTypes.arrayOf(P8P_DATA_GRID_FILTER_SHAPE),
|
||||||
rows: PropTypes.array.isRequired,
|
rows: PropTypes.array.isRequired,
|
||||||
size: PropTypes.string,
|
size: PropTypes.string,
|
||||||
morePages: PropTypes.bool.isRequired,
|
morePages: PropTypes.bool.isRequired,
|
||||||
@ -159,4 +159,4 @@ P8PDataGrid.propTypes = {
|
|||||||
//Интерфейс модуля
|
//Интерфейс модуля
|
||||||
//----------------
|
//----------------
|
||||||
|
|
||||||
export { P8PDataGrid, P8PDATA_GRID_SIZE, P8PDATA_GRID_DATA_TYPE, P8PDATA_GRID_FILTER_SHAPE };
|
export { P8P_DATA_GRID_SIZE, P8P_DATA_GRID_DATA_TYPE, P8P_DATA_GRID_FILTER_SHAPE, P8PDataGrid };
|
||||||
|
@ -33,11 +33,24 @@ import {
|
|||||||
//---------
|
//---------
|
||||||
|
|
||||||
//Типы меню
|
//Типы меню
|
||||||
const VARIANT = {
|
const P8P_PANELS_MENU_VARIANT = {
|
||||||
DRAWER: "DRAWER",
|
DRAWER: "DRAWER",
|
||||||
GRID: "GRID"
|
GRID: "GRID"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Структура элемента описания панели
|
||||||
|
const P8P_PANELS_MENU_PANEL_SHAPE = PropTypes.shape({
|
||||||
|
name: PropTypes.string.isRequired,
|
||||||
|
caption: PropTypes.string.isRequired,
|
||||||
|
desc: PropTypes.string.isRequired,
|
||||||
|
group: PropTypes.string,
|
||||||
|
icon: PropTypes.string.isRequired,
|
||||||
|
path: PropTypes.string.isRequired,
|
||||||
|
preview: PropTypes.string.isRequired,
|
||||||
|
showInPanelsList: PropTypes.bool.isRequired,
|
||||||
|
url: PropTypes.string.isRequired
|
||||||
|
});
|
||||||
|
|
||||||
//Стили
|
//Стили
|
||||||
const STYLES = {
|
const STYLES = {
|
||||||
CONTAINER: {
|
CONTAINER: {
|
||||||
@ -77,19 +90,6 @@ const STYLES = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//Структура элемента описания панели
|
|
||||||
const PANEL_SHAPE = PropTypes.shape({
|
|
||||||
name: PropTypes.string.isRequired,
|
|
||||||
caption: PropTypes.string.isRequired,
|
|
||||||
desc: PropTypes.string.isRequired,
|
|
||||||
group: PropTypes.string,
|
|
||||||
icon: PropTypes.string.isRequired,
|
|
||||||
path: PropTypes.string.isRequired,
|
|
||||||
preview: PropTypes.string.isRequired,
|
|
||||||
showInPanelsList: PropTypes.bool.isRequired,
|
|
||||||
url: PropTypes.string.isRequired
|
|
||||||
});
|
|
||||||
|
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
//Вспомогательные классы и функции
|
//Вспомогательные классы и функции
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
@ -117,7 +117,7 @@ const getPanelsLinks = ({ variant, panels, selectedPanel, defaultGroupTytle, nav
|
|||||||
for (const grp of grps) {
|
for (const grp of grps) {
|
||||||
if (!(grps.length == 1 && grps[0] == null))
|
if (!(grps.length == 1 && grps[0] == null))
|
||||||
panelsLinks.push(
|
panelsLinks.push(
|
||||||
variant === VARIANT.GRID ? (
|
variant === P8P_PANELS_MENU_VARIANT.GRID ? (
|
||||||
<Grid item xs={12} sm={12} md={12} lg={12} xl={12} key={grp}>
|
<Grid item xs={12} sm={12} md={12} lg={12} xl={12} key={grp}>
|
||||||
<Typography variant="h5" color="secondary">
|
<Typography variant="h5" color="secondary">
|
||||||
{grp ? grp : defaultGroupTytle}
|
{grp ? grp : defaultGroupTytle}
|
||||||
@ -130,7 +130,7 @@ const getPanelsLinks = ({ variant, panels, selectedPanel, defaultGroupTytle, nav
|
|||||||
for (const panel of panels) {
|
for (const panel of panels) {
|
||||||
if (panel.showInPanelsList == true && ((grp && panel.group === grp) || (!grp && !panel.group)))
|
if (panel.showInPanelsList == true && ((grp && panel.group === grp) || (!grp && !panel.group)))
|
||||||
panelsLinks.push(
|
panelsLinks.push(
|
||||||
variant === VARIANT.GRID ? (
|
variant === P8P_PANELS_MENU_VARIANT.GRID ? (
|
||||||
<Grid item xs={12} sm={6} md={4} lg={4} xl={4} key={panel.name}>
|
<Grid item xs={12} sm={6} md={4} lg={4} xl={4} key={panel.name}>
|
||||||
<Card sx={STYLES.PANEL_CARD}>
|
<Card sx={STYLES.PANEL_CARD}>
|
||||||
{panel.preview ? (
|
{panel.preview ? (
|
||||||
@ -180,7 +180,7 @@ const getPanelsLinks = ({ variant, panels, selectedPanel, defaultGroupTytle, nav
|
|||||||
//Меню панелей - сдвигающееся боковое меню
|
//Меню панелей - сдвигающееся боковое меню
|
||||||
const P8PPanelsMenuDrawer = ({ onItemNavigate, panels = [], selectedPanel } = {}) => {
|
const P8PPanelsMenuDrawer = ({ onItemNavigate, panels = [], selectedPanel } = {}) => {
|
||||||
//Формируем ссылки на панели
|
//Формируем ссылки на панели
|
||||||
const panelsLinks = getPanelsLinks({ variant: VARIANT.DRAWER, panels, selectedPanel, onItemNavigate });
|
const panelsLinks = getPanelsLinks({ variant: P8P_PANELS_MENU_VARIANT.DRAWER, panels, selectedPanel, onItemNavigate });
|
||||||
|
|
||||||
//Генерация содержимого
|
//Генерация содержимого
|
||||||
return <List sx={{ paddingTop: 0 }}>{panelsLinks}</List>;
|
return <List sx={{ paddingTop: 0 }}>{panelsLinks}</List>;
|
||||||
@ -189,14 +189,14 @@ const P8PPanelsMenuDrawer = ({ onItemNavigate, panels = [], selectedPanel } = {}
|
|||||||
//Контроль свойств - Меню панелей - сдвигающееся боковое меню
|
//Контроль свойств - Меню панелей - сдвигающееся боковое меню
|
||||||
P8PPanelsMenuDrawer.propTypes = {
|
P8PPanelsMenuDrawer.propTypes = {
|
||||||
onItemNavigate: PropTypes.func,
|
onItemNavigate: PropTypes.func,
|
||||||
panels: PropTypes.arrayOf(PANEL_SHAPE).isRequired,
|
panels: PropTypes.arrayOf(P8P_PANELS_MENU_PANEL_SHAPE).isRequired,
|
||||||
selectedPanel: PANEL_SHAPE
|
selectedPanel: P8P_PANELS_MENU_PANEL_SHAPE
|
||||||
};
|
};
|
||||||
|
|
||||||
//Меню панелей - грид
|
//Меню панелей - грид
|
||||||
const P8PPanelsMenuGrid = ({ title, onItemNavigate, navigateCaption, panels = [], defaultGroupTytle } = {}) => {
|
const P8PPanelsMenuGrid = ({ title, onItemNavigate, navigateCaption, panels = [], defaultGroupTytle } = {}) => {
|
||||||
//Формируем ссылки на панели
|
//Формируем ссылки на панели
|
||||||
const panelsLinks = getPanelsLinks({ variant: VARIANT.GRID, panels, defaultGroupTytle, navigateCaption, onItemNavigate });
|
const panelsLinks = getPanelsLinks({ variant: P8P_PANELS_MENU_VARIANT.GRID, panels, defaultGroupTytle, navigateCaption, onItemNavigate });
|
||||||
|
|
||||||
//Генерация содержимого
|
//Генерация содержимого
|
||||||
return (
|
return (
|
||||||
@ -220,7 +220,7 @@ P8PPanelsMenuGrid.propTypes = {
|
|||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
onItemNavigate: PropTypes.func,
|
onItemNavigate: PropTypes.func,
|
||||||
navigateCaption: PropTypes.string.isRequired,
|
navigateCaption: PropTypes.string.isRequired,
|
||||||
panels: PropTypes.arrayOf(PANEL_SHAPE).isRequired,
|
panels: PropTypes.arrayOf(P8P_PANELS_MENU_PANEL_SHAPE).isRequired,
|
||||||
defaultGroupTytle: PropTypes.string.isRequired
|
defaultGroupTytle: PropTypes.string.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -228,4 +228,4 @@ P8PPanelsMenuGrid.propTypes = {
|
|||||||
//Интерфейс модуля
|
//Интерфейс модуля
|
||||||
//----------------
|
//----------------
|
||||||
|
|
||||||
export { PANEL_SHAPE, P8PPanelsMenuDrawer, P8PPanelsMenuGrid };
|
export { P8P_PANELS_MENU_PANEL_SHAPE, P8PPanelsMenuDrawer, P8PPanelsMenuGrid };
|
||||||
|
@ -70,6 +70,13 @@ const P8P_TABLE_COLUMN_MENU_ACTIONS = {
|
|||||||
FILTER: "FILTER"
|
FILTER: "FILTER"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Структура элемента описания фильтра
|
||||||
|
const P8P_TABLE_FILTER_SHAPE = PropTypes.shape({
|
||||||
|
name: PropTypes.string.isRequired,
|
||||||
|
from: PropTypes.any,
|
||||||
|
to: PropTypes.any
|
||||||
|
});
|
||||||
|
|
||||||
//Стили
|
//Стили
|
||||||
const STYLES = {
|
const STYLES = {
|
||||||
TABLE: {
|
TABLE: {
|
||||||
@ -98,13 +105,6 @@ const STYLES = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//Структура элемента описания фильтра
|
|
||||||
const P8P_FILTER_SHAPE = PropTypes.shape({
|
|
||||||
name: PropTypes.string.isRequired,
|
|
||||||
from: PropTypes.any,
|
|
||||||
to: PropTypes.any
|
|
||||||
});
|
|
||||||
|
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
//Вспомогательные классы и функции
|
//Вспомогательные классы и функции
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
@ -694,7 +694,7 @@ P8PTable.propTypes = {
|
|||||||
direction: PropTypes.string.isRequired
|
direction: PropTypes.string.isRequired
|
||||||
})
|
})
|
||||||
).isRequired,
|
).isRequired,
|
||||||
filters: PropTypes.arrayOf(P8P_FILTER_SHAPE).isRequired,
|
filters: PropTypes.arrayOf(P8P_TABLE_FILTER_SHAPE).isRequired,
|
||||||
size: PropTypes.string,
|
size: PropTypes.string,
|
||||||
morePages: PropTypes.bool.isRequired,
|
morePages: PropTypes.bool.isRequired,
|
||||||
reloading: PropTypes.bool.isRequired,
|
reloading: PropTypes.bool.isRequired,
|
||||||
@ -723,4 +723,4 @@ P8PTable.propTypes = {
|
|||||||
//Интерфейс модуля
|
//Интерфейс модуля
|
||||||
//----------------
|
//----------------
|
||||||
|
|
||||||
export { P8PTable, P8P_TABLE_DATA_TYPE, P8P_TABLE_SIZE, P8P_FILTER_SHAPE };
|
export { P8P_TABLE_DATA_TYPE, P8P_TABLE_SIZE, P8P_TABLE_FILTER_SHAPE, P8PTable };
|
||||||
|
@ -16,7 +16,7 @@ import { MessagingСtx } from "./messaging"; //Контекст сообщени
|
|||||||
//---------
|
//---------
|
||||||
|
|
||||||
//Структура объекта клиента
|
//Структура объекта клиента
|
||||||
const P8P_CLIENT_SHAPE = PropTypes.shape({
|
const BACKEND_CONTEXT_CLIENT_SHAPE = PropTypes.shape({
|
||||||
SERV_DATA_TYPE_STR: PropTypes.string.isRequired,
|
SERV_DATA_TYPE_STR: PropTypes.string.isRequired,
|
||||||
SERV_DATA_TYPE_NUMB: PropTypes.string.isRequired,
|
SERV_DATA_TYPE_NUMB: PropTypes.string.isRequired,
|
||||||
SERV_DATA_TYPE_DATE: PropTypes.string.isRequired,
|
SERV_DATA_TYPE_DATE: PropTypes.string.isRequired,
|
||||||
@ -116,6 +116,6 @@ export const BackEndContext = ({ client, children }) => {
|
|||||||
|
|
||||||
//Контроль свойств - Провайдер контекста взаимодействия с серверным API
|
//Контроль свойств - Провайдер контекста взаимодействия с серверным API
|
||||||
BackEndContext.propTypes = {
|
BackEndContext.propTypes = {
|
||||||
client: P8P_CLIENT_SHAPE.isRequired,
|
client: BACKEND_CONTEXT_CLIENT_SHAPE.isRequired,
|
||||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
||||||
};
|
};
|
||||||
|
@ -71,6 +71,7 @@ export const MessagingContext = ({ children }) => {
|
|||||||
return (
|
return (
|
||||||
<MessagingСtx.Provider
|
<MessagingСtx.Provider
|
||||||
value={{
|
value={{
|
||||||
|
MSG_DLGT,
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
showMsg,
|
showMsg,
|
||||||
@ -78,7 +79,6 @@ export const MessagingContext = ({ children }) => {
|
|||||||
showMsgInfo,
|
showMsgInfo,
|
||||||
showMsgWarn,
|
showMsgWarn,
|
||||||
hideMsg,
|
hideMsg,
|
||||||
MSG_DLGT,
|
|
||||||
msgState: state
|
msgState: state
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -12,7 +12,7 @@ import PropTypes from "prop-types"; //Контроль свойств компо
|
|||||||
import { Grid, Icon, Stack, Link, Button, Table, TableBody, TableRow, TableCell, Typography, Box, Paper, IconButton } from "@mui/material"; //Интерфейсные компоненты
|
import { Grid, Icon, Stack, Link, Button, Table, TableBody, TableRow, TableCell, Typography, Box, Paper, IconButton } from "@mui/material"; //Интерфейсные компоненты
|
||||||
import { hasValue, formatDateRF, formatNumberRFCurrency, object2Base64XML } from "../../core/utils"; //Вспомогательные процедуры и функции
|
import { hasValue, formatDateRF, formatNumberRFCurrency, object2Base64XML } from "../../core/utils"; //Вспомогательные процедуры и функции
|
||||||
import { BUTTONS, TEXTS, INPUTS } from "../../../app.text"; //Тектовые ресурсы и константы
|
import { BUTTONS, TEXTS, INPUTS } from "../../../app.text"; //Тектовые ресурсы и константы
|
||||||
import { P8PDataGrid, P8PDATA_GRID_SIZE } from "../../components/p8p_data_grid"; //Таблица данных
|
import { P8PDataGrid, P8P_DATA_GRID_SIZE } from "../../components/p8p_data_grid"; //Таблица данных
|
||||||
import { BackEndСtx } from "../../context/backend"; //Контекст взаимодействия с сервером
|
import { BackEndСtx } from "../../context/backend"; //Контекст взаимодействия с сервером
|
||||||
import { ApplicationСtx } from "../../context/application"; //Контекст приложения
|
import { ApplicationСtx } from "../../context/application"; //Контекст приложения
|
||||||
import { MessagingСtx } from "../../context/messaging"; //Контекст сообщений
|
import { MessagingСtx } from "../../context/messaging"; //Контекст сообщений
|
||||||
@ -299,7 +299,7 @@ const Projects = ({ onStagesOpen }) => {
|
|||||||
<P8PDataGrid
|
<P8PDataGrid
|
||||||
columnsDef={projectsDataGrid.columnsDef}
|
columnsDef={projectsDataGrid.columnsDef}
|
||||||
rows={projectsDataGrid.rows}
|
rows={projectsDataGrid.rows}
|
||||||
size={P8PDATA_GRID_SIZE.SMALL}
|
size={P8P_DATA_GRID_SIZE.SMALL}
|
||||||
morePages={projectsDataGrid.morePages}
|
morePages={projectsDataGrid.morePages}
|
||||||
reloading={projectsDataGrid.reload}
|
reloading={projectsDataGrid.reload}
|
||||||
expandable={true}
|
expandable={true}
|
||||||
|
@ -12,7 +12,7 @@ import PropTypes from "prop-types"; //Контроль свойств компо
|
|||||||
import { Box, Icon, Stack, Link } from "@mui/material"; //Интерфейсные компоненты
|
import { Box, Icon, Stack, Link } from "@mui/material"; //Интерфейсные компоненты
|
||||||
import { hasValue, formatNumberRFCurrency, object2Base64XML } from "../../core/utils"; //Вспомогательные процедуры и функции
|
import { hasValue, formatNumberRFCurrency, object2Base64XML } from "../../core/utils"; //Вспомогательные процедуры и функции
|
||||||
import { BUTTONS, TEXTS, INPUTS } from "../../../app.text"; //Тектовые ресурсы и константы
|
import { BUTTONS, TEXTS, INPUTS } from "../../../app.text"; //Тектовые ресурсы и константы
|
||||||
import { P8PDataGrid, P8PDATA_GRID_SIZE, P8PDATA_GRID_FILTER_SHAPE } from "../../components/p8p_data_grid"; //Таблица данных
|
import { P8PDataGrid, P8P_DATA_GRID_SIZE, P8P_DATA_GRID_FILTER_SHAPE } from "../../components/p8p_data_grid"; //Таблица данных
|
||||||
import { BackEndСtx } from "../../context/backend"; //Контекст взаимодействия с сервером
|
import { BackEndСtx } from "../../context/backend"; //Контекст взаимодействия с сервером
|
||||||
import { ApplicationСtx } from "../../context/application"; //Контекст приложения
|
import { ApplicationСtx } from "../../context/application"; //Контекст приложения
|
||||||
import { MessagingСtx } from "../../context/messaging"; //Контекст сообщений
|
import { MessagingСtx } from "../../context/messaging"; //Контекст сообщений
|
||||||
@ -165,7 +165,7 @@ const StageArts = ({ stage, filters }) => {
|
|||||||
columnsDef={stageArtsDataGrid.columnsDef}
|
columnsDef={stageArtsDataGrid.columnsDef}
|
||||||
filtersInitial={filters}
|
filtersInitial={filters}
|
||||||
rows={stageArtsDataGrid.rows}
|
rows={stageArtsDataGrid.rows}
|
||||||
size={P8PDATA_GRID_SIZE.SMALL}
|
size={P8P_DATA_GRID_SIZE.SMALL}
|
||||||
morePages={false}
|
morePages={false}
|
||||||
reloading={stageArtsDataGrid.reload}
|
reloading={stageArtsDataGrid.reload}
|
||||||
orderAscMenuItemCaption={BUTTONS.ORDER_ASC}
|
orderAscMenuItemCaption={BUTTONS.ORDER_ASC}
|
||||||
@ -191,7 +191,7 @@ const StageArts = ({ stage, filters }) => {
|
|||||||
//Контроль свойств - Калькуляция этапа проекта
|
//Контроль свойств - Калькуляция этапа проекта
|
||||||
StageArts.propTypes = {
|
StageArts.propTypes = {
|
||||||
stage: PropTypes.number.isRequired,
|
stage: PropTypes.number.isRequired,
|
||||||
filters: PropTypes.arrayOf(P8PDATA_GRID_FILTER_SHAPE)
|
filters: PropTypes.arrayOf(P8P_DATA_GRID_FILTER_SHAPE)
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------
|
//----------------
|
||||||
|
@ -12,7 +12,7 @@ import PropTypes from "prop-types"; //Контроль свойств компо
|
|||||||
import { Box, Stack, Grid, Paper, Table, TableBody, TableRow, TableCell, Typography, Button, Link } from "@mui/material"; //Интерфейсные компоненты
|
import { Box, Stack, Grid, Paper, Table, TableBody, TableRow, TableCell, Typography, Button, Link } from "@mui/material"; //Интерфейсные компоненты
|
||||||
import { hasValue, formatDateRF, formatNumberRFCurrency, object2Base64XML } from "../../core/utils"; //Вспомогательные процедуры и функции
|
import { hasValue, formatDateRF, formatNumberRFCurrency, object2Base64XML } from "../../core/utils"; //Вспомогательные процедуры и функции
|
||||||
import { BUTTONS, TEXTS, INPUTS } from "../../../app.text"; //Тектовые ресурсы и константы
|
import { BUTTONS, TEXTS, INPUTS } from "../../../app.text"; //Тектовые ресурсы и константы
|
||||||
import { P8PDataGrid, P8PDATA_GRID_SIZE, P8PDATA_GRID_FILTER_SHAPE } from "../../components/p8p_data_grid"; //Таблица данных
|
import { P8PDataGrid, P8P_DATA_GRID_SIZE, P8P_DATA_GRID_FILTER_SHAPE } from "../../components/p8p_data_grid"; //Таблица данных
|
||||||
import { BackEndСtx } from "../../context/backend"; //Контекст взаимодействия с сервером
|
import { BackEndСtx } from "../../context/backend"; //Контекст взаимодействия с сервером
|
||||||
import { ApplicationСtx } from "../../context/application"; //Контекст приложения
|
import { ApplicationСtx } from "../../context/application"; //Контекст приложения
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ const StageContracts = ({ stage, filters }) => {
|
|||||||
columnsDef={stageContractsDataGrid.columnsDef}
|
columnsDef={stageContractsDataGrid.columnsDef}
|
||||||
filtersInitial={filters}
|
filtersInitial={filters}
|
||||||
rows={stageContractsDataGrid.rows}
|
rows={stageContractsDataGrid.rows}
|
||||||
size={P8PDATA_GRID_SIZE.SMALL}
|
size={P8P_DATA_GRID_SIZE.SMALL}
|
||||||
morePages={stageContractsDataGrid.morePages}
|
morePages={stageContractsDataGrid.morePages}
|
||||||
reloading={stageContractsDataGrid.reload}
|
reloading={stageContractsDataGrid.reload}
|
||||||
expandable={true}
|
expandable={true}
|
||||||
@ -246,7 +246,7 @@ const StageContracts = ({ stage, filters }) => {
|
|||||||
//Контроль свойств - Договоры с соисполнителями этапа проекта
|
//Контроль свойств - Договоры с соисполнителями этапа проекта
|
||||||
StageContracts.propTypes = {
|
StageContracts.propTypes = {
|
||||||
stage: PropTypes.number.isRequired,
|
stage: PropTypes.number.isRequired,
|
||||||
filters: PropTypes.arrayOf(P8PDATA_GRID_FILTER_SHAPE)
|
filters: PropTypes.arrayOf(P8P_DATA_GRID_FILTER_SHAPE)
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------
|
//----------------
|
||||||
|
@ -12,7 +12,7 @@ import PropTypes from "prop-types"; //Контроль свойств компо
|
|||||||
import { Box, Icon, Stack, Grid, Paper, Table, TableBody, TableRow, TableCell, Typography, Button, IconButton, Link } from "@mui/material"; //Интерфейсные компоненты
|
import { Box, Icon, Stack, Grid, Paper, Table, TableBody, TableRow, TableCell, Typography, Button, IconButton, Link } from "@mui/material"; //Интерфейсные компоненты
|
||||||
import { hasValue, formatDateRF, formatNumberRFCurrency, object2Base64XML } from "../../core/utils"; //Вспомогательные процедуры и функции
|
import { hasValue, formatDateRF, formatNumberRFCurrency, object2Base64XML } from "../../core/utils"; //Вспомогательные процедуры и функции
|
||||||
import { BUTTONS, TEXTS, INPUTS } from "../../../app.text"; //Тектовые ресурсы и константы
|
import { BUTTONS, TEXTS, INPUTS } from "../../../app.text"; //Тектовые ресурсы и константы
|
||||||
import { P8PDataGrid, P8PDATA_GRID_SIZE, P8PDATA_GRID_FILTER_SHAPE } from "../../components/p8p_data_grid"; //Таблица данных
|
import { P8PDataGrid, P8P_DATA_GRID_SIZE, P8P_DATA_GRID_FILTER_SHAPE } from "../../components/p8p_data_grid"; //Таблица данных
|
||||||
import { P8PFullScreenDialog } from "../../components/p8p_fullscreen_dialog"; //Полноэкранный диалог
|
import { P8PFullScreenDialog } from "../../components/p8p_fullscreen_dialog"; //Полноэкранный диалог
|
||||||
import { StageArts } from "./stage_arts"; //Калькуляция этапа проекта
|
import { StageArts } from "./stage_arts"; //Калькуляция этапа проекта
|
||||||
import { StageContracts } from "./stage_contracts"; //Договоры с соисполнителями этапа проекта
|
import { StageContracts } from "./stage_contracts"; //Договоры с соисполнителями этапа проекта
|
||||||
@ -348,7 +348,7 @@ const Stages = ({ project, projectName, filters }) => {
|
|||||||
columnsDef={stagesDataGrid.columnsDef}
|
columnsDef={stagesDataGrid.columnsDef}
|
||||||
filtersInitial={filters}
|
filtersInitial={filters}
|
||||||
rows={stagesDataGrid.rows}
|
rows={stagesDataGrid.rows}
|
||||||
size={P8PDATA_GRID_SIZE.SMALL}
|
size={P8P_DATA_GRID_SIZE.SMALL}
|
||||||
morePages={stagesDataGrid.morePages}
|
morePages={stagesDataGrid.morePages}
|
||||||
reloading={stagesDataGrid.reload}
|
reloading={stagesDataGrid.reload}
|
||||||
expandable={true}
|
expandable={true}
|
||||||
@ -398,7 +398,7 @@ const Stages = ({ project, projectName, filters }) => {
|
|||||||
Stages.propTypes = {
|
Stages.propTypes = {
|
||||||
project: PropTypes.number.isRequired,
|
project: PropTypes.number.isRequired,
|
||||||
projectName: PropTypes.string.isRequired,
|
projectName: PropTypes.string.isRequired,
|
||||||
filters: PropTypes.arrayOf(P8PDATA_GRID_FILTER_SHAPE)
|
filters: PropTypes.arrayOf(P8P_DATA_GRID_FILTER_SHAPE)
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------
|
//----------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user