feat: request portal — bespoke forms + approval mechanism
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { ICategory } from '../models/types';
|
||||
|
||||
/**
|
||||
* Категории портала (верхний ряд вкладок).
|
||||
* Пока захардкожены; позже источником станет SharePoint.
|
||||
*/
|
||||
export const CATEGORIES: ICategory[] = [
|
||||
{ id: 'recruiting', title: 'Отдел рекрутинга', icon: 'people' },
|
||||
{ id: 'it', title: 'IT', icon: 'monitor' },
|
||||
{ id: 'accounting', title: 'Бухгалтерия', icon: 'calculator' },
|
||||
{ id: 'hr', title: 'Отдел кадров', icon: 'clipboard' }
|
||||
];
|
||||
|
||||
/** Категория, активная при открытии портала. */
|
||||
export const DEFAULT_CATEGORY_ID: string = CATEGORIES[0].id;
|
||||
@@ -0,0 +1,31 @@
|
||||
import { IRequestType } from '../models/types';
|
||||
|
||||
/**
|
||||
* Типы заявок (плитки) по категориям. Первая партия.
|
||||
* Пока захардкожены; сами формы появятся позже (см. forms/registry).
|
||||
* id — латиницей, т.к. позже станет ключом в реестре форм.
|
||||
*/
|
||||
export const REQUEST_TYPES: IRequestType[] = [
|
||||
// Отдел рекрутинга
|
||||
{ id: 'recruiting-selection', categoryId: 'recruiting', title: 'Заявка на подбор', icon: 'search' },
|
||||
{ id: 'recruiting-hire', categoryId: 'recruiting', title: 'Заявка на прием', icon: 'people' },
|
||||
|
||||
// IT
|
||||
{ id: 'it-workplace-setup', categoryId: 'it', title: 'Заявка на организацию рабочего места', icon: 'monitor' },
|
||||
|
||||
// Бухгалтерия
|
||||
{ id: 'accounting-advance', categoryId: 'accounting', title: 'Заявка на аванс', icon: 'calculator' },
|
||||
|
||||
// Отдел кадров
|
||||
{ id: 'hr-labor-leave', categoryId: 'hr', title: 'Заявка на трудовой отпуск', icon: 'calendar' },
|
||||
{ id: 'hr-day-off', categoryId: 'hr', title: 'на отгул', icon: 'calendar' },
|
||||
{ id: 'hr-dismissal', categoryId: 'hr', title: 'на увольнение', icon: 'document' },
|
||||
{ id: 'hr-clearance-sheet', categoryId: 'hr', title: 'обходной лист', icon: 'clipboard' },
|
||||
{ id: 'hr-bs', categoryId: 'hr', title: 'БС', icon: 'document' },
|
||||
{ id: 'hr-business-trip', categoryId: 'hr', title: 'на командировку', icon: 'send' }
|
||||
];
|
||||
|
||||
/** Заявки, относящиеся к указанной категории. */
|
||||
export function getRequestsByCategory(categoryId: string): IRequestType[] {
|
||||
return REQUEST_TYPES.filter((request) => request.categoryId === categoryId);
|
||||
}
|
||||
Reference in New Issue
Block a user