fix: changed resolve endpoint contract form get to post
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user