Genel düzenlemeler
This commit is contained in:
parent
4b9ef52e84
commit
ca18bbc6a8
6 changed files with 33 additions and 11 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Kurs.Languages.Languages;
|
using Kurs.Languages.Languages;
|
||||||
|
|
@ -10526,7 +10527,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,
|
||||||
|
|
@ -10801,7 +10802,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
DisplayExpr = "Name",
|
DisplayExpr = "Name",
|
||||||
ValueExpr = "Key",
|
ValueExpr = "Key",
|
||||||
LookupQuery = $"SELECT \"{DbTablePrefix}Country\".\"Code\" AS \"Key\", \"{DbTablePrefix}Country\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}Country\" ORDER BY \"{DbTablePrefix}Country\".\"Name\""
|
LookupQuery = $"SELECT \"{DbTablePrefix}Country\".\"Code\" AS \"Key\", \"{DbTablePrefix}Country\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}Country\" ORDER BY \"{DbTablePrefix}Country\".\"Name\"",
|
||||||
|
CascadeEmptyFields = "CityCode"
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
{
|
{
|
||||||
|
|
@ -10834,7 +10836,10 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
DisplayExpr = "Name",
|
DisplayExpr = "Name",
|
||||||
ValueExpr = "Key",
|
ValueExpr = "Key",
|
||||||
LookupQuery = $"SELECT \"{DbTablePrefix}City\".\"Code\" AS \"Key\", \"{DbTablePrefix}City\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}City\" ORDER BY \"{DbTablePrefix}City\".\"Name\""
|
LookupQuery = $"SELECT \"{DbTablePrefix}City\".\"Code\" AS \"Key\", \"{DbTablePrefix}City\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}City\" WHERE \"PCity\".\"CountryCode\" = @param0 OR @param0 IS NULL ORDER BY \"{DbTablePrefix}City\".\"Name\"",
|
||||||
|
CascadeRelationField = "CountryCode",
|
||||||
|
CascadeFilterOperator="=",
|
||||||
|
CascadeParentFields = "CountryCode"
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||||
{
|
{
|
||||||
|
|
@ -11097,7 +11102,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
#region SkillType Fields
|
#region SkillType Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync([
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
new()
|
new ()
|
||||||
{
|
{
|
||||||
ListFormCode = listFormSkillType.ListFormCode,
|
ListFormCode = listFormSkillType.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -11144,7 +11149,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
Deny = false
|
Deny = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -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