- merged with master;

- fixed registartion form - added hub id;
- fixed bando view for beneficiario after switching company;
This commit is contained in:
Vitalii Kiiko
2024-10-23 12:24:34 +02:00
10 changed files with 49 additions and 24 deletions

View File

@@ -18,7 +18,6 @@ const Datepicker = ({
disabled = false,
timeOnly = false
}) => {
console.log('defaultValue', defaultValue)
return (
<>
<label htmlFor={fieldName} className={classNames({ 'p-error': errors[fieldName] })}>

View File

@@ -1,8 +1,9 @@
import React from 'react';
import { classNames } from 'primereact/utils';
import { Controller } from 'react-hook-form';
import { InputNumber } from 'primereact/inputnumber';
import { is } from 'ramda';
import { InputNumber } from 'primereact/inputnumber';
const NumberInput = ({
fieldName,
@@ -25,7 +26,7 @@ const NumberInput = ({
const input = <Controller
name={fieldName}
control={control}
defaultValue={defaultValue}
defaultValue={is(Number, defaultValue) ? defaultValue : 0}
rules={config}
render={({ field, fieldState }) => (
<InputNumber inputId={field.name}
@@ -36,8 +37,8 @@ const NumberInput = ({
max={max}
locale={locale}
useGrouping={useGrouping}
maxFractionDigits={maxFractionDigits}
minFractionDigits={minFractionDigits}
maxFractionDigits={!isNaN(parseInt(maxFractionDigits)) ? parseInt(maxFractionDigits) : 0}
minFractionDigits={!isNaN(parseInt(minFractionDigits)) ? parseInt(minFractionDigits) : 0}
className={classNames({ 'p-invalid': fieldState.invalid })}/>
)}/>
return (

View File

@@ -86,7 +86,7 @@ const TopBarProfileMenu = ({ menuLeftRef }) => {
const switchCompany = (id) => {
if (chosenCompanyId !== id) {
storeSet.main.chosenCompanyId(id);
console.log('set company 2', id)
if (toast.current) {
toast.current.show({
severity: 'success',