\r\n {applications.map((item, i) => {\r\n ///View data///\r\n const viewArr = item.view.slice();\r\n const viewLength = viewArr.length;\r\n const viewCountMore = viewLength - 2;\r\n const showViewItemsArr = viewArr.splice(0, 2);\r\n const hideViewItemsArr = item.view.slice(2);\r\n ///Create data///\r\n const createArr = item.create.slice();\r\n const createLength = createArr.length;\r\n const createCountMore = createLength - 2;\r\n const showCreateItemsArr = createArr.splice(0, 2);\r\n const hideCreateItemsArr = item.create.slice(2);\r\n ///Edit data///\r\n const editArr = item.edit.slice();\r\n const editLength = editArr.length;\r\n const editCountMore = editLength - 2;\r\n const showEditItemsArr = editArr.splice(0, 2);\r\n const hideEditItemsArr = item.edit.slice(2);\r\n ///Disable data///\r\n const disableArr = item.disable.slice();\r\n const disableLength = disableArr.length;\r\n const disableCountMore = disableLength - 2;\r\n const showDisableItemsArr = disableArr.splice(0, 2);\r\n const hideDisableItemsArr = item.disable.slice(2);\r\n\r\n const id = item.application;\r\n const application = applicationsData.filter((el) => el.id === id);\r\n const appName = application.length !== 0 ? application[0].name : '';\r\n return (\r\n
\r\n
\r\n Application: \r\n \r\n \r\n {appName}\r\n \r\n \r\n \r\n
\r\n
\r\n View: \r\n {viewLength <= 2 ? (\r\n \r\n {showViewItemsArr.map((item, i) => {\r\n return (\r\n \r\n \r\n {item}\r\n \r\n \r\n );\r\n })}\r\n \r\n ) : (\r\n \r\n {showViewItemsArr.map((item, i) => {\r\n return (\r\n \r\n \r\n {item}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n
\r\n {hideViewItemsArr.map((item, i) => (\r\n {item}\r\n ))}\r\n \r\n
{`+${viewCountMore}`}\r\n
\r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n
\r\n Create: \r\n {createLength <= 2 ? (\r\n \r\n {showCreateItemsArr.map((item, i) => {\r\n return (\r\n \r\n \r\n {item}\r\n \r\n \r\n );\r\n })}\r\n \r\n ) : (\r\n \r\n {showCreateItemsArr.map((item, i) => {\r\n return (\r\n \r\n \r\n {item}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n
\r\n {hideCreateItemsArr.map((item, i) => (\r\n {item}\r\n ))}\r\n \r\n
{`+${createCountMore}`}\r\n
\r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n
\r\n Edit: \r\n {editLength <= 2 ? (\r\n \r\n {showEditItemsArr.map((item, i) => {\r\n return (\r\n \r\n \r\n {item}\r\n \r\n \r\n );\r\n })}\r\n \r\n ) : (\r\n \r\n {showEditItemsArr.map((item, i) => {\r\n return (\r\n \r\n \r\n {item}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n
\r\n {hideEditItemsArr.map((item, i) => (\r\n {item}\r\n ))}\r\n \r\n
{`+${editCountMore}`}\r\n
\r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n
\r\n Disable: \r\n {disableLength <= 2 ? (\r\n \r\n {showDisableItemsArr.map((item, i) => {\r\n return (\r\n \r\n \r\n {item}\r\n \r\n \r\n );\r\n })}\r\n \r\n ) : (\r\n \r\n {showDisableItemsArr.map((item, i) => {\r\n return (\r\n \r\n \r\n {item}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n
\r\n {hideDisableItemsArr.map((item, i) => (\r\n {item}\r\n ))}\r\n \r\n
{`+${disableCountMore}`}\r\n
\r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n );\r\n })}\r\n
\r\n