@@ -1,34 +1,36 @@ -"use client"; +'use client' -import { initializeFaro, getWebInstrumentations, faro } from '@grafana/faro-web-sdk'; -import { TracingInstrumentation } from '@grafana/faro-web-tracing'; +import { initializeFaro, getWebInstrumentations, faro } from '@grafana/faro-web-sdk' +import { TracingInstrumentation } from '@grafana/faro-web-tracing' export default function FrontendObservability(): null { - if (faro.api) { - return null; - } + if (faro.api) { + return null + } - try { - initializeFaro({ - url: process.env.NEXT_PUBLIC_FARO_API_URL, - apiKey: process.env.NEXT_PUBLIC_FARO_API_KEY, - app: { - name: process.env.NEXT_PUBLIC_FARO_APP_NAME, - version: process.env.NEXT_PUBLIC_RELEASE, - environment: process.env.NEXT_PUBLIC_ENVIRONMENT, - }, - instrumentations: [ - ...getWebInstrumentations({captureConsole: true, enablePerformanceInstrumentation: false, enableContentSecurityPolicyInstrumentation: false}), - new TracingInstrumentation(), - ], - }); + try { + initializeFaro({ + url: process.env.NEXT_PUBLIC_FARO_API_URL, + apiKey: process.env.NEXT_PUBLIC_FARO_API_KEY, + app: { + name: process.env.NEXT_PUBLIC_FARO_APP_NAME, + version: process.env.NEXT_PUBLIC_RELEASE, + environment: process.env.NEXT_PUBLIC_ENVIRONMENT, + }, + instrumentations: [ + ...getWebInstrumentations({ + captureConsole: true, + enablePerformanceInstrumentation: false, + enableContentSecurityPolicyInstrumentation: false, + }), + new TracingInstrumentation(), + ], + }) - console.log('Faro Initialized'); - - } catch (error) { - console.error('Faro not initialized:', error); - } - finally { - return null - } + console.log('Faro Initialized') + } catch (error) { + console.error('Faro not initialized:', error) + } finally { + return null + } } @@ -27,9 +27,7 @@ import { getIpList } from '../../api/get-ipList' export const BusinessGroups = ({ company_uid }: { company_uid?: string }) => { const [businessGroups, setBusinessGroups] = useState() - const [searchGroup, setSearchGroup] = useState( - businessGroups ? businessGroups : [] - ) + const [searchGroup, setSearchGroup] = useState(businessGroups ? businessGroups : []) const [businessAddModal, setBusinessAddModal] = useState(false) const [showPersons, setShowPersons] = useState(true) const [search, setSearch] = useState('') @@ -48,7 +46,7 @@ export const BusinessGroups = ({ company_uid }: { company_uid?: string }) => { } if (search) { - return businessGroups.filter((el) => el.title.includes(search)) + return businessGroups.filter((el) => el.title.toLowerCase().includes(search.toLowerCase())) } return businessGroups }) @@ -98,11 +96,7 @@ export const BusinessGroups = ({ company_uid }: { company_uid?: string }) => { Бизнес-группы - setShowPersons((prev) => !prev)} - className={styles.arrow} - /> + setShowPersons((prev) => !prev)} className={styles.arrow} /> { @@ -144,13 +138,8 @@ export const BusinessGroups = ({ company_uid }: { company_uid?: string }) => { {group.title} - - {group.token_limit - ? group.token_limit.split('.')[0] - : 'Не указано'} + + {group.token_limit ? group.token_limit.split('.')[0] : 'Не указано'} el.email.includes(search)) + return persons?.filter((el) => el.email.toLowerCase().includes(search.toLowerCase())) } return persons }) @@ -108,7 +108,7 @@ export const SecurityList = ({ return null } if (search) { - return persons?.filter((el) => el.email.includes(search)) + return persons?.filter((el) => el.email.toLowerCase().includes(search.toLowerCase())) } return persons })