Grid ve Tree FullHeight özelliği
This commit is contained in:
parent
877f4b203a
commit
f8c67fea99
11 changed files with 44 additions and 3 deletions
|
|
@ -24,6 +24,8 @@ public class GridOptionsDto : AuditedEntityDto<Guid>
|
|||
public int PageSize { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
public bool FullHeight { get; set; }
|
||||
|
||||
//[TextArea]
|
||||
public string Description { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ public class ListFormsAppService : CrudAppService<
|
|||
item.Name = input.Name;
|
||||
item.Width = input.Width;
|
||||
item.Height = input.Height;
|
||||
item.FullHeight = input.FullHeight;
|
||||
item.Description = input.Description;
|
||||
item.IsSubForm = input.IsSubForm;
|
||||
item.ShowActivity = input.ShowActivity;
|
||||
|
|
|
|||
|
|
@ -3793,6 +3793,12 @@
|
|||
"en": "Height",
|
||||
"tr": "Yükseklik"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DetailsFullHeight",
|
||||
"en": "Full Height",
|
||||
"tr": "Tam Yükseklik"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.GridLayout",
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public class ListForm : FullAuditedEntity<Guid>
|
|||
public int PageSize { get; set; } // Sayfa basina kayit sayisi 10, 25, 50, 100
|
||||
public int? Width { get; set; }
|
||||
public int? Height { get; set; }
|
||||
public bool FullHeight { get; set; } = false;
|
||||
|
||||
public string DefaultFilter { get; set; } // Her sorgunun sonuna eklenecek default WHERE condition
|
||||
public string ColumnOptionJson { get; set; }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251112140020_Initial")]
|
||||
[Migration("20251112185040_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -5063,6 +5063,9 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("FormFieldsDefaultValueJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("FullHeight")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("GroupPanelJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
|
|
@ -1882,6 +1882,7 @@ namespace Erp.Platform.Migrations
|
|||
PageSize = table.Column<int>(type: "int", nullable: false, defaultValue: 50),
|
||||
Width = table.Column<int>(type: "int", nullable: true),
|
||||
Height = table.Column<int>(type: "int", nullable: true),
|
||||
FullHeight = table.Column<bool>(type: "bit", nullable: false),
|
||||
DefaultFilter = table.Column<string>(type: "text", nullable: true),
|
||||
ColumnOptionJson = table.Column<string>(type: "text", nullable: true),
|
||||
PivotOptionJson = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -5060,6 +5060,9 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("FormFieldsDefaultValueJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("FullHeight")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("GroupPanelJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
|
|
|
|||
|
|
@ -463,6 +463,7 @@ export interface GridOptionsDto extends AuditedEntityDto<string> {
|
|||
pageSize?: number
|
||||
width: number
|
||||
height: number
|
||||
fullHeight: boolean
|
||||
description?: string
|
||||
filterRowJson?: string
|
||||
filterRowDto: GridFilterRowDto
|
||||
|
|
|
|||
|
|
@ -217,6 +217,17 @@ function FormTabDetails(
|
|||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.DetailsFullHeight')}
|
||||
invalid={errors.fullHeight && touched.fullHeight}
|
||||
errorMessage={errors.fullHeight}
|
||||
>
|
||||
<Field
|
||||
name="fullHeight"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DetailsFullHeight')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
{values.listFormType === 'List' && (
|
||||
|
|
|
|||
|
|
@ -709,7 +709,13 @@ const Grid = (props: GridProps) => {
|
|||
//dataSource={gridDataSource}
|
||||
//remoteOperations={{ groupPaging: true }}
|
||||
//remoteOperations={false}
|
||||
height={gridDto.gridOptions.height || `calc(100vh - ${170 + widgetGroupHeight}px)`}
|
||||
height={
|
||||
gridDto.gridOptions.height > 0
|
||||
? gridDto.gridOptions.height
|
||||
: gridDto.gridOptions.fullHeight
|
||||
? `calc(100vh - ${170 + widgetGroupHeight}px)`
|
||||
: undefined
|
||||
}
|
||||
width={gridDto.gridOptions.width || '100%'}
|
||||
allowColumnResizing={gridDto.gridOptions.columnOptionDto?.allowColumnResizing}
|
||||
allowColumnReordering={gridDto.gridOptions.columnOptionDto?.allowColumnReordering}
|
||||
|
|
|
|||
|
|
@ -608,7 +608,13 @@ const Tree = (props: TreeProps) => {
|
|||
<TreeListDx
|
||||
ref={gridRef as any}
|
||||
id={'TreeList-' + listFormCode}
|
||||
height={gridDto.gridOptions.height || `calc(100vh - ${170 + widgetGroupHeight}px)`}
|
||||
height={
|
||||
gridDto.gridOptions.height > 0
|
||||
? gridDto.gridOptions.height
|
||||
: gridDto.gridOptions.fullHeight
|
||||
? `calc(100vh - ${170 + widgetGroupHeight}px)`
|
||||
: undefined
|
||||
}
|
||||
width={gridDto.gridOptions.width || '100%'}
|
||||
dataStructure="plain"
|
||||
keyExpr={gridDto.gridOptions.treeOptionDto?.keyExpr}
|
||||
|
|
|
|||
Loading…
Reference in a new issue