diff --git a/src/webparts/requestPortal/components/RequestGrid/RequestGrid.module.scss b/src/webparts/requestPortal/components/RequestGrid/RequestGrid.module.scss index e11202b..ac7dfee 100644 --- a/src/webparts/requestPortal/components/RequestGrid/RequestGrid.module.scss +++ b/src/webparts/requestPortal/components/RequestGrid/RequestGrid.module.scss @@ -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; diff --git a/src/webparts/requestPortal/components/RequestGrid/RequestGrid.tsx b/src/webparts/requestPortal/components/RequestGrid/RequestGrid.tsx index 612635d..bdac0e2 100644 --- a/src/webparts/requestPortal/components/RequestGrid/RequestGrid.tsx +++ b/src/webparts/requestPortal/components/RequestGrid/RequestGrid.tsx @@ -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 = ({ requests, onSelect }) ))} diff --git a/src/webparts/requestPortal/data/requests.ts b/src/webparts/requestPortal/data/requests.ts index 271cefe..adfdccb 100644 --- a/src/webparts/requestPortal/data/requests.ts +++ b/src/webparts/requestPortal/data/requests.ts @@ -17,14 +17,32 @@ export const REQUEST_TYPES: IRequestType[] = [ // Отдел кадров { id: 'hr-vacation', categoryId: 'hr', title: 'Заявка на трудовой отпуск', icon: 'calendar' }, { id: 'hr-unpaid-leave', categoryId: 'hr', title: 'Заявка на отпуск без содержания', icon: 'document' }, - { id: 'hr-dismissal', categoryId: 'hr', title: 'Заявление на увольнение', icon: 'document' }, - { id: 'clearance-form', categoryId: 'hr', title: 'Обходной лист', icon: 'clipboard' }, - { id: 'hr-transfer', categoryId: 'hr', title: 'Заявка на перемещение сотрудника', icon: 'people' }, + { id: 'hr-dismissal', categoryId: 'hr', title: 'Заявление на увольнение', icon: 'document', comingSoon: true }, + { id: 'clearance-form', categoryId: 'hr', title: 'Обходной лист', icon: 'clipboard', comingSoon: true }, + { + id: 'hr-transfer', + categoryId: 'hr', + title: 'Заявка на перемещение сотрудника', + icon: 'people', + comingSoon: true + }, // Склад / Снабжение - { id: 'wh-tmc-transfer', categoryId: 'warehouse', title: 'СЗ на перемещение ТМЦ', icon: 'send' }, - { id: 'wh-service-request', categoryId: 'warehouse', title: 'Заявка на услуги', icon: 'document' }, - { id: 'wh-concrete-request', categoryId: 'warehouse', title: 'Заявка на бетон', icon: 'vehicle' } + { id: 'wh-tmc-transfer', categoryId: 'warehouse', title: 'СЗ на перемещение ТМЦ', icon: 'send', comingSoon: true }, + { + id: 'wh-service-request', + categoryId: 'warehouse', + title: 'Заявка на услуги', + icon: 'document', + comingSoon: true + }, + { + id: 'wh-concrete-request', + categoryId: 'warehouse', + title: 'Заявка на бетон', + icon: 'vehicle', + comingSoon: true + } ]; /** Заявки, относящиеся к указанной категории. */ diff --git a/src/webparts/requestPortal/models/types.ts b/src/webparts/requestPortal/models/types.ts index 1744908..d155b7e 100644 --- a/src/webparts/requestPortal/models/types.ts +++ b/src/webparts/requestPortal/models/types.ts @@ -19,6 +19,8 @@ export interface IRequestType { /** Короткое пояснение под заголовком плитки. Необязательно. */ description?: string; icon: IconName; + /** Заявка ещё не готова к использованию: плитка видна, но заблокирована. */ + comingSoon?: boolean; } /**