fix: заявки в разработке (склад/снабжение, часть кадров) отображаются заблокированными плитками
Tests / frontend-test (push) Successful in 1m11s
Tests / frontend-test (push) Successful in 1m11s
This commit is contained in:
@@ -46,6 +46,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tileDisabled {
|
||||
cursor: not-allowed;
|
||||
background: $gray-50;
|
||||
|
||||
&:hover {
|
||||
box-shadow: $sh-1;
|
||||
transform: none;
|
||||
border-color: $gray-200;
|
||||
}
|
||||
|
||||
&:hover::before {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.tileIcon {
|
||||
background: $gray-100;
|
||||
border-color: $gray-200;
|
||||
color: $gray-400;
|
||||
}
|
||||
|
||||
.tileTitle {
|
||||
color: $gray-400;
|
||||
}
|
||||
}
|
||||
|
||||
.tileIcon {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import styles from './RequestGrid.module.scss';
|
||||
import { Icon } from '@tnsu/ui-kit';
|
||||
import { Badge, Icon } from '@tnsu/ui-kit';
|
||||
import { IRequestType } from '../../models/types';
|
||||
|
||||
interface IRequestGridProps {
|
||||
@@ -19,7 +19,8 @@ export const RequestGrid: React.FC<IRequestGridProps> = ({ requests, onSelect })
|
||||
<button
|
||||
key={request.id}
|
||||
type="button"
|
||||
className={styles.tile}
|
||||
className={request.comingSoon ? `${styles.tile} ${styles.tileDisabled}` : styles.tile}
|
||||
disabled={request.comingSoon}
|
||||
onClick={() => onSelect(request)}
|
||||
>
|
||||
<span className={styles.tileIcon}>
|
||||
@@ -27,11 +28,19 @@ export const RequestGrid: React.FC<IRequestGridProps> = ({ requests, onSelect })
|
||||
</span>
|
||||
<span className={styles.tileBody}>
|
||||
<span className={styles.tileTitle}>{request.title}</span>
|
||||
{request.description && <span className={styles.tileDesc}>{request.description}</span>}
|
||||
</span>
|
||||
<span className={styles.tileArrow}>
|
||||
<Icon name="chevron-right" size="sm" />
|
||||
{request.comingSoon ? (
|
||||
<Badge variant="muted" size="sm">
|
||||
В разработке
|
||||
</Badge>
|
||||
) : (
|
||||
request.description && <span className={styles.tileDesc}>{request.description}</span>
|
||||
)}
|
||||
</span>
|
||||
{!request.comingSoon && (
|
||||
<span className={styles.tileArrow}>
|
||||
<Icon name="chevron-right" size="sm" />
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user