diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDefaults.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDefaults.cs index a7bd0ea7..66153e2b 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDefaults.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDefaults.cs @@ -19,7 +19,8 @@ public static class SeederDefaults { new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value } + new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@NEWID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }); public static readonly string DefaultDeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index 355dcf04..4cdd93b0 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -1330,6 +1330,7 @@ public static class PlatformConsts public const string Month = "@MONTH"; public const string Day = "@DAY"; public const string Id = "@ID"; + public const string NewId = "@NEWID"; public const string Selected_Ids = "@SELECTED_IDS"; public const string TenantId = "@TENANTID"; } diff --git a/api/src/Kurs.Platform.Domain/ListForms/ListFormManager.cs b/api/src/Kurs.Platform.Domain/ListForms/ListFormManager.cs index 7a866f7e..04d0564b 100644 --- a/api/src/Kurs.Platform.Domain/ListForms/ListFormManager.cs +++ b/api/src/Kurs.Platform.Domain/ListForms/ListFormManager.cs @@ -88,13 +88,6 @@ public class ListFormManager : PlatformDomainService, IListFormManager { var fields = new Dictionary(); - if (op == OperationEnum.Insert && listForm.KeyFieldDbSourceType == DbType.Guid) - { - // TODO: parametre sayisi artirilarak daha detayli kontrol yapilabilir. - // Ornegin Autoincrement olmayan ve elle deger veilmesi gereken bir Int alan ise? - fields.Add(listForm.KeyFieldName, Guid.NewGuid()); - } - if ((object)inputParams != null) { foreach (var item in JsonSerializer.Deserialize>(inputParams)) diff --git a/api/src/Kurs.Platform.Domain/Queries/DefaultValueHelper.cs b/api/src/Kurs.Platform.Domain/Queries/DefaultValueHelper.cs index 07e0357d..c025cd6c 100644 --- a/api/src/Kurs.Platform.Domain/Queries/DefaultValueHelper.cs +++ b/api/src/Kurs.Platform.Domain/Queries/DefaultValueHelper.cs @@ -33,7 +33,7 @@ public class DefaultValueHelper : ITransientDependency var result = strValue .Replace(PlatformConsts.DefaultValues.UserId, _currentUser.Id?.ToString() ?? Guid.Empty.ToString()) .Replace(PlatformConsts.DefaultValues.UserName, _currentUser.UserName ?? string.Empty) - .Replace(PlatformConsts.DefaultValues.Roles, string.Join("','", _currentUser.Roles ?? Array.Empty())) + .Replace(PlatformConsts.DefaultValues.Roles, string.Join("','", _currentUser.Roles ?? [])) .Replace(PlatformConsts.DefaultValues.Now, now.ToString("O", CultureInfo.InvariantCulture)) .Replace(PlatformConsts.DefaultValues.Day, now.Day.ToString(CultureInfo.InvariantCulture)) .Replace(PlatformConsts.DefaultValues.Month, now.Month.ToString(CultureInfo.InvariantCulture)) diff --git a/api/src/Kurs.Platform.Domain/Queries/DefaultValueManager.cs b/api/src/Kurs.Platform.Domain/Queries/DefaultValueManager.cs index a6bb6b53..072315d9 100644 --- a/api/src/Kurs.Platform.Domain/Queries/DefaultValueManager.cs +++ b/api/src/Kurs.Platform.Domain/Queries/DefaultValueManager.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Text.Json; using System.Threading.Tasks; @@ -83,6 +82,8 @@ public class DefaultValueManager : PlatformDomainService, IDefaultValueManager value = Clock.Now.Year; else if (field.Value == PlatformConsts.DefaultValues.Id) value = keys?.FirstOrDefault(); + else if (field.Value == PlatformConsts.DefaultValues.NewId) + value = Guid.NewGuid(); else if (field.Value == PlatformConsts.DefaultValues.Selected_Ids) value = keys; else if (field.Value == PlatformConsts.DefaultValues.TenantId) diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json index 604d29c1..a92aeba3 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json @@ -2298,7 +2298,7 @@ "code": "PERFECT_ATTENDANCE", "name": "Mükemmel Devam", "description": "Düzenli ve zamanında işe gelen, devamsızlık yapmayan çalışanlar", - "icon": "📅", + "icon": "❤️", "color": "#28A745", "backgroundColor": "#E8F5E8", "category": "Attendance", diff --git a/ui/src/utils/tailwind.ts b/ui/src/utils/tailwind.ts index ffa13c32..1918c317 100644 --- a/ui/src/utils/tailwind.ts +++ b/ui/src/utils/tailwind.ts @@ -21,6 +21,7 @@ export const SCREENS = { // Border radius (Tailwind ile uyumlu) export const BORDER_RADIUS = { none: '0px', + xs: '0.0625rem', sm: '0.125rem', DEFAULT: '0.25rem', md: '0.375rem', diff --git a/ui/src/views/list/Grid.tsx b/ui/src/views/list/Grid.tsx index 33659f28..1e9ebdf4 100644 --- a/ui/src/views/list/Grid.tsx +++ b/ui/src/views/list/Grid.tsx @@ -825,6 +825,31 @@ const Grid = (props: GridProps) => { resizeEnabled: gridDto.gridOptions.editingOptionDto?.popup?.resizeEnabled, fullScreen: isPopupFullScreen, toolbarItems: [ + { + widget: 'dxButton', + toolbar: 'bottom', + location: 'after', + options: { + text: translate('::Save'), + type: 'default', + onClick: () => { + const grid = gridRef.current?.instance + grid?.saveEditData() + }, + }, + }, + { + widget: 'dxButton', + toolbar: 'bottom', + location: 'after', + options: { + text: translate('::Cancel'), + onClick: () => { + const grid = gridRef.current?.instance + grid?.cancelEditData() + }, + }, + }, { widget: 'dxButton', toolbar: 'top', diff --git a/ui/src/views/list/Tree.tsx b/ui/src/views/list/Tree.tsx index d1c026a8..5a63ef64 100644 --- a/ui/src/views/list/Tree.tsx +++ b/ui/src/views/list/Tree.tsx @@ -659,6 +659,31 @@ const Tree = (props: TreeProps) => { resizeEnabled: gridDto.gridOptions.editingOptionDto?.popup?.resizeEnabled, fullScreen: isPopupFullScreen, toolbarItems: [ + { + widget: 'dxButton', + toolbar: 'bottom', + location: 'after', + options: { + text: translate('::Save'), + type: 'default', + onClick: () => { + const tree = gridRef.current?.instance + tree?.saveEditData() + }, + }, + }, + { + widget: 'dxButton', + toolbar: 'bottom', + location: 'after', + options: { + text: translate('::Cancel'), + onClick: () => { + const tree = gridRef.current?.instance + tree?.cancelEditData() + }, + }, + }, { widget: 'dxButton', toolbar: 'top',