Skip to content

Commit 02f6e91

Browse files
refactor(condo): DOMA-6883 remove old Alert component (#3722)
1 parent 44e714c commit 02f6e91

File tree

5 files changed

+6
-60
lines changed

5 files changed

+6
-60
lines changed

apps/condo/domains/common/components/Alert.tsx

Lines changed: 0 additions & 54 deletions
This file was deleted.

apps/condo/domains/common/utils/helpers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,14 @@ export const getAddressDetails = (property: ObjectWithAddressInfo) => {
6767
const regionNamePosition = regionWithType && regionWithType.split(' ')[0] === regionName ? 0 : 1
6868
const regionWithFullType = (regionType) ? (regionNamePosition === 0 ? `${regionName} ${regionType}` : `${regionType} ${regionName}`) : `${regionName}`
6969

70-
const cityWithType = get(addressMeta, 'city_with_type')
70+
const cityPart = get(addressMeta, 'city_with_type')
7171
const cityName = get(addressMeta, 'city')
7272

7373
const settlementPart = get(addressMeta, 'settlement_with_type')
7474

7575
const settlement = streetWithType ? streetWithType : settlementPart
7676
const streetPart = settlement && `${settlement}, ${houseNamePrefix}${houseName}${houseNameSuffix}`
7777
const regionPart = regionName && regionName !== cityName && regionWithFullType
78-
const cityPart = cityWithType && cityWithType
7978

8079
const areaWithType = get(addressMeta, 'area_with_type')
8180
const areaPart = areaWithType && areaWithType !== cityPart && areaWithType

apps/condo/domains/organization/components/EmployeeForm/UpdateEmployeeForm.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ import { useApolloClient } from '@open-condo/next/apollo'
1010
import { useAuth } from '@open-condo/next/auth'
1111
import { useIntl } from '@open-condo/next/intl'
1212
import { useOrganization } from '@open-condo/next/organization'
13-
import { ActionBar, Button } from '@open-condo/ui'
13+
import { ActionBar, Alert, Button } from '@open-condo/ui'
1414

15-
import { Alert } from '@condo/domains/common/components/Alert'
1615
import Input from '@condo/domains/common/components/antd/Input'
1716
import { FormWithAction } from '@condo/domains/common/components/containers/FormList'
1817
import LoadingOrErrorPage from '@condo/domains/common/components/containers/LoadingOrErrorPage'

apps/condo/domains/organization/hooks/useTableColumns.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ export const useTableColumns = (
5656
const renderSpecializations = useCallback((employee) => {
5757
const { SpecializationsMessage } = getEmployeeSpecializationsMessage(intl, employee, organizationEmployeeSpecializations)
5858

59+
if (!SpecializationsMessage) return null
60+
5961
return (
6062
<Typography.Paragraph key={employee.id} style={TEXT_STYLES}>
61-
{SpecializationsMessage && SpecializationsMessage}
63+
{SpecializationsMessage}
6264
</Typography.Paragraph>
6365
)
6466
}, [intl, organizationEmployeeSpecializations])

apps/condo/domains/scope/components/FormHintAlert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Typography } from 'antd'
22
import React, { CSSProperties, useMemo } from 'react'
33

44
import { useIntl } from '@open-condo/next/intl'
5+
import { Alert } from '@open-condo/ui'
56

6-
import { Alert } from '@condo/domains/common/components/Alert'
77
import { useTracking } from '@condo/domains/common/components/TrackingContext'
88

99
const ALERT_MESSAGE_STYLE: CSSProperties = { color: 'inherit', marginBottom: '4px' }

0 commit comments

Comments
 (0)