-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Холина Дарья Анатольевна
committed
Nov 12, 2024
1 parent
651376d
commit c7a0e87
Showing
14 changed files
with
256 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* eslint-disable max-len,react/jsx-props-no-spreading, no-tabs */ | ||
import React from 'react'; | ||
import Icon from '@ant-design/icons'; | ||
|
||
function GateSvg() { | ||
return ( | ||
<svg | ||
viewBox="0 0 512.001 512.001" | ||
// stroke="currentColor" | ||
fill="currentColor" | ||
width="1em" | ||
height="1em" | ||
// strokeLinecap="round" | ||
// strokeLinejoin="round" | ||
// strokeWidth="2" | ||
> | ||
<g transform="translate(0 -1)"> | ||
<g> | ||
<g> | ||
<polygon points="259.534,137.534 208.334,188.734 252.468,188.734 303.668,137.534 " /> | ||
<polygon points="327.8,137.534 276.6,188.734 320.735,188.734 371.935,137.534 " /> | ||
<path d="M144.845,137.534c-6.153-8.132-15.027-14.097-25.378-16.205v-10.317c0-13.611-11.068-24.678-24.678-24.678H41.745 | ||
c-13.611,0-24.678,11.068-24.678,24.678v265.566C7.569,377.175,0,385.018,0,394.66v14.814c0,10.027,8.158,18.193,18.193,18.193 | ||
H118.34c10.035,0,18.193-8.166,18.193-18.193V394.66c0-9.643-7.569-17.485-17.067-18.082V204.939 | ||
c10.351-2.108,19.226-8.073,25.378-16.205h39.356l51.2-51.2H144.845z M119.467,409.474c0,0.623-0.512,1.126-1.126,1.126H18.193 | ||
c-0.614,0-1.126-0.503-1.126-1.126V394.66c0-0.623,0.512-1.126,1.126-1.126H118.34c0.614,0,1.126,0.504,1.126,1.126V409.474z | ||
M110.933,188.734c-14.114,0-25.6-11.486-25.6-25.6s11.486-25.6,25.6-25.6s25.6,11.486,25.6,25.6 | ||
S125.047,188.734,110.933,188.734z" | ||
/> | ||
<polygon points="396.067,137.534 344.867,188.734 389.001,188.734 440.201,137.534 " /> | ||
<path d="M495.625,137.534h-31.292l-51.2,51.2h82.492c9.028,0,16.375-7.347,16.375-16.375v-18.449 | ||
C512.001,144.881,504.654,137.534,495.625,137.534z" | ||
/> | ||
</g> | ||
</g> | ||
</g> | ||
</svg> | ||
); | ||
} | ||
|
||
export function GateIcon(props: any) { | ||
return <Icon component={GateSvg} {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* eslint-disable max-len,react/jsx-props-no-spreading */ | ||
import React from 'react'; | ||
import Icon from '@ant-design/icons'; | ||
|
||
function HouseSvg() { | ||
return ( | ||
<svg viewBox="0 0 576 512" fill="currentColor"> | ||
<path | ||
d="M575.8 255.5C575.8 273.5 560.8 287.6 543.8 287.6H511.8L512.5 447.7C512.5 450.5 512.3 453.1 512 455.8V472C512 494.1 494.1 512 472 512H456C454.9 512 453.8 511.1 452.7 511.9C451.3 511.1 449.9 512 448.5 512H392C369.9 512 352 494.1 352 472V384C352 366.3 337.7 352 320 352H256C238.3 352 224 366.3 224 384V472C224 494.1 206.1 512 184 512H128.1C126.6 512 125.1 511.9 123.6 511.8C122.4 511.9 121.2 512 120 512H104C81.91 512 64 494.1 64 472V360C64 359.1 64.03 358.1 64.09 357.2V287.6H32.05C14.02 287.6 0 273.5 0 255.5C0 246.5 3.004 238.5 10.01 231.5L266.4 8.016C273.4 1.002 281.4 0 288.4 0C295.4 0 303.4 2.004 309.5 7.014L564.8 231.5C572.8 238.5 576.9 246.5 575.8 255.5L575.8 255.5z" | ||
/> | ||
</svg> | ||
); | ||
} | ||
|
||
export function HouseIcon(props: any) { | ||
return <Icon component={HouseSvg} {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,42 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import React, { useMemo } from 'react'; | ||
import { useSelector } from 'react-redux'; | ||
import { Spin, Typography } from 'antd'; | ||
import { LoadingOutlined } from '@ant-design/icons'; | ||
import { ParkingFilledIcon } from 'icons/parking_filled'; | ||
import { TreeFilledIcon } from 'icons/tree-filled'; | ||
import { getAccesses } from 'store/accesses/selectors'; | ||
import { AccessItem } from './access-item'; | ||
import './styles.scss'; | ||
|
||
export function GrantedAccesses() { | ||
const { data: accesses, isLoading } = useSelector(getAccesses); | ||
const { | ||
data: accesses, | ||
isLoading | ||
} = useSelector(getAccesses); | ||
|
||
const hasTwoIconsItem = useMemo(() => accesses.some((access) => (access.areas || []).length > 1), [accesses.length]); | ||
return ( | ||
<div className="view granted-accesses"> | ||
{/* <Typography.Title level={5}>Доступы</Typography.Title> */} | ||
<Typography.Title level={5}>Ваши доступы</Typography.Title> | ||
{isLoading && <Spin indicator={<LoadingOutlined spin />} size="small" />} | ||
<div className="access-list"> | ||
<div className={`access-list ${hasTwoIconsItem ? '' : 'single-area'}`}> | ||
{ | ||
accesses.length ? accesses.map((access) => <AccessItem key={access.accessId} access={access} />) | ||
: (isLoading ? '' : 'нет доступов') | ||
} | ||
</div> | ||
<div className="area-icons-placeholder"> | ||
{/* todo брать арии из справочника */} | ||
* | ||
<div className="area parking"> | ||
<ParkingFilledIcon /> | ||
<span className="icon-label"> - Паркинг</span> | ||
</div> | ||
<div className="area home"> | ||
<TreeFilledIcon /> | ||
<span className="icon-label"> - Дворовая территория</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,44 @@ | ||
.view.granted-accesses { | ||
display: flex; | ||
flex-flow: column; | ||
|
||
|
||
padding: 0.5em 0 0.5em 0 !important; | ||
|
||
|
||
h5 { | ||
margin-bottom: 1em; | ||
} | ||
|
||
> .access-list { | ||
padding-left: 0.5em; | ||
padding-right: 0.5em; | ||
text-align: start; | ||
flex: 1 0 auto; | ||
max-height: calc(100% - 32px - 40px); | ||
overflow-y: auto; | ||
|
||
&.single-area { | ||
.access-item-areas { | ||
width: 26px; | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
.area-icons-placeholder { | ||
height: 32px; | ||
display: flex; | ||
background: rgba(230, 244, 255, 0.5); | ||
padding: 2px 8px; | ||
align-items: center; | ||
justify-content: flex-start; | ||
gap: 1em; | ||
|
||
.anticon.anticon-info { | ||
font-size: 14px; | ||
color: rgba(150, 150, 150, .9); | ||
} | ||
} | ||
} |
Oops, something went wrong.