WEB APP: Панель "Мониторинг сборки изделий" - постраничная выдача в таблицах детализации карточки

This commit is contained in:
Mikhail Chechnev 2024-05-24 19:39:24 +03:00
parent c28c648eb8
commit b686ae7513
2 changed files with 6 additions and 6 deletions

View File

@ -69,7 +69,7 @@ const STYLES = {
width: "280px",
borderBottom: "1px solid"
},
TABLE_DETAILS: { height: "260px" },
TABLE_DETAILS: { height: "230px" },
TABLE_DETAILS_HEADER_CELL: maxWidth => ({
padding: "2px 2px",
fontSize: "11px",
@ -78,6 +78,7 @@ const STYLES = {
...(maxWidth ? { maxWidth } : {})
}),
TABLE_DETAILS_DATA_CELL: textAlign => ({ padding: "2px 2px", fontSize: "11px", ...(textAlign ? { textAlign } : {}) }),
TABLE_DETAILS_MORE_BUTTON: { borderRadius: "25px" },
CARD_DETAILS_CONTAINER: { minWidth: "1200px", maxWidth: "1400px" },
CARD_DETAILS_NAVIGATION_STACK: { width: "100%" }
};
@ -193,20 +194,19 @@ const ProductDetailsTable = ({ plan, product, stored, noProductMessage, noDataFo
<Box sx={STYLES.BOX_INFO_SUB(!product || data.rows.length === 0)}>
{!product ? (
<Typography variant="UDO_body2">{noProductMessage}</Typography>
) : isLoading ? null : data.rows.length === 0 ? (
<Typography variant="subtitle2">{noDataFoundMessage}</Typography>
) : (
<>
<Typography variant="h4">
<b>{title}</b>
</Typography>
<P8PDataGrid
{...P8P_DATA_GRID_CONFIG_PROPS}
{...{ ...P8P_DATA_GRID_CONFIG_PROPS, noDataFoundText: isLoading ? "" : noDataFoundMessage }}
containerComponentProps={{ sx: STYLES.TABLE_DETAILS, elevation: 0 }}
columnsDef={data.columnsDef}
rows={data.rows}
size={P8P_DATA_GRID_SIZE.SMALL}
morePages={data.morePages}
morePagesBtnProps={{ sx: STYLES.TABLE_DETAILS_MORE_BUTTON }}
fixedHeader={true}
reloading={false}
dataCellRender={dataCellRender}

View File

@ -16,7 +16,7 @@ import { object2Base64XML } from "../../core/utils"; //Вспомогатель
//---------
//Размер страницы данных
const DATA_GRID_PAGE_SIZE = 0;
const DATA_GRID_PAGE_SIZE = 50;
//-----------
//Тело модуля
@ -194,7 +194,7 @@ const useProductDetailsTable = (plan, product, orders, pageNumber, stored) => {
CORDERS: { VALUE: object2Base64XML(orders, { arrayNodeName: "orders" }), SDATA_TYPE: SERV_DATA_TYPE_CLOB },
NPAGE_NUMBER: pageNumber,
NPAGE_SIZE: DATA_GRID_PAGE_SIZE,
NINCLUDE_DEF: 1
NINCLUDE_DEF: pageNumber == 1 ? 1 : 0
},
respArg: "COUT"
});