Skip to content

Commit 42c05ad

Browse files
authored
Merge pull request #70 from Lemoncode/feature/#62-crear-layout-contrato-abierto-temporalidad
Created open contract layout temporality
2 parents 907ebdd + 17bd46b commit 42c05ad

File tree

2 files changed

+124
-2
lines changed

2 files changed

+124
-2
lines changed

src/modules/expedientes/crear/components/steps/steps.styles.ts

+29
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,33 @@ import { css } from '@emotion/css';
22

33
export const form = css`
44
width: 100%;
5+
.MuiOutlinedInput-root {
6+
padding: 0;
7+
}
8+
`;
9+
10+
export const headerFormGrid = css`
11+
@media (min-width: 768px) {
12+
display: grid;
13+
grid-template-columns: repeat(2, 1fr) 1rem 1fr;
14+
place-items: center;
15+
gap: 16px;
16+
}
17+
`;
18+
19+
export const footerFormGrid = css`
20+
@media (min-width: 768px) {
21+
display: grid;
22+
grid-template-columns: repeat(4, 1fr);
23+
place-items: center;
24+
gap: 16px;
25+
& > div:last-child {
26+
grid-column: 1 / 3;
27+
}
28+
}
29+
`;
30+
31+
export const selectForm = css`
32+
width: 10rem;
33+
margin: 0;
534
`;

src/modules/expedientes/crear/components/steps/temporalidad-step.component.tsx

+95-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react';
22
import { Form, Formik } from 'formik';
3-
import { TextFieldForm } from '#common/components';
43
import { useCreateExpedienteContext, Temporalidad } from '#modules/expedientes/core/providers';
54
import { StepNavigation } from '../step-navigation.component';
65
import { temporalidadValidations } from '../validations';
6+
import { SelectForm, TextFieldForm } from '#common/components/index.ts';
7+
import { Typography } from '@mui/material';
78
import * as classes from './steps.styles';
89

910
export const TemporalityStep: React.FC = () => {
@@ -22,7 +23,99 @@ export const TemporalityStep: React.FC = () => {
2223
>
2324
{() => (
2425
<Form className={classes.form}>
25-
<TextFieldForm name="description" label="Descripcion" />
26+
<div className={classes.headerFormGrid}>
27+
<TextFieldForm
28+
name="periodo-de-ejecucion"
29+
label="Periodo de ejecución"
30+
type="text"
31+
slotProps={{
32+
inputLabel: {
33+
shrink: true,
34+
},
35+
input: {
36+
endAdornment: (
37+
<SelectForm
38+
name="unidad"
39+
label="Meses"
40+
options={[
41+
{ id: '1', nombre: 'Días' },
42+
{ id: '2', nombre: 'Meses' },
43+
{ id: '3', nombre: 'Años' },
44+
]}
45+
className={classes.selectForm}
46+
/>
47+
),
48+
},
49+
}}
50+
/>
51+
<TextFieldForm
52+
name="date"
53+
label="Fecha de inicio"
54+
type="date"
55+
required
56+
slotProps={{
57+
inputLabel: {
58+
shrink: true,
59+
},
60+
}}
61+
/>
62+
<span>-</span>
63+
<TextFieldForm
64+
name="date3"
65+
label="Fecha fin"
66+
type="date"
67+
required
68+
slotProps={{
69+
inputLabel: {
70+
shrink: true,
71+
},
72+
}}
73+
/>
74+
<SelectForm
75+
label="Prorogable"
76+
name="prorogable"
77+
options={[
78+
{ id: '1', nombre: 'Si' },
79+
{ id: '2', nombre: 'No' },
80+
]}
81+
required
82+
/>
83+
84+
<TextFieldForm
85+
name="duracion-maxima-prorroga"
86+
label="Duración máxima prórroga"
87+
type="text"
88+
slotProps={{
89+
inputLabel: {
90+
shrink: true,
91+
},
92+
input: {
93+
endAdornment: (
94+
<SelectForm
95+
name="unidad"
96+
label="Meses"
97+
options={[
98+
{ id: '1', nombre: 'Días' },
99+
{ id: '2', nombre: 'Meses' },
100+
{ id: '3', nombre: 'Años' },
101+
]}
102+
className={classes.selectForm}
103+
/>
104+
),
105+
},
106+
}}
107+
/>
108+
</div>
109+
<Typography variant="h6" fontWeight={600} marginTop={2} marginBottom={2}>
110+
ADJUDICACIÓN
111+
</Typography>
112+
<div className={classes.footerFormGrid}>
113+
<TextFieldForm type="number" name="importeSinIva" label="Importe Sin IVA" required />
114+
<TextFieldForm type="number" name="tipoIva" label="Tipo de IVA" required />
115+
<TextFieldForm type="number" name="importeIva" label="Importe IVA" required />
116+
<TextFieldForm type="number" name="importeConIva" label="Importe con IVA" required />
117+
<TextFieldForm type="number" name="numero" label="Num.Sorolla2" />
118+
</div>
26119
<StepNavigation />
27120
</Form>
28121
)}

0 commit comments

Comments
 (0)