diff --git a/api/src/Sozsoft.Platform.Application.Contracts/ListForms/Dto/ColumnFormatDto.cs b/api/src/Sozsoft.Platform.Application.Contracts/ListForms/Dto/ColumnFormatDto.cs index ba59e53..cb29364 100644 --- a/api/src/Sozsoft.Platform.Application.Contracts/ListForms/Dto/ColumnFormatDto.cs +++ b/api/src/Sozsoft.Platform.Application.Contracts/ListForms/Dto/ColumnFormatDto.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Data; using System.Text.Json; using System.Text.Json.Serialization; -using Sozsoft.Platform.Enums; using Volo.Abp.Application.Dtos; namespace Sozsoft.Platform.ListForms; @@ -14,6 +13,7 @@ public class ColumnFormatDto : AuditedEntityDto public string FieldName { get; set; } public string CaptionName { get; set; } + public string PlaceHolder { get; set; } public bool ReadOnly { get; set; } public bool Visible { get; set; } // select sorgusuna dahildir fakat ekranda gosterilmez, kolon secicinin icerisinde bulunur public bool IsActive { get; set; } // sadece isActive olan alanlar sorguya dahil edilir diff --git a/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormFieldsAppService.cs b/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormFieldsAppService.cs index 9d171cf..bc3f354 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormFieldsAppService.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormFieldsAppService.cs @@ -52,6 +52,7 @@ public class ListFormFieldsAppService : CrudAppService< entity.FieldName = updateInput.FieldName; entity.CultureName = updateInput.CultureName; entity.CaptionName = updateInput.CaptionName; + entity.PlaceHolder = updateInput.PlaceHolder; entity.BandName = updateInput.BandName; entity.IsActive = updateInput.IsActive; entity.Visible = updateInput.Visible; @@ -128,6 +129,7 @@ public class ListFormFieldsAppService : CrudAppService< { item.FieldName = input.FieldName; item.CaptionName = input.CaptionName; + item.PlaceHolder = input.PlaceHolder; item.BandName = input.BandName; item.SourceDbType = input.SourceDbType; item.Alignment = input.Alignment; @@ -251,6 +253,7 @@ public class ListFormFieldsAppService : CrudAppService< { field.BandName = sourceField.BandName; field.CaptionName = sourceField.CaptionName; + field.PlaceHolder = sourceField.PlaceHolder; field.SourceDbType = sourceField.SourceDbType; } if (input.CopiedFields.All || input.CopiedFields.Options) diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json index 7282a69..16e690b 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json @@ -4914,6 +4914,12 @@ "en": "Field Name", "tr": "Alan Adı" }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormFieldEdit.PlaceHolder", + "en": "Place Holder", + "tr": "Yer Tutucu" + }, { "resourceName": "Platform", "key": "ListForms.ListFormFieldEdit.DetailsBandName", diff --git a/api/src/Sozsoft.Platform.Domain/Entities/Tenant/ListForm/ListFormField.cs b/api/src/Sozsoft.Platform.Domain/Entities/Tenant/ListForm/ListFormField.cs index e22fdba..ede05cc 100644 --- a/api/src/Sozsoft.Platform.Domain/Entities/Tenant/ListForm/ListFormField.cs +++ b/api/src/Sozsoft.Platform.Domain/Entities/Tenant/ListForm/ListFormField.cs @@ -13,6 +13,7 @@ public class ListFormField : FullAuditedEntity public string CultureName { get; set; } // Bu tanım hangi dil için (“tr”, “en”) public string FieldName { get; set; } // Kaynaktaki sutun adi public string CaptionName { get; set; } // Sutun basligi + public string PlaceHolder { get; set; } // Sutun placeholder'i public bool? Visible { get; set; } // Liste üzerinde gösterilecek mi? Yoksa eklenebilir sütunların arasında mı duracak. select sorgusuna dahildir public bool? IsActive { get; set; } = true; // Sadece IsActive olan alanlar sorguya dahil edilir public int? Width { get; set; } // Sütunun listedeki genişliği diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index cf32fda..2397cc7 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -365,6 +365,7 @@ public class PlatformDbContext : b.Property(a => a.CultureName).HasMaxLength(10).IsRequired(); b.Property(a => a.FieldName).IsRequired().HasMaxLength(128); b.Property(a => a.CaptionName).HasMaxLength(256); + b.Property(a => a.PlaceHolder).HasMaxLength(256); // Varsayılan değerler b.Property(a => a.AllowSearch).HasDefaultValue(false); diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260317181749_Initial.Designer.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260330120142_Initial.Designer.cs similarity index 99% rename from api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260317181749_Initial.Designer.cs rename to api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260330120142_Initial.Designer.cs index 1381ec7..0513ff7 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260317181749_Initial.Designer.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260330120142_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Sozsoft.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20260317181749_Initial")] + [Migration("20260330120142_Initial")] partial class Initial { /// @@ -2656,6 +2656,10 @@ namespace Sozsoft.Platform.Migrations b.Property("PivotSettingsJson") .HasColumnType("text"); + b.Property("PlaceHolder") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + b.Property("RoleId") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260317181749_Initial.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260330120142_Initial.cs similarity index 99% rename from api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260317181749_Initial.cs rename to api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260330120142_Initial.cs index 71d7bf6..a2ae16c 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260317181749_Initial.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260330120142_Initial.cs @@ -2031,6 +2031,7 @@ namespace Sozsoft.Platform.Migrations CultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), FieldName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), CaptionName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + PlaceHolder = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), Visible = table.Column(type: "bit", nullable: true, defaultValue: true), IsActive = table.Column(type: "bit", nullable: true, defaultValue: true), Width = table.Column(type: "int", nullable: true, defaultValue: 100), diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 799c9a8..67b4374 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -2653,6 +2653,10 @@ namespace Sozsoft.Platform.Migrations b.Property("PivotSettingsJson") .HasColumnType("text"); + b.Property("PlaceHolder") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + b.Property("RoleId") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); diff --git a/ui/src/proxy/form/models.ts b/ui/src/proxy/form/models.ts index 1d4d49f..161c197 100644 --- a/ui/src/proxy/form/models.ts +++ b/ui/src/proxy/form/models.ts @@ -196,6 +196,7 @@ export interface ColumnFilterDto { export interface ColumnFormatDto extends AuditedEntityDto { fieldName?: string captionName?: string + placeHolder?: string readOnly: boolean visible: boolean isActive: boolean diff --git a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabDetails.tsx b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabDetails.tsx index bfb1b17..e4551d5 100644 --- a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabDetails.tsx +++ b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabDetails.tsx @@ -12,6 +12,7 @@ import { tooltipFormatListOptions } from '@/proxy/admin/list-form/options' const schema = object().shape({ fieldName: string().required().max(100), captionName: string(), + placeHolder: string(), bandName: string(), sourceDbType: number().required(), }) @@ -53,6 +54,13 @@ function FormFieldTabDetails({ > + + + )} - label={{ text: translate('::' + formItem.colData?.captionName), className: 'font-semibold' }} + label={{ + text: translate('::' + formItem.colData?.captionName), + className: 'font-semibold', + }} > ) : formItem.editorType2 === PlatformEditorTypes.dxGridBox ? ( )} - label={{ text: translate('::' + formItem.colData?.captionName), className: 'font-semibold' }} + label={{ + text: translate('::' + formItem.colData?.captionName), + className: 'font-semibold', + }} > ) : ( { if (btn?.options?.onClick && typeof btn.options.onClick === 'string') { const origClick = eval(`(${btn.options.onClick})`) diff --git a/ui/src/views/list/Grid.tsx b/ui/src/views/list/Grid.tsx index ac0c175..a5bd67c 100644 --- a/ui/src/views/list/Grid.tsx +++ b/ui/src/views/list/Grid.tsx @@ -73,6 +73,7 @@ import { useListFormCustomDataSource } from './useListFormCustomDataSource' import { useListFormColumns } from './useListFormColumns' import { Loading } from '@/components/shared' import { useStoreState } from '@/store' +import { placeholder } from '@babel/types' interface GridProps { listFormCode: string @@ -924,6 +925,14 @@ const Grid = (props: GridProps) => { } } + // Her item'a placeholder olarak captionName ekle + if (listFormField?.placeHolder) { + editorOptions = { + ...editorOptions, + placeholder: translate('::' + listFormField.placeHolder), + } + } + // Set defaultValue for @AUTONUMBER fields if ( typeof listFormField?.defaultValue === 'string' &&