Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 14815 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 14815 Rev 14817
Línea 7... Línea 7...
7
const SalaryModal = ({
7
const SalaryModal = ({
8
	closeModal,
8
	closeModal,
9
	dataLink
9
	dataLink
10
}) => {
10
}) => {
Línea 11... Línea 11...
11
 
11
 
12
	const [currencyOptions, setCurrencyOptions] = useState([])
12
	const [currencyOptions, setCurrencyOptions] = useState([{ label: 'Pesos mexicanos', value: 'MXN' }])
13
	const [isActive, setIsActive] = useState(false)
13
	const [isActive, setIsActive] = useState(false)
14
	const [currency, setCurrency] = useState(currencyOptions[0].value)
14
	const [currency, setCurrency] = useState(currencyOptions[0].value)
Línea 15... Línea 15...
15
	const { register, watch, setValue } = useForm()
15
	const { register, watch, setValue } = useForm()
Línea 24... Línea 24...
24
				currencies }) => {
24
				currencies }) => {
25
				setCurrency(salary_currency)
25
				setCurrency(salary_currency)
26
				setValue('salary_min', salary_min)
26
				setValue('salary_min', salary_min)
27
				setValue('salary_max', salary_max)
27
				setValue('salary_max', salary_max)
28
				salary_visible === 'y' ? setIsActive(true) : setIsActive(false)
28
				salary_visible === 'y' ? setIsActive(true) : setIsActive(false)
-
 
29
				Object.entries(currencies)
-
 
30
					.map(([value, key]) => {
29
				Object.entries(currencies).map(([value, key]) => setCurrencyOptions(prev => [...prev, { label: key, value: value }]))
31
						const currencys = new Set([...currencyOptions, { label: key, value: value }])
-
 
32
						setCurrencyOptions([...currencys])
-
 
33
					})
30
			})
34
			})
31
	}, [])
35
	}, [])
Línea 32... Línea 36...
32
 
36
 
33
	return (
37
	return (