refactor(app-config): rename allowCustomConnection as customConnectionAllowed
This commit is contained in:
@@ -20,7 +20,7 @@ function AdminApplicationCreateAuthClient(props) {
|
||||
const {
|
||||
mutateAsync: createAppConfig,
|
||||
isPending: isCreateAppConfigPending,
|
||||
error: createAppConfigError
|
||||
error: createAppConfigError,
|
||||
} = useAdminCreateAppConfig(props.appKey);
|
||||
|
||||
const {
|
||||
@@ -34,7 +34,7 @@ function AdminApplicationCreateAuthClient(props) {
|
||||
|
||||
if (!appConfigId) {
|
||||
const { data: appConfigData } = await createAppConfig({
|
||||
allowCustomConnection: true,
|
||||
customConnectionAllowed: true,
|
||||
shared: false,
|
||||
disabled: false,
|
||||
});
|
||||
|
@@ -46,7 +46,8 @@ function AdminApplicationSettings(props) {
|
||||
|
||||
const defaultValues = useMemo(
|
||||
() => ({
|
||||
allowCustomConnection: appConfig?.data?.allowCustomConnection || false,
|
||||
customConnectionAllowed:
|
||||
appConfig?.data?.customConnectionAllowed || false,
|
||||
shared: appConfig?.data?.shared || false,
|
||||
disabled: appConfig?.data?.disabled || false,
|
||||
}),
|
||||
@@ -61,8 +62,8 @@ function AdminApplicationSettings(props) {
|
||||
<Paper sx={{ p: 2, mt: 4 }}>
|
||||
<Stack spacing={2} direction="column">
|
||||
<Switch
|
||||
name="allowCustomConnection"
|
||||
label={formatMessage('adminAppsSettings.allowCustomConnection')}
|
||||
name="customConnectionAllowed"
|
||||
label={formatMessage('adminAppsSettings.customConnectionAllowed')}
|
||||
FormControlLabelProps={{
|
||||
labelPlacement: 'start',
|
||||
}}
|
||||
|
@@ -95,7 +95,7 @@ function ChooseConnectionSubstep(props) {
|
||||
|
||||
if (
|
||||
!appConfig?.data ||
|
||||
(!appConfig.data?.disabled && appConfig.data?.allowCustomConnection)
|
||||
(!appConfig.data?.disabled && appConfig.data?.customConnectionAllowed)
|
||||
) {
|
||||
options.push({
|
||||
label: formatMessage('chooseConnectionSubstep.addNewConnection'),
|
||||
|
Reference in New Issue
Block a user