Skip to content

Commit

Permalink
Merge branch 'dev' into bal-3144
Browse files Browse the repository at this point in the history
  • Loading branch information
tomer-shvadron authored Dec 15, 2024
2 parents fe6fbd7 + 35e675e commit 6217446
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/db-ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ jobs:
runs-on: ubuntu-latest
needs: [update-helm-chart,build-and-push-ee-image]
if: ${{ needs.update-helm-chart.result == 'success' }}
environment: ${{ github.event.client_payload.environment }}
permissions:
contents: read
packages: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-wf-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ jobs:
runs-on: ubuntu-latest
needs: [update-helm-chart,build-and-push-ee-image]
if: ${{ needs.update-helm-chart.result == 'success' }}
environment: ${{ inputs.environment }}
permissions:
contents: read
packages: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/hotfix-wf-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ jobs:
send-to-slack:
runs-on: ubuntu-latest
needs: [update-helm-chart,build-and-push-ee-image,build-and-push-image]
environment: ${{ inputs.environment }}
if: ${{ needs.update-helm-chart.result == 'success' }}
permissions:
contents: read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export const EditableDetailsV2: FunctionComponent<IEditableDetailsV2Props> = ({
<EditableDetailV2
name={field.name}
type={props.type}
inputType={
config.inputTypes?.[
path.split('.').at(-1) as keyof typeof config.inputTypes
]
}
format={props.format}
minimum={props.minimum}
maximum={props.maximum}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const EditableDetailV2 = ({
minimum,
maximum,
pattern,
inputType,
parse,
}: {
isEditable: boolean;
Expand All @@ -52,6 +53,7 @@ export const EditableDetailV2 = ({
minimum?: number;
maximum?: number;
pattern?: string;
inputType?: string;
parse?: {
date?: boolean;
isoDate?: boolean;
Expand Down Expand Up @@ -131,7 +133,10 @@ export const EditableDetailV2 = ({
);
}

if (parse?.boolean && (typeof value === 'boolean' || type === 'boolean')) {
if (
parse?.boolean &&
(typeof value === 'boolean' || type === 'boolean' || inputType === 'checkbox')
) {
return (
<FormControl>
<Checkbox_
Expand All @@ -145,16 +150,16 @@ export const EditableDetailV2 = ({
}

if (isEditable) {
const inputType = getInputType({ format, type, value });
const computedInputType = inputType ?? getInputType({ format, type, value });

return (
<FormControl>
<Input
{...(typeof minimum === 'number' && { min: minimum })}
{...(typeof maximum === 'number' && { max: maximum })}
{...(pattern && { pattern })}
{...(inputType === 'datetime-local' && { step: '1' })}
type={inputType}
{...(computedInputType === 'datetime-local' && { step: '1' })}
type={computedInputType}
value={displayValue}
onChange={handleInputChange}
autoComplete={'off'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface IBaseEditableDetailsV2Config {
disabled: boolean;
};
};
inputTypes?: Record<string, HTMLInputElement['type']>;
}

export interface IEditableDetailsV2ConfigWithBlacklist extends IBaseEditableDetailsV2Config {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@ export const useKycBlock = ({
disabled: !caseState.writeEnabled,
},
},
inputTypes: {
dateOfBirth: 'date',
},
},
},
})
Expand Down

0 comments on commit 6217446

Please sign in to comment.