@indec/react-address-commons
Advanced tools
Comparing version 2.2.3 to 2.3.3
{ | ||
"name": "@indec/react-address-commons", | ||
"version": "2.2.3", | ||
"version": "2.3.3", | ||
"description": "Common react components for address apps", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -1,2 +0,2 @@ | ||
import React, {Component, Fragment} from 'react'; | ||
import React, {PureComponent, Fragment} from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -6,3 +6,5 @@ import {connect} from 'react-redux'; | ||
import {faUser} from '@fortawesome/free-solid-svg-icons'; | ||
import {concat, isEmpty, includes} from 'lodash'; | ||
import { | ||
concat, isEmpty, includes, some | ||
} from 'lodash'; | ||
import {LoadingIndicator, PageHeader, Pages} from '@indec/react-commons'; | ||
@@ -18,3 +20,3 @@ | ||
const getRoles = sessionRoles => { | ||
if (includes(sessionRoles, roles.COORDINATOR)) { | ||
if (some(sessionRoles, rol => includes([roles.COORDINATOR, roles.READ_ONLY_COORDINATOR], rol))) { | ||
return [ | ||
@@ -35,3 +37,3 @@ {_id: 'sc', name: 'Subcoordinador Provincial'}, | ||
class UsersList extends Component { | ||
class UsersList extends PureComponent { | ||
static propTypes = { | ||
@@ -38,0 +40,0 @@ requestUsers: PropTypes.func.isRequired, |
@@ -5,2 +5,3 @@ const roles = { | ||
COORDINATOR: 'co', | ||
READ_ONLY_COORDINATOR: 'roc', | ||
SUB_COORDINATOR: 'sc', | ||
@@ -18,3 +19,4 @@ SUPERVISOR: 'su', | ||
{_id: 'co', name: 'Coordinador Provincial'}, | ||
{_id: 'sc', name: 'Subcoordinador Provincial'} | ||
{_id: 'sc', name: 'Subcoordinador Provincial'}, | ||
{_id: 'roc', name: 'Coordinador Provincial (SL)'} | ||
]; | ||
@@ -21,0 +23,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
275657
4830