TenantConnection String güncellemeleri

This commit is contained in:
Sedat Öztürk 2026-03-21 23:34:14 +03:00
parent dd82d405ce
commit 4943f78f89

View file

@ -24,6 +24,7 @@ import { Suspense, useEffect, useRef, useState } from 'react'
import * as Yup from 'yup'
import { dataSourceTypeOptions } from '../listForm/edit/options'
import { DataSourceTypeEnum } from '@/proxy/form/models'
import { FaEye, FaEyeSlash } from 'react-icons/fa'
export interface ConnectionStringDto {
id: string
@ -163,6 +164,19 @@ function TenantConnectionString({
}
}
const [pwInputType, setPwInputType] = useState('password')
const onPasswordVisibleClick = (e: React.MouseEvent<HTMLSpanElement>) => {
e.preventDefault()
setPwInputType(pwInputType === 'password' ? 'text' : 'password')
}
const passwordVisible = (
<span className="cursor-pointer" onClick={(e) => onPasswordVisibleClick(e as any)}>
{pwInputType === 'password' ? <FaEyeSlash /> : <FaEye />}
</span>
)
const handleSubmitSeed = async (
values: SeedTenantDataInput,
{ setSubmitting }: FormikHelpers<SeedTenantDataInput>,
@ -184,10 +198,18 @@ function TenantConnectionString({
placement: 'top-end',
},
)
onDialogClose()
} catch (error) {
const errorMessage =
(error as any)?.response?.data?.error?.message ??
(error as any)?.response?.data?.message ??
(error as any)?.message ??
'İşlem başarısız'
toast.push(
<Notification type="danger" duration={2000}>
{'Hata'}
<Notification type="warning" duration={10000}>
{errorMessage}
</Notification>,
{
placement: 'top-end',
@ -364,7 +386,8 @@ function TenantConnectionString({
errorMessage={errors.adminPassword}
>
<Field
type="text"
type={pwInputType}
suffix={passwordVisible}
autoComplete="off"
name="adminPassword"
component={Input}