Заявка на услуги #18

Merged
gorbenko.pavel merged 15 commits from service-request into main 2026-09-01 12:48:41 +00:00
2 changed files with 56 additions and 60 deletions
Showing only changes of commit a3d3983d78 - Show all commits
@@ -1,20 +1,18 @@
import * as React from 'react';
import { CollapseSection, FormGrid, FormField, TextArea } from '../../../shared/ui';
import { CollapseSection, FormField, TextArea } from '../../../shared/ui';
import { ISectionProps } from '../model';
/** Общие замечания — отдельный блок бумажной формы, не относится к объёму работ. */
export const RemarksSection: React.FC<ISectionProps> = ({ data, set }) => (
<CollapseSection title="Общие замечания" icon="info">
<FormGrid>
<FormField label="Общие замечания" htmlFor="GeneralRemarks" full>
<TextArea
id="GeneralRemarks"
value={data.GeneralRemarks}
onChange={(v) => set('GeneralRemarks', v)}
rows={4}
placeholder="Особые условия, ссылки на нормативы, порядок приёмки скрытых работ…"
/>
</FormField>
</FormGrid>
<FormField label="Общие замечания" htmlFor="GeneralRemarks" full>
<TextArea
id="GeneralRemarks"
value={data.GeneralRemarks}
onChange={(v) => set('GeneralRemarks', v)}
rows={4}
placeholder="Особые условия, ссылки на нормативы, порядок приёмки скрытых работ…"
/>
</FormField>
</CollapseSection>
);
@@ -1,6 +1,6 @@
import * as React from 'react';
import styles from './ScopeSection.module.scss';
import { CollapseSection, FormGrid, FormField, TextInput, TextArea } from '../../../shared/ui';
import { CollapseSection, FormField, TextInput, TextArea } from '../../../shared/ui';
import { CostGroupsEditor } from './CostGroupsEditor';
import { ISectionProps } from '../model';
@@ -24,57 +24,55 @@ export const ScopeSection: React.FC<ISectionProps> = ({ data, set }) => {
return (
<CollapseSection title="Описание требований" icon="helmet">
<FormGrid>
<FormField label="Объём работ" htmlFor="ScopeOfWork" required full>
<TextArea
id="ScopeOfWork"
value={data.ScopeOfWork}
onChange={(v) => set('ScopeOfWork', v)}
rows={12}
placeholder="Состав и объёмы работ, ссылки на рабочую документацию, требования к исполнительной документации…"
/>
</FormField>
<FormField label="Объём работ" htmlFor="ScopeOfWork" required full>
<TextArea
id="ScopeOfWork"
value={data.ScopeOfWork}
onChange={(v) => set('ScopeOfWork', v)}
rows={12}
placeholder="Состав и объёмы работ, ссылки на рабочую документацию, требования к исполнительной документации…"
/>
</FormField>
<div className={styles.volumesBlock}>
<span className={styles.volumesLabel}>Итого объёмы работ</span>
<CostGroupsEditor
groups={data.WorkVolumes}
onChange={(groups) => set('WorkVolumes', groups)}
totalLabel="Итого"
emptyReadOnlyText="Объёмы работ не заполнены"
/>
</div>
<div className={styles.volumesBlock}>
<span className={styles.volumesLabel}>Итого объёмы работ</span>
<CostGroupsEditor
groups={data.WorkVolumes}
onChange={(groups) => set('WorkVolumes', groups)}
totalLabel="Итого"
emptyReadOnlyText="Объёмы работ не заполнены"
/>
</div>
<FormField label="Предлагаемые поставщики" htmlFor="SuggestedSuppliers" full>
<TextArea
id="SuggestedSuppliers"
value={data.SuggestedSuppliers}
onChange={(v) => set('SuggestedSuppliers', v)}
rows={3}
placeholder="Требования к подрядчику и/или конкретные организации из утверждённого перечня"
/>
</FormField>
<FormField label="Предлагаемые поставщики" htmlFor="SuggestedSuppliers" full>
<TextArea
id="SuggestedSuppliers"
value={data.SuggestedSuppliers}
onChange={(v) => set('SuggestedSuppliers', v)}
rows={3}
placeholder="Требования к подрядчику и/или конкретные организации из утверждённого перечня"
/>
</FormField>
<FormField label="Предполагаемая дата начала" htmlFor="EstimatedStartDate">
<TextInput
id="EstimatedStartDate"
type="date"
value={data.EstimatedStartDate}
onChange={(v) => set('EstimatedStartDate', v)}
/>
</FormField>
<FormField label="Предполагаемая дата окончания" htmlFor="EstimatedFinishDate">
<TextInput
id="EstimatedFinishDate"
type="date"
value={data.EstimatedFinishDate}
onChange={(v) => set('EstimatedFinishDate', v)}
min={data.EstimatedStartDate || undefined}
/>
</FormField>
<FormField label="Предполагаемая дата начала" htmlFor="EstimatedStartDate">
<TextInput
id="EstimatedStartDate"
type="date"
value={data.EstimatedStartDate}
onChange={(v) => set('EstimatedStartDate', v)}
/>
</FormField>
<FormField label="Предполагаемая дата окончания" htmlFor="EstimatedFinishDate">
<TextInput
id="EstimatedFinishDate"
type="date"
value={data.EstimatedFinishDate}
onChange={(v) => set('EstimatedFinishDate', v)}
min={data.EstimatedStartDate || undefined}
/>
</FormField>
{days !== undefined && <div className={styles.duration}>Продолжительность: {days} кал. дн.</div>}
</FormGrid>
{days !== undefined && <div className={styles.duration}>Продолжительность: {days} кал. дн.</div>}
</CollapseSection>
);
};