feat: changed initial page layout
This commit is contained in:
@@ -6,3 +6,9 @@
|
||||
font-size: $fs-sm;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: $sp-4;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,9 @@ import * as React from 'react';
|
||||
import { useState, useEffect, useMemo } from 'react';
|
||||
import type { WebPartContext } from '@microsoft/sp-webpart-base';
|
||||
import styles from './RecruitingHireView.module.scss';
|
||||
import { Alert, FormCard, FormModeProvider, CollapseSection, FormField, AttachmentList } from '../../shared/ui';
|
||||
import { Alert, Button, FormCard, FormModeProvider, CollapseSection, FormField, AttachmentList, Icon } from '../../shared/ui';
|
||||
import { ApproverService, DecisionPanel, StatusBadge } from '../../shared/approval';
|
||||
import { navigate } from '../../shared/routing';
|
||||
import { getAttachments, IAttachmentInfo } from '../../shared/attachments/attachments.service';
|
||||
import { IFormData, EMPTY_DATA, SetField } from './model';
|
||||
import { loadHireRequest } from './load';
|
||||
@@ -18,6 +19,10 @@ interface IRecruitingHireViewProps {
|
||||
itemId: number;
|
||||
}
|
||||
|
||||
// Ключ формы «Организация рабочего места» в реестре (data/requests) — цель
|
||||
// производной заявки «на основе прием».
|
||||
const WORKPLACE_FORM_KEY = 'it-workplace-setup';
|
||||
|
||||
// В режиме чтения поля не редактируются, поэтому обновление — пустышка.
|
||||
const NOOP_SET: SetField = () => undefined;
|
||||
|
||||
@@ -76,6 +81,18 @@ const RecruitingHireView: React.FC<IRecruitingHireViewProps> = ({ context, itemI
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className={styles.toolbar}>
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
navigate({ mode: 'create', nav: 'new', formKey: WORKPLACE_FORM_KEY, sourceId: itemId })
|
||||
}
|
||||
>
|
||||
<Icon name="copy" size="sm" />
|
||||
Организация рабочего места на основе этой
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<FormCard
|
||||
title="Заявка на прием"
|
||||
subtitle={`№${itemId} · режим согласования`}
|
||||
|
||||
Reference in New Issue
Block a user