fix: changed resolve endpoint contract form get to post

This commit is contained in:
Тимур Городецкий
2026-08-03 14:37:42 +05:00
parent 788e046ebe
commit e6203e7093
22 changed files with 512 additions and 22 deletions
@@ -0,0 +1,14 @@
@import '../../../../styles/design-tokens';
.content {
width: 100%;
max-width: 1080px;
margin: 0 auto;
}
.state {
padding: $sp-8;
color: $gray-500;
font-size: $fs-sm;
text-align: center;
}
@@ -0,0 +1,32 @@
import * as React from 'react';
import type { WebPartContext } from '@microsoft/sp-webpart-base';
import styles from './ApproveFeature.module.scss';
import { getViewComponent } from '../../forms/viewRegistry';
export interface IApproveFeatureProps {
context: WebPartContext;
/** Ключ формы (тип заявки) из URL. */
formKey: string;
/** RowID заявки из URL. */
itemId: number;
}
// Фича «Согласование»: открывается по ссылке из потока (mode=approve&type=&id=).
// Показывает заявку в режиме чтения; панель решения добавим следующим шагом.
const ApproveFeature: React.FC<IApproveFeatureProps> = ({ context, formKey, itemId }) => {
const ViewComponent = getViewComponent(formKey);
return (
<div className={styles.content}>
{ViewComponent ? (
<React.Suspense fallback={<div className={styles.state}>Загрузка…</div>}>
<ViewComponent context={context} itemId={itemId} />
</React.Suspense>
) : (
<div className={styles.state}>Для формы «{formKey}» режим согласования пока не настроен.</div>
)}
</div>
);
};
export default ApproveFeature;