Genel düzenlemeler
This commit is contained in:
parent
4b9ef52e84
commit
9986b76751
6 changed files with 24 additions and 7 deletions
|
|
@ -10526,7 +10526,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "CountryCode",
|
FieldName = "CountryCode",
|
||||||
Width = 200,
|
Width = 400,
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import { usePermission } from '../utils/hooks/usePermission'
|
||||||
import { GridColumnData } from '../views/list/GridColumnData'
|
import { GridColumnData } from '../views/list/GridColumnData'
|
||||||
import {
|
import {
|
||||||
ColumnFormatDto,
|
ColumnFormatDto,
|
||||||
|
EditingFormItemDto,
|
||||||
GridDto,
|
GridDto,
|
||||||
PlatformEditorTypes,
|
PlatformEditorTypes,
|
||||||
UiCommandButtonPositionTypeEnum,
|
UiCommandButtonPositionTypeEnum,
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,6 @@ function FormFieldTabJoinOptions({
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="columnJoinTableDto.joinCondition2"
|
name="columnJoinTableDto.joinCondition2"
|
||||||
placeholder={translate('::ListForms.ListFormFieldEdit.JoinOptionsJoinCondition2')}
|
placeholder={translate('::ListForms.ListFormFieldEdit.JoinOptionsJoinCondition2')}
|
||||||
component={Input}
|
|
||||||
>
|
>
|
||||||
{({ field, form }: FieldProps<GridColumnJoinConditionEnum>) => (
|
{({ field, form }: FieldProps<GridColumnJoinConditionEnum>) => (
|
||||||
<Select
|
<Select
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,23 @@ const schema = object().shape({
|
||||||
.required(),
|
.required(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function getNormalizedInitialValues(initialValues: ColumnFormatEditDto) {
|
||||||
|
return {
|
||||||
|
...initialValues,
|
||||||
|
lookupDto: {
|
||||||
|
...initialValues.lookupDto,
|
||||||
|
dataSourceType: initialValues.lookupDto?.dataSourceType ?? undefined,
|
||||||
|
valueExpr: initialValues.lookupDto?.valueExpr ?? '',
|
||||||
|
displayExpr: initialValues.lookupDto?.displayExpr ?? '',
|
||||||
|
cascadeRelationField: initialValues.lookupDto?.cascadeRelationField ?? '',
|
||||||
|
cascadeParentFields: initialValues.lookupDto?.cascadeParentFields ?? '',
|
||||||
|
cascadeFilterOperator: initialValues.lookupDto?.cascadeFilterOperator ?? undefined,
|
||||||
|
cascadeEmptyFields: initialValues.lookupDto?.cascadeEmptyFields ?? '',
|
||||||
|
lookupQuery: initialValues.lookupDto?.lookupQuery ?? '',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function FormFieldTabLookup({
|
function FormFieldTabLookup({
|
||||||
listFormCode,
|
listFormCode,
|
||||||
initialValues,
|
initialValues,
|
||||||
|
|
@ -40,10 +57,10 @@ function FormFieldTabLookup({
|
||||||
<Container className="grid xl:grid-cols-2">
|
<Container className="grid xl:grid-cols-2">
|
||||||
<Formik
|
<Formik
|
||||||
enableReinitialize
|
enableReinitialize
|
||||||
initialValues={initialValues}
|
initialValues={getNormalizedInitialValues(initialValues)}
|
||||||
validationSchema={schema}
|
validationSchema={schema}
|
||||||
onSubmit={async (values, formikHelpers) => {
|
onSubmit={async (values) => {
|
||||||
await onSubmit(ListFormFieldEditTabs.LookupForm, values, formikHelpers)
|
await onSubmit(ListFormFieldEditTabs.LookupForm, values)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ touched, errors, isSubmitting, values }) => (
|
{({ touched, errors, isSubmitting, values }) => (
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ function RolesPermission({
|
||||||
|
|
||||||
updatePermissions(providerName, name, { permissions: updatePermList })
|
updatePermissions(providerName, name, { permissions: updatePermList })
|
||||||
toast.push(<Notification title={'Permission updated'} type="success" />, {
|
toast.push(<Notification title={'Permission updated'} type="success" />, {
|
||||||
placement: 'top-center',
|
placement: 'top-end',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ function UsersPermission({
|
||||||
|
|
||||||
updatePermissions(providerName, id, { permissions: updatePermList })
|
updatePermissions(providerName, id, { permissions: updatePermList })
|
||||||
toast.push(<Notification title={'Permission updated'} type="success" />, {
|
toast.push(<Notification title={'Permission updated'} type="success" />, {
|
||||||
placement: 'top-center',
|
placement: 'top-end',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue