ListFormSeeder dateBox FormatEditors
This commit is contained in:
parent
07f03bdf3c
commit
32530c72c0
3 changed files with 28 additions and 9 deletions
|
|
@ -1302,12 +1302,12 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
new() {
|
||||
Order=1, Caption="General", ColCount=2, ColSpan=1, ItemType="group", Items =[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "FullName", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "NationalId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "BirthDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Gender", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "MaritalStatus", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 7, DataField = "EmployeeStatus", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Gender", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "MaritalStatus", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 7, DataField = "EmployeeStatus", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||
]},
|
||||
new() {
|
||||
|
|
@ -1325,18 +1325,18 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
]},
|
||||
new() {
|
||||
Order=3, Caption="Job", ColCount=2, ColSpan=1, ItemType="group", Items =[
|
||||
new EditingFormItemDto { Order = 1, DataField = "HireDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 1, DataField = "HireDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "TerminationDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "EmploymentTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 4, DataField = "JobPositionId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 6, DataField = "WorkLocation", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 7, DataField = "ManagerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 7, DataField = "ManagerId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 8, DataField = "BaseSalary", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 9, DataField = "CurrencyId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 10, DataField = "PayrollGroup", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 11, DataField = "BankAccountId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 12, DataField = "BadgeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 11, DataField = "BankAccountId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 12, DataField = "BadgeId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
]},
|
||||
new() {
|
||||
Order=4, Caption="Emergency", ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||
|
|
@ -1412,6 +1412,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1427,6 +1428,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1580,6 +1582,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
LookupQuery = LookupQueryValues.CountryValues,
|
||||
CascadeEmptyFields = "City,District,Street"
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1606,6 +1609,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
CascadeParentFields = "Country",
|
||||
CascadeEmptyFields = "District,Street"
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1632,6 +1636,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
CascadeParentFields = "Country,City",
|
||||
CascadeEmptyFields = "Street",
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1657,6 +1662,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
CascadeFilterOperator="=",
|
||||
CascadeParentFields = "Country,City,District",
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1724,7 +1730,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
|
|
@ -1813,6 +1818,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.EmploymentType), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1829,6 +1835,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.JobPosition), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1845,6 +1852,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Department), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1861,6 +1869,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
|
|
@ -1893,6 +1902,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1909,6 +1919,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1935,6 +1946,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
new () { Key= "Months", Name= "Months" }
|
||||
}),
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
|
|||
|
|
@ -313,6 +313,8 @@ function JsonRowOpDialogEditForm({
|
|||
<pre>{`• {"format": "phoneGlobal", "mask":"(000) 000-0000", "maskInvalidMessage":"Lütfen geçerli bir telefon numarası girin", "useMaskedValue":false, "maskRules": { "X": "[1-9]" }, "placeholder": "(555) 123-4567" }`}</pre>
|
||||
<pre>{`• {"tooltip": { "enabled": true }}`}</pre>
|
||||
<pre>{`• {"height":200}`}</pre>
|
||||
<pre>{`• {"type":"date"}`}</pre>
|
||||
<pre>{`• {"type":"datetime"}`}</pre>
|
||||
<pre>
|
||||
{`• {
|
||||
"buttons": [
|
||||
|
|
|
|||
|
|
@ -203,6 +203,11 @@ const FormDevExpress = (props: {
|
|||
editorOptions={{
|
||||
...formItem.editorOptions,
|
||||
...(mode === 'view' ? { readOnly: true } : { autoFocus: i === 1 }),
|
||||
...(formItem.editorType === 'dxDateBox' ? {
|
||||
useMaskBehavior: true,
|
||||
openOnFieldClick: true,
|
||||
showClearButton: true,
|
||||
} : {}),
|
||||
buttons: (formItem.editorOptions?.buttons || []).map((btn: any) => {
|
||||
if (btn?.options?.onClick && typeof btn.options.onClick === 'string') {
|
||||
const origClick = eval(`(${btn.options.onClick})`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue