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,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "CountryCode",
|
||||
Width = 200,
|
||||
Width = 400,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import { usePermission } from '../utils/hooks/usePermission'
|
|||
import { GridColumnData } from '../views/list/GridColumnData'
|
||||
import {
|
||||
ColumnFormatDto,
|
||||
EditingFormItemDto,
|
||||
GridDto,
|
||||
PlatformEditorTypes,
|
||||
UiCommandButtonPositionTypeEnum,
|
||||
|
|
|
|||
|
|
@ -178,7 +178,6 @@ function FormFieldTabJoinOptions({
|
|||
autoComplete="off"
|
||||
name="columnJoinTableDto.joinCondition2"
|
||||
placeholder={translate('::ListForms.ListFormFieldEdit.JoinOptionsJoinCondition2')}
|
||||
component={Input}
|
||||
>
|
||||
{({ field, form }: FieldProps<GridColumnJoinConditionEnum>) => (
|
||||
<Select
|
||||
|
|
|
|||
|
|
@ -26,6 +26,23 @@ const schema = object().shape({
|
|||
.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({
|
||||
listFormCode,
|
||||
initialValues,
|
||||
|
|
@ -40,10 +57,10 @@ function FormFieldTabLookup({
|
|||
<Container className="grid xl:grid-cols-2">
|
||||
<Formik
|
||||
enableReinitialize
|
||||
initialValues={initialValues}
|
||||
initialValues={getNormalizedInitialValues(initialValues)}
|
||||
validationSchema={schema}
|
||||
onSubmit={async (values, formikHelpers) => {
|
||||
await onSubmit(ListFormFieldEditTabs.LookupForm, values, formikHelpers)
|
||||
onSubmit={async (values) => {
|
||||
await onSubmit(ListFormFieldEditTabs.LookupForm, values)
|
||||
}}
|
||||
>
|
||||
{({ touched, errors, isSubmitting, values }) => (
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ function RolesPermission({
|
|||
|
||||
updatePermissions(providerName, name, { permissions: updatePermList })
|
||||
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 })
|
||||
toast.push(<Notification title={'Permission updated'} type="success" />, {
|
||||
placement: 'top-center',
|
||||
placement: 'top-end',
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue