Compare commits

...

69 commits
1.0.36 ... main

Author SHA1 Message Date
Sedat Öztürk
5009e72374 CardView düzenlemesi 2026-01-19 22:20:20 +03:00
Sedat Öztürk
138b49a7b0 CardView düzenlemeleri 2026-01-19 03:00:17 +03:00
Sedat Öztürk
8793292932 CardView eklendi. 2026-01-19 02:40:24 +03:00
Sedat Öztürk
9478d4f69d Card, Pivot, Tree içerisinde tüm translate değerleri 2026-01-17 23:13:25 +03:00
Sedat Öztürk
0f0d185b2a Grid Animasyon problemi giderildi. 2026-01-17 22:08:21 +03:00
Sedat Öztürk
52c93ccbaf Grid Translate Edit - Delete 2026-01-17 19:50:10 +03:00
Sedat Öztürk
93f6b8aab6 Participant kaldırıldı -> Crm birleştirildi. 2026-01-17 18:27:37 +03:00
Sedat Öztürk
4b94aeaa86 Grid üzerindeki translate düzeltildi 2026-01-17 01:53:17 +03:00
Sedat Öztürk
5c8c25e918 Nodejs 24 versiyon olarak değiştirildi. 2026-01-17 00:16:47 +03:00
Sedat Öztürk
8d0795a44d Localization Search 2026-01-17 00:02:15 +03:00
Sedat ÖZTÜRK
b085e8bd11 LanguageText değişiklikleri Redis Clear Cache 2026-01-16 17:52:52 +03:00
Sedat ÖZTÜRK
d0bfbbd811 Grid Column Format 2026-01-16 17:03:58 +03:00
Sedat Öztürk
b436f53480 FileManagement düzenlemesi 2026-01-10 17:30:53 +03:00
Sedat ÖZTÜRK
8bc2e4250b htmlEditor için İmage seçimi 2026-01-09 17:42:49 +03:00
Sedat ÖZTÜRK
9b1ce9f512 Template Report içerisinde Dinamik veri kullanma 2026-01-09 16:51:38 +03:00
Sedat Öztürk
a9f43ca320 TemplateReport 2026-01-08 00:00:24 +03:00
Sedat ÖZTÜRK
30e099d3ef XtraReport filtreli şekilde aç 2026-01-07 17:53:52 +03:00
Sedat ÖZTÜRK
7738a34a55 Html Report Definition 2026-01-07 14:57:23 +03:00
Sedat ÖZTÜRK
7d9705951d ReportViewer Linux font problemi 2026-01-07 11:28:39 +03:00
Sedat ÖZTÜRK
222208471e ReportViewer ve ReportDesigner 2026-01-07 10:57:23 +03:00
Sedat ÖZTÜRK
c83611c178 Reportviewer hatası düzenlemesi 2026-01-07 09:12:55 +03:00
Sedat Öztürk
1571be8d2c DevExpress_License.txt 2026-01-07 01:25:30 +03:00
Sedat Öztürk
c5e8cf06d8 Devexpress 25.1.7 2026-01-06 20:59:47 +03:00
Sedat ÖZTÜRK
2dcf714ab4 Devexpress Report Designer 2026-01-06 16:07:26 +03:00
Sedat ÖZTÜRK
132887d2a9 Devexpress Report Viewer kısmı Sector tablosuna bağlandı 2026-01-06 15:11:20 +03:00
Sedat ÖZTÜRK
233d97c2ec Devexpress Report Viewer 2026-01-06 14:33:39 +03:00
Sedat Öztürk
56a35c2e73 Card görünüm loading problemi 2026-01-05 22:30:23 +03:00
Sedat Öztürk
928696a6c9 Seeder düzenlemesi 2026-01-05 22:30:00 +03:00
Sedat Öztürk
b8a6970eaf Grid Animasyon kaldırıldı 2026-01-04 21:14:11 +03:00
Sedat Öztürk
9ea656349d UTC kısmı kaldırıldı. 2026-01-02 00:30:40 +03:00
Sedat Öztürk
0d7a6863c4 Seeder Decimal Formatting 2025-12-22 23:44:37 +03:00
Sedat Öztürk
3a3e57fd63 Total Amount ve Material onChange değiştirildi. 2025-12-22 21:56:02 +03:00
Sedat Öztürk
ce8bb4c55f Seeder düzenlemesi 2025-12-22 21:36:48 +03:00
Sedat Öztürk
a1333ec647 PopupForm Field OnChange 2025-12-18 23:31:31 +03:00
Sedat ÖZTÜRK
407fbd80ba Seeder düzenlemesi 2025-12-15 17:24:16 +03:00
Sedat Öztürk
d4e3ddb6f0 Menu ShortName sütunu 2025-12-14 23:06:09 +03:00
Sedat Öztürk
94eab3095b Büyük temizlik 2025-12-13 17:51:35 +03:00
Sedat ÖZTÜRK
16dca4a08d Json dosyaları güncellendi 2025-12-12 17:42:14 +03:00
Sedat ÖZTÜRK
187cbbeb6b ListForm Country DefaultValue 2025-12-12 17:12:50 +03:00
Sedat ÖZTÜRK
e024ebeafd Seeder hataları düzeltildi. 2025-12-12 16:52:59 +03:00
Sedat ÖZTÜRK
77b040e528 Code sütunları kaldırıldı 2025-12-12 14:33:52 +03:00
Sedat Öztürk
9a6f1b3a01 Tanımlamaların Guid -> string dönüştürüldü 2025-12-12 00:04:21 +03:00
Sedat Öztürk
1bedba8be1 Migration Problemleri 2025-12-11 22:55:19 +03:00
Sedat Öztürk
c5ad91381c DbContext HasMaxLength düzenleme 2025-12-11 22:49:32 +03:00
Sedat ÖZTÜRK
ab735605a1 Tanımlamaların Guid -> string dönüştürüldü 2025-12-11 17:53:17 +03:00
Sedat ÖZTÜRK
906e54d80b Tanımlamaların Guid -> string dönüştürüldü 2025-12-11 16:59:44 +03:00
Sedat ÖZTÜRK
adc45fad30 Mrp Workload 2025-12-10 17:48:50 +03:00
Sedat ÖZTÜRK
83165cbc9f Mrp Production Work order 2025-12-10 16:04:16 +03:00
Sedat ÖZTÜRK
db0b19d919 Mrp Production Orders 2025-12-10 14:16:39 +03:00
Sedat ÖZTÜRK
582765aa0f Waybill ListformSeeder 2025-12-10 10:19:40 +03:00
Sedat Öztürk
12b88a0623 Accounting Invoice 2025-12-09 23:45:46 +03:00
Sedat Öztürk
b9db2a36ed Accounting Çek Tahsilat 2025-12-09 22:28:04 +03:00
Sedat Öztürk
5eded551e3 Acccounting Invoice, CheckNote düzenlemesi 2025-12-09 00:56:32 +03:00
Sedat Öztürk
a2788c1d41 Accounting Wayybill Type ve Waybill Status 2025-12-08 22:12:16 +03:00
Sedat ÖZTÜRK
dec3be0559 ListFormSeeder düzenlemeleri 2025-12-08 16:19:34 +03:00
Sedat ÖZTÜRK
935a6a800c Devextreme extra kontroller 2025-12-08 14:50:09 +03:00
Sedat ÖZTÜRK
a637458352 Store Stock Entry, Exit ve Transfer 2025-12-08 11:09:19 +03:00
Sedat Öztürk
09edf0ffed Store Stock Transfer 2025-12-08 00:54:49 +03:00
Sedat Öztürk
214fd91b66 Store Stock Entry ve Stock Exit 2025-12-07 23:54:24 +03:00
Sedat Öztürk
a3245a6e82 Store Stock Entry 2025-12-07 22:15:16 +03:00
Sedat Öztürk
8fd2d58c0f Before ve After Command Çalıştırıldı 2025-12-07 01:03:53 +03:00
Sedat Öztürk
e54dfe4f98 Before ve After Command tanımlamaları 2025-12-06 22:58:23 +03:00
Sedat Öztürk
c3ce3583a6 SqlObjectManagerAppService 2025-12-06 22:09:35 +03:00
Sedat Öztürk
1fddab5797 case DatabaseProvider.SqlServer eksik kullanım düzeltildi. 2025-12-06 21:43:30 +03:00
Sedat Öztürk
b74729c23e projelerdeki #nullable hatası susturuldu 2025-12-06 21:27:44 +03:00
Sedat Öztürk
9b2c1c25ee Sql Query Manager düzenlemesi 2025-12-06 15:09:54 +03:00
Sedat Öztürk
4a7f2ee853 Sql Query Manager düzenlemesi 2025-12-06 14:15:32 +03:00
Sedat Öztürk
27c298c245 Listform genel düzenelemeler seeder 2025-12-06 13:51:34 +03:00
Sedat Öztürk
7bd6216515 Sql Query Manager Tenant kontrolü 2025-12-06 13:10:39 +03:00
554 changed files with 39993 additions and 121995 deletions

6
api/.gitignore vendored
View file

@ -263,4 +263,8 @@ src/Erp.Platform.Blazor.Server.Tiered/Logs/*
# Use abp install-libs to restore. # Use abp install-libs to restore.
**/wwwroot/libs/* **/wwwroot/libs/*
*appsettings.development.json *appsettings.development.json
# DevExpress License - DO NOT commit to repository
**/DevExpress_License.txt
DevExpress_License.txt

View file

@ -31,10 +31,21 @@ COPY . .
RUN dotnet publish "src/Erp.Platform.DbMigrator/Erp.Platform.DbMigrator.csproj" -c Release -o /app/publish --no-restore RUN dotnet publish "src/Erp.Platform.DbMigrator/Erp.Platform.DbMigrator.csproj" -c Release -o /app/publish --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final
# DevExpress License Key - runtime'da da gerekli
ARG DevExpress_License
ENV DevExpress_License=$DevExpress_License
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
LC_ALL=tr_TR.UTF-8 \ LC_ALL=tr_TR.UTF-8 \
LANG=tr_TR.UTF-8 LANG=tr_TR.UTF-8
# DevExpress lisans dosyasını oluştur (runtime için)
RUN mkdir -p $HOME/.config/DevExpress && \
if [ -n "$DevExpress_License" ]; then \
echo "$DevExpress_License" > $HOME/.config/DevExpress/DevExpress_License.txt; \
fi
# icu'lar dotnet culture icin gerekli # icu'lar dotnet culture icin gerekli
# lib'ler wkhtmltopdf icin gerekli # lib'ler wkhtmltopdf icin gerekli
RUN apk update RUN apk update

View file

@ -2,7 +2,7 @@
ENV DOTNET_NUGET_SIGNATURE_VERIFICATION=false ENV DOTNET_NUGET_SIGNATURE_VERIFICATION=false
WORKDIR /app WORKDIR /app
RUN apk update && apk upgrade RUN apk update && apk upgrade
RUN apk add nodejs~=22 npm~=11 RUN apk add nodejs~=24 npm~=11
COPY .config/dotnet-tools.json .config/dotnet-tools.json COPY .config/dotnet-tools.json .config/dotnet-tools.json
RUN dotnet tool restore RUN dotnet tool restore
@ -53,19 +53,38 @@ RUN mkdir -p publish
RUN dotnet publish "src/Erp.Platform.HttpApi.Host/Erp.Platform.HttpApi.Host.csproj" -c Release -o /app/publish --no-restore RUN dotnet publish "src/Erp.Platform.HttpApi.Host/Erp.Platform.HttpApi.Host.csproj" -c Release -o /app/publish --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final
# DevExpress License Key - runtime'da da gerekli
ARG DevExpress_License
ENV DevExpress_License=$DevExpress_License
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
LC_ALL=tr_TR.UTF-8 \ LC_ALL=tr_TR.UTF-8 \
LANG=tr_TR.UTF-8 LANG=tr_TR.UTF-8
# DevExpress lisans dosyasını oluştur (runtime için)
RUN mkdir -p $HOME/.config/DevExpress && \
if [ -n "$DevExpress_License" ]; then \
echo "$DevExpress_License" > $HOME/.config/DevExpress/DevExpress_License.txt; \
fi
# icu'lar dotnet culture icin gerekli # icu'lar dotnet culture icin gerekli
# lib'ler wkhtmltopdf icin gerekli # lib'ler wkhtmltopdf icin gerekli
# fontconfig ve fonts-* DevExpress reporting için gerekli
RUN apk update RUN apk update
RUN apk add --no-cache \ RUN apk add --no-cache \
icu-data-full \ icu-data-full \
icu-libs \ icu-libs \
libgdiplus \ libgdiplus \
libc6-compat \ libc6-compat \
libc-dev libc-dev \
fontconfig \
ttf-dejavu \
ttf-liberation \
font-noto
# Font cache oluştur
RUN fc-cache -f -v
# OpenSSL default TLSv3 desteklediği için MSSQL 2012'ye bağlanmıyor. Bunu çözmek için gerekli # OpenSSL default TLSv3 desteklediği için MSSQL 2012'ye bağlanmıyor. Bunu çözmek için gerekli
RUN sed -i 's/\[openssl_init\]/# [openssl_init]/' /etc/ssl/openssl.cnf RUN sed -i 's/\[openssl_init\]/# [openssl_init]/' /etc/ssl/openssl.cnf

View file

@ -1,6 +1,8 @@
using Erp.Languages.Entities; using Erp.Languages.Entities;
using Erp.Languages.Localization; using Erp.Languages.Localization;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using StackExchange.Redis;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
@ -27,10 +29,12 @@ public class LanguageTextAppService : CrudAppService<
{ {
private readonly IRepository<LanguageText, Guid> _repositoryText; private readonly IRepository<LanguageText, Guid> _repositoryText;
private readonly IRepository<LanguageKey, Guid> _repositoryKey; private readonly IRepository<LanguageKey, Guid> _repositoryKey;
private readonly IConfiguration _configuration;
public LanguageTextAppService( public LanguageTextAppService(
IRepository<LanguageText, Guid> repositoryText, IRepository<LanguageText, Guid> repositoryText,
IRepository<LanguageKey, Guid> repositoryKey IRepository<LanguageKey, Guid> repositoryKey,
IConfiguration configuration
) )
: base(repositoryText) : base(repositoryText)
{ {
@ -38,6 +42,7 @@ public class LanguageTextAppService : CrudAppService<
ObjectMapperContext = typeof(LanguagesApplicationModule); ObjectMapperContext = typeof(LanguagesApplicationModule);
_repositoryText = repositoryText; _repositoryText = repositoryText;
_repositoryKey = repositoryKey; _repositoryKey = repositoryKey;
_configuration = configuration;
} }
public override async Task<LanguageTextDto> CreateAsync(LanguageTextCreateUpdateDto input) public override async Task<LanguageTextDto> CreateAsync(LanguageTextCreateUpdateDto input)
@ -124,6 +129,13 @@ public class LanguageTextAppService : CrudAppService<
return ObjectMapper.Map<List<LanguageText>, List<LanguageTextDto>>(item); return ObjectMapper.Map<List<LanguageText>, List<LanguageTextDto>>(item);
} }
public async Task ClearRedisCacheAsync()
{
var redis = ConnectionMultiplexer.Connect(_configuration["Redis:Configuration"]!);
var db = redis.GetDatabase();
await db.ExecuteAsync("FLUSHALL");
}
protected virtual IQueryable<LanguageKey> ApplySorting(IQueryable<LanguageKey> query, LanguageTextTranslatedRequestDto input) protected virtual IQueryable<LanguageKey> ApplySorting(IQueryable<LanguageKey> query, LanguageTextTranslatedRequestDto input)
{ {

View file

@ -55,8 +55,6 @@ public class DatabaseResourceLocalizer : IDatabaseResourceLocalizer, ISingletonD
protected virtual LanguageTextCacheItem CreateCacheItem(LocalizationResourceBase resource, string cultureName) protected virtual LanguageTextCacheItem CreateCacheItem(LocalizationResourceBase resource, string cultureName)
{ {
//TODO VT'den textleri alip cache'e dolduran kismi yazalim
//TODO:SÖ
var task = languageTextRepository.GetListAsync(a => a.ResourceName == resource.ResourceName && a.CultureName == cultureName); var task = languageTextRepository.GetListAsync(a => a.ResourceName == resource.ResourceName && a.CultureName == cultureName);
var texts = AsyncHelper.RunSync(() => task); var texts = AsyncHelper.RunSync(() => task);

View file

@ -19,7 +19,8 @@ public static class LanguagesDbContextModelCreatingExtensions
b.Property(a => a.CultureName).HasMaxLength(10).IsRequired(); b.Property(a => a.CultureName).HasMaxLength(10).IsRequired();
b.Property(a => a.UiCultureName).HasMaxLength(10).IsRequired(); b.Property(a => a.UiCultureName).HasMaxLength(10).IsRequired();
b.Property(a => a.DisplayName).HasMaxLength(50).IsRequired(); b.Property(a => a.DisplayName).HasMaxLength(64).IsRequired();
b.Property(a => a.TwoLetterISOLanguageName).HasMaxLength(2).IsRequired();
// Language → LanguageText (CultureName üzerinden) // Language → LanguageText (CultureName üzerinden)
b.HasMany<LanguageText>() b.HasMany<LanguageText>()
@ -34,8 +35,8 @@ public static class LanguagesDbContextModelCreatingExtensions
b.ToTable(TablePrefix.ByName(nameof(LanguageKey)), Prefix.DbSchema); b.ToTable(TablePrefix.ByName(nameof(LanguageKey)), Prefix.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
b.Property(a => a.Key).HasMaxLength(100).IsRequired(); b.Property(a => a.Key).HasMaxLength(128).IsRequired();
b.Property(a => a.ResourceName).HasMaxLength(50).IsRequired(); b.Property(a => a.ResourceName).HasMaxLength(64).IsRequired();
b.HasMany(a => a.Texts) b.HasMany(a => a.Texts)
.WithOne(t => t.LanguageKey) .WithOne(t => t.LanguageKey)
@ -53,9 +54,9 @@ public static class LanguagesDbContextModelCreatingExtensions
b.ConfigureByConvention(); b.ConfigureByConvention();
b.Property(a => a.CultureName).HasMaxLength(10).IsRequired(); b.Property(a => a.CultureName).HasMaxLength(10).IsRequired();
b.Property(a => a.ResourceName).HasMaxLength(50); b.Property(a => a.ResourceName).HasMaxLength(64);
b.Property(a => a.Key).HasMaxLength(100); b.Property(a => a.Key).HasMaxLength(128);
b.Property(a => a.Value).HasMaxLength(4000).IsRequired(); b.Property(a => a.Value).HasMaxLength(4096).IsRequired();
}); });
} }
} }

View file

@ -17,15 +17,15 @@ public static class MailQueueDbContextModelCreatingExtensions
b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueue)), Prefix.DbSchema); b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueue)), Prefix.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
b.Property(x => x.From).IsRequired().HasMaxLength(100); b.Property(x => x.From).IsRequired().HasMaxLength(128);
b.Property(x => x.To).IsRequired().HasMaxLength(100); b.Property(x => x.To).IsRequired().HasMaxLength(128);
b.Property(x => x.MailParameter).HasMaxLength(8000); b.Property(x => x.MailParameter).HasMaxLength(8192);
b.Property(x => x.TableName).HasMaxLength(100); b.Property(x => x.TableName).HasMaxLength(128);
b.Property(x => x.TableParameter).HasMaxLength(500); b.Property(x => x.TableParameter).HasMaxLength(512);
b.Property(x => x.Attachment).HasMaxLength(100); b.Property(x => x.Attachment).HasMaxLength(128);
b.Property(x => x.AttachmentParameter).HasMaxLength(500); b.Property(x => x.AttachmentParameter).HasMaxLength(512);
b.Property(x => x.AwsMessageId).HasMaxLength(100); b.Property(x => x.AwsMessageId).HasMaxLength(128);
b.Property(x => x.RelatedRecordId).HasMaxLength(100); b.Property(x => x.RelatedRecordId).HasMaxLength(128);
// 🔗 İlişki: MailQueue ↔ MailQueueEvents (AwsMessageId) // 🔗 İlişki: MailQueue ↔ MailQueueEvents (AwsMessageId)
b.HasMany(x => x.Events) b.HasMany(x => x.Events)
@ -47,9 +47,9 @@ public static class MailQueueDbContextModelCreatingExtensions
b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueueEvents)), Prefix.DbSchema); b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueueEvents)), Prefix.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
b.Property(x => x.AwsMessageId).IsRequired().HasMaxLength(100); b.Property(x => x.AwsMessageId).IsRequired().HasMaxLength(128);
b.Property(x => x.Event).HasMaxLength(20); b.Property(x => x.Event).HasMaxLength(20);
b.Property(x => x.MailAddress).HasMaxLength(100); b.Property(x => x.MailAddress).HasMaxLength(128);
}); });
builder.Entity<BackgroundWorker_MailQueueTableFormat>(b => builder.Entity<BackgroundWorker_MailQueueTableFormat>(b =>
@ -57,15 +57,15 @@ public static class MailQueueDbContextModelCreatingExtensions
b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueueTableFormat)), Prefix.DbSchema); b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueueTableFormat)), Prefix.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
b.Property(x => x.TableName).IsRequired().HasMaxLength(100); b.Property(x => x.TableName).IsRequired().HasMaxLength(128);
b.Property(x => x.ColumnName).HasMaxLength(50); b.Property(x => x.ColumnName).HasMaxLength(64);
b.Property(x => x.Caption).HasMaxLength(50); b.Property(x => x.Caption).HasMaxLength(64);
b.Property(x => x.HeaderCss).HasMaxLength(1000); b.Property(x => x.HeaderCss).HasMaxLength(1024);
b.Property(x => x.Css).HasMaxLength(1000); b.Property(x => x.Css).HasMaxLength(1024);
b.Property(x => x.FooterCss).HasMaxLength(1000); b.Property(x => x.FooterCss).HasMaxLength(1024);
b.Property(x => x.DataType).HasMaxLength(50); b.Property(x => x.DataType).HasMaxLength(64);
b.Property(x => x.DataFormat).HasMaxLength(50); b.Property(x => x.DataFormat).HasMaxLength(64);
b.Property(x => x.SubTotal).HasMaxLength(50); b.Property(x => x.SubTotal).HasMaxLength(64);
// Unique index (TableName + Order) // Unique index (TableName + Order)
b.HasIndex(x => new { x.TableName, x.Order }) b.HasIndex(x => new { x.TableName, x.Order })

View file

@ -4,6 +4,7 @@
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
<NoWarn>$(NoWarn);CS8632</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -6,6 +6,7 @@
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<RootNamespace>Erp.Notifications</RootNamespace> <RootNamespace>Erp.Notifications</RootNamespace>
<NoWarn>$(NoWarn);CS8632</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -18,10 +18,10 @@ public static class NotificationDbContextModelCreatingExtensions
b.ToTable(TablePrefix.ByName(nameof(NotificationRule)), Prefix.DbSchema); b.ToTable(TablePrefix.ByName(nameof(NotificationRule)), Prefix.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
b.Property(x => x.NotificationType).IsRequired().HasMaxLength(100); b.Property(x => x.NotificationType).IsRequired().HasMaxLength(128);
b.Property(x => x.RecipientType).IsRequired().HasMaxLength(50); b.Property(x => x.RecipientType).IsRequired().HasMaxLength(64);
b.Property(x => x.RecipientId).HasMaxLength(200); b.Property(x => x.RecipientId).HasMaxLength(256);
b.Property(x => x.Channel).IsRequired().HasMaxLength(50); b.Property(x => x.Channel).IsRequired().HasMaxLength(64);
// 1:N ilişki NotificationRule -> Notifications // 1:N ilişki NotificationRule -> Notifications
b.HasMany(x => x.Notifications) b.HasMany(x => x.Notifications)
@ -35,10 +35,10 @@ public static class NotificationDbContextModelCreatingExtensions
b.ToTable(TablePrefix.ByName(nameof(Notification)), Prefix.DbSchema); b.ToTable(TablePrefix.ByName(nameof(Notification)), Prefix.DbSchema);
b.ConfigureByConvention(); b.ConfigureByConvention();
b.Property(x => x.NotificationChannel).IsRequired().HasMaxLength(50); b.Property(x => x.NotificationChannel).IsRequired().HasMaxLength(64);
b.Property(x => x.NotificationType).IsRequired().HasMaxLength(100); b.Property(x => x.NotificationType).IsRequired().HasMaxLength(128);
b.Property(x => x.Identifier).IsRequired().HasMaxLength(200); b.Property(x => x.Identifier).IsRequired().HasMaxLength(256);
b.Property(x => x.Message).IsRequired().HasMaxLength(2000); b.Property(x => x.Message).IsRequired().HasMaxLength(2048);
}); });
} }
} }

View file

@ -37,7 +37,7 @@ public static class SettingsDbContextModelCreatingExtensions
b.Property(a => a.Code).HasMaxLength(128).IsRequired(); b.Property(a => a.Code).HasMaxLength(128).IsRequired();
b.Property(a => a.NameKey).HasMaxLength(128).IsRequired(); b.Property(a => a.NameKey).HasMaxLength(128).IsRequired();
b.Property(a => a.DescriptionKey).HasMaxLength(512); b.Property(a => a.DescriptionKey).HasMaxLength(512);
b.Property(a => a.DefaultValue).HasMaxLength(2048); b.Property(a => a.DefaultValue).HasMaxLength(1024);
b.Property(a => a.MainGroupKey).HasMaxLength(128).IsRequired(); b.Property(a => a.MainGroupKey).HasMaxLength(128).IsRequired();
b.Property(a => a.SubGroupKey).HasMaxLength(128); b.Property(a => a.SubGroupKey).HasMaxLength(128);
b.Property(a => a.RequiredPermissionName).HasMaxLength(128).IsRequired(); b.Property(a => a.RequiredPermissionName).HasMaxLength(128).IsRequired();

View file

@ -41,6 +41,11 @@ public interface ISqlObjectManagerAppService : IApplicationService
// Database Metadata Operations // Database Metadata Operations
Task<List<DatabaseColumnDto>> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName); Task<List<DatabaseColumnDto>> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName);
/// <summary>
/// Gets the SQL definition/body of a native SQL Server object (Stored Procedure, View, or Function)
/// </summary>
Task<string> GetNativeObjectDefinitionAsync(string dataSourceCode, string schemaName, string objectName);
// Smart Save - Analyzes SQL and saves to appropriate table with auto-deploy // Smart Save - Analyzes SQL and saves to appropriate table with auto-deploy
Task<SmartSaveResultDto> SmartSaveAsync(SmartSaveInputDto input); Task<SmartSaveResultDto> SmartSaveAsync(SmartSaveInputDto input);

View file

@ -20,6 +20,7 @@ public class SqlFunctionDto : FullAuditedEntityDto<Guid>
public bool IsDeployed { get; set; } public bool IsDeployed { get; set; }
public DateTime? LastDeployedAt { get; set; } public DateTime? LastDeployedAt { get; set; }
public string Parameters { get; set; } public string Parameters { get; set; }
public bool IsCustom { get; set; } // true = stored in database, false = native SQL Server object
} }
public class CreateSqlFunctionDto public class CreateSqlFunctionDto

View file

@ -18,6 +18,7 @@ public class SqlStoredProcedureDto : FullAuditedEntityDto<Guid>
public bool IsDeployed { get; set; } public bool IsDeployed { get; set; }
public DateTime? LastDeployedAt { get; set; } public DateTime? LastDeployedAt { get; set; }
public string Parameters { get; set; } public string Parameters { get; set; }
public bool IsCustom { get; set; } // true = stored in database, false = native SQL Server object
} }
public class CreateSqlStoredProcedureDto public class CreateSqlStoredProcedureDto

View file

@ -18,6 +18,7 @@ public class SqlViewDto : FullAuditedEntityDto<Guid>
public bool IsDeployed { get; set; } public bool IsDeployed { get; set; }
public DateTime? LastDeployedAt { get; set; } public DateTime? LastDeployedAt { get; set; }
public bool WithSchemaBinding { get; set; } public bool WithSchemaBinding { get; set; }
public bool IsCustom { get; set; } // true = stored in database, false = native SQL Server object
} }
public class CreateSqlViewDto public class CreateSqlViewDto

View file

@ -1,14 +1,18 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Erp.SqlQueryManager.Application.Contracts; using Erp.SqlQueryManager.Application.Contracts;
using Erp.SqlQueryManager.Domain.Entities; using Erp.SqlQueryManager.Domain.Entities;
using Erp.SqlQueryManager.Domain.Services; using Erp.SqlQueryManager.Domain.Services;
using Erp.SqlQueryManager.Domain.Shared; using Erp.SqlQueryManager.Domain.Shared;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.MultiTenancy;
namespace Erp.SqlQueryManager.Application; namespace Erp.SqlQueryManager.Application;
@ -25,6 +29,8 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
private readonly IRepository<SqlFunction, Guid> _functionRepository; private readonly IRepository<SqlFunction, Guid> _functionRepository;
private readonly ISqlExecutorService _sqlExecutorService; private readonly ISqlExecutorService _sqlExecutorService;
private readonly ISqlTemplateProvider _templateProvider; private readonly ISqlTemplateProvider _templateProvider;
private readonly ICurrentTenant _currentTenant;
private readonly IHttpContextAccessor _httpContextAccessor;
public SqlObjectManagerAppService( public SqlObjectManagerAppService(
IRepository<SqlQuery, Guid> queryRepository, IRepository<SqlQuery, Guid> queryRepository,
@ -32,7 +38,10 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
IRepository<SqlView, Guid> viewRepository, IRepository<SqlView, Guid> viewRepository,
IRepository<SqlFunction, Guid> functionRepository, IRepository<SqlFunction, Guid> functionRepository,
ISqlExecutorService sqlExecutorService, ISqlExecutorService sqlExecutorService,
ISqlTemplateProvider templateProvider) ISqlTemplateProvider templateProvider,
ICurrentTenant currentTenant,
IHttpContextAccessor httpContextAccessor
)
{ {
_queryRepository = queryRepository; _queryRepository = queryRepository;
_procedureRepository = procedureRepository; _procedureRepository = procedureRepository;
@ -40,10 +49,35 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
_functionRepository = functionRepository; _functionRepository = functionRepository;
_sqlExecutorService = sqlExecutorService; _sqlExecutorService = sqlExecutorService;
_templateProvider = templateProvider; _templateProvider = templateProvider;
_currentTenant = currentTenant;
_httpContextAccessor = httpContextAccessor;
}
private string GetTenantFromHeader()
{
return _httpContextAccessor.HttpContext?
.Request?
.Headers["__tenant"]
.FirstOrDefault();
}
private void ValidateTenantAccess()
{
var headerTenant = GetTenantFromHeader();
var currentTenantName = _currentTenant.Name;
if (_currentTenant.IsAvailable)
{
if (headerTenant != currentTenantName)
{
throw new Volo.Abp.UserFriendlyException($"Tenant mismatch. Header tenant '{headerTenant}' does not match current tenant '{currentTenantName}'.");
}
}
} }
public async Task<SqlObjectExplorerDto> GetAllObjectsAsync(string dataSourceCode) public async Task<SqlObjectExplorerDto> GetAllObjectsAsync(string dataSourceCode)
{ {
ValidateTenantAccess();
var result = new SqlObjectExplorerDto(); var result = new SqlObjectExplorerDto();
// Get all queries for this data source // Get all queries for this data source
@ -68,67 +102,14 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
}) })
.ToList(); .ToList();
// Get all stored procedures for this data source // Get all stored procedures for this data source (custom + native merged)
var procedures = await _procedureRepository.GetListAsync(); result.StoredProcedures = await GetMergedStoredProceduresAsync(dataSourceCode);
result.StoredProcedures = procedures
.Where(p => p.DataSourceCode == dataSourceCode)
.Select(p => new SqlStoredProcedureDto
{
Id = p.Id,
ProcedureName = p.ProcedureName,
SchemaName = p.SchemaName,
DisplayName = p.DisplayName,
Description = p.Description,
ProcedureBody = p.ProcedureBody,
DataSourceCode = p.DataSourceCode,
Category = p.Category,
Parameters = p.Parameters,
IsDeployed = p.IsDeployed,
LastDeployedAt = p.LastDeployedAt
})
.ToList();
// Get all views for this data source // Get all views for this data source (custom + native merged)
var views = await _viewRepository.GetListAsync(); result.Views = await GetMergedViewsAsync(dataSourceCode);
result.Views = views
.Where(v => v.DataSourceCode == dataSourceCode)
.Select(v => new SqlViewDto
{
Id = v.Id,
ViewName = v.ViewName,
SchemaName = v.SchemaName,
DisplayName = v.DisplayName,
Description = v.Description,
ViewDefinition = v.ViewDefinition,
DataSourceCode = v.DataSourceCode,
Category = v.Category,
WithSchemaBinding = v.WithSchemaBinding,
IsDeployed = v.IsDeployed,
LastDeployedAt = v.LastDeployedAt
})
.ToList();
// Get all functions for this data source // Get all functions for this data source (custom + native merged)
var functions = await _functionRepository.GetListAsync(); result.Functions = await GetMergedFunctionsAsync(dataSourceCode);
result.Functions = functions
.Where(f => f.DataSourceCode == dataSourceCode)
.Select(f => new SqlFunctionDto
{
Id = f.Id,
FunctionName = f.FunctionName,
SchemaName = f.SchemaName,
DisplayName = f.DisplayName,
Description = f.Description,
FunctionType = f.FunctionType,
FunctionBody = f.FunctionBody,
ReturnType = f.ReturnType,
DataSourceCode = f.DataSourceCode,
Category = f.Category,
Parameters = f.Parameters,
IsDeployed = f.IsDeployed,
LastDeployedAt = f.LastDeployedAt
})
.ToList();
// Get all database tables // Get all database tables
result.Tables = await GetTablesAsync(dataSourceCode); result.Tables = await GetTablesAsync(dataSourceCode);
@ -182,10 +163,250 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
return tables; return tables;
} }
private async Task<List<SqlStoredProcedureDto>> GetMergedStoredProceduresAsync(string dataSourceCode)
{
// Get custom stored procedures from database
var customProcedures = await _procedureRepository.GetListAsync();
var customList = customProcedures
.Where(p => p.DataSourceCode == dataSourceCode)
.Select(p => new SqlStoredProcedureDto
{
Id = p.Id,
ProcedureName = p.ProcedureName,
SchemaName = p.SchemaName,
DisplayName = $"{p.SchemaName}.{p.ProcedureName}",
Description = p.Description,
ProcedureBody = p.ProcedureBody,
DataSourceCode = p.DataSourceCode,
Category = p.Category,
Parameters = p.Parameters,
IsDeployed = p.IsDeployed,
LastDeployedAt = p.LastDeployedAt,
IsCustom = true
})
.ToList();
// Get native stored procedures from SQL Server
var nativeQuery = @"
SELECT
SCHEMA_NAME(p.schema_id) AS SchemaName,
p.name AS ProcedureName,
p.create_date AS CreatedDate,
p.modify_date AS ModifiedDate
FROM
sys.procedures p
WHERE
p.is_ms_shipped = 0
ORDER BY
SCHEMA_NAME(p.schema_id), p.name";
var result = await _sqlExecutorService.ExecuteQueryAsync(nativeQuery, dataSourceCode);
var nativeList = new List<SqlStoredProcedureDto>();
if (result.Success && result.Data != null)
{
foreach (var row in result.Data)
{
var dict = row as System.Collections.Generic.IDictionary<string, object>;
if (dict != null)
{
var schemaName = dict["SchemaName"]?.ToString() ?? "dbo";
var procName = dict["ProcedureName"]?.ToString() ?? "";
// Skip if already exists in custom list
if (!customList.Any(c => c.SchemaName == schemaName && c.ProcedureName == procName))
{
// Generate deterministic GUID from schema and name to ensure uniqueness
var uniqueId = GenerateDeterministicGuid($"SP_{dataSourceCode}_{schemaName}_{procName}");
nativeList.Add(new SqlStoredProcedureDto
{
Id = uniqueId,
SchemaName = schemaName,
ProcedureName = procName,
DisplayName = $"{schemaName}.{procName}",
DataSourceCode = dataSourceCode,
IsCustom = false,
IsDeployed = true // Native objects are already deployed
});
}
}
}
}
// Merge and return
return customList.Concat(nativeList).ToList();
}
private async Task<List<SqlViewDto>> GetMergedViewsAsync(string dataSourceCode)
{
// Get custom views from database
var customViews = await _viewRepository.GetListAsync();
var customList = customViews
.Where(v => v.DataSourceCode == dataSourceCode)
.Select(v => new SqlViewDto
{
Id = v.Id,
ViewName = v.ViewName,
SchemaName = v.SchemaName,
DisplayName = $"{v.SchemaName}.{v.ViewName}",
Description = v.Description,
ViewDefinition = v.ViewDefinition,
DataSourceCode = v.DataSourceCode,
Category = v.Category,
WithSchemaBinding = v.WithSchemaBinding,
IsDeployed = v.IsDeployed,
LastDeployedAt = v.LastDeployedAt,
IsCustom = true
})
.ToList();
// Get native views from SQL Server
var nativeQuery = @"
SELECT
SCHEMA_NAME(v.schema_id) AS SchemaName,
v.name AS ViewName,
v.create_date AS CreatedDate,
v.modify_date AS ModifiedDate
FROM
sys.views v
WHERE
v.is_ms_shipped = 0
ORDER BY
SCHEMA_NAME(v.schema_id), v.name";
var result = await _sqlExecutorService.ExecuteQueryAsync(nativeQuery, dataSourceCode);
var nativeList = new List<SqlViewDto>();
if (result.Success && result.Data != null)
{
foreach (var row in result.Data)
{
var dict = row as System.Collections.Generic.IDictionary<string, object>;
if (dict != null)
{
var schemaName = dict["SchemaName"]?.ToString() ?? "dbo";
var viewName = dict["ViewName"]?.ToString() ?? "";
// Skip if already exists in custom list
if (!customList.Any(c => c.SchemaName == schemaName && c.ViewName == viewName))
{
// Generate deterministic GUID from schema and name to ensure uniqueness
var uniqueId = GenerateDeterministicGuid($"VIEW_{dataSourceCode}_{schemaName}_{viewName}");
nativeList.Add(new SqlViewDto
{
Id = uniqueId,
SchemaName = schemaName,
ViewName = viewName,
DisplayName = $"{schemaName}.{viewName}",
DataSourceCode = dataSourceCode,
IsCustom = false,
IsDeployed = true
});
}
}
}
}
return customList.Concat(nativeList).ToList();
}
private async Task<List<SqlFunctionDto>> GetMergedFunctionsAsync(string dataSourceCode)
{
// Get custom functions from database
var customFunctions = await _functionRepository.GetListAsync();
var customList = customFunctions
.Where(f => f.DataSourceCode == dataSourceCode)
.Select(f => new SqlFunctionDto
{
Id = f.Id,
FunctionName = f.FunctionName,
SchemaName = f.SchemaName,
DisplayName = $"[{f.SchemaName}].[{f.FunctionName}]",
Description = f.Description,
FunctionType = f.FunctionType,
FunctionBody = f.FunctionBody,
ReturnType = f.ReturnType,
DataSourceCode = f.DataSourceCode,
Category = f.Category,
Parameters = f.Parameters,
IsDeployed = f.IsDeployed,
LastDeployedAt = f.LastDeployedAt,
IsCustom = true
})
.ToList();
// Get native functions from SQL Server
var nativeQuery = @"
SELECT
SCHEMA_NAME(o.schema_id) AS SchemaName,
o.name AS FunctionName,
o.create_date AS CreatedDate,
o.modify_date AS ModifiedDate,
CASE o.type
WHEN 'FN' THEN 'Scalar'
WHEN 'IF' THEN 'InlineTableValued'
WHEN 'TF' THEN 'TableValued'
ELSE 'Unknown'
END AS FunctionType
FROM
sys.objects o
WHERE
o.type IN ('FN', 'IF', 'TF')
AND o.is_ms_shipped = 0
ORDER BY
SCHEMA_NAME(o.schema_id), o.name";
var result = await _sqlExecutorService.ExecuteQueryAsync(nativeQuery, dataSourceCode);
var nativeList = new List<SqlFunctionDto>();
if (result.Success && result.Data != null)
{
foreach (var row in result.Data)
{
var dict = row as System.Collections.Generic.IDictionary<string, object>;
if (dict != null)
{
var schemaName = dict["SchemaName"]?.ToString() ?? "dbo";
var funcName = dict["FunctionName"]?.ToString() ?? "";
// Skip if already exists in custom list
if (!customList.Any(c => c.SchemaName == schemaName && c.FunctionName == funcName))
{
var funcTypeStr = dict["FunctionType"]?.ToString() ?? "Scalar";
var funcType = funcTypeStr == "Scalar" ? SqlFunctionType.ScalarFunction :
funcTypeStr == "InlineTableValued" ? SqlFunctionType.InlineTableValuedFunction :
SqlFunctionType.TableValuedFunction;
// Generate deterministic GUID from schema and name to ensure uniqueness
var uniqueId = GenerateDeterministicGuid($"FUNC_{dataSourceCode}_{schemaName}_{funcName}");
nativeList.Add(new SqlFunctionDto
{
Id = uniqueId,
SchemaName = schemaName,
FunctionName = funcName,
DisplayName = $"{schemaName}.{funcName}",
DataSourceCode = dataSourceCode,
FunctionType = funcType,
IsCustom = false,
IsDeployed = true
});
}
}
}
}
return customList.Concat(nativeList).ToList();
}
#region Query Operations #region Query Operations
public async Task<SqlQueryDto> CreateQueryAsync(CreateSqlQueryDto input) public async Task<SqlQueryDto> CreateQueryAsync(CreateSqlQueryDto input)
{ {
ValidateTenantAccess();
var query = ObjectMapper.Map<CreateSqlQueryDto, SqlQuery>(input); var query = ObjectMapper.Map<CreateSqlQueryDto, SqlQuery>(input);
query.Status = SqlQueryStatus.Draft; query.Status = SqlQueryStatus.Draft;
@ -195,6 +416,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SqlQueryDto> UpdateQueryAsync(Guid id, UpdateSqlQueryDto input) public async Task<SqlQueryDto> UpdateQueryAsync(Guid id, UpdateSqlQueryDto input)
{ {
ValidateTenantAccess();
var query = await _queryRepository.GetAsync(id); var query = await _queryRepository.GetAsync(id);
query.Name = input.Name; query.Name = input.Name;
@ -209,21 +431,23 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task DeleteQueryAsync(Guid id) public async Task DeleteQueryAsync(Guid id)
{ {
ValidateTenantAccess();
await _queryRepository.DeleteAsync(id); await _queryRepository.DeleteAsync(id);
} }
public async Task<SqlQueryExecutionResultDto> ExecuteQueryAsync(ExecuteSqlQueryDto input) public async Task<SqlQueryExecutionResultDto> ExecuteQueryAsync(ExecuteSqlQueryDto input)
{ {
ValidateTenantAccess();
var sqlText = input.QueryText.Trim(); var sqlText = input.QueryText.Trim();
var sqlUpper = sqlText.ToUpperInvariant(); var sqlUpper = sqlText.ToUpperInvariant();
// Check if this is a DDL command (CREATE/ALTER/DROP for VIEW/PROCEDURE/FUNCTION) // Check if this is a DDL command (CREATE/ALTER/DROP for VIEW/PROCEDURE/FUNCTION)
bool isDDLCommand = bool isDDLCommand =
sqlUpper.Contains("CREATE VIEW") || sqlUpper.Contains("ALTER VIEW") || sqlUpper.Contains("CREATE VIEW") || sqlUpper.Contains("ALTER VIEW") ||
sqlUpper.Contains("CREATE PROCEDURE") || sqlUpper.Contains("CREATE PROC") || sqlUpper.Contains("CREATE PROCEDURE") || sqlUpper.Contains("CREATE PROC") ||
sqlUpper.Contains("ALTER PROCEDURE") || sqlUpper.Contains("ALTER PROC") || sqlUpper.Contains("ALTER PROCEDURE") || sqlUpper.Contains("ALTER PROC") ||
sqlUpper.Contains("CREATE FUNCTION") || sqlUpper.Contains("ALTER FUNCTION") || sqlUpper.Contains("CREATE FUNCTION") || sqlUpper.Contains("ALTER FUNCTION") ||
sqlUpper.Contains("DROP VIEW") || sqlUpper.Contains("DROP PROCEDURE") || sqlUpper.Contains("DROP VIEW") || sqlUpper.Contains("DROP PROCEDURE") ||
sqlUpper.Contains("DROP PROC") || sqlUpper.Contains("DROP FUNCTION"); sqlUpper.Contains("DROP PROC") || sqlUpper.Contains("DROP FUNCTION");
if (isDDLCommand) if (isDDLCommand)
@ -234,7 +458,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
// Try to parse/validate the SQL using SET PARSEONLY // Try to parse/validate the SQL using SET PARSEONLY
var validationSql = $"SET PARSEONLY ON;\n{sqlText}\nSET PARSEONLY OFF;"; var validationSql = $"SET PARSEONLY ON;\n{sqlText}\nSET PARSEONLY OFF;";
await _sqlExecutorService.ExecuteNonQueryAsync(validationSql, input.DataSourceCode); await _sqlExecutorService.ExecuteNonQueryAsync(validationSql, input.DataSourceCode);
return new SqlQueryExecutionResultDto return new SqlQueryExecutionResultDto
{ {
Success = true, Success = true,
@ -264,6 +488,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SqlQueryExecutionResultDto> ExecuteSavedQueryAsync(Guid id) public async Task<SqlQueryExecutionResultDto> ExecuteSavedQueryAsync(Guid id)
{ {
ValidateTenantAccess();
var query = await _queryRepository.GetAsync(id); var query = await _queryRepository.GetAsync(id);
var result = await _sqlExecutorService.ExecuteQueryAsync(query.QueryText, query.DataSourceCode); var result = await _sqlExecutorService.ExecuteQueryAsync(query.QueryText, query.DataSourceCode);
@ -281,6 +506,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SqlStoredProcedureDto> UpdateStoredProcedureAsync(Guid id, UpdateSqlStoredProcedureDto input) public async Task<SqlStoredProcedureDto> UpdateStoredProcedureAsync(Guid id, UpdateSqlStoredProcedureDto input)
{ {
ValidateTenantAccess();
var procedure = await _procedureRepository.GetAsync(id); var procedure = await _procedureRepository.GetAsync(id);
procedure.DisplayName = input.DisplayName; procedure.DisplayName = input.DisplayName;
@ -296,6 +522,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task DeleteStoredProcedureAsync(Guid id) public async Task DeleteStoredProcedureAsync(Guid id)
{ {
ValidateTenantAccess();
var procedure = await _procedureRepository.GetAsync(id); var procedure = await _procedureRepository.GetAsync(id);
// Drop stored procedure from SQL Server (always try, regardless of IsDeployed flag) // Drop stored procedure from SQL Server (always try, regardless of IsDeployed flag)
@ -314,14 +541,15 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SqlQueryExecutionResultDto> DeployStoredProcedureAsync(DeployStoredProcedureDto input) public async Task<SqlQueryExecutionResultDto> DeployStoredProcedureAsync(DeployStoredProcedureDto input)
{ {
ValidateTenantAccess();
var procedure = await _procedureRepository.GetAsync(input.Id); var procedure = await _procedureRepository.GetAsync(input.Id);
try try
{ {
// Önce DROP işlemi yap (varsa) // Önce DROP işlemi yap (varsa)
var dropSql = $"IF OBJECT_ID('[{procedure.SchemaName}].[{procedure.ProcedureName}]', 'P') IS NOT NULL DROP PROCEDURE [{procedure.SchemaName}].[{procedure.ProcedureName}]"; var dropSql = $"IF OBJECT_ID('[{procedure.SchemaName}].[{procedure.ProcedureName}]', 'P') IS NOT NULL DROP PROCEDURE [{procedure.SchemaName}].[{procedure.ProcedureName}]";
await _sqlExecutorService.ExecuteNonQueryAsync(dropSql, procedure.DataSourceCode); await _sqlExecutorService.ExecuteNonQueryAsync(dropSql, procedure.DataSourceCode);
// Sonra CREATE işlemi yap // Sonra CREATE işlemi yap
var result = await _sqlExecutorService.DeployStoredProcedureAsync( var result = await _sqlExecutorService.DeployStoredProcedureAsync(
procedure.ProcedureBody, procedure.ProcedureBody,
@ -356,6 +584,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SqlViewDto> UpdateViewAsync(Guid id, UpdateSqlViewDto input) public async Task<SqlViewDto> UpdateViewAsync(Guid id, UpdateSqlViewDto input)
{ {
ValidateTenantAccess();
var view = await _viewRepository.GetAsync(id); var view = await _viewRepository.GetAsync(id);
view.DisplayName = input.DisplayName; view.DisplayName = input.DisplayName;
@ -371,6 +600,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task DeleteViewAsync(Guid id) public async Task DeleteViewAsync(Guid id)
{ {
ValidateTenantAccess();
var view = await _viewRepository.GetAsync(id); var view = await _viewRepository.GetAsync(id);
// Drop view from SQL Server (always try, regardless of IsDeployed flag) // Drop view from SQL Server (always try, regardless of IsDeployed flag)
@ -389,14 +619,15 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SqlQueryExecutionResultDto> DeployViewAsync(DeployViewDto input) public async Task<SqlQueryExecutionResultDto> DeployViewAsync(DeployViewDto input)
{ {
ValidateTenantAccess();
var view = await _viewRepository.GetAsync(input.Id); var view = await _viewRepository.GetAsync(input.Id);
try try
{ {
// Önce DROP işlemi yap (varsa) // Önce DROP işlemi yap (varsa)
var dropSql = $"IF OBJECT_ID('[{view.SchemaName}].[{view.ViewName}]', 'V') IS NOT NULL DROP VIEW [{view.SchemaName}].[{view.ViewName}]"; var dropSql = $"IF OBJECT_ID('[{view.SchemaName}].[{view.ViewName}]', 'V') IS NOT NULL DROP VIEW [{view.SchemaName}].[{view.ViewName}]";
await _sqlExecutorService.ExecuteNonQueryAsync(dropSql, view.DataSourceCode); await _sqlExecutorService.ExecuteNonQueryAsync(dropSql, view.DataSourceCode);
// Sonra CREATE işlemi yap // Sonra CREATE işlemi yap
var result = await _sqlExecutorService.DeployViewAsync( var result = await _sqlExecutorService.DeployViewAsync(
view.ViewDefinition, view.ViewDefinition,
@ -431,6 +662,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SqlFunctionDto> UpdateFunctionAsync(Guid id, UpdateSqlFunctionDto input) public async Task<SqlFunctionDto> UpdateFunctionAsync(Guid id, UpdateSqlFunctionDto input)
{ {
ValidateTenantAccess();
var function = await _functionRepository.GetAsync(id); var function = await _functionRepository.GetAsync(id);
function.DisplayName = input.DisplayName; function.DisplayName = input.DisplayName;
@ -446,6 +678,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task DeleteFunctionAsync(Guid id) public async Task DeleteFunctionAsync(Guid id)
{ {
ValidateTenantAccess();
var function = await _functionRepository.GetAsync(id); var function = await _functionRepository.GetAsync(id);
// Drop function from SQL Server (always try, regardless of IsDeployed flag) // Drop function from SQL Server (always try, regardless of IsDeployed flag)
@ -464,14 +697,15 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SqlQueryExecutionResultDto> DeployFunctionAsync(DeployFunctionDto input) public async Task<SqlQueryExecutionResultDto> DeployFunctionAsync(DeployFunctionDto input)
{ {
ValidateTenantAccess();
var function = await _functionRepository.GetAsync(input.Id); var function = await _functionRepository.GetAsync(input.Id);
try try
{ {
// Önce DROP işlemi yap (varsa) // Önce DROP işlemi yap (varsa)
var dropSql = $"IF OBJECT_ID('[{function.SchemaName}].[{function.FunctionName}]', 'FN') IS NOT NULL DROP FUNCTION [{function.SchemaName}].[{function.FunctionName}]"; var dropSql = $"IF OBJECT_ID('[{function.SchemaName}].[{function.FunctionName}]', 'FN') IS NOT NULL DROP FUNCTION [{function.SchemaName}].[{function.FunctionName}]";
await _sqlExecutorService.ExecuteNonQueryAsync(dropSql, function.DataSourceCode); await _sqlExecutorService.ExecuteNonQueryAsync(dropSql, function.DataSourceCode);
// Sonra CREATE işlemi yap // Sonra CREATE işlemi yap
var result = await _sqlExecutorService.DeployFunctionAsync( var result = await _sqlExecutorService.DeployFunctionAsync(
function.FunctionBody, function.FunctionBody,
@ -504,8 +738,37 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
#region Database Metadata Operations #region Database Metadata Operations
public async Task<string> GetNativeObjectDefinitionAsync(string dataSourceCode, string schemaName, string objectName)
{
ValidateTenantAccess();
var query = @"
SELECT OBJECT_DEFINITION(OBJECT_ID(@ObjectName)) AS Definition";
var fullObjectName = $"[{schemaName}].[{objectName}]";
var result = await _sqlExecutorService.ExecuteQueryAsync(
query.Replace("@ObjectName", $"'{fullObjectName}'"),
dataSourceCode
);
if (result.Success && result.Data != null)
{
var dataList = result.Data.ToList();
if (dataList.Count > 0)
{
var row = dataList[0] as System.Collections.Generic.IDictionary<string, object>;
if (row != null && row.ContainsKey("Definition"))
{
return row["Definition"]?.ToString() ?? string.Empty;
}
}
}
return string.Empty;
}
public async Task<List<DatabaseColumnDto>> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName) public async Task<List<DatabaseColumnDto>> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName)
{ {
ValidateTenantAccess();
var query = $@" var query = $@"
SELECT SELECT
c.name AS ColumnName, c.name AS ColumnName,
@ -550,6 +813,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
public async Task<SmartSaveResultDto> SmartSaveAsync(SmartSaveInputDto input) public async Task<SmartSaveResultDto> SmartSaveAsync(SmartSaveInputDto input)
{ {
ValidateTenantAccess();
var result = new SmartSaveResultDto(); var result = new SmartSaveResultDto();
var sqlText = input.SqlText.Trim(); var sqlText = input.SqlText.Trim();
var sqlUpper = sqlText.ToUpperInvariant(); var sqlUpper = sqlText.ToUpperInvariant();
@ -773,39 +1037,6 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
return result; return result;
} }
private string ExtractObjectName(string sql, params string[] keywords)
{
var sqlUpper = sql.ToUpperInvariant();
foreach (var keyword in keywords)
{
var createIndex = sqlUpper.IndexOf($"CREATE {keyword}", StringComparison.OrdinalIgnoreCase);
var alterIndex = sqlUpper.IndexOf($"ALTER {keyword}", StringComparison.OrdinalIgnoreCase);
var startIndex = Math.Max(createIndex, alterIndex);
if (startIndex >= 0)
{
startIndex = sqlUpper.IndexOf(keyword, startIndex, StringComparison.OrdinalIgnoreCase) + keyword.Length;
var endIndex = sql.IndexOfAny(new[] { ' ', '\r', '\n', '\t', '(', '[' }, startIndex);
if (endIndex > startIndex)
{
var name = sql.Substring(startIndex, endIndex - startIndex).Trim();
// Remove schema prefix if exists
if (name.Contains("."))
{
name = name.Substring(name.LastIndexOf('.') + 1);
}
// Remove square brackets
name = name.Replace("[", "").Replace("]", "");
return name;
}
}
}
return "UnnamedObject";
}
#region Helper Methods #region Helper Methods
private SqlQueryExecutionResultDto MapExecutionResult(SqlExecutionResult result) private SqlQueryExecutionResultDto MapExecutionResult(SqlExecutionResult result)
@ -822,4 +1053,21 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA
} }
#endregion #endregion
#region Helper Methods
/// <summary>
/// Generates a deterministic GUID from a string input using MD5 hash
/// This ensures same input always produces same GUID
/// </summary>
private static Guid GenerateDeterministicGuid(string input)
{
using (var md5 = MD5.Create())
{
var hash = md5.ComputeHash(Encoding.UTF8.GetBytes(input));
return new Guid(hash);
}
}
#endregion
} }

View file

@ -26,7 +26,7 @@ public class SqlQueryManagerAutoMapperProfile : Profile
.Ignore(x => x.LastExecutedAt) .Ignore(x => x.LastExecutedAt)
.Ignore(x => x.ExecutionCount); .Ignore(x => x.ExecutionCount);
CreateMap<SqlStoredProcedure, SqlStoredProcedureDto>(); CreateMap<SqlStoredProcedure, SqlStoredProcedureDto>().Ignore(x => x.IsCustom);
CreateMap<CreateSqlStoredProcedureDto, SqlStoredProcedure>() CreateMap<CreateSqlStoredProcedureDto, SqlStoredProcedure>()
.IgnoreFullAuditedObjectProperties() .IgnoreFullAuditedObjectProperties()
.Ignore(x => x.Id) .Ignore(x => x.Id)
@ -34,6 +34,7 @@ public class SqlQueryManagerAutoMapperProfile : Profile
.Ignore(x => x.Status) .Ignore(x => x.Status)
.Ignore(x => x.IsDeployed) .Ignore(x => x.IsDeployed)
.Ignore(x => x.LastDeployedAt); .Ignore(x => x.LastDeployedAt);
CreateMap<UpdateSqlStoredProcedureDto, SqlStoredProcedure>() CreateMap<UpdateSqlStoredProcedureDto, SqlStoredProcedure>()
.IgnoreFullAuditedObjectProperties() .IgnoreFullAuditedObjectProperties()
.Ignore(x => x.Id) .Ignore(x => x.Id)
@ -45,7 +46,7 @@ public class SqlQueryManagerAutoMapperProfile : Profile
.Ignore(x => x.IsDeployed) .Ignore(x => x.IsDeployed)
.Ignore(x => x.LastDeployedAt); .Ignore(x => x.LastDeployedAt);
CreateMap<SqlView, SqlViewDto>(); CreateMap<SqlView, SqlViewDto>().Ignore(x => x.IsCustom);
CreateMap<CreateSqlViewDto, SqlView>() CreateMap<CreateSqlViewDto, SqlView>()
.IgnoreFullAuditedObjectProperties() .IgnoreFullAuditedObjectProperties()
.Ignore(x => x.Id) .Ignore(x => x.Id)
@ -59,12 +60,12 @@ public class SqlQueryManagerAutoMapperProfile : Profile
.Ignore(x => x.TenantId) .Ignore(x => x.TenantId)
.Ignore(x => x.ViewName) .Ignore(x => x.ViewName)
.Ignore(x => x.SchemaName) .Ignore(x => x.SchemaName)
.Ignore(x => x.DataSourceCode) .Ignore(x => x.DataSourceCode)
.Ignore(x => x.Status) .Ignore(x => x.Status)
.Ignore(x => x.IsDeployed) .Ignore(x => x.IsDeployed)
.Ignore(x => x.LastDeployedAt); .Ignore(x => x.LastDeployedAt);
CreateMap<SqlFunction, SqlFunctionDto>(); CreateMap<SqlFunction, SqlFunctionDto>().Ignore(x => x.IsCustom);
CreateMap<CreateSqlFunctionDto, SqlFunction>() CreateMap<CreateSqlFunctionDto, SqlFunction>()
.IgnoreFullAuditedObjectProperties() .IgnoreFullAuditedObjectProperties()
.Ignore(x => x.Id) .Ignore(x => x.Id)
@ -79,7 +80,7 @@ public class SqlQueryManagerAutoMapperProfile : Profile
.Ignore(x => x.FunctionName) .Ignore(x => x.FunctionName)
.Ignore(x => x.SchemaName) .Ignore(x => x.SchemaName)
.Ignore(x => x.FunctionType) .Ignore(x => x.FunctionType)
.Ignore(x => x.DataSourceCode) .Ignore(x => x.DataSourceCode)
.Ignore(x => x.Status) .Ignore(x => x.Status)
.Ignore(x => x.IsDeployed) .Ignore(x => x.IsDeployed)
.Ignore(x => x.LastDeployedAt); .Ignore(x => x.LastDeployedAt);

View file

@ -19,13 +19,13 @@ public static class SqlQueryManagerDbContextModelCreatingExtensions
b.Property(x => x.Code).IsRequired().HasMaxLength(128); b.Property(x => x.Code).IsRequired().HasMaxLength(128);
b.Property(x => x.Name).IsRequired().HasMaxLength(256); b.Property(x => x.Name).IsRequired().HasMaxLength(256);
b.Property(x => x.Description).HasMaxLength(1000); b.Property(x => x.Description).HasMaxLength(1024);
b.Property(x => x.QueryText).IsRequired(); b.Property(x => x.QueryText).IsRequired();
b.Property(x => x.DataSourceCode).IsRequired().HasMaxLength(128); b.Property(x => x.DataSourceCode).IsRequired().HasMaxLength(128);
b.Property(x => x.Status).IsRequired(); b.Property(x => x.Status).IsRequired();
b.Property(x => x.Category).HasMaxLength(128); b.Property(x => x.Category).HasMaxLength(128);
b.Property(x => x.Tags).HasMaxLength(500); b.Property(x => x.Tags).HasMaxLength(512);
b.Property(x => x.Parameters).HasMaxLength(4000); b.Property(x => x.Parameters).HasMaxLength(4096);
b.HasIndex(x => x.Code); b.HasIndex(x => x.Code);
b.HasIndex(x => x.DataSourceCode); b.HasIndex(x => x.DataSourceCode);
@ -42,12 +42,12 @@ public static class SqlQueryManagerDbContextModelCreatingExtensions
b.Property(x => x.ProcedureName).IsRequired().HasMaxLength(128); b.Property(x => x.ProcedureName).IsRequired().HasMaxLength(128);
b.Property(x => x.SchemaName).IsRequired().HasMaxLength(128); b.Property(x => x.SchemaName).IsRequired().HasMaxLength(128);
b.Property(x => x.DisplayName).IsRequired().HasMaxLength(256); b.Property(x => x.DisplayName).IsRequired().HasMaxLength(256);
b.Property(x => x.Description).HasMaxLength(1000); b.Property(x => x.Description).HasMaxLength(1024);
b.Property(x => x.ProcedureBody).IsRequired(); b.Property(x => x.ProcedureBody).IsRequired();
b.Property(x => x.DataSourceCode).IsRequired().HasMaxLength(128); b.Property(x => x.DataSourceCode).IsRequired().HasMaxLength(128);
b.Property(x => x.Status).IsRequired(); b.Property(x => x.Status).IsRequired();
b.Property(x => x.Category).HasMaxLength(128); b.Property(x => x.Category).HasMaxLength(128);
b.Property(x => x.Parameters).HasMaxLength(4000); b.Property(x => x.Parameters).HasMaxLength(4096);
b.HasIndex(x => new { x.SchemaName, x.ProcedureName }); b.HasIndex(x => new { x.SchemaName, x.ProcedureName });
b.HasIndex(x => x.DataSourceCode); b.HasIndex(x => x.DataSourceCode);
@ -64,7 +64,7 @@ public static class SqlQueryManagerDbContextModelCreatingExtensions
b.Property(x => x.ViewName).IsRequired().HasMaxLength(128); b.Property(x => x.ViewName).IsRequired().HasMaxLength(128);
b.Property(x => x.SchemaName).IsRequired().HasMaxLength(128); b.Property(x => x.SchemaName).IsRequired().HasMaxLength(128);
b.Property(x => x.DisplayName).IsRequired().HasMaxLength(256); b.Property(x => x.DisplayName).IsRequired().HasMaxLength(256);
b.Property(x => x.Description).HasMaxLength(1000); b.Property(x => x.Description).HasMaxLength(1024);
b.Property(x => x.ViewDefinition).IsRequired(); b.Property(x => x.ViewDefinition).IsRequired();
b.Property(x => x.DataSourceCode).IsRequired().HasMaxLength(128); b.Property(x => x.DataSourceCode).IsRequired().HasMaxLength(128);
b.Property(x => x.Status).IsRequired(); b.Property(x => x.Status).IsRequired();
@ -85,14 +85,14 @@ public static class SqlQueryManagerDbContextModelCreatingExtensions
b.Property(x => x.FunctionName).IsRequired().HasMaxLength(128); b.Property(x => x.FunctionName).IsRequired().HasMaxLength(128);
b.Property(x => x.SchemaName).IsRequired().HasMaxLength(128); b.Property(x => x.SchemaName).IsRequired().HasMaxLength(128);
b.Property(x => x.DisplayName).IsRequired().HasMaxLength(256); b.Property(x => x.DisplayName).IsRequired().HasMaxLength(256);
b.Property(x => x.Description).HasMaxLength(1000); b.Property(x => x.Description).HasMaxLength(1024);
b.Property(x => x.FunctionType).IsRequired(); b.Property(x => x.FunctionType).IsRequired();
b.Property(x => x.FunctionBody).IsRequired(); b.Property(x => x.FunctionBody).IsRequired();
b.Property(x => x.ReturnType).IsRequired().HasMaxLength(256); b.Property(x => x.ReturnType).IsRequired().HasMaxLength(256);
b.Property(x => x.DataSourceCode).IsRequired().HasMaxLength(128); b.Property(x => x.DataSourceCode).IsRequired().HasMaxLength(128);
b.Property(x => x.Status).IsRequired(); b.Property(x => x.Status).IsRequired();
b.Property(x => x.Category).HasMaxLength(128); b.Property(x => x.Category).HasMaxLength(128);
b.Property(x => x.Parameters).HasMaxLength(4000); b.Property(x => x.Parameters).HasMaxLength(4096);
b.HasIndex(x => new { x.SchemaName, x.FunctionName }); b.HasIndex(x => new { x.SchemaName, x.FunctionName });
b.HasIndex(x => x.DataSourceCode); b.HasIndex(x => x.DataSourceCode);

View file

@ -5,6 +5,6 @@ namespace Erp.Platform.AiBots;
public class AiBotDto : FullAuditedEntityDto<Guid> public class AiBotDto : FullAuditedEntityDto<Guid>
{ {
public string BotName { get; set; } public string Name { get; set; }
} }

View file

@ -5,6 +5,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<RootNamespace>Erp.Platform</RootNamespace> <RootNamespace>Erp.Platform</RootNamespace>
<NoWarn>$(NoWarn);CS8632</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -17,6 +17,7 @@ public class FileItemDto
public string ParentId { get; set; } = string.Empty; public string ParentId { get; set; } = string.Empty;
public bool IsReadOnly { get; set; } public bool IsReadOnly { get; set; }
public int? ChildCount { get; set; } public int? ChildCount { get; set; }
public string TenantId { get; set; } = string.Empty;
} }
public class GetFilesDto public class GetFilesDto

View file

@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Intranet; namespace Erp.Platform.Intranet;
public class CurrencyDto : FullAuditedEntityDto<Guid> public class CurrencyDto : FullAuditedEntityDto<string>
{ {
public string Code { get; set; } // TRY, USD, EUR public string Code { get; set; } // TRY, USD, EUR
public string Symbol { get; set; } // ₺, $, etc. public string Symbol { get; set; } // ₺, $, etc.

View file

@ -7,7 +7,6 @@ namespace Erp.Platform.Intranet;
public class DepartmentDto : FullAuditedEntityDto<Guid> public class DepartmentDto : FullAuditedEntityDto<Guid>
{ {
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }
public string Code { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string Description { get; set; } public string Description { get; set; }
public Guid? ParentDepartmentId { get; set; } public Guid? ParentDepartmentId { get; set; }

View file

@ -38,7 +38,7 @@ public class EmployeeDto : FullAuditedEntityDto<Guid>
public Guid? EmploymentTypeId { get; set; } public Guid? EmploymentTypeId { get; set; }
public EmploymentTypeDto EmploymentType { get; set; } public EmploymentTypeDto EmploymentType { get; set; }
public Guid? JobPositionId { get; set; } public string? JobPositionId { get; set; }
public JobPositionDto JobPosition { get; set; } public JobPositionDto JobPosition { get; set; }
public Guid? DepartmentId { get; set; } public Guid? DepartmentId { get; set; }

View file

@ -3,8 +3,9 @@ using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Intranet; namespace Erp.Platform.Intranet;
public class EmploymentTypeDto : FullAuditedEntityDto<Guid> public class EmploymentTypeDto : FullAuditedEntityDto<string>
{ {
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }
public string Name { get; set; } public string Name { get; set; }
} }

View file

@ -12,17 +12,14 @@ public class ExpenseDto : FullAuditedEntityDto<Guid>
public string Category { get; set; } public string Category { get; set; }
public decimal Amount { get; set; } public decimal Amount { get; set; }
public string Currency { get; set; } public string Currency { get; set; }
public DateTime RequestDate { get; set; } public DateTime RequestDate { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string Project { get; set; } public string Project { get; set; }
public string Status { get; set; } public string Status { get; set; }
public Guid? ApproverId { get; set; } public Guid? ApproverId { get; set; }
public EmployeeDto Approver { get; set; } public EmployeeDto Approver { get; set; }
public DateTime? ApprovalDate { get; set; } public DateTime? ApprovalDate { get; set; }
public string RejectionReason { get; set; } public string RejectionReason { get; set; }
public string Notes { get; set; } public string Notes { get; set; }

View file

@ -19,6 +19,7 @@ public class IntranetDashboardDto
public List<OvertimeDto> Overtimes { get; set; } = []; public List<OvertimeDto> Overtimes { get; set; } = [];
public List<SurveyDto> Surveys { get; set; } = []; public List<SurveyDto> Surveys { get; set; } = [];
public List<SocialPostDto> SocialPosts { get; set; } = []; public List<SocialPostDto> SocialPosts { get; set; } = [];
public List<ProjectTaskDto> Tasks { get; set; } = [];
} }

View file

@ -3,14 +3,16 @@ using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Intranet; namespace Erp.Platform.Intranet;
public class JobPositionDto : FullAuditedEntityDto<Guid> public class JobPositionDto : FullAuditedEntityDto<string>
{ {
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }
public string Code { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string Description { get; set; } public string Description { get; set; }
public Guid? DepartmentId { get; set; } public Guid? DepartmentId { get; set; }
public string DepartmentName { get; set; } public string DepartmentName { get; set; }
public string Level { get; set; } public string Level { get; set; }
public decimal MinSalary { get; set; } public decimal MinSalary { get; set; }
public decimal MaxSalary { get; set; } public decimal MaxSalary { get; set; }

View file

@ -0,0 +1,29 @@
using System;
using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Intranet;
public class ProjectTaskDto : FullAuditedEntityDto<Guid>
{
public Guid? TenantId { get; set; }
public Guid? ProjectId { get; set; }
public Guid? PhaseId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string? TaskTypeId { get; set; }
public string Priority { get; set; }
public string? StatusId { get; set; }
public Guid? EmployeeId { get; set; }
public EmployeeDto Employee { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public int Progress { get; set; }
public bool IsActive { get; set; }
}

View file

@ -33,6 +33,8 @@ public class GridOptionsEditDto : GridOptionsDto
} }
public string DeleteCommand { get; set; } public string DeleteCommand { get; set; }
public string DeleteBeforeCommand { get; set; }
public string DeleteAfterCommand { get; set; }
[JsonIgnore] [JsonIgnore]
public string DeleteFieldsDefaultValueJson { get; set; } public string DeleteFieldsDefaultValueJson { get; set; }
public List<FieldsDefaultValueDto> DeleteFieldsDefaultValueDto public List<FieldsDefaultValueDto> DeleteFieldsDefaultValueDto
@ -48,6 +50,8 @@ public class GridOptionsEditDto : GridOptionsDto
} }
public string InsertCommand { get; set; } public string InsertCommand { get; set; }
public string InsertBeforeCommand { get; set; }
public string InsertAfterCommand { get; set; }
[JsonIgnore] [JsonIgnore]
public string InsertFieldsDefaultValueJson { get; set; } public string InsertFieldsDefaultValueJson { get; set; }
public List<FieldsDefaultValueDto> InsertFieldsDefaultValueDto public List<FieldsDefaultValueDto> InsertFieldsDefaultValueDto
@ -63,6 +67,8 @@ public class GridOptionsEditDto : GridOptionsDto
} }
public string UpdateCommand { get; set; } public string UpdateCommand { get; set; }
public string UpdateBeforeCommand { get; set; }
public string UpdateAfterCommand { get; set; }
[JsonIgnore] [JsonIgnore]
public string UpdateFieldsDefaultValueJson { get; set; } public string UpdateFieldsDefaultValueJson { get; set; }
public List<FieldsDefaultValueDto> UpdateFieldsDefaultValueDto public List<FieldsDefaultValueDto> UpdateFieldsDefaultValueDto

View file

@ -4,6 +4,7 @@ public class LayoutDto
{ {
public bool Grid { get; set; } = true; public bool Grid { get; set; } = true;
public bool Card { get; set; } = true; public bool Card { get; set; } = true;
public bool CardView { get; set; } = true;
public bool Pivot { get; set; } = true; public bool Pivot { get; set; } = true;
public bool Chart { get; set; } = true; public bool Chart { get; set; } = true;
public bool Tree { get; set; } = true; public bool Tree { get; set; } = true;

View file

@ -42,6 +42,17 @@ public static class LookupQueryValues
$"ORDER BY \"{DisplayExpr}\";"; $"ORDER BY \"{DisplayExpr}\";";
} }
public static string MaterialValues =
$"SELECT " +
$"\"Id\" AS \"Key\", " +
$"\"Name\" AS \"Name\", " +
$"\"UomId\" AS \"UomId\", " +
$"\"SalesPrice\" AS \"UnitPrice\", " +
$"1 AS \"Quantity\" " +
$"FROM \"{FullNameTable(TableNameEnum.Material)}\" " +
$"WHERE \"IsDeleted\" = 'false' " +
$"ORDER BY \"Name\";";
public static string ProjectPhaseValues = public static string ProjectPhaseValues =
$"SELECT " + $"SELECT " +
$"\"Id\" AS \"Key\", " + $"\"Id\" AS \"Key\", " +
@ -118,7 +129,7 @@ public static class LookupQueryValues
public static string CountryValues = public static string CountryValues =
$"SELECT " + $"SELECT " +
$"\"Code\" AS \"Key\", " + $"\"Id\" AS \"Key\", " +
$"\"Name\" AS \"Name\" " + $"\"Name\" AS \"Name\" " +
$"FROM \"{FullNameTable(TableNameEnum.Country)}\" " + $"FROM \"{FullNameTable(TableNameEnum.Country)}\" " +
$"WHERE \"IsDeleted\" = 'false' " + $"WHERE \"IsDeleted\" = 'false' " +
@ -126,7 +137,7 @@ public static class LookupQueryValues
public static string CityValues = public static string CityValues =
$"SELECT " + $"SELECT " +
$"\"Code\" AS \"Key\", " + $"\"Name\" AS \"Key\", " +
$"\"Name\" AS \"Name\" " + $"\"Name\" AS \"Name\" " +
$"FROM \"{FullNameTable(TableNameEnum.City)}\" " + $"FROM \"{FullNameTable(TableNameEnum.City)}\" " +
$"WHERE " + $"WHERE " +
@ -265,4 +276,14 @@ public static class LookupQueryValues
$"AND (\"ZoneId\" = @param1 OR @param1 IS NULL) " + $"AND (\"ZoneId\" = @param1 OR @param1 IS NULL) " +
$"AND \"IsDeleted\" = 'false' " + $"AND \"IsDeleted\" = 'false' " +
$"ORDER BY \"Name\";"; $"ORDER BY \"Name\";";
public static string ReferenceTypeValues(string movementTypeName) =>
$"SELECT " +
$"\"Id\" AS \"Key\", " +
$"\"Name\" AS \"Name\" " +
$"FROM \"{FullNameTable(TableNameEnum.ReferenceType)}\" " +
$"WHERE " +
$"(\"MovementTypeName\" = N'{movementTypeName}') " +
$"AND \"IsDeleted\" = 'false' " +
$"ORDER BY \"Name\";";
} }

View file

@ -13,6 +13,7 @@ public class MenuDto : FullAuditedEntityDto<Guid>
public string ParentCode { get; set; } public string ParentCode { get; set; }
public string CssClass { get; set; } public string CssClass { get; set; }
public string RequiredPermissionName { get; set; } public string RequiredPermissionName { get; set; }
public string ShortName { get; set; }
public string Target { get; set; } public string Target { get; set; }
public bool IsDisabled { get; set; } public bool IsDisabled { get; set; }

View file

@ -5,7 +5,6 @@ namespace Erp.Platform.Public;
public class CityDto : AuditedEntityDto<Guid> public class CityDto : AuditedEntityDto<Guid>
{ {
public string Code { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string PlateCode { get; set; } public string PlateCode { get; set; }
public string Country { get; set; } public string Country { get; set; }

View file

@ -6,7 +6,6 @@ namespace Erp.Platform.Public;
public class CountryDto : AuditedEntityDto<Guid> public class CountryDto : AuditedEntityDto<Guid>
{ {
public string Code { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string GroupName { get; set; } public string GroupName { get; set; }
public string Currency { get; set; } public string Currency { get; set; }

View file

@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Public; namespace Erp.Platform.Public;
public class PaymentMethodDto : EntityDto<Guid> public class PaymentMethodDto : EntityDto<string>
{ {
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }

View file

@ -1,37 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Erp.Platform.Reports
{
public class CreateReportTemplateDto
{
[Required]
public string Name { get; set; }
public string Description { get; set; }
[Required]
public string HtmlContent { get; set; }
public Guid CategoryId { get; set; }
public List<string> Tags { get; set; }
public List<CreateReportParameterDto> Parameters { get; set; }
public CreateReportTemplateDto()
{
Tags = [];
Parameters = [];
}
}
public class CreateReportParameterDto
{
[Required]
public string Name { get; set; }
public string Placeholder { get; set; }
public string Type { get; set; }
public string DefaultValue { get; set; }
public bool Required { get; set; }
public string Description { get; set; }
}
}

View file

@ -1,18 +0,0 @@
using System;
using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Reports
{
public class GetReportTemplatesInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
public Guid CategoryId { get; set; }
}
public class GetGeneratedReportsInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
public Guid? TemplateId { get; set; }
}
}

View file

@ -1,33 +0,0 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace Erp.Platform.Reports
{
public interface IReportAppService : IApplicationService
{
// Template operations
Task<PagedResultDto<ReportTemplateDto>> GetTemplatesAsync(GetReportTemplatesInput input);
Task<ReportTemplateDto> GetTemplateAsync(Guid id);
Task<ReportTemplateDto> CreateTemplateAsync(CreateReportTemplateDto input);
Task<ReportTemplateDto> UpdateTemplateAsync(Guid id, UpdateReportTemplateDto input);
Task DeleteTemplateAsync(Guid id);
// Generated Report operations
Task<PagedResultDto<ReportGeneratedDto>> GetGeneratedReportsAsync(GetGeneratedReportsInput input);
Task<ReportGeneratedDto> GetGeneratedReportAsync(Guid id);
Task<ReportGeneratedDto> GenerateReportAsync(ReportGenerateDto input);
Task DeleteGeneratedReportAsync(Guid id);
// Bulk operations
Task<ReportsDataDto> GetAllDataAsync();
}
public class ReportsDataDto
{
public PagedResultDto<ReportTemplateDto> Templates { get; set; }
public PagedResultDto<ReportGeneratedDto> GeneratedReports { get; set; }
}
}

View file

@ -1,15 +0,0 @@
using System;
using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Reports
{
public class ReportCategoryDto : FullAuditedEntityDto<Guid>
{
public string Name { get; set; }
public string Description { get; set; }
public string Icon { get; set; }
public int TemplateCount { get; init; }
}
}

View file

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Erp.Platform.Reports
{
public class ReportGenerateDto
{
[Required]
public Guid TemplateId { get; set; }
public Dictionary<string, string> Parameters { get; set; }
public ReportGenerateDto()
{
Parameters = [];
}
}
}

View file

@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Reports
{
public class ReportGeneratedDto : FullAuditedEntityDto<Guid>
{
public Guid? TemplateId { get; set; }
[Required]
public string TemplateName { get; set; }
[Required]
public string GeneratedContent { get; set; }
public Dictionary<string, string> Parameters { get; set; }
public ReportTemplateDto ReportTemplate { get; set; }
public ReportGeneratedDto()
{
Parameters = [];
}
}
}

View file

@ -1,19 +0,0 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Erp.Platform.Reports
{
public class ReportParameterDto
{
public Guid Id { get; set; }
public Guid? TemplateId { get; set; }
[Required]
public string Name { get; set; }
public string Placeholder { get; set; }
public string Type { get; set; }
public string DefaultValue { get; set; }
public bool Required { get; set; }
public string Description { get; set; }
}
}

View file

@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Reports
{
public class ReportTemplateDto : FullAuditedEntityDto<Guid>
{
[Required]
public string Name { get; set; }
public string Description { get; set; }
[Required]
public string HtmlContent { get; set; }
public Guid CategoryId { get; set; }
public List<string> Tags { get; set; }
public List<ReportParameterDto> Parameters { get; set; }
public ReportTemplateDto()
{
Tags = [];
Parameters = [];
}
}
}

View file

@ -1,38 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Erp.Platform.Reports;
public class UpdateReportTemplateDto
{
[Required]
public string Name { get; set; }
public string Description { get; set; }
[Required]
public string HtmlContent { get; set; }
public Guid CategoryId { get; set; }
public List<string> Tags { get; set; }
public List<UpdateReportParameterDto> Parameters { get; set; }
public UpdateReportTemplateDto()
{
Tags = [];
Parameters = [];
}
}
public class UpdateReportParameterDto
{
public Guid? Id { get; set; }
[Required]
public string Name { get; set; }
public string Placeholder { get; set; }
public string Type { get; set; }
public string DefaultValue { get; set; }
public bool Required { get; set; }
public string Description { get; set; }
}

View file

@ -4,13 +4,13 @@ using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Uoms; namespace Erp.Platform.Uoms;
public class UomDto : AuditedEntityDto<Guid> public class UomDto : AuditedEntityDto<string>
{ {
public string Name { get; set; } public string Name { get; set; }
public UomType Type { get; set; } public UomType Type { get; set; }
public decimal Ratio { get; set; } public decimal Ratio { get; set; }
public bool IsActive { get; set; } public bool IsActive { get; set; }
public decimal Rounding { get; set; } public decimal Rounding { get; set; }
public Guid UomCategoryId { get; set; } public string UomCategoryId { get; set; }
public string UomCategoryName { get; set; } // Listelemede gösterim için opsiyonel public string UomCategoryName { get; set; } // Listelemede gösterim için opsiyonel
} }

View file

@ -50,7 +50,7 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
private string GetTenantPrefix() private string GetTenantPrefix()
{ {
var tenantId = _currentTenant.Id?.ToString() ?? "host"; var tenantId = _currentTenant.Id?.ToString() ?? "host";
return $"files/{tenantId}/"; return $"tenants/{tenantId}/";
} }
private string EncodePathAsId(string path) private string EncodePathAsId(string path)
@ -241,7 +241,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
Path = metadata.Path, Path = metadata.Path,
ParentId = parentId ?? string.Empty, ParentId = parentId ?? string.Empty,
IsReadOnly = finalIsReadOnly, IsReadOnly = finalIsReadOnly,
ChildCount = metadata.ChildCount ChildCount = metadata.ChildCount,
TenantId = metadata.TenantId
}; };
}).OrderBy(x => x.Type == "folder" ? 0 : 1).ThenBy(x => x.Name).ToList(); }).OrderBy(x => x.Type == "folder" ? 0 : 1).ThenBy(x => x.Name).ToList();
@ -309,7 +310,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = metadata.ModifiedAt, ModifiedAt = metadata.ModifiedAt,
Path = metadata.Path, Path = metadata.Path,
ParentId = input.ParentId ?? string.Empty, ParentId = input.ParentId ?? string.Empty,
IsReadOnly = metadata.IsReadOnly IsReadOnly = metadata.IsReadOnly,
TenantId = _currentTenant.Id?.ToString()
}; };
} }
@ -401,7 +403,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = metadata.ModifiedAt, ModifiedAt = metadata.ModifiedAt,
Path = metadata.Path, Path = metadata.Path,
ParentId = input.ParentId ?? string.Empty, ParentId = input.ParentId ?? string.Empty,
IsReadOnly = metadata.IsReadOnly IsReadOnly = metadata.IsReadOnly,
TenantId = _currentTenant.Id?.ToString()
}; };
} }
@ -468,7 +471,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = metadata.ModifiedAt, ModifiedAt = metadata.ModifiedAt,
Path = metadata.Path, Path = metadata.Path,
ParentId = metadata.ParentId, ParentId = metadata.ParentId,
IsReadOnly = metadata.IsReadOnly IsReadOnly = metadata.IsReadOnly,
TenantId = _currentTenant.Id?.ToString()
}; };
} }
@ -530,7 +534,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = metadata.ModifiedAt, ModifiedAt = metadata.ModifiedAt,
Path = metadata.Path, Path = metadata.Path,
ParentId = metadata.ParentId, ParentId = metadata.ParentId,
IsReadOnly = metadata.IsReadOnly IsReadOnly = metadata.IsReadOnly,
TenantId = _currentTenant.Id?.ToString()
}; };
} }
@ -675,7 +680,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = dirInfo.LastWriteTime, ModifiedAt = dirInfo.LastWriteTime,
Path = finalTargetPath, Path = finalTargetPath,
ParentId = input.TargetFolderId ?? string.Empty, ParentId = input.TargetFolderId ?? string.Empty,
IsReadOnly = false IsReadOnly = false,
TenantId = _currentTenant.Id?.ToString()
}); });
} }
else if (File.Exists(sourceFullPath)) else if (File.Exists(sourceFullPath))
@ -704,7 +710,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = fileInfo.LastWriteTime, ModifiedAt = fileInfo.LastWriteTime,
Path = finalTargetPath, Path = finalTargetPath,
ParentId = input.TargetFolderId ?? string.Empty, ParentId = input.TargetFolderId ?? string.Empty,
IsReadOnly = false IsReadOnly = false,
TenantId = _currentTenant.Id?.ToString()
}); });
} }
else else
@ -800,7 +807,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = dirInfo.LastWriteTime, ModifiedAt = dirInfo.LastWriteTime,
Path = finalTargetPath, Path = finalTargetPath,
ParentId = input.TargetFolderId ?? string.Empty, ParentId = input.TargetFolderId ?? string.Empty,
IsReadOnly = false IsReadOnly = false,
TenantId = _currentTenant.Id?.ToString()
}); });
} }
else if (File.Exists(sourceFullPath)) else if (File.Exists(sourceFullPath))
@ -829,7 +837,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = fileInfo.LastWriteTime, ModifiedAt = fileInfo.LastWriteTime,
Path = finalTargetPath, Path = finalTargetPath,
ParentId = input.TargetFolderId ?? string.Empty, ParentId = input.TargetFolderId ?? string.Empty,
IsReadOnly = false IsReadOnly = false,
TenantId = _currentTenant.Id?.ToString()
}); });
} }
else else
@ -895,7 +904,8 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
ModifiedAt = metadata.ModifiedAt, ModifiedAt = metadata.ModifiedAt,
Path = metadata.Path, Path = metadata.Path,
ParentId = metadata.ParentId, ParentId = metadata.ParentId,
IsReadOnly = metadata.IsReadOnly IsReadOnly = metadata.IsReadOnly,
TenantId = _currentTenant.Id?.ToString()
}) })
.OrderBy(x => x.Type == "folder" ? 0 : 1) .OrderBy(x => x.Type == "folder" ? 0 : 1)
.ThenBy(x => x.Name) .ThenBy(x => x.Name)

View file

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using ClosedXML;
using Erp.Platform.BlobStoring; using Erp.Platform.BlobStoring;
using Erp.Platform.Entities; using Erp.Platform.Entities;
using Erp.Platform.FileManagement; using Erp.Platform.FileManagement;
@ -38,6 +37,7 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
private readonly IRepository<Overtime, Guid> _overtimeRepository; private readonly IRepository<Overtime, Guid> _overtimeRepository;
private readonly IRepository<Survey, Guid> _surveyRepository; private readonly IRepository<Survey, Guid> _surveyRepository;
private readonly IRepository<SocialPost, Guid> _socialPostRepository; private readonly IRepository<SocialPost, Guid> _socialPostRepository;
private readonly IRepository<ProjectTask, Guid> _projectTaskRepository;
public IntranetAppService( public IntranetAppService(
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
@ -57,7 +57,8 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
IRepository<Leave, Guid> leaveRepository, IRepository<Leave, Guid> leaveRepository,
IRepository<Overtime, Guid> overtimeRepository, IRepository<Overtime, Guid> overtimeRepository,
IRepository<Survey, Guid> surveyRepository, IRepository<Survey, Guid> surveyRepository,
IRepository<SocialPost, Guid> socialPostRepository IRepository<SocialPost, Guid> socialPostRepository,
IRepository<ProjectTask, Guid> projectTaskRepository
) )
{ {
_currentTenant = currentTenant; _currentTenant = currentTenant;
@ -78,6 +79,8 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
_overtimeRepository = overtimeRepository; _overtimeRepository = overtimeRepository;
_surveyRepository = surveyRepository; _surveyRepository = surveyRepository;
_socialPostRepository = socialPostRepository; _socialPostRepository = socialPostRepository;
_projectTaskRepository = projectTaskRepository;
} }
public async Task<IntranetDashboardDto> GetIntranetDashboardAsync() public async Task<IntranetDashboardDto> GetIntranetDashboardAsync()
@ -97,10 +100,23 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
Leaves = await GetLeavesAsync(), Leaves = await GetLeavesAsync(),
Overtimes = await GetOvertimesAsync(), Overtimes = await GetOvertimesAsync(),
Surveys = await GetSurveysAsync(), Surveys = await GetSurveysAsync(),
SocialPosts = await GetSocialPostsAsync() SocialPosts = await GetSocialPostsAsync(),
Tasks = await GetProjectTasksAsync()
}; };
} }
private async Task<List<ProjectTaskDto>> GetProjectTasksAsync()
{
var tasks = await _projectTaskRepository
.WithDetailsAsync(e => e.Employee)
.ContinueWith(t => t.Result.Where(s => s.Priority == "High" || s.Priority == "Urgent")
.OrderByDescending(s => s.StartDate)
.Take(3)
.ToList());
return ObjectMapper.Map<List<ProjectTask>, List<ProjectTaskDto>>(tasks);
}
private async Task<List<SocialPostDto>> GetSocialPostsAsync() private async Task<List<SocialPostDto>> GetSocialPostsAsync()
{ {
var socialPosts = await _socialPostRepository var socialPosts = await _socialPostRepository
@ -125,8 +141,6 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
private async Task<List<OvertimeDto>> GetOvertimesAsync() private async Task<List<OvertimeDto>> GetOvertimesAsync()
{ {
var today = DateTime.Now;
var overtimes = await _overtimeRepository var overtimes = await _overtimeRepository
.WithDetailsAsync(e => e.Employee) .WithDetailsAsync(e => e.Employee)
.ContinueWith(t => t.Result.ToList()); .ContinueWith(t => t.Result.ToList());
@ -136,8 +150,6 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
private async Task<List<LeaveDto>> GetLeavesAsync() private async Task<List<LeaveDto>> GetLeavesAsync()
{ {
var today = DateTime.Now;
var leaves = await _leaveRepository var leaves = await _leaveRepository
.WithDetailsAsync(e => e.Employee) .WithDetailsAsync(e => e.Employee)
.ContinueWith(t => t.Result.ToList()); .ContinueWith(t => t.Result.ToList());
@ -450,7 +462,8 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
Path = relativePath, Path = relativePath,
ParentId = string.Empty, ParentId = string.Empty,
IsReadOnly = false, IsReadOnly = false,
ChildCount = 0 ChildCount = 0,
TenantId = _currentTenant.Id?.ToString()
}); });
} }

View file

@ -40,6 +40,8 @@ public class IntranetAutoMapperProfile : Profile
CreateMap<SocialPollOption, SocialPollOptionDto>(); CreateMap<SocialPollOption, SocialPollOptionDto>();
CreateMap<SocialComment, SocialCommentDto>(); CreateMap<SocialComment, SocialCommentDto>();
CreateMap<SocialLike, SocialLikeDto>(); CreateMap<SocialLike, SocialLikeDto>();
CreateMap<ProjectTask, ProjectTaskDto>();
} }
} }

View file

@ -94,16 +94,22 @@ public class ListFormsAppService : CrudAppService<
{ {
item.InsertServiceAddress = input.InsertServiceAddress; item.InsertServiceAddress = input.InsertServiceAddress;
item.InsertCommand = input.InsertCommand; item.InsertCommand = input.InsertCommand;
item.InsertBeforeCommand = input.InsertBeforeCommand;
item.InsertAfterCommand = input.InsertAfterCommand;
} }
else if (input.EditType == ListFormEditTabs.Database.Update.UpdateForm) else if (input.EditType == ListFormEditTabs.Database.Update.UpdateForm)
{ {
item.UpdateServiceAddress = input.UpdateServiceAddress; item.UpdateServiceAddress = input.UpdateServiceAddress;
item.UpdateCommand = input.UpdateCommand; item.UpdateCommand = input.UpdateCommand;
item.UpdateBeforeCommand = input.UpdateBeforeCommand;
item.UpdateAfterCommand = input.UpdateAfterCommand;
} }
else if (input.EditType == ListFormEditTabs.Database.Delete.DeleteForm) else if (input.EditType == ListFormEditTabs.Database.Delete.DeleteForm)
{ {
item.DeleteServiceAddress = input.DeleteServiceAddress; item.DeleteServiceAddress = input.DeleteServiceAddress;
item.DeleteCommand = input.DeleteCommand; item.DeleteCommand = input.DeleteCommand;
item.DeleteBeforeCommand = input.DeleteBeforeCommand;
item.DeleteAfterCommand = input.DeleteAfterCommand;
} }
else if (input.EditType == ListFormEditTabs.PermissionForm) else if (input.EditType == ListFormEditTabs.PermissionForm)
{ {
@ -154,11 +160,11 @@ public class ListFormsAppService : CrudAppService<
else if (input.EditType == ListFormEditTabs.GanttForm) else if (input.EditType == ListFormEditTabs.GanttForm)
{ {
item.GanttOptionJson = JsonSerializer.Serialize(input.GanttOptionDto); item.GanttOptionJson = JsonSerializer.Serialize(input.GanttOptionDto);
} }
else if (input.EditType == ListFormEditTabs.SchedulerForm) else if (input.EditType == ListFormEditTabs.SchedulerForm)
{ {
item.SchedulerOptionJson = JsonSerializer.Serialize(input.SchedulerOptionDto); item.SchedulerOptionJson = JsonSerializer.Serialize(input.SchedulerOptionDto);
} }
else if (input.EditType == ListFormEditTabs.PagerForm) else if (input.EditType == ListFormEditTabs.PagerForm)
{ {
item.PageSize = input.PageSize; item.PageSize = input.PageSize;

View file

@ -1,4 +1,5 @@
using System.Linq; using System;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Erp.Platform.Enums; using Erp.Platform.Enums;
using Erp.Platform.Localization; using Erp.Platform.Localization;
@ -31,7 +32,10 @@ public class ListFormDataAppService : PlatformAppService
if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Create)) if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Create))
throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]); throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]);
var queryParameters = httpContextAccessor.HttpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); var httpContext = httpContextAccessor.HttpContext
?? throw new InvalidOperationException("HTTP Context bulunamadı.");
var queryParameters = httpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value);
return await qManager.GenerateAndRunQueryAsync<dynamic>(input.ListFormCode, OperationEnum.Insert, input.Data, queryParameters: queryParameters); return await qManager.GenerateAndRunQueryAsync<dynamic>(input.ListFormCode, OperationEnum.Insert, input.Data, queryParameters: queryParameters);
} }
@ -41,7 +45,10 @@ public class ListFormDataAppService : PlatformAppService
if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Update)) if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Update))
throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]); throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]);
var queryParameters = httpContextAccessor.HttpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); var httpContext = httpContextAccessor.HttpContext
?? throw new InvalidOperationException("HTTP Context bulunamadı.");
var queryParameters = httpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value);
return await qManager.GenerateAndRunQueryAsync<int>(input.ListFormCode, OperationEnum.Update, input.Data, input.Keys, queryParameters); return await qManager.GenerateAndRunQueryAsync<int>(input.ListFormCode, OperationEnum.Update, input.Data, input.Keys, queryParameters);
} }
@ -51,7 +58,10 @@ public class ListFormDataAppService : PlatformAppService
if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Delete)) if (!await authManager.CanAccess(input.ListFormCode, AuthorizationTypeEnum.Delete))
throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]); throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]);
var queryParameters = httpContextAccessor.HttpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); var httpContext = httpContextAccessor.HttpContext
?? throw new InvalidOperationException("HTTP Context bulunamadı.");
var queryParameters = httpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value);
return await qManager.GenerateAndRunQueryAsync<int>(input.ListFormCode, OperationEnum.Delete, input.Data, input.Keys, queryParameters); return await qManager.GenerateAndRunQueryAsync<int>(input.ListFormCode, OperationEnum.Delete, input.Data, input.Keys, queryParameters);
} }
} }

View file

@ -25,7 +25,7 @@ public class PublicAppService : PlatformAppService
private readonly IRepository<BlogPost, Guid> _postRepository; private readonly IRepository<BlogPost, Guid> _postRepository;
private readonly IRepository<BlogCategory, Guid> _categoryRepository; private readonly IRepository<BlogCategory, Guid> _categoryRepository;
private readonly IRepository<Product, Guid> _productRepository; private readonly IRepository<Product, Guid> _productRepository;
private readonly IRepository<PaymentMethod, Guid> _paymentMethodRepository; private readonly IRepository<PaymentMethod, string> _paymentMethodRepository;
private readonly IRepository<InstallmentOption> _installmentOptionRepository; private readonly IRepository<InstallmentOption> _installmentOptionRepository;
private readonly IRepository<Order, Guid> _orderRepository; private readonly IRepository<Order, Guid> _orderRepository;
private readonly IRepository<About, Guid> _aboutRepository; private readonly IRepository<About, Guid> _aboutRepository;
@ -40,7 +40,7 @@ public class PublicAppService : PlatformAppService
IRepository<BlogPost, Guid> postRepository, IRepository<BlogPost, Guid> postRepository,
IRepository<BlogCategory, Guid> categoryRepository, IRepository<BlogCategory, Guid> categoryRepository,
IRepository<Product, Guid> productRepository, IRepository<Product, Guid> productRepository,
IRepository<PaymentMethod, Guid> paymentMethodRepository, IRepository<PaymentMethod, string> paymentMethodRepository,
IRepository<InstallmentOption> installmentOptionRepository, IRepository<InstallmentOption> installmentOptionRepository,
IRepository<Order, Guid> orderRepository, IRepository<Order, Guid> orderRepository,
IRepository<About, Guid> aboutRepository, IRepository<About, Guid> aboutRepository,

View file

@ -1,408 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Erp.Platform.Entities;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories;
using System.Linq.Dynamic.Core;
using Microsoft.EntityFrameworkCore;
namespace Erp.Platform.Reports;
[Authorize()]
public class ReportAppService : PlatformAppService, IReportAppService
{
private readonly IRepository<ReportTemplate, Guid> _reportTemplateRepository;
private readonly IRepository<ReportGenerated, Guid> _generatedReportRepository;
private readonly IRepository<ReportParameter, Guid> _reportParameterRepository;
private readonly IRepository<ReportCategory, Guid> _reportCategotyRepository;
public ReportAppService(
IRepository<ReportTemplate, Guid> reportTemplateRepository,
IRepository<ReportGenerated, Guid> generatedReportRepository,
IRepository<ReportParameter, Guid> reportParameterRepository,
IRepository<ReportCategory, Guid> reportCategotyRepository
)
{
_reportTemplateRepository = reportTemplateRepository;
_generatedReportRepository = generatedReportRepository;
_reportParameterRepository = reportParameterRepository;
_reportCategotyRepository = reportCategotyRepository;
}
public async Task<List<ReportCategoryDto>> GetCategoriesAsync()
{
var entity = await _reportCategotyRepository.GetListAsync();
return ObjectMapper.Map<List<ReportCategory>, List<ReportCategoryDto>>(entity);
}
public async Task<PagedResultDto<ReportTemplateDto>> GetTemplatesAsync(GetReportTemplatesInput input)
{
// IQueryable başlat - Parameters'ı include et
var query = await _reportTemplateRepository.GetQueryableAsync();
query = query.Include(x => x.Parameters);
// Filtreleme
if (!string.IsNullOrWhiteSpace(input.Filter))
{
query = query.Where(x =>
x.Name.Contains(input.Filter) ||
x.Description.Contains(input.Filter)
);
}
if (input.CategoryId != Guid.Empty)
{
query = query.Where(x => x.CategoryId == input.CategoryId);
}
// Toplam kayıt sayısı
var totalCount = await AsyncExecuter.CountAsync(query);
// Sıralama (ABP default olarak sorting null ise Id'ye göre sıralar)
query = query.OrderBy(input.Sorting ?? nameof(ReportTemplate.Name));
// Sayfalama
var templates = await AsyncExecuter.ToListAsync(
query
.Skip(input.SkipCount)
.Take(input.MaxResultCount)
);
// DTO dönüşümü
var templateDtos = templates.Select(MapToReportTemplateDto).ToList();
return new PagedResultDto<ReportTemplateDto>(
totalCount,
templateDtos
);
}
public async Task<ReportTemplateDto> GetTemplateAsync(Guid id)
{
var query = await _reportTemplateRepository.GetQueryableAsync();
var template = await query
.Include(x => x.Parameters)
.FirstOrDefaultAsync(x => x.Id == id);
if (template == null)
{
throw new ArgumentException($"Template with id {id} not found");
}
return MapToReportTemplateDto(template);
}
public async Task<ReportTemplateDto> CreateTemplateAsync(CreateReportTemplateDto input)
{
var template = new ReportTemplate(
GuidGenerator.Create(),
input.Name,
input.Description,
input.HtmlContent,
input.CategoryId)
{
Tags = JsonSerializer.Serialize(input.Tags)
};
template = await _reportTemplateRepository.InsertAsync(template, true);
// Parameters ekle
foreach (var paramDto in input.Parameters)
{
var parameter = new ReportParameter(
GuidGenerator.Create(),
template.Id,
paramDto.Name,
paramDto.Placeholder,
paramDto.Type,
paramDto.Required)
{
DefaultValue = paramDto.DefaultValue,
Description = paramDto.Description
};
await _reportParameterRepository.InsertAsync(parameter);
}
return await GetTemplateAsync(template.Id);
}
public async Task<ReportTemplateDto> UpdateTemplateAsync(Guid id, UpdateReportTemplateDto input)
{
// 1) Şablonu getir ve alanlarını güncelle
var template = await _reportTemplateRepository.GetAsync(id);
template.Name = input.Name;
template.Description = input.Description;
template.HtmlContent = input.HtmlContent;
template.CategoryId = input.CategoryId;
template.Tags = JsonSerializer.Serialize(input.Tags ?? []);
// Şablonu hemen persist et (audit alanları için de iyi olur)
await _reportTemplateRepository.UpdateAsync(template, autoSave: true);
// 2) Parametrelerde upsert + artıklarını sil
var existingParams = await _reportParameterRepository.GetListAsync(p => p.TemplateId == id);
var existingById = existingParams.ToDictionary(p => p.Id, p => p);
var inputParams = input.Parameters ?? new List<UpdateReportParameterDto>();
// Id'si olan/olmayan diye ayır
var withId = inputParams.Where(x => x.Id.HasValue).ToList();
var withoutId = inputParams.Where(x => !x.Id.HasValue).ToList();
// 2.a) Id'si olanları güncelle (varsa) ya da ekle (yoksa)
foreach (var dto in withId)
{
var pid = dto.Id!.Value;
if (existingById.TryGetValue(pid, out var entity))
{
// Güncelle
entity.Name = dto.Name;
entity.Placeholder = dto.Placeholder;
entity.Type = dto.Type;
entity.Required = dto.Required;
entity.DefaultValue = dto.DefaultValue;
entity.Description = dto.Description;
await _reportParameterRepository.UpdateAsync(entity);
existingById.Remove(pid); // kalanlar silinecek listesinde kalmasın
}
else
{
// DB'de yoksa yeni ekle (istemci Id göndermiş olabilir)
var newParam = new ReportParameter(
pid,
template.Id,
dto.Name,
dto.Placeholder,
dto.Type,
dto.Required)
{
DefaultValue = dto.DefaultValue,
Description = dto.Description
};
await _reportParameterRepository.InsertAsync(newParam);
}
}
// 2.b) Id'siz gelenleri yeni olarak ekle
foreach (var dto in withoutId)
{
var newParam = new ReportParameter(
GuidGenerator.Create(),
template.Id,
dto.Name,
dto.Placeholder,
dto.Type,
dto.Required)
{
DefaultValue = dto.DefaultValue,
Description = dto.Description
};
await _reportParameterRepository.InsertAsync(newParam);
}
// 2.c) Input'ta olmayan eski parametreleri sil
foreach (var leftover in existingById.Values)
{
await _reportParameterRepository.DeleteAsync(leftover);
}
// 3) Değişiklikleri tek seferde kaydet
await CurrentUnitOfWork.SaveChangesAsync();
// 4) Güncel DTO'yu dön
return await GetTemplateAsync(template.Id);
}
public async Task DeleteTemplateAsync(Guid id)
{
await _reportTemplateRepository.DeleteAsync(id);
}
public async Task<PagedResultDto<ReportGeneratedDto>> GetGeneratedReportsAsync(GetGeneratedReportsInput input)
{
var query = await _generatedReportRepository.GetQueryableAsync();
// Okuma senaryosu: tracking gerekmiyor + Template'ı eager load edelim
query = query.AsNoTracking()
.Include(x => x.ReportTemplate);
// Filtre
if (!string.IsNullOrWhiteSpace(input.Filter))
{
query = query.Where(x =>
x.TemplateName.Contains(input.Filter) ||
x.GeneratedContent.Contains(input.Filter)
);
}
if (input.TemplateId.HasValue)
{
query = query.Where(x => x.TemplateId == input.TemplateId.Value);
}
// Toplam kayıt
var totalCount = await AsyncExecuter.CountAsync(query);
// Sıralama
if (!string.IsNullOrWhiteSpace(input.Sorting))
query = query.OrderBy(input.Sorting); // ör. "generatedAt DESC" veya "templateName"
else
query = query.OrderByDescending(x => x.CreationTime);
// Sayfalama
var reports = await AsyncExecuter.ToListAsync(
query.Skip(input.SkipCount).Take(input.MaxResultCount)
);
// DTO map
var reportDtos = reports.Select(MapToGeneratedReportDto).ToList();
return new PagedResultDto<ReportGeneratedDto>(totalCount, reportDtos);
}
public async Task<ReportGeneratedDto> GetGeneratedReportAsync(Guid id)
{
var report = await _generatedReportRepository.GetAsync(id);
return MapToGeneratedReportDto(report);
}
public async Task<ReportGeneratedDto> GenerateReportAsync(ReportGenerateDto input)
{
var template = await _reportTemplateRepository.GetAsync(input.TemplateId);
if (template == null)
{
throw new ArgumentException("Template not found");
}
// HTML içeriğindeki parametreleri değiştir
var generatedContent = template.HtmlContent;
foreach (var param in input.Parameters)
{
var pattern = $"@@{param.Key}";
generatedContent = generatedContent.Replace(pattern, param.Value ?? "");
}
var generatedReport = new ReportGenerated(
GuidGenerator.Create(),
template.Id,
template.Name,
generatedContent,
JsonSerializer.Serialize(input.Parameters));
generatedReport = await _generatedReportRepository.InsertAsync(generatedReport, true);
return await GetGeneratedReportAsync(generatedReport.Id);
}
public async Task DeleteGeneratedReportAsync(Guid id)
{
await _generatedReportRepository.DeleteAsync(id);
}
public async Task<ReportsDataDto> GetAllDataAsync()
{
var templatesInput = new GetReportTemplatesInput { MaxResultCount = 1000 };
var reportsInput = new GetGeneratedReportsInput { MaxResultCount = 1000 };
var templates = await GetTemplatesAsync(templatesInput);
var reports = await GetGeneratedReportsAsync(reportsInput);
return new ReportsDataDto
{
Templates = templates,
GeneratedReports = reports
};
}
private ReportTemplateDto MapToReportTemplateDto(ReportTemplate template)
{
var dto = new ReportTemplateDto
{
Id = template.Id,
Name = template.Name,
Description = template.Description,
HtmlContent = template.HtmlContent,
CategoryId = template.CategoryId,
CreationTime = template.CreationTime,
LastModificationTime = template.LastModificationTime,
CreatorId = template.CreatorId,
LastModifierId = template.LastModifierId
};
// Tags deserialize
try
{
dto.Tags = string.IsNullOrEmpty(template.Tags)
? []
: JsonSerializer.Deserialize<List<string>>(template.Tags);
}
catch
{
dto.Tags = new List<string>();
}
// Parameters map
dto.Parameters = template.Parameters?.Select(p => new ReportParameterDto
{
Id = p.Id,
TemplateId = p.TemplateId,
Name = p.Name,
Placeholder = p.Placeholder,
Type = p.Type,
DefaultValue = p.DefaultValue,
Required = p.Required,
Description = p.Description
}).ToList() ?? [];
return dto;
}
private ReportGeneratedDto MapToGeneratedReportDto(ReportGenerated report)
{
var dto = new ReportGeneratedDto
{
Id = report.Id,
TemplateId = report.TemplateId,
TemplateName = report.TemplateName,
GeneratedContent = report.GeneratedContent,
CreationTime = report.CreationTime,
LastModificationTime = report.LastModificationTime,
CreatorId = report.CreatorId,
LastModifierId = report.LastModifierId
};
// Parameters deserialize
try
{
dto.Parameters = string.IsNullOrEmpty(report.Parameters)
? new Dictionary<string, string>()
: JsonSerializer.Deserialize<Dictionary<string, string>>(report.Parameters);
}
catch
{
dto.Parameters = [];
}
// Template mapping
if (report.ReportTemplate != null)
{
dto.ReportTemplate = MapToReportTemplateDto(report.ReportTemplate);
}
return dto;
}
}

View file

@ -1,91 +0,0 @@
using AutoMapper;
using Erp.Platform.Entities;
using System.Text.Json;
using System.Collections.Generic;
namespace Erp.Platform.Reports
{
public class ReportAutoMapperProfile : Profile
{
public ReportAutoMapperProfile()
{
CreateMap<ReportTemplate, ReportTemplateDto>()
.ForMember(dest => dest.Tags, opt => opt.MapFrom(src =>
ConvertTagsFromJson(src.Tags)))
.ForMember(dest => dest.Parameters, opt => opt.MapFrom(src => src.Parameters));
CreateMap<CreateReportTemplateDto, ReportTemplate>()
.ForMember(dest => dest.Tags, opt => opt.MapFrom(src => ConvertTagsToJson(src.Tags)))
.ForMember(dest => dest.Parameters, opt => opt.Ignore());
CreateMap<UpdateReportTemplateDto, ReportTemplate>()
.ForMember(dest => dest.Tags, opt => opt.MapFrom(src => ConvertTagsToJson(src.Tags)))
.ForMember(dest => dest.Parameters, opt => opt.Ignore());
CreateMap<ReportParameter, ReportParameterDto>();
CreateMap<CreateReportParameterDto, ReportParameter>()
.ForMember(dest => dest.Id, opt => opt.Ignore())
.ForMember(dest => dest.TemplateId, opt => opt.Ignore());
CreateMap<UpdateReportParameterDto, ReportParameter>()
.ForMember(dest => dest.TemplateId, opt => opt.Ignore());
CreateMap<ReportGenerated, ReportGeneratedDto>()
.ForMember(dest => dest.Parameters, opt => opt.MapFrom(src =>
ConvertParametersFromJson(src.Parameters)))
.ForMember(dest => dest.ReportTemplate, opt => opt.MapFrom(src => src.ReportTemplate));
CreateMap<ReportGenerateDto, ReportGenerated>()
.ForMember(dest => dest.Parameters, opt => opt.MapFrom(src => ConvertParametersToJson(src.Parameters)))
.ForMember(dest => dest.Id, opt => opt.Ignore())
.ForMember(dest => dest.TemplateId, opt => opt.MapFrom(src => src.TemplateId))
.ForMember(dest => dest.TemplateName, opt => opt.Ignore())
.ForMember(dest => dest.GeneratedContent, opt => opt.Ignore());
CreateMap<ReportCategory, ReportCategoryDto>();
}
private static List<string> ConvertTagsFromJson(string tags)
{
if (string.IsNullOrEmpty(tags))
return new List<string>();
try
{
return JsonSerializer.Deserialize<List<string>>(tags) ?? new List<string>();
}
catch
{
return new List<string>();
}
}
private static string ConvertTagsToJson(List<string> tags)
{
return JsonSerializer.Serialize(tags ?? new List<string>());
}
private static Dictionary<string, string> ConvertParametersFromJson(string parameters)
{
if (string.IsNullOrEmpty(parameters))
return new Dictionary<string, string>();
try
{
return JsonSerializer.Deserialize<Dictionary<string, string>>(parameters) ?? new Dictionary<string, string>();
}
catch
{
return new Dictionary<string, string>();
}
}
private static string ConvertParametersToJson(Dictionary<string, string> parameters)
{
return JsonSerializer.Serialize(parameters ?? new Dictionary<string, string>());
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -26,7 +26,7 @@ namespace Erp.Platform.Data.Seeds;
#region SeedDtos #region SeedDtos
public class AiBotSeedDto public class AiBotSeedDto
{ {
public string BotName { get; set; } public string Name { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string ApiUrl { get; set; } public string ApiUrl { get; set; }
public bool IsActive { get; set; } public bool IsActive { get; set; }
@ -70,6 +70,7 @@ public class MenuSeedDto
public string Icon { get; set; } public string Icon { get; set; }
public string RequiredPermissionName { get; set; } public string RequiredPermissionName { get; set; }
public bool IsDisabled { get; set; } public bool IsDisabled { get; set; }
public string ShortName { get; set; }
} }
public class PermissionGroupDefinitionRecordSeedDto public class PermissionGroupDefinitionRecordSeedDto
@ -91,7 +92,7 @@ public class PermissionDefinitionRecordSeedDto
public class CurrencySeedDto public class CurrencySeedDto
{ {
public string Code { get; set; } public string Id { get; set; }
public string Symbol { get; set; } public string Symbol { get; set; }
public string Name { get; set; } public string Name { get; set; }
public bool IsActive { get; set; } public bool IsActive { get; set; }
@ -149,9 +150,9 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
private readonly IRepository<Menu, Guid> _menuRepository; private readonly IRepository<Menu, Guid> _menuRepository;
private readonly IRepository<PermissionGroupDefinitionRecord, Guid> _permissionGroupRepository; private readonly IRepository<PermissionGroupDefinitionRecord, Guid> _permissionGroupRepository;
private readonly IRepository<PermissionDefinitionRecord, Guid> _permissionRepository; private readonly IRepository<PermissionDefinitionRecord, Guid> _permissionRepository;
private readonly IRepository<Currency, Guid> _currencyRepository; private readonly IRepository<Currency, string> _currencyRepository;
private readonly IRepository<CountryGroup, Guid> _countryGroupRepository; private readonly IRepository<CountryGroup, string> _countryGroupRepository;
private readonly IRepository<Country, Guid> _countryRepository; private readonly IRepository<Country, string> _countryRepository;
private readonly IRepository<City, Guid> _cityRepository; private readonly IRepository<City, Guid> _cityRepository;
private readonly IRepository<District, Guid> _districtRepository; private readonly IRepository<District, Guid> _districtRepository;
private readonly IRepository<ContactTag, Guid> _contactTagRepository; private readonly IRepository<ContactTag, Guid> _contactTagRepository;
@ -169,9 +170,9 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
IRepository<Menu, Guid> menuRepository, IRepository<Menu, Guid> menuRepository,
IRepository<PermissionGroupDefinitionRecord, Guid> permissionGroupRepository, IRepository<PermissionGroupDefinitionRecord, Guid> permissionGroupRepository,
IRepository<PermissionDefinitionRecord, Guid> permissionRepository, IRepository<PermissionDefinitionRecord, Guid> permissionRepository,
IRepository<Currency, Guid> currencyRepository, IRepository<Currency, string> currencyRepository,
IRepository<CountryGroup, Guid> countryGroupRepository, IRepository<CountryGroup, string> countryGroupRepository,
IRepository<Country, Guid> countryRepository, IRepository<Country, string> countryRepository,
IRepository<City, Guid> cityRepository, IRepository<City, Guid> cityRepository,
IRepository<District, Guid> districtRepository, IRepository<District, Guid> districtRepository,
IRepository<ContactTag, Guid> contactTagRepository, IRepository<ContactTag, Guid> contactTagRepository,
@ -236,7 +237,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
continue; continue;
buffer.Add(new CountryGroup( buffer.Add(new CountryGroup(
Guid.NewGuid(), item.Name,
item.Name item.Name
)); ));
@ -268,7 +269,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
// DB’de mevcut kodları set olarak al // DB’de mevcut kodları set olarak al
var existingCodes = (await dbCtx.Set<Country>() var existingCodes = (await dbCtx.Set<Country>()
.Select(c => c.Code) .Select(c => c.Name)
.ToListAsync()) .ToListAsync())
.ToHashSet(); .ToHashSet();
@ -282,15 +283,14 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
await foreach (var item in JsonSerializer.DeserializeAsyncEnumerable<CountryDto>(fs, options)) await foreach (var item in JsonSerializer.DeserializeAsyncEnumerable<CountryDto>(fs, options))
{ {
if (item == null) continue; if (item == null) continue;
if (string.IsNullOrWhiteSpace(item.Code)) continue; // boş kodları atla if (string.IsNullOrWhiteSpace(item.Name)) continue; // boş kodları atla
// hem DB’de hem JSON içinde duplicate engelle // hem DB’de hem JSON içinde duplicate engelle
if (!seenCodes.Add(item.Code) || existingCodes.Contains(item.Code)) if (!seenCodes.Add(item.Name) || existingCodes.Contains(item.Name))
continue; continue;
buffer.Add(new Country( buffer.Add(new Country(
Guid.NewGuid(), item.Name,
item.Code,
item.Name, item.Name,
item.GroupName, item.GroupName,
item.Currency, item.Currency,
@ -326,11 +326,11 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
// 1. Mevcut kayıtları çek (tek sorguda) // 1. Mevcut kayıtları çek (tek sorguda)
var existingCities = await dbCtx.Set<City>() var existingCities = await dbCtx.Set<City>()
.Select(d => new { d.Code }) .Select(d => new { d.Country, d.Name })
.ToListAsync(); .ToListAsync();
var existingSet = existingCities var existingSet = existingCities
.Select(d => d.Code) .Select(d => $"{d.Country}.{d.Name}")
.ToHashSet(); .ToHashSet();
var options = new JsonSerializerOptions var options = new JsonSerializerOptions
@ -346,14 +346,13 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
{ {
if (item == null) continue; if (item == null) continue;
var key = $"{item.Country}.{item.Code}"; var key = $"{item.Country}.{item.Name}";
if (existingSet.Contains(key)) continue; // duplicate kontrolü if (existingSet.Contains(key)) continue; // duplicate kontrolü
buffer.Add(new City( buffer.Add(new City(
Guid.NewGuid(), Guid.NewGuid(),
item.Country, item.Country,
item.Name, item.Name,
key,
item.PlateCode item.PlateCode
)); ));
@ -407,14 +406,13 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
{ {
if (item == null) continue; if (item == null) continue;
var key = $"{item.Country}:{item.Country}.{item.City}:{item.Name}:{item.Township}"; var key = $"{item.Country}:{item.City}:{item.Name}:{item.Township}";
var city = $"{item.Country}.{item.City}";
if (existingSet.Contains(key)) continue; if (existingSet.Contains(key)) continue;
buffer.Add(new District( buffer.Add(new District(
Guid.NewGuid(), Guid.NewGuid(),
item.Country, item.Country,
city, item.City,
item.Name, item.Name,
item.Township item.Township
)); ));
@ -584,6 +582,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
Icon = item.Icon, Icon = item.Icon,
RequiredPermissionName = item.RequiredPermissionName, RequiredPermissionName = item.RequiredPermissionName,
IsDisabled = item.IsDisabled, IsDisabled = item.IsDisabled,
ShortName = item.ShortName
}); });
} }
} }
@ -626,13 +625,12 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
foreach (var item in items.Currencies) foreach (var item in items.Currencies)
{ {
var exists = await _currencyRepository.AnyAsync(x => x.Code == item.Code); var exists = await _currencyRepository.AnyAsync(x => x.Id == item.Id);
if (!exists) if (!exists)
{ {
await _currencyRepository.InsertAsync(new Currency await _currencyRepository.InsertAsync(new Currency(item.Id)
{ {
Code = item.Code,
Symbol = item.Symbol, Symbol = item.Symbol,
Name = item.Name, Name = item.Name,
IsActive = item.IsActive IsActive = item.IsActive
@ -670,13 +668,13 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
foreach (var item in items.AiBots) foreach (var item in items.AiBots)
{ {
var exists = await _aiBotRepository.AnyAsync(x => x.BotName == item.BotName); var exists = await _aiBotRepository.AnyAsync(x => x.Name == item.Name);
if (!exists) if (!exists)
{ {
await _aiBotRepository.InsertAsync(new AiBot await _aiBotRepository.InsertAsync(new AiBot
{ {
BotName = item.BotName, Name = item.Name,
Description = item.Description, Description = item.Description,
ApiUrl = item.ApiUrl, ApiUrl = item.ApiUrl,
IsActive = item.IsActive IsActive = item.IsActive

File diff suppressed because it is too large Load diff

View file

@ -80,16 +80,16 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Program)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Program)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -195,7 +195,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Schedule)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Schedule)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 750, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 750, 400, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -219,10 +219,10 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
new EditingFormItemDto { Order = 16, DataField = "Friday", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 16, DataField = "Friday", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 17, DataField = "Saturday", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 17, DataField = "Saturday", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 18, DataField = "Sunday", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 18, DataField = "Sunday", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 19, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 19, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IncludeLunch", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IncludeLunch", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Monday", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Monday", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
@ -590,7 +590,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RegistrationType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RegistrationType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
@ -600,10 +600,10 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
[ [
new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -737,7 +737,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RegistrationMethod)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RegistrationMethod)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 550, 350, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 550, 350, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
@ -748,10 +748,10 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "RegistrationTypeId", IsRequired = true, ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "RegistrationTypeId", IsRequired = true, ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -911,7 +911,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ClassType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ClassType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
@ -924,10 +924,10 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "MinStudentCount", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 5, DataField = "MinStudentCount", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 6, DataField = "MaxStudentCount", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 6, DataField = "MaxStudentCount", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 7, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 7, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -1120,7 +1120,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Class)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Class)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 550, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 550, 300, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
@ -1131,10 +1131,10 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "ClassTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "ClassTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -1294,7 +1294,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Level)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Level)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 650, 450, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 650, 450, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
@ -1304,16 +1304,16 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
[ [
new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "ClassTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "ClassTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "LevelType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 3, DataField = "LevelType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox}, new EditingFormItemDto { Order = 4, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox},
new EditingFormItemDto { Order = 5, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 5, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 6, DataField = "LessonCount", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 6, DataField = "LessonCount", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 7, DataField = "LessonDuration", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 7, DataField = "LessonDuration", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 8, DataField = "MonthlyPaymentRate", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 8, DataField = "MonthlyPaymentRate", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 9, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 9, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -1492,7 +1492,6 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "MonthlyPaymentRate", FieldName = "MonthlyPaymentRate",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 150, Width = 150,
ListOrderNo = 9, ListOrderNo = 9,
@ -1501,7 +1500,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
IsDeleted = false, IsDeleted = false,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
// Status // Status
new() new()
@ -1567,16 +1567,16 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ClassCancellationReason)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ClassCancellationReason)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -1682,7 +1682,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LessonPeriod)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LessonPeriod)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
@ -1699,7 +1699,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
new EditingFormItemDto { Order = 8, DataField = "Lesson4", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 8, DataField = "Lesson4", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
} }
); );
@ -1922,7 +1922,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionTag)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionTag)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -1934,7 +1934,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
new EditingFormItemDto { Order = 3, DataField = "Color", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxColorBox }, new EditingFormItemDto { Order = 3, DataField = "Color", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxColorBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
}, autoSave: true }, autoSave: true
); );
@ -2043,7 +2043,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionPool)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionPool)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -2054,7 +2054,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
new EditingFormItemDto { Order = 3, DataField = "Tags", ColSpan = 1, EditorType2=EditorTypes.dxTagBox }, new EditingFormItemDto { Order = 3, DataField = "Tags", ColSpan = 1, EditorType2=EditorTypes.dxTagBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() { new() {
Hint = "Questions", Hint = "Questions",
@ -2174,10 +2174,10 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Question)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Question)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() { new() {
Hint = "Answers", Hint = "Answers",
@ -2265,7 +2265,6 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Points", FieldName = "Points",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 60, Width = 60,
ListOrderNo = 3, ListOrderNo = 3,
@ -2275,7 +2274,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,

File diff suppressed because it is too large Load diff

View file

@ -82,10 +82,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EmploymentType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EmploymentType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 200, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 200, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -162,7 +162,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -173,21 +173,20 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.JobPosition)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.JobPosition)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 4, DataField="DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField="DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField="Level", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField="Level", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField="MinSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 6, DataField="MinSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 7, DataField="MaxSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 7, DataField="MaxSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 8, DataField="Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 8, DataField="Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 9, DataField="RequiredSkills", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 9, DataField="RequiredSkills", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 10, DataField="Responsibilities", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 10, DataField="Responsibilities", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
@ -196,7 +195,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "MinSalary", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "MaxSalary", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }
}), }),
} }
); );
@ -206,7 +208,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -219,22 +221,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 100,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
@ -318,7 +304,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "MinSalary", FieldName = "MinSalary",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 7, ListOrderNo = 7,
@ -328,14 +313,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "MaxSalary", FieldName = "MaxSalary",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 8, ListOrderNo = 8,
@ -345,7 +330,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -358,7 +344,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
@ -464,21 +450,20 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
TreeOptionJson = DefaultTreeOptionJson("Id", "ParentDepartmentId", true), TreeOptionJson = DefaultTreeOptionJson("Id", "ParentDepartmentId", true),
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Department)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Department)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 4, DataField="ParentDepartmentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField="ParentDepartmentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField="ManagerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField="ManagerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField="CostCenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 6, DataField="CostCenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField="Budget", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 7, DataField="Budget", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 8, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox} new EditingFormItemDto { Order = 8, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox}
]} ]}
}), }),
@ -506,22 +491,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 100,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
@ -607,7 +576,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Budget", FieldName = "Budget",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 8, ListOrderNo = 8,
@ -617,7 +585,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -674,15 +643,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Badge)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Badge)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [
new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 4, DataField="Icon", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField="Icon", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
@ -719,22 +687,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 200,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
@ -887,7 +839,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Points", FieldName = "Points",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 9, ListOrderNo = 9,
@ -897,7 +848,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -983,23 +935,22 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
TreeOptionJson = DefaultTreeOptionJson("Id", "ParentCostCenterId", true), TreeOptionJson = DefaultTreeOptionJson("Id", "ParentCostCenterId", true),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CostCenter)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CostCenter)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 4, DataField="ParentCostCenterId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField="ParentCostCenterId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField="ResponsibleEmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField="ResponsibleEmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField="DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 6, DataField="DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField="CostCenterType", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 7, DataField="CostCenterType", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 8, DataField="BudgetedAmount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 8, DataField="BudgetedAmount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 9, DataField="ActualAmount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 9, DataField="ActualAmount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 10, DataField="Currency", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 10, DataField="Currency", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 11, DataField="FiscalYear", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 11, DataField="FiscalYear", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 12, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox} new EditingFormItemDto { Order = 12, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox}
@ -1030,22 +981,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 100,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
@ -1162,7 +1097,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "BudgetedAmount", FieldName = "BudgetedAmount",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 9, ListOrderNo = 9,
@ -1172,14 +1106,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "ActualAmount", FieldName = "ActualAmount",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 10, ListOrderNo = 10,
@ -1189,7 +1123,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -1202,7 +1137,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
@ -1212,7 +1147,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "FiscalYear", FieldName = "FiscalYear",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 12, ListOrderNo = 12,
@ -1222,7 +1156,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -1280,10 +1215,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
TreeOptionJson = DefaultTreeOptionJson("Id", "ManagerId", true), TreeOptionJson = DefaultTreeOptionJson("Id", "ManagerId", true),
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Employee)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Employee)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -1292,9 +1227,9 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "NationalId", 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 = 4, DataField = "BirthDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 5, DataField = "Gender", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 5, DataField = "Gender", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField = "MaritalStatus", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField = "MaritalStatus", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField = "EmployeeStatus", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 7, DataField = "EmployeeStatus", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 8, DataField = "IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 8, DataField = "IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
]}, ]},
new() { new() {
@ -1319,7 +1254,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 5, DataField = "DepartmentId", 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 = 6, DataField = "WorkLocation", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 7, DataField = "ManagerId", ColSpan = 1, 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 = 8, DataField = "BaseSalary", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 9, DataField = "Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 9, DataField = "Currency", 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 = 10, DataField = "PayrollGroup", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 11, DataField = "BankId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 11, DataField = "BankId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
@ -1334,7 +1269,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
]}, ]},
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -1883,7 +1818,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "BaseSalary", FieldName = "BaseSalary",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 30, ListOrderNo = 30,
@ -1894,7 +1828,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -1907,7 +1842,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"),
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
@ -2027,10 +1962,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Leave)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Leave)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -2042,8 +1977,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorScript = EditorScriptValues.CalcTotalDaysFromDates}, new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorScript = EditorScriptValues.CalcTotalDaysFromDates},
new EditingFormItemDto { Order = 6, DataField = "TotalDays", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.Disabled}, new EditingFormItemDto { Order = 6, DataField = "TotalDays", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.Disabled},
new EditingFormItemDto { Order = 7, DataField = "IsHalfDay", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox}, new EditingFormItemDto { Order = 7, DataField = "IsHalfDay", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox},
new EditingFormItemDto { Order = 8, DataField = "Reason", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea}, new EditingFormItemDto { Order = 8, DataField = "Reason", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 9, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, new EditingFormItemDto { Order = 9, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
@ -2196,7 +2131,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -2358,10 +2294,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Overtime)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Overtime)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -2374,7 +2310,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 7, DataField = "Reason", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea}, new EditingFormItemDto { Order = 7, DataField = "Reason", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea},
new EditingFormItemDto { Order = 8, DataField = "Rate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton}, new EditingFormItemDto { Order = 8, DataField = "Rate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton},
new EditingFormItemDto { Order = 9, DataField = "Amount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = "{ \"disabled\" : true, \"format\" : { \"type\" : \"fixedPoint\", \"precision\" : 2 } }"}, new EditingFormItemDto { Order = 9, DataField = "Amount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = "{ \"disabled\" : true, \"format\" : { \"type\" : \"fixedPoint\", \"precision\" : 2 } }"},
new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
@ -2496,7 +2432,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -2546,7 +2483,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Amount", FieldName = "Amount",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 8, ListOrderNo = 8,
@ -2556,7 +2492,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -2652,7 +2589,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
} }
#endregion #endregion
#region Expense Request #region Expense
listFormName = AppCodes.Hr.Expense; listFormName = AppCodes.Hr.Expense;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
{ {
@ -2687,22 +2624,22 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Expense)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Expense)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 450, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 450, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "Category", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "Category", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "Amount", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 3, DataField = "Amount", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 4, DataField = "Currency", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "Currency", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField = "RequestDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 5, DataField = "RequestDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan=1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan=1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 7, DataField = "Project", ColSpan=1, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 7, DataField = "Project", ColSpan=1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 8, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 8, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 9, DataField = "Notes", ColSpan=1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 9, DataField = "Notes", ColSpan=1, EditorType2 = EditorTypes.dxTextArea },
]} ]}
}), }),
@ -2802,7 +2739,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Amount", FieldName = "Amount",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 4, ListOrderNo = 4,
@ -2813,7 +2749,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -2826,7 +2763,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"),
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
@ -2975,10 +2912,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Payroll)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Payroll)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -2987,14 +2924,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 2, DataField = "PeriodYear", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 2, DataField = "PeriodYear", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 3, DataField = "PeriodMonth", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "PeriodMonth", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "PaymentDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 4, DataField = "PaymentDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 5, DataField = "BaseSalary", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 5, DataField = "BaseSalary", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 6, DataField = "Overtime", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 6, DataField = "Overtime", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 7, DataField = "Bonus", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 7, DataField = "Bonus", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 8, DataField = "GrossSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 8, DataField = "GrossSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 9, DataField = "NetSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 9, DataField = "NetSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 10, DataField = "TaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 10, DataField = "TaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 11, DataField = "SocialSecurity", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 11, DataField = "SocialSecurity", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
@ -3157,7 +3094,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "BaseSalary", FieldName = "BaseSalary",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 150, Width = 150,
ListOrderNo = 6, ListOrderNo = 6,
@ -3168,14 +3104,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Overtime", FieldName = "Overtime",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 7, ListOrderNo = 7,
@ -3185,14 +3121,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Bonus", FieldName = "Bonus",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 8, ListOrderNo = 8,
@ -3202,14 +3138,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "GrossSalary", FieldName = "GrossSalary",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 9, ListOrderNo = 9,
@ -3219,14 +3155,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "NetSalary", FieldName = "NetSalary",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 10, ListOrderNo = 10,
@ -3236,14 +3172,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Int64, SourceDbType = DbType.Int64,
FieldName = "TaxNumber", FieldName = "TaxNumber",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 11, ListOrderNo = 11,
@ -3253,7 +3189,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -3261,7 +3198,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "SocialSecurity", FieldName = "SocialSecurity",
Alignment = "right", Alignment = "right",
Format = "fixedPoint",
Width = 100, Width = 100,
ListOrderNo = 12, ListOrderNo = 12,
Visible = true, Visible = true,
@ -3270,7 +3206,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
@ -3342,10 +3279,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Template360)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Template360)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -3493,10 +3430,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Performance360)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Performance360)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -3506,7 +3443,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 3, DataField = "TemplateId", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "TemplateId", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "StartDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 4, DataField = "StartDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 6, DataField = "Status", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField = "Status", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField = "DepartmentId", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 7, DataField = "DepartmentId", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 8, DataField = "TargetEmployees", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxTagBox }, new EditingFormItemDto { Order = 8, DataField = "TargetEmployees", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxTagBox },
]} ]}
@ -3726,10 +3663,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Training)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Training)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -3745,7 +3682,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 9, DataField = "StartDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 9, DataField = "StartDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 10, DataField = "EndDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 10, DataField = "EndDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 11, DataField = "MaxParticipants", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 11, DataField = "MaxParticipants", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan=1, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan=1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
@ -4060,10 +3997,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 450, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -4071,7 +4008,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 3, DataField = "Deadline", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 3, DataField = "Deadline", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 4, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField = "IsAnonymous", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 5, DataField = "IsAnonymous", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxCheckBox },
]} ]}
}), }),
@ -4240,10 +4177,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -4405,10 +4342,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyResponse)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyResponse)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {

View file

@ -80,7 +80,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EventType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EventType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -88,7 +88,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
} }
); );
@ -166,7 +166,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EventCategory)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EventCategory)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -174,7 +174,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
} }
); );
@ -252,7 +252,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Event)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Event)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
@ -266,12 +266,12 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
new EditingFormItemDto { Order = 4, DataField = "Place", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Place", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 7, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 7, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 8, DataField = "ParticipantsCount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 8, DataField = "ParticipantsCount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 9, DataField = "Likes", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 9, DataField = "Likes", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
@ -501,9 +501,9 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Meal)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Meal)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -691,10 +691,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Reservation)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Reservation)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -707,7 +707,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
new EditingFormItemDto {Order=6,DataField="Purpose", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxTextBox}, new EditingFormItemDto {Order=6,DataField="Purpose", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxTextBox},
new EditingFormItemDto {Order=8,DataField="Participants", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox}, new EditingFormItemDto {Order=8,DataField="Participants", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox},
new EditingFormItemDto {Order=9,DataField="Notes", ColSpan=1, EditorType2 = EditorTypes.dxTextArea}, new EditingFormItemDto {Order=9,DataField="Notes", ColSpan=1, EditorType2 = EditorTypes.dxTextArea},
new EditingFormItemDto {Order=7,DataField="Status", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxSelectBox}, new EditingFormItemDto {Order=7,DataField="Status", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
@ -941,10 +941,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ShuttleRoute)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ShuttleRoute)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -954,8 +954,8 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "DepartureTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions }, new EditingFormItemDto { Order = 3, DataField = "DepartureTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions },
new EditingFormItemDto { Order = 4, DataField = "ArrivalTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions }, new EditingFormItemDto { Order = 4, DataField = "ArrivalTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions },
new EditingFormItemDto { Order = 5, DataField = "Capacity", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 5, DataField = "Capacity", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 6, DataField = "Available", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 6, DataField = "Available", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 7, DataField = "Route", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTagBox } new EditingFormItemDto { Order = 7, DataField = "Route", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTagBox }
] ]
} }
@ -1067,7 +1067,6 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Int32, SourceDbType = DbType.Int32,
FieldName = "Capacity", FieldName = "Capacity",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 6, ListOrderNo = 6,
@ -1077,14 +1076,14 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Int32, SourceDbType = DbType.Int32,
FieldName = "Available", FieldName = "Available",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 7, ListOrderNo = 7,
@ -1094,7 +1093,8 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -1168,10 +1168,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Announcement)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Announcement)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -1439,10 +1439,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Visitor)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Visitor)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 450, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 450, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -1456,7 +1456,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
new EditingFormItemDto { Order = 7, DataField = "CheckIn", ColSpan=1, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 7, DataField = "CheckIn", ColSpan=1, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 8, DataField = "CheckOut", ColSpan=1, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 8, DataField = "CheckOut", ColSpan=1, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 9, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 9, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
@ -1694,10 +1694,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialPost)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialPost)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 600, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -1863,16 +1863,16 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialComment)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialComment)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Content", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 1, DataField = "Content", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 2, DataField = "SocialPostId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField = "SocialPostId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
} }
); );

View file

@ -70,7 +70,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkcenterType)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkcenterType)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -81,9 +81,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkcenterType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkcenterType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
@ -104,7 +104,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -193,7 +193,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkcenterStatus)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkcenterStatus)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -204,9 +204,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkcenterStatus)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkcenterStatus)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
@ -227,7 +227,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -316,7 +316,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Workcenter)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Workcenter)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -327,30 +327,29 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workcenter)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workcenter)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 3, DataField = "WorkcenterTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "WorkcenterTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField = "Manufacturer", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "Manufacturer", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 5, DataField = "Model", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 6, DataField = "Model", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 6, DataField = "SerialNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 7, DataField = "SerialNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 7, DataField = "InstallationDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
new EditingFormItemDto { Order = 8, DataField = "InstallationDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat }, new EditingFormItemDto { Order = 8, DataField = "WarrantyExpiry", ColSpan = 1, EditorType2=EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
new EditingFormItemDto { Order = 9, DataField = "WarrantyExpiry", ColSpan = 1, EditorType2=EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat }, new EditingFormItemDto { Order = 9, DataField = "Location", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 10, DataField = "Location", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 10, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 11, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 11, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 12, DataField = "Criticality", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 13, DataField = "Criticality", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 13, DataField = "Capacity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 14, DataField = "Capacity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 14, DataField = "CostPerHour", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 15, DataField = "CostPerHour", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 15, DataField = "SetupTime", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 16, DataField = "SetupTime", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 16, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 17, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
@ -368,7 +367,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -380,22 +379,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 100,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
@ -432,7 +415,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "WorkcenterTypeId", FieldName = "WorkcenterTypeId",
Width = 150, Width = 150,
ListOrderNo = 5, ListOrderNo = 5,
@ -564,7 +547,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkcenterStatus), "Name", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkcenterStatus), "Id", "Name"),
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
@ -618,7 +601,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "CostPerHour", FieldName = "CostPerHour",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 16, ListOrderNo = 16,
@ -628,7 +610,8 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -700,25 +683,25 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizard)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizard)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 550, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 550, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items= Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items=
[ [
new() { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new() { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new() { Order = 2, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new() { Order = 2, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new() { Order = 3, DataField = "PlanType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new() { Order = 3, DataField = "PlanType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new() { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new() { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new() { Order = 5, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, new() { Order = 5, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
]}, ]},
new() { new() {
Order=1, ColCount=2, ColSpan=1, Caption="Frequency", ItemType="group", Items= Order=1, ColCount=2, ColSpan=1, Caption="Frequency", ItemType="group", Items=
[ [
new() { Order = 1, DataField = "Frequency", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, new() { Order = 1, DataField = "Frequency", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
new() { Order = 2, DataField = "FrequencyUnit", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, new() { Order = 2, DataField = "FrequencyUnit", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new() { Order = 3, DataField = "EstimatedDuration", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, new() { Order = 3, DataField = "EstimatedDuration", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
]}, ]},
new() { new() {
@ -794,7 +777,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "WorkcenterId", FieldName = "WorkcenterId",
Width = 150, Width = 150,
ListOrderNo = 3, ListOrderNo = 3,
@ -1050,14 +1033,14 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizardMaterial)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizardMaterial)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "Quantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 2, DataField = "Quantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
]} ]}
}), }),
@ -1116,7 +1099,8 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
], autoSave: true); ], autoSave: true);
#endregion #endregion
@ -1158,14 +1142,14 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizardEmployee)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizardEmployee)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "StartDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 2, DataField = "StartDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 3, DataField = "EndDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 3, DataField = "EndDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 4, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
@ -1326,25 +1310,24 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Fault)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Fault)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Title", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 4, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField = "Location", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 5, DataField = "Location", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 6, DataField = "FaultTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField = "FaultTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 7, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 8, DataField = "Severity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 8, DataField = "Severity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 9, DataField = "EstimatedRepairTime", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 9, DataField = "EstimatedRepairTime", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 10, DataField = "FollowUpRequired", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 10, DataField = "FollowUpRequired", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 11, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 11, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
@ -1378,25 +1361,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "Code", FieldName = "Name",
Width = 100,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Title",
Width = 180, Width = 180,
ListOrderNo = 3, ListOrderNo = 3,
Visible = true, Visible = true,
@ -1425,7 +1390,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "WorkcenterId", FieldName = "WorkcenterId",
Width = 150, Width = 150,
ListOrderNo = 5, ListOrderNo = 5,
@ -1457,7 +1422,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "FaultTypeId", FieldName = "FaultTypeId",
Width = 100, Width = 100,
ListOrderNo = 7, ListOrderNo = 7,
@ -1566,7 +1531,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.FaultStatus), "Name", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.FaultStatus), "Id", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
@ -1615,7 +1580,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.FaultType)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.FaultType)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -1626,9 +1591,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.FaultType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.FaultType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
@ -1649,7 +1614,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -1739,7 +1704,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.FaultStatus)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.FaultStatus)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -1750,9 +1715,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.FaultStatus)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.FaultStatus)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
@ -1773,7 +1738,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -1863,7 +1828,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderType)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderType)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -1874,9 +1839,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
@ -1897,7 +1862,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -1987,7 +1952,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderStatus)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderStatus)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -1998,9 +1963,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderStatus)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderStatus)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
@ -2021,7 +1986,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -2122,26 +2087,26 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workorder)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workorder)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "WorkorderNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.Disabled }, new EditingFormItemDto { Order = 1, DataField = "WorkorderNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.Disabled },
new EditingFormItemDto { Order = 2, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "WorkorderTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 3, DataField = "WorkorderTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField = "Subject", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 7, DataField = "Subject", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 8, DataField = "ScheduledStart", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, new EditingFormItemDto { Order = 8, DataField = "ScheduledStart", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
new EditingFormItemDto { Order = 9, DataField = "ScheduledEnd", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, new EditingFormItemDto { Order = 9, DataField = "ScheduledEnd", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
new EditingFormItemDto { Order = 10, DataField = "ActualStart", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, new EditingFormItemDto { Order = 10, DataField = "ActualStart", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
new EditingFormItemDto { Order = 11, DataField = "ActualEnd", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, new EditingFormItemDto { Order = 11, DataField = "ActualEnd", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
new EditingFormItemDto { Order = 12, DataField = "EstimatedCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 12, DataField = "EstimatedCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 13, DataField = "ActualCost", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 13, DataField = "ActualCost", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 14, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 14, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 15, DataField = "Notes", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 15, DataField = "Notes", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
]} ]}
@ -2214,7 +2179,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "WorkcenterId", FieldName = "WorkcenterId",
Width = 150, Width = 150,
ListOrderNo = 3, ListOrderNo = 3,
@ -2231,7 +2196,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "WorkorderTypeId", FieldName = "WorkorderTypeId",
Width = 150, Width = 150,
ListOrderNo = 4, ListOrderNo = 4,
@ -2284,7 +2249,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Name", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Id", "Name"),
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
@ -2357,7 +2322,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
FieldName = "EstimatedCost", FieldName = "EstimatedCost",
Width = 100, Width = 100,
@ -2368,7 +2332,8 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -2406,7 +2371,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
FieldName = "ActualCost", FieldName = "ActualCost",
Width = 100, Width = 100,
@ -2418,7 +2382,8 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -2490,17 +2455,17 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderMaterial)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderMaterial)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "Quantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 2, DataField = "Quantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 3, DataField = "UnitCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 3, DataField = "UnitCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 4, DataField = "TotalCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 4, DataField = "TotalCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
@ -2550,7 +2515,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Quantity", FieldName = "Quantity",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 3, ListOrderNo = 3,
@ -2561,14 +2525,14 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "UnitCost", FieldName = "UnitCost",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 4, ListOrderNo = 4,
@ -2578,14 +2542,14 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "TotalCost", FieldName = "TotalCost",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 5, ListOrderNo = 5,
@ -2595,7 +2559,8 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
} }
], autoSave: true); ], autoSave: true);
#endregion #endregion
@ -2637,14 +2602,14 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderActivity)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderActivity)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "Duration", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 2, DataField = "Duration", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea}, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea},
]} ]}
@ -2694,7 +2659,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Int32, SourceDbType = DbType.Int32,
FieldName = "Duration", FieldName = "Duration",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 3, ListOrderNo = 3,
@ -2807,22 +2771,22 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workorder)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workorder)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "Subject", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 1, DataField = "Subject", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "WorkorderTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 3, DataField = "WorkorderTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField = "ScheduledStart", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, new EditingFormItemDto { Order = 7, DataField = "ScheduledStart", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
new EditingFormItemDto { Order = 8, DataField = "ScheduledEnd", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, new EditingFormItemDto { Order = 8, DataField = "ScheduledEnd", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
new EditingFormItemDto { Order = 9, DataField = "EstimatedCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 9, DataField = "EstimatedCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 10, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 10, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
]} ]}
}), }),
@ -2870,7 +2834,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "WorkcenterId", FieldName = "WorkcenterId",
Width = 150, Width = 150,
ListOrderNo = 3, ListOrderNo = 3,
@ -2887,7 +2851,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "WorkorderTypeId", FieldName = "WorkorderTypeId",
Width = 150, Width = 150,
ListOrderNo = 4, ListOrderNo = 4,
@ -2940,7 +2904,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Name", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Id", "Name"),
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
@ -2997,7 +2961,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
FieldName = "EstimatedCost", FieldName = "EstimatedCost",
Width = 100, Width = 100,
@ -3008,7 +2971,8 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,

File diff suppressed because it is too large Load diff

View file

@ -1,791 +0,0 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Erp.Languages.Languages;
using Erp.Platform.Entities;
using Erp.Platform.Enums;
using Erp.Platform.ListForms;
using Erp.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using AppCodes = Erp.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Erp.Platform.PlatformConsts;
using static Erp.Platform.PlatformSeeder.SeederDefaults;
namespace Erp.Platform.Data.Seeds;
public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_Participant(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
var listFormName = String.Empty;
#region MeetingMethod
listFormName = AppCodes.Definitions.MeetingMethod;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
{
var listForm = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
IsSubForm = false,
ShowNote = true,
LayoutJson = DefaultLayoutJson(),
CultureName = LanguageCodes.En,
ListFormCode = listFormName,
Name = listFormName,
Title = listFormName,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = listFormName,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingMethod)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson,
HeaderFilterJson = DefaultHeaderFilterJson,
SearchPanelJson = DefaultSearchPanelJson,
GroupPanelJson = DefaultGroupPanelJson,
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MeetingMethod)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region MeetingMethod Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Type",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Dijital",Name="Dijital" },
new () { Key="Telefon",Name="Telefon" },
new () { Key="Fiziksel",Name="Fiziksel" },
new () { Key="Hibrit",Name="Hibrit" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
// Status
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 120,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region MeetingResult
listFormName = AppCodes.Definitions.MeetingResult;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
{
var listForm = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
IsSubForm = false,
ShowNote = true,
LayoutJson = DefaultLayoutJson(),
CultureName = LanguageCodes.En,
ListFormCode = listFormName,
Name = listFormName,
Title = listFormName,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = listFormName,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingResult)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson,
HeaderFilterJson = DefaultHeaderFilterJson,
SearchPanelJson = DefaultSearchPanelJson,
GroupPanelJson = DefaultGroupPanelJson,
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MeetingResult)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region MeetingResult Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Order",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
// Status
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 120,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region Source
listFormName = AppCodes.Definitions.Source;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
{
var listForm = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
IsSubForm = false,
ShowNote = true,
LayoutJson = DefaultLayoutJson(),
CultureName = LanguageCodes.En,
ListFormCode = listFormName,
Name = listFormName,
Title = listFormName,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = listFormName,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Source)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson,
HeaderFilterJson = DefaultHeaderFilterJson,
SearchPanelJson = DefaultSearchPanelJson,
GroupPanelJson = DefaultGroupPanelJson,
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Source)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region Source Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 500,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region Interesting
listFormName = AppCodes.Definitions.Interesting;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
{
var listForm = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
IsSubForm = false,
ShowNote = true,
LayoutJson = DefaultLayoutJson(),
CultureName = LanguageCodes.En,
ListFormCode = listFormName,
Name = listFormName,
Title = listFormName,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = listFormName,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Interesting)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson,
HeaderFilterJson = DefaultHeaderFilterJson,
SearchPanelJson = DefaultSearchPanelJson,
GroupPanelJson = DefaultGroupPanelJson,
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Interesting)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region Interesting Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region SalesRejectionReason
listFormName = AppCodes.Definitions.SalesRejectionReason;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
{
var listForm = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
IsSubForm = false,
ShowNote = true,
LayoutJson = DefaultLayoutJson(),
CultureName = LanguageCodes.En,
ListFormCode = listFormName,
Name = listFormName,
Title = listFormName,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = listFormName,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson,
HeaderFilterJson = DefaultHeaderFilterJson,
SearchPanelJson = DefaultSearchPanelJson,
GroupPanelJson = DefaultGroupPanelJson,
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesRejectionReason)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Category", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region SalesRejectionReason Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 500,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
// Status
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Category",
Width = 300,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Kişisel",Name="Kişisel" },
new () { Key="Fiyat / Bütçe",Name="Fiyat / Bütçe" },
new () { Key="Ürün / Hizmet",Name="Ürün / Hizmet" },
new () { Key="Rekabet",Name="Rekabet" },
new () { Key="Zamanlama",Name="Zamanlama" },
new () { Key="Lokasyon",Name="Lokasyon" },
new () { Key="İletişim",Name="İletişim" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 100,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region NoteType
listFormName = AppCodes.Definitions.NoteType;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
{
var listForm = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
IsSubForm = false,
ShowNote = true,
LayoutJson = DefaultLayoutJson(),
CultureName = LanguageCodes.En,
ListFormCode = listFormName,
Name = listFormName,
Title = listFormName,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = listFormName,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.NoteType)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson,
HeaderFilterJson = DefaultHeaderFilterJson,
SearchPanelJson = DefaultSearchPanelJson,
GroupPanelJson = DefaultGroupPanelJson,
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.NoteType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
]}
}),
}
);
#region NoteType Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
}
}

View file

@ -70,7 +70,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Type)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Type)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -81,10 +81,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Type)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Type)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -105,7 +105,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -194,7 +194,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Status)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Status)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -205,10 +205,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Status)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Status)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -229,7 +229,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -318,7 +318,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Risk)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Risk)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -329,10 +329,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Risk)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Risk)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -353,7 +353,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -442,7 +442,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Category)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Category)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -453,10 +453,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Category)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Category)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -477,7 +477,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -566,7 +566,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.TaskType)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.TaskType)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -577,10 +577,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.TaskType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.TaskType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -601,7 +601,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -690,7 +690,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkType)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkType)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -701,10 +701,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkType)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkType)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -725,7 +725,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -825,10 +825,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Projects)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Projects)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 550, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 550, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -836,10 +836,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
[ [
new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField="ProjectTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 3, DataField="ProjectTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField="StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField="StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField="ManagerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 5, DataField="ManagerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField="Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField="Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 7, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
]}, ]},
new() { new() {
@ -847,8 +847,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
[ [
new EditingFormItemDto { Order = 1, DataField="StartDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 1, DataField="StartDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 2, DataField="EndDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 2, DataField="EndDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 3, DataField="Budget", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 3, DataField="Budget", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 4, DataField="Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField="Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]}, ]},
new() { new() {
Order=3, ColCount=2, ColSpan=1, Caption="Actual", ItemType="group", Items = Order=3, ColCount=2, ColSpan=1, Caption="Actual", ItemType="group", Items =
@ -856,8 +856,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 1, DataField="ActualStartDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 1, DataField="ActualStartDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 2, DataField="ActualEndDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 2, DataField="ActualEndDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 3, DataField="ActualCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 3, DataField="ActualCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 4, DataField="CustomerId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField="CustomerId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField="Progress", ColSpan = 1, EditorType2 = EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions }, new EditingFormItemDto { Order = 5, DataField="Progress", ColSpan = 1, EditorType2 = EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions },
new EditingFormItemDto { Order = 6, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 6, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
]} ]}
@ -937,7 +937,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "ProjectTypeId", FieldName = "ProjectTypeId",
Width = 100, Width = 100,
ListOrderNo = 4, ListOrderNo = 4,
@ -954,7 +954,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "StatusId", FieldName = "StatusId",
Width = 100, Width = 100,
ListOrderNo = 5, ListOrderNo = 5,
@ -1065,7 +1065,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Budget", FieldName = "Budget",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 11, ListOrderNo = 11,
@ -1076,7 +1075,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -1089,7 +1089,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"),
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
@ -1130,7 +1130,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "ActualCost", FieldName = "ActualCost",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 15, ListOrderNo = 15,
@ -1140,7 +1139,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -1234,15 +1234,15 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectRisk)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectRisk)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="RiskId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField="RiskId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
}, autoSave: true }, autoSave: true
@ -1268,7 +1268,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "RiskId", FieldName = "RiskId",
Width = 300, Width = 300,
ListOrderNo = 2, ListOrderNo = 2,
@ -1321,17 +1321,17 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTeam)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTeam)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 200, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 200, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
TreeOptionJson = DefaultTreeOptionJson("EmployeeId", "ManagerId", true), TreeOptionJson = DefaultTreeOptionJson("EmployeeId", "ManagerId", true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField="EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField="ManagerId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField="ManagerId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
}, autoSave: true }, autoSave: true
@ -1458,28 +1458,28 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectPhase)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectPhase)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="ProjectId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField="ProjectId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField="CategoryId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField="CategoryId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField="Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField="Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 5, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 6, DataField="StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField="StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField="Sequence", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 7, DataField="Sequence", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 8, DataField="StartDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 8, DataField="StartDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 9, DataField="EndDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 9, DataField="EndDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 10, DataField="Budget", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 10, DataField="Budget", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 11, DataField="ActualStartDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 11, DataField="ActualStartDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 12, DataField="ActualEndDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 12, DataField="ActualEndDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 13, DataField="ActualCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 13, DataField="ActualCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat() },
new EditingFormItemDto { Order = 14, DataField="Progress", ColSpan = 1, EditorType2 = EditorTypes.dxSlider }, new EditingFormItemDto { Order = 14, DataField="Progress", ColSpan = 1, EditorType2 = EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions },
new EditingFormItemDto { Order = 15, DataField="Risks", ColSpan = 1, EditorType2 = EditorTypes.dxTagBox }, new EditingFormItemDto { Order = 15, DataField="Risks", ColSpan = 1, EditorType2 = EditorTypes.dxTagBox },
new EditingFormItemDto { Order = 16, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 16, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
]} ]}
@ -1598,7 +1598,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "StatusId", FieldName = "StatusId",
Width = 100, Width = 100,
ListOrderNo = 7, ListOrderNo = 7,
@ -1665,7 +1665,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Budget", FieldName = "Budget",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 11, ListOrderNo = 11,
@ -1676,7 +1675,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -1713,7 +1713,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "ActualCost", FieldName = "ActualCost",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 14, ListOrderNo = 14,
@ -1723,7 +1722,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
AllowSearch = true, AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
@ -1811,23 +1811,23 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="ProjectId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField="ProjectId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField="PhaseId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField="PhaseId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField="Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField="Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField="Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField="StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 5, DataField="StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 6, DataField="EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 6, DataField="EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField="StartDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateTimeFormat }, new EditingFormItemDto { Order = 7, DataField="StartDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateTimeFormat },
new EditingFormItemDto { Order = 8, DataField="EndDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateTimeFormat }, new EditingFormItemDto { Order = 8, DataField="EndDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateTimeFormat },
new EditingFormItemDto { Order = 9, DataField="Progress", ColSpan = 1, EditorType2 = EditorTypes.dxSlider }, new EditingFormItemDto { Order = 9, DataField="Progress", ColSpan = 1, EditorType2 = EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions },
new EditingFormItemDto { Order = 10, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 10, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 11, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 11, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
]} ]}
@ -1971,7 +1971,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "StatusId", FieldName = "StatusId",
Width = 100, Width = 100,
ListOrderNo = 7, ListOrderNo = 7,
@ -2116,10 +2116,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ScaleType = "weeks" ScaleType = "weeks"
}), }),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
@ -2162,14 +2162,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.DefaultLookupQuery(nameof(TableNameEnum.Projects), "Id", "Name"),
CascadeEmptyFields = "PhaseId"
}),
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
@ -2247,7 +2239,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Progress", FieldName = "Progress",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 70, Width = 70,
ListOrderNo = 7, ListOrderNo = 7,
@ -2258,7 +2249,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
]); ]);
#endregion #endregion
@ -2300,24 +2292,24 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTaskDaily)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTaskDaily)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 1, DataField="EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField="TaskId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField="TaskId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField="Date", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 3, DataField="Date", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 4, DataField="WorkedTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField="WorkedTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField="HoursWorked", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 5, DataField="HoursWorked", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 6, DataField="Progress", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSlider }, new EditingFormItemDto { Order = 6, DataField="Progress", ColSpan = 1, EditorType2 = EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions },
new EditingFormItemDto { Order = 7, DataField="Description", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 7, DataField="Description", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 8, DataField="Challenges", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 8, DataField="Challenges", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 9, DataField="NextSteps", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 9, DataField="NextSteps", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 10, DataField="StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 10, DataField="StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
@ -2398,7 +2390,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "WorkedTypeId", FieldName = "WorkedTypeId",
Width = 100, Width = 100,
ListOrderNo = 5, ListOrderNo = 5,
@ -2493,7 +2485,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { new() {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "StatusId", FieldName = "StatusId",
Width = 100, Width = 100,
ListOrderNo = 10, ListOrderNo = 10,

View file

@ -110,7 +110,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order=7, DataField = "Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=7, DataField = "Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=8, DataField = "Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=8, DataField = "Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=9, DataField = "Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=9, DataField = "Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=10, DataField = "MenuGroup", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order=10, DataField = "MenuGroup", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
] ]
} }
}), }),
@ -139,7 +139,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }
}) })
}, autoSave: true }, autoSave: true
@ -557,12 +557,12 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 650, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =
[ [
new EditingFormItemDto { Order=1, DataField = "TenantId", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order=1, DataField = "TenantId", ColSpan=2, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order=2, DataField = "Code", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=2, DataField = "Code", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=3, DataField = "Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=3, DataField = "Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=4, DataField = "VknTckn", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order=4, DataField = "VknTckn", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
@ -573,26 +573,26 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order=9, DataField = "IsActive", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order=9, DataField = "IsActive", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
] ]
}, },
new() { Order=2, ColCount=1, ColSpan=1, ItemType="group", Items = new() { Order=2, ColCount=2, ColSpan=1, ItemType="group", Items =
[ [
new EditingFormItemDto { Order=1, DataField = "Country", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order=1, DataField = "Country", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order=2, DataField = "City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order=2, DataField = "City", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order=3, DataField = "District", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order=3, DataField = "District", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order=4, DataField = "Township", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order=4, DataField = "Township", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order=5, DataField = "Address1", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=5, DataField = "Address1", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order=6, DataField = "Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=6, DataField = "Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order=7, DataField = "PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=7, DataField = "Email", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=8, DataField = "Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=8, DataField = "Website", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=9, DataField = "Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=9, DataField = "PostalCode", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
] ]
} }
}), }),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Branch)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Branch)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() { new() {
@ -1019,7 +1019,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.SettingDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.SettingDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 600, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -1040,7 +1040,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 14, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 14, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsVisibleToClients", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsVisibleToClients", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "IsInherited", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsInherited", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
@ -1403,7 +1403,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order=2, DataField="Group", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=2, DataField="Group", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=3, DataField="Term", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=3, DataField="Term", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=4, DataField="Url", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=4, DataField="Url", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=5, DataField="Weight", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order=5, DataField="Weight", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
]} ]}
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
@ -1552,7 +1552,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [
new EditingFormItemDto { Order=1, DataField="BotName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=1, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=2, DataField="Description", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order=2, DataField="Description", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order=3, DataField="ApiUrl", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=3, DataField="ApiUrl", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=4, DataField="IsActive", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxCheckBox } new EditingFormItemDto { Order=4, DataField="IsActive", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxCheckBox }
@ -1587,7 +1587,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "BotName", FieldName = "Name",
Width = 100, Width = 100,
ListOrderNo = 2, ListOrderNo = 2,
Visible = true, Visible = true,
@ -1686,9 +1686,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Language)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Language)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
@ -1837,20 +1837,29 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LanguageText)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LanguageText)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=
[ [
new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "ResourceName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "ResourceName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "Key", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Key", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "Value", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Value", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
] ]
} }}),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
ButtonPosition= UiCommandButtonPositionTypeEnum.Toolbar,
Hint = "Clear Redis Cache",
Text = "Clear Redis Cache",
AuthName = listFormName,
OnClick = "UiEvalService.ApiClearRedisCache();",
IsVisible = true,
},
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
}, autoSave: true }, autoSave: true
); );
@ -2018,7 +2027,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Route)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Route)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
@ -2034,7 +2043,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
] ]
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "RouteType", FieldDbType = DbType.String, Value = "public", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "RouteType", FieldDbType = DbType.String, Value = "public", CustomValueType = FieldCustomValueTypeEnum.Value }
}) })
@ -2193,10 +2202,10 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Menu)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Menu)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
TreeOptionJson = DefaultTreeOptionJson("Code", "ParentCode", true), TreeOptionJson = DefaultTreeOptionJson("Code", "ParentCode", true),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 450, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=
[ [
@ -2211,9 +2220,10 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 12, DataField = "ShortName", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsDisabled", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "IsDisabled", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}) })
@ -2226,7 +2236,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
{ {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -2434,6 +2444,22 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new ListFormField
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "ShortName",
Width = 100,
ListOrderNo = 13,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
]); ]);
#endregion #endregion
@ -2475,7 +2501,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.DataSource)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.DataSource)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 600, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -2486,7 +2512,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 3, DataField = "ConnectionString", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, new EditingFormItemDto { Order = 3, DataField = "ConnectionString", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
} }
); );
@ -2606,7 +2632,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
SelectionJson = DefaultSelectionMultipleJson, SelectionJson = DefaultSelectionMultipleJson,
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.ListForm)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.ListForm)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false),
@ -2639,7 +2665,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 4, DataField = "PermissionJson:D", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "PermissionJson:D", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() { new() {
Hint = "Manage Listform", Hint = "Manage Listform",
@ -3079,7 +3105,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.NotificationRule)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.NotificationRule)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -3093,7 +3119,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 7, DataField = "IsCustomized", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 7, DataField = "IsCustomized", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "IsFixed", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsFixed", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
@ -3311,7 +3337,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Notification)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Notification)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 300, true, true, true, true, false),
} }
@ -3529,7 +3555,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
}), }),
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.BackgroundWorker)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.BackgroundWorker)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 650, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 650, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
@ -3549,7 +3575,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 4, DataField = "Options:Tablo", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Options:Tablo", ColSpan = 2, EditorType2=EditorTypes.dxTextBox },
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
}) })
@ -3730,7 +3756,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTag)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTag)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
@ -3743,7 +3769,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
] ]
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
}); });
#region ContactTag Fields #region ContactTag Fields
@ -3839,7 +3865,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTitle)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTitle)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
@ -3852,7 +3878,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
] ]
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
}); });
#region ContactTitle Fields #region ContactTitle Fields
@ -3937,7 +3963,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Currency)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Currency)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -3948,7 +3974,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Currency)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Currency)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
@ -3956,7 +3982,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new() { new() {
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
[ [
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Symbol", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Symbol", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField = "Rate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 4, DataField = "Rate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
@ -3964,7 +3989,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
] ]
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
}); });
#region Currency Fields #region Currency Fields
@ -3973,7 +3998,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
{ {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -3984,22 +4009,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
}, },
new() new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 150,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
},
new()
{ {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
@ -4037,7 +4046,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal, SourceDbType = DbType.Decimal,
FieldName = "Rate", FieldName = "Rate",
Format = "fixedPoint",
Alignment = "right", Alignment = "right",
Width = 100, Width = 100,
ListOrderNo = 5, ListOrderNo = 5,
@ -4048,6 +4056,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() new()
{ {
@ -4093,7 +4102,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CountryGroup)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CountryGroup)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -4104,7 +4113,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CountryGroup)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CountryGroup)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
@ -4116,7 +4125,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
] ]
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
}); });
#region CountryGroup Fields #region CountryGroup Fields
@ -4125,7 +4134,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
{ {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -4180,7 +4189,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Country)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Country)),
KeyFieldName = "Id", KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.String,
DefaultFilter = DefaultFilterJson, DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = DefaultFilterRowJson, FilterRowJson = DefaultFilterRowJson,
@ -4191,7 +4200,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Country)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Country)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
@ -4199,7 +4208,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
new() { new() {
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
[ [
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "Currency", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "Currency", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
@ -4210,7 +4218,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
] ]
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }
}) })
@ -4222,7 +4230,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
{ {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid, SourceDbType = DbType.String,
FieldName = "Id", FieldName = "Id",
Width = 100, Width = 100,
ListOrderNo = 1, ListOrderNo = 1,
@ -4233,22 +4241,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
}, },
new() new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 100,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
},
new()
{ {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
@ -4292,7 +4284,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = false, AllowSearch = false,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
}, },
@ -4395,7 +4387,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.City)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.City)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
@ -4405,14 +4397,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
[ [
new EditingFormItemDto { Order = 1, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 1, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField = "PlateCode", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } new EditingFormItemDto { Order = 4, DataField = "PlateCode", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }
] ]
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }
}) })
}); });
@ -4472,22 +4463,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
}, },
new() new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 120,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
},
new()
{ {
ListFormCode = listForm.ListFormCode, ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
@ -4543,7 +4518,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
ColumnOptionJson = DefaultColumnOptionJson, ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName), PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.District)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.District)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
@ -4558,9 +4533,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
] ]
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }
}) })
}); });

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -15,18 +15,18 @@ public static class SeederDefaults
return $"UPDATE \"{TableNameResolver.GetFullTableName(tableName)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id"; return $"UPDATE \"{TableNameResolver.GetFullTableName(tableName)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id";
} }
public static readonly string DefaultInsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] public static string DefaultInsertFieldsDefaultValueJson(DbType dbType = DbType.Guid) => JsonSerializer.Serialize(new FieldsDefaultValue[]
{ {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", 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 } new() { FieldName = "Id", FieldDbType = dbType, Value = "@NEWID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}); });
public static readonly string DefaultDeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] public static string DefaultDeleteFieldsDefaultValueJson(DbType dbType = DbType.Guid) => JsonSerializer.Serialize(new FieldsDefaultValue[]
{ {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } new() { FieldName = "Id", FieldDbType = dbType, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}); });
public static string DefaultEditingOptionJson( public static string DefaultEditingOptionJson(
@ -66,6 +66,7 @@ public static class SeederDefaults
{ {
Grid = true, Grid = true,
Card = true, Card = true,
CardView = true,
Pivot = true, Pivot = true,
Chart = true, Chart = true,
Tree = true, Tree = true,

View file

@ -7,10 +7,8 @@ public enum MenuPrefix
Platform, Platform,
Saas, Saas,
Administration, Administration,
Intranet,
Participant,
Coordinator,
Crm, Crm,
Coordinator,
SupplyChain, SupplyChain,
Maintenance, Maintenance,
Store, Store,
@ -29,10 +27,8 @@ public static class MenuPrefixExtensions
MenuPrefix.Platform => "Plat", MenuPrefix.Platform => "Plat",
MenuPrefix.Saas => "Sas", MenuPrefix.Saas => "Sas",
MenuPrefix.Administration => "Adm", MenuPrefix.Administration => "Adm",
MenuPrefix.Intranet => "Net",
MenuPrefix.Participant => "Prt",
MenuPrefix.Coordinator => "Crd",
MenuPrefix.Crm => "Crm", MenuPrefix.Crm => "Crm",
MenuPrefix.Coordinator => "Crd",
MenuPrefix.SupplyChain => "Scp", MenuPrefix.SupplyChain => "Scp",
MenuPrefix.Maintenance => "Mnt", MenuPrefix.Maintenance => "Mnt",
MenuPrefix.Store => "Str", MenuPrefix.Store => "Str",

View file

@ -3,8 +3,14 @@
public enum OperationEnum public enum OperationEnum
{ {
Insert, Insert,
InsertBefore,
InsertAfter,
Update, Update,
UpdateBefore,
UpdateAfter,
Delete, Delete,
DeleteBefore,
DeleteAfter,
Select Select
} }

View file

@ -37,8 +37,6 @@ public enum TableNameEnum
CustomComponent, CustomComponent,
ReportCategory, ReportCategory,
ReportTemplate, ReportTemplate,
ReportParameter,
ReportGenerated,
IpRestriction, IpRestriction,
Sector, Sector,
ContactTag, ContactTag,
@ -216,5 +214,23 @@ public enum TableNameEnum
Movement, Movement,
MovementItem, MovementItem,
MovementType, MovementType,
ReferenceType ReferenceType,
TransferItem, //Gerçek bir tablo ismi değil. View eklemek amacıyla eklendi.
WaybillType,
WaybillStatus,
Waybill,
WaybillItem,
InvoiceType,
InvoiceStatus,
PaymentStatus,
Invoice,
InvoiceItem,
CheckStatus,
CheckType,
CheckNote,
ProductionOrderType,
ProductionOrderStatus,
ProductionOrder,
ProductionOrderItem,
ProductionWorkorder,
} }

View file

@ -4,9 +4,9 @@ namespace Erp.Platform;
public static class TablePrefix public static class TablePrefix
{ {
private const string HostPrefix = "H"; public const string HostPrefix = "H";
private const string TenantPrefix = "T"; public const string TenantPrefix = "T";
private const string BranchPrefix = "B"; public const string BranchPrefix = "B";
public static string PlatformByName(MenuPrefix MenuGroup, TableNameEnum tableName) public static string PlatformByName(MenuPrefix MenuGroup, TableNameEnum tableName)
{ {

View file

@ -18,11 +18,11 @@ public static class PlatformConsts
{ {
public static string Disabled = "{ \"disabled\" : true }"; public static string Disabled = "{ \"disabled\" : true }";
public static string ShowClearButton = "{ \"showClearButton\" : true }"; public static string ShowClearButton = "{ \"showClearButton\" : true }";
public static string HtmlEditorOptions = "{\"toolbar\": {\"multiline\": true, \"items\": [{\"name\": \"undo\"},{\"name\": \"redo\"},{\"name\": \"separator\"},{\"name\": \"size\",\"acceptedValues\": [\"8pt\",\"10pt\",\"12pt\",\"14pt\",\"18pt\",\"24pt\",\"36pt\"],\"options\": {\"inputAttr\": {\"aria-label\": \"Font size\"}}},{\"name\": \"font\",\"acceptedValues\": [\"Arial\",\"Courier New\",\"Georgia\",\"Impact\",\"Lucida Console\",\"Tahoma\",\"Times New Roman\",\"Verdana\"],\"options\": {\"inputAttr\": {\"aria-label\": \"Font family\"}}},{\"name\": \"separator\"},{\"name\": \"bold\"},{\"name\": \"italic\"},{\"name\": \"strike\"},{\"name\": \"underline\"},{\"name\": \"separator\"},{\"name\": \"alignLeft\"},{\"name\": \"alignCenter\"},{\"name\": \"alignRight\"},{\"name\": \"alignJustify\"},{\"name\": \"separator\"},{\"name\": \"orderedList\"},{\"name\": \"bulletList\"},{\"name\": \"separator\"},{\"name\": \"header\",\"acceptedValues\": [false,1,2,3,4,5],\"options\": {\"inputAttr\": {\"aria-label\": \"Font family\"}}},{\"name\": \"separator\"},{\"name\": \"color\"},{\"name\": \"background\"},{\"name\": \"separator\"},{\"name\": \"link\"},{\"name\": \"image\"},{\"name\": \"separator\"},{\"name\": \"clear\"},{\"name\": \"codeBlock\"},{\"name\": \"blockquote\"},{\"name\": \"separator\"},{\"name\": \"insertTable\"},{\"name\": \"deleteTable\"},{\"name\": \"insertRowAbove\"},{\"name\": \"insertRowBelow\"},{\"name\": \"deleteRow\"},{\"name\": \"insertColumnLeft\"},{\"name\": \"insertColumnRight\"},{\"name\": \"deleteColumn\"}]}}"; public static string HtmlEditorOptions = "{ \"mediaResizing\": { \"enabled\": true }, \"imageUpload\": { \"tabs\": [\"file\", \"url\"], \"fileUploadMode\": \"base64\" }, \"toolbar\": { \"multiline\": true, \"items\": [ { \"name\": \"undo\" }, { \"name\": \"redo\" }, { \"name\": \"separator\" }, { \"name\": \"size\", \"acceptedValues\": [\"8pt\", \"10pt\", \"12pt\", \"14pt\", \"18pt\", \"24pt\", \"36pt\"], \"options\": { \"inputAttr\": { \"aria-label\": \"Font size\" } } }, { \"name\": \"font\", \"acceptedValues\": [\"Arial\", \"Courier New\", \"Georgia\", \"Impact\", \"Lucida Console\", \"Tahoma\", \"Times New Roman\", \"Verdana\"], \"options\": { \"inputAttr\": { \"aria-label\": \"Font family\" } } }, { \"name\": \"separator\" }, { \"name\": \"bold\" }, { \"name\": \"italic\" }, { \"name\": \"strike\" }, { \"name\": \"underline\" }, { \"name\": \"separator\" }, { \"name\": \"alignLeft\" }, { \"name\": \"alignCenter\" }, { \"name\": \"alignRight\" }, { \"name\": \"alignJustify\" }, { \"name\": \"separator\" }, { \"name\": \"orderedList\" }, { \"name\": \"bulletList\" }, { \"name\": \"separator\" }, { \"name\": \"header\", \"acceptedValues\": [false, 1, 2, 3, 4, 5] }, { \"name\": \"separator\" }, { \"name\": \"color\" }, { \"name\": \"background\" }, { \"name\": \"separator\" }, { \"name\": \"link\" }, { \"name\": \"image\" }, { \"name\": \"separator\" }, { \"name\": \"clear\" }, { \"name\": \"codeBlock\" }, { \"name\": \"blockquote\" }, { \"name\": \"separator\" }, { \"name\": \"insertTable\" }, { \"name\": \"deleteTable\" }, { \"name\": \"insertRowAbove\" }, { \"name\": \"insertRowBelow\" }, { \"name\": \"deleteRow\" }, { \"name\": \"insertColumnLeft\" }, { \"name\": \"insertColumnRight\" }, { \"name\": \"deleteColumn\" }, { \"name\": \"cellProperties\" }, { \"name\": \"tableProperties\" } ] } }";
public static string PhoneEditorOptions = "{\"format\": \"phoneGlobal\", \"mask\":\"(000) 000-0000\", \"maskInvalidMessage\":\"Lütfen geçerli bir telefon numarası girin\", \"useMaskedValue\":false, \"maskRules\": { \"X\": \"[0-9]\" }, \"placeholder\": \"(555) 123-4567\" }"; public static string PhoneEditorOptions = "{\"format\": \"phoneGlobal\", \"mask\":\"(000) 000-0000\", \"maskInvalidMessage\":\"Lütfen geçerli bir telefon numarası girin\", \"useMaskedValue\":false, \"maskRules\": { \"X\": \"[0-9]\" }, \"placeholder\": \"(555) 123-4567\" }";
public static string TimeSpanOptions = "{\"type\":\"time\",\"pickerType\":\"list\",\"displayFormat\":\"HH:mm\",\"dateSerializationFormat\":\"yyyy-MM-ddTHH:mm:ss\",\"interval\":5,\"width\":\"100%\"}"; public static string TimeSpanOptions = "{\"type\":\"time\",\"pickerType\":\"list\",\"displayFormat\":\"HH:mm\",\"dateSerializationFormat\":\"yyyy-MM-ddTHH:mm:ss\",\"interval\":5,\"width\":\"100%\"}";
public static string NumberStandartFormat = "{ \"format\": \"fixedPoint\", \"precision\": 2 }"; public static string NumberStandartFormat(int precision = 2) => "{ \"format\": { \"type\": \"fixedPoint\", \"precision\": " + precision + " }, \"useMaskBehavior\": true, \"showSpinButtons\": true }";
public static string NumberPercentFormat = "{ \"format\": \"#0.##'%'\" }"; public static string NumberPercentFormat = "{ \"format\": \"#0.##'%'\", \"useMaskBehavior\": true, \"showSpinButtons\": true }";
public static string DateFormat = "{ \"format\": \"dd/MM/yyyy\", \"displayFormat\" : \"dd/MM/yyyy\" }"; public static string DateFormat = "{ \"format\": \"dd/MM/yyyy\", \"displayFormat\" : \"dd/MM/yyyy\" }";
public static string DateTimeFormat = "{ \"format\": \"dd/MM/yyyy HH:mm\", \"displayFormat\" : \"dd/MM/yyyy HH:mm\" }"; public static string DateTimeFormat = "{ \"format\": \"dd/MM/yyyy HH:mm\", \"displayFormat\" : \"dd/MM/yyyy HH:mm\" }";
public static string SliderOptions = "{\"tooltip\": { \"enabled\": true }}"; public static string SliderOptions = "{\"tooltip\": { \"enabled\": true }}";
@ -32,6 +32,8 @@ public static class PlatformConsts
{ {
public static string CalcTotalDaysFromDates = "(() => {const d=v=>!v?null:(v instanceof Date?v:new Date(v));const nf={...formData,[editor.dataField]:e?.value};const s=d(nf.StartDate),t=d(nf.EndDate);setFormData({...formData,TotalDays: s&&t?Math.max(0,Math.floor((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(s.getFullYear(),s.getMonth(),s.getDate()))/(24*60*60*1000))+1):null});})();"; public static string CalcTotalDaysFromDates = "(() => {const d=v=>!v?null:(v instanceof Date?v:new Date(v));const nf={...formData,[editor.dataField]:e?.value};const s=d(nf.StartDate),t=d(nf.EndDate);setFormData({...formData,TotalDays: s&&t?Math.max(0,Math.floor((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(s.getFullYear(),s.getMonth(),s.getDate()))/(24*60*60*1000))+1):null});})();";
public static string CalcTotalHoursFromTimes = "(()=>{const toD=v=>!v?null:(v instanceof Date?v:new Date(v));const next={...formData,[e.dataField]:e.value};const s=toD(next.StartTime),t=toD(next.EndTime);let h=null;if(s&&t){h=(t-s)/36e5;if(h<0)h+=24;h=Math.round(h*10)/10;}setFormData({...next,TotalHours:h});})();"; public static string CalcTotalHoursFromTimes = "(()=>{const toD=v=>!v?null:(v instanceof Date?v:new Date(v));const next={...formData,[e.dataField]:e.value};const s=toD(next.StartTime),t=toD(next.EndTime);let h=null;if(s&&t){h=(t-s)/36e5;if(h<0)h+=24;h=Math.round(h*10)/10;}setFormData({...next,TotalHours:h});})();";
public static string MaterialOnChange = "(() => { const p=e.component.option('selectedItem')||{}; const q=Math.round((parseFloat(p.Quantity)||0)*100); const u=Math.round((parseFloat(p.UnitPrice)||0)*100); setFormData({ ...formData, Quantity:q/100, UnitPrice:u/100, UomId:p.UomId, TotalAmount:Math.round((q*u)/100)/100 }); })();";
public static string CalcTotalAmount = "(() => { const n={...formData,[e.dataField]:e.value}; const q=Math.round((parseFloat(n.Quantity)||0)*100); const u=Math.round((parseFloat(n.UnitPrice)||0)*100); setFormData({ ...n, TotalAmount:Math.round((q*u)/100)/100 }); })();";
} }
public static class Prefix public static class Prefix

View file

@ -23,6 +23,7 @@ public static class TableNameResolver
{ nameof(TableNameEnum.BackgroundWorker_MailQueueEvents), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.BackgroundWorker_MailQueueEvents), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
{ nameof(TableNameEnum.BackgroundWorker_MailQueueTableFormat), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.BackgroundWorker_MailQueueTableFormat), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
{ nameof(TableNameEnum.AiBot), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.AiBot), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
{ nameof(TableNameEnum.BackgroundWorker), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
// 🔹 PLATFORM TABLOLARI // 🔹 PLATFORM TABLOLARI
{ nameof(TableNameEnum.Route), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.Route), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
@ -40,7 +41,6 @@ public static class TableNameResolver
{ nameof(TableNameEnum.Country), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.Country), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.City), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.City), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.District), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.District), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.BackgroundWorker), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
{ nameof(TableNameEnum.ForumCategory), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.ForumCategory), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.ForumTopic), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.ForumTopic), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.ForumPost), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.ForumPost), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
@ -59,8 +59,6 @@ public static class TableNameResolver
{ nameof(TableNameEnum.DynamicService), (TablePrefix.TenantByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.DynamicService), (TablePrefix.TenantByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.ReportCategory), (TablePrefix.TenantByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.ReportCategory), (TablePrefix.TenantByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.ReportTemplate), (TablePrefix.TenantByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.ReportTemplate), (TablePrefix.TenantByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.ReportParameter), (TablePrefix.TenantByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.ReportGenerated), (TablePrefix.TenantByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.IpRestriction), (TablePrefix.TenantByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.IpRestriction), (TablePrefix.TenantByName, MenuPrefix.Saas) },
{ nameof(TableNameEnum.Sector), (TablePrefix.TenantByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.Sector), (TablePrefix.TenantByName, MenuPrefix.Saas) },
@ -94,14 +92,41 @@ public static class TableNameResolver
{ nameof(TableNameEnum.PartnerBank), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.PartnerBank), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.PartnerCertificate), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.PartnerCertificate), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.PartnerContact), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.PartnerContact), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.EventCategory), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.EventType), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Event), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.EventPhoto), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.EventComment), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Training), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Certificate), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Meal), (TablePrefix.BranchByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Reservation), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.ShuttleRoute), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Announcement), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Visitor), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.SocialPost), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.SocialLocation), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.SocialMedia), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.SocialPollOption), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.SocialComment), (TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.SocialLike), (TablePrefix.TenantByName, MenuPrefix.Administration) },
// 🔹 PARTICIPANT // CRM
{ nameof(TableNameEnum.Interesting), (TablePrefix.TenantByName, MenuPrefix.Participant) }, { nameof(TableNameEnum.Interesting), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.Source), (TablePrefix.TenantByName, MenuPrefix.Participant) }, { nameof(TableNameEnum.Source), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.NoteType), (TablePrefix.TenantByName, MenuPrefix.Participant) }, { nameof(TableNameEnum.NoteType), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.SalesRejectionReason), (TablePrefix.TenantByName, MenuPrefix.Participant) }, { nameof(TableNameEnum.SalesRejectionReason), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.MeetingMethod), (TablePrefix.TenantByName, MenuPrefix.Participant) }, { nameof(TableNameEnum.MeetingMethod), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.MeetingResult), (TablePrefix.TenantByName, MenuPrefix.Participant) }, { nameof(TableNameEnum.MeetingResult), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.CustomerSegment), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.CustomerType), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.LossReason), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.Opportunity), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.Activity), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.Competitor), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.SalesOrderStatus), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.SalesOrder), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.SalesOrderItem), (TablePrefix.TenantByName, MenuPrefix.Crm) },
// 🔹 COORDINATOR // 🔹 COORDINATOR
{ nameof(TableNameEnum.Schedule), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, { nameof(TableNameEnum.Schedule), (TablePrefix.BranchByName, MenuPrefix.Coordinator) },
@ -143,26 +168,6 @@ public static class TableNameResolver
{ nameof(TableNameEnum.SurveyAnswer), (TablePrefix.TenantByName, MenuPrefix.Hr) }, { nameof(TableNameEnum.SurveyAnswer), (TablePrefix.TenantByName, MenuPrefix.Hr) },
{ nameof(TableNameEnum.SurveyResponse), (TablePrefix.TenantByName, MenuPrefix.Hr) }, { nameof(TableNameEnum.SurveyResponse), (TablePrefix.TenantByName, MenuPrefix.Hr) },
// 🔹 INTRANET
{ nameof(TableNameEnum.EventCategory), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.EventType), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.Event), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.EventPhoto), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.EventComment), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.Training), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.Certificate), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.Meal), (TablePrefix.BranchByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.Reservation), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.ShuttleRoute), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.Announcement), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.Visitor), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.SocialPost), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.SocialLocation), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.SocialMedia), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.SocialPollOption), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.SocialComment), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
{ nameof(TableNameEnum.SocialLike), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
// 🔹 SUPPLY CHAIN // 🔹 SUPPLY CHAIN
{ nameof(TableNameEnum.MaterialType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, { nameof(TableNameEnum.MaterialType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
{ nameof(TableNameEnum.MaterialGroup), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, { nameof(TableNameEnum.MaterialGroup), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
@ -184,17 +189,6 @@ public static class TableNameResolver
{ nameof(TableNameEnum.PurchaseOrder), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, { nameof(TableNameEnum.PurchaseOrder), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
{ nameof(TableNameEnum.PurchaseOrderItem), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, { nameof(TableNameEnum.PurchaseOrderItem), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
// CRM
{ nameof(TableNameEnum.CustomerSegment), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.CustomerType), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.LossReason), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.Opportunity), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.Activity), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.Competitor), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.SalesOrderStatus), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.SalesOrder), (TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.SalesOrderItem), (TablePrefix.TenantByName, MenuPrefix.Crm) },
// 🔹 MAINTENANCE // 🔹 MAINTENANCE
{ nameof(TableNameEnum.WorkcenterType), (TablePrefix.TenantByName, MenuPrefix.Maintenance) }, { nameof(TableNameEnum.WorkcenterType), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.WorkcenterStatus), (TablePrefix.TenantByName, MenuPrefix.Maintenance) }, { nameof(TableNameEnum.WorkcenterStatus), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
@ -214,10 +208,22 @@ public static class TableNameResolver
// 🔹 ACCOUNTING // 🔹 ACCOUNTING
{ nameof(TableNameEnum.Bank), (TablePrefix.TenantByName, MenuPrefix.Accounting) }, { nameof(TableNameEnum.WaybillType), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.BankAccount), (TablePrefix.TenantByName, MenuPrefix.Accounting) }, { nameof(TableNameEnum.WaybillStatus), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.Cash), (TablePrefix.TenantByName, MenuPrefix.Accounting) }, { nameof(TableNameEnum.InvoiceType), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.CurrentAccount), (TablePrefix.TenantByName, MenuPrefix.Accounting) }, { nameof(TableNameEnum.InvoiceStatus), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.PaymentStatus), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.CheckStatus), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.CheckType), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.Bank), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.BankAccount), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.Cash), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.CurrentAccount), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.Waybill), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.WaybillItem), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.Invoice), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.InvoiceItem), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
{ nameof(TableNameEnum.CheckNote), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
// 🔹 STORE // 🔹 STORE
{ nameof(TableNameEnum.WarehouseType), (TablePrefix.TenantByName, MenuPrefix.Store) }, { nameof(TableNameEnum.WarehouseType), (TablePrefix.TenantByName, MenuPrefix.Store) },
@ -242,6 +248,11 @@ public static class TableNameResolver
{ nameof(TableNameEnum.Bom), (TablePrefix.TenantByName, MenuPrefix.Mrp) }, { nameof(TableNameEnum.Bom), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
{ nameof(TableNameEnum.BomOperation), (TablePrefix.TenantByName, MenuPrefix.Mrp) }, { nameof(TableNameEnum.BomOperation), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
{ nameof(TableNameEnum.BomComponent), (TablePrefix.TenantByName, MenuPrefix.Mrp) }, { nameof(TableNameEnum.BomComponent), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
{ nameof(TableNameEnum.ProductionOrderType), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
{ nameof(TableNameEnum.ProductionOrderStatus), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
{ nameof(TableNameEnum.ProductionOrder), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
{ nameof(TableNameEnum.ProductionOrderItem), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
{ nameof(TableNameEnum.ProductionWorkorder), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
// 🔹 R&D // 🔹 R&D
{ nameof(TableNameEnum.Type), (TablePrefix.TenantByName, MenuPrefix.Project) }, { nameof(TableNameEnum.Type), (TablePrefix.TenantByName, MenuPrefix.Project) },
@ -279,5 +290,10 @@ public static class TableNameResolver
return ViewPrefix + entry.Method(entry.PrefixGroup, tableEnum); return ViewPrefix + entry.Method(entry.PrefixGroup, tableEnum);
} }
public static string GetFullSpecialViewName(MenuPrefix menu, string Prefix, string objectName)
{
return $"{ViewPrefix}{MenuPrefixExtensions.ToPrefix(menu)}_{Prefix}_{objectName}";
}
} }

View file

@ -394,7 +394,7 @@ public class BranchSeedManager : DomainService
var bankLog = CreateLog(nameof(Bank)); var bankLog = CreateLog(nameof(Bank));
foreach (var item in items.Banks) foreach (var item in items.Banks)
{ {
var exists = await _bankRepository.AnyAsync(x => x.Code == item.Code && x.BranchId == branchId); var exists = await _bankRepository.AnyAsync(x => x.Name == item.Name && x.BranchId == branchId);
if (!exists) if (!exists)
{ {
@ -402,7 +402,6 @@ public class BranchSeedManager : DomainService
{ {
TenantId = tenantId, TenantId = tenantId,
BranchId = branchId, BranchId = branchId,
Code = item.Code,
Name = item.Name, Name = item.Name,
Address1 = item.Address1, Address1 = item.Address1,
Address2 = item.Address2, Address2 = item.Address2,
@ -431,7 +430,7 @@ public class BranchSeedManager : DomainService
var cashLog = CreateLog(nameof(Cash)); var cashLog = CreateLog(nameof(Cash));
foreach (var item in items.Cashes) foreach (var item in items.Cashes)
{ {
var exists = await _cashRepository.AnyAsync(x => x.Code == item.Code && x.BranchId == branchId); var exists = await _cashRepository.AnyAsync(x => x.Name == item.Name && x.BranchId == branchId);
if (!exists) if (!exists)
{ {
@ -439,7 +438,6 @@ public class BranchSeedManager : DomainService
{ {
TenantId = tenantId, TenantId = tenantId,
BranchId = branchId, BranchId = branchId,
Code = item.Code,
Name = item.Name, Name = item.Name,
Description = item.Description, Description = item.Description,
Currency = item.Currency, Currency = item.Currency,
@ -464,7 +462,7 @@ public class BranchSeedManager : DomainService
var currentAccountLog = CreateLog(nameof(CurrentAccount)); var currentAccountLog = CreateLog(nameof(CurrentAccount));
foreach (var item in items.CurrentAccounts) foreach (var item in items.CurrentAccounts)
{ {
var exists = await _currentAccountRepository.AnyAsync(x => x.Code == item.Code && x.BranchId == branchId); var exists = await _currentAccountRepository.AnyAsync(x => x.Name == item.Name && x.BranchId == branchId);
if (!exists) if (!exists)
{ {
@ -472,7 +470,6 @@ public class BranchSeedManager : DomainService
{ {
TenantId = tenantId, TenantId = tenantId,
BranchId = branchId, BranchId = branchId,
Code = item.Code,
Name = item.Name, Name = item.Name,
Description = item.Description, Description = item.Description,
TaxNumber = item.TaxNumber, TaxNumber = item.TaxNumber,

View file

@ -847,7 +847,7 @@
"name": "Garanti BBVA - Levent Şubesi", "name": "Garanti BBVA - Levent Şubesi",
"address1": "Büyükdere Cad. No: 199", "address1": "Büyükdere Cad. No: 199",
"address2": "Kule 3 Kat: 12", "address2": "Kule 3 Kat: 12",
"country": "TR", "country": "Türkiye",
"city": null, "city": null,
"district": null, "district": null,
"postalCode": "34394", "postalCode": "34394",
@ -859,7 +859,7 @@
"name": "Akbank - Ümraniye Sanayi Şubesi", "name": "Akbank - Ümraniye Sanayi Şubesi",
"address1": "Sanayi Mah. Alemdağ Cad. No: 45", "address1": "Sanayi Mah. Alemdağ Cad. No: 45",
"address2": "", "address2": "",
"country": "TR", "country": "Türkiye",
"city": null, "city": null,
"district": null, "district": null,
"postalCode": "34773", "postalCode": "34773",

View file

@ -373,6 +373,7 @@ public static class SeedConsts
{ {
public const string Default = Prefix.App + ".Reports"; public const string Default = Prefix.App + ".Reports";
public const string Categories = Default + ".Categories"; public const string Categories = Default + ".Categories";
public const string ReportTemplates = Default + ".ReportTemplates";
} }
//Web Site //Web Site
public const string About = Prefix.App + ".About"; public const string About = Prefix.App + ".About";
@ -451,6 +452,23 @@ public static class SeedConsts
public const string QuestionTag = Default + ".QuestionTag"; public const string QuestionTag = Default + ".QuestionTag";
public const string QuestionPool = Default + ".QuestionPool"; public const string QuestionPool = Default + ".QuestionPool";
public const string Question = Default + ".Question"; public const string Question = Default + ".Question";
public const string CustomerType = Default + ".CustomerType";
public const string CustomerSegment = Default + ".CustomerSegment";
public const string Customer = Default + ".Customer";
public const string LossReason = Default + ".LossReason";
public const string SalesOrderStatus = Default + ".SalesOrderStatus";
}
public static class Crm
{
public const string Default = Prefix.App + ".Crm";
public const string Opportunity = Default + ".Opportunity";
public const string OpportunityActivity = Default + ".OpportunityActivity";
public const string OpportunityCompetitor = Default + ".OpportunityCompetitor";
public const string Activity = Default + ".Activity";
public const string SalesOrder = Default + ".SalesOrder";
public const string SalesOrderItem = Default + ".SalesOrderItem";
} }
public static class Coordinator public static class Coordinator
@ -497,22 +515,6 @@ public static class SeedConsts
public const string SurveyResponse = Default + ".SurveyResponse"; public const string SurveyResponse = Default + ".SurveyResponse";
} }
public static class Crm
{
public const string Default = Prefix.App + ".Crm";
public const string CustomerType = Default + ".CustomerType";
public const string CustomerSegment = Default + ".CustomerSegment";
public const string Customer = Default + ".Customer";
public const string LossReason = Default + ".LossReason";
public const string Opportunity = Default + ".Opportunity";
public const string OpportunityActivity = Default + ".OpportunityActivity";
public const string OpportunityCompetitor = Default + ".OpportunityCompetitor";
public const string Activity = Default + ".Activity";
public const string SalesOrderStatus = Default + ".SalesOrderStatus";
public const string SalesOrder = Default + ".SalesOrder";
public const string SalesOrderItem = Default + ".SalesOrderItem";
}
public static class SupplyChain public static class SupplyChain
{ {
public const string Default = Prefix.App + ".SupplyChain"; public const string Default = Prefix.App + ".SupplyChain";
@ -567,6 +569,18 @@ public static class SeedConsts
public const string BankAccount = Default + ".BankAccount"; public const string BankAccount = Default + ".BankAccount";
public const string Cash = Default + ".Cash"; public const string Cash = Default + ".Cash";
public const string CurrentAccount = Default + ".CurrentAccount"; public const string CurrentAccount = Default + ".CurrentAccount";
public const string WaybillType = Default + ".WaybillType";
public const string WaybillStatus = Default + ".WaybillStatus";
public const string Waybill = Default + ".Waybill";
public const string WaybillItem = Default + ".WaybillItem";
public const string InvoiceType = Default + ".InvoiceType";
public const string InvoiceStatus = Default + ".InvoiceStatus";
public const string PaymentStatus = Default + ".PaymentStatus";
public const string CheckStatus = Default + ".CheckStatus";
public const string CheckType = Default + ".CheckType";
public const string CheckNote = Default + ".CheckNote";
public const string Invoice = Default + ".Invoice";
public const string InvoiceItem = Default + ".InvoiceItem";
} }
public static class Store public static class Store
@ -585,6 +599,12 @@ public static class SeedConsts
public const string MovementType = Default + ".MovementType"; public const string MovementType = Default + ".MovementType";
public const string Movement = Default + ".Movement"; public const string Movement = Default + ".Movement";
public const string MovementItem = Default + ".MovementItem"; public const string MovementItem = Default + ".MovementItem";
public const string Entry = Default + ".Entry";
public const string EntryItem = Default + ".EntryItem";
public const string Exit = Default + ".Exit";
public const string ExitItem = Default + ".ExitItem";
public const string Transfer = Default + ".Transfer";
public const string TransferItem = Default + ".TransferItem";
} }
public static class Project public static class Project
@ -618,6 +638,13 @@ public static class SeedConsts
public const string Bom = Default + ".Bom"; public const string Bom = Default + ".Bom";
public const string BomComponent = Default + ".BomComponent"; public const string BomComponent = Default + ".BomComponent";
public const string BomOperation = Default + ".BomOperation"; public const string BomOperation = Default + ".BomOperation";
public const string ProductionOrderType = Default + ".ProductionOrderType";
public const string ProductionOrderStatus = Default + ".ProductionOrderStatus";
public const string ProductionOrder = Default + ".ProductionOrder";
public const string ProductionOrderItem = Default + ".ProductionOrderItem";
public const string WorkorderStatus = Default + ".WorkorderStatus";
public const string Workorder = Default + ".Workorder";
public const string Workload = Default + ".Workload";
} }
} }

View file

@ -9,7 +9,6 @@ public class Bank : FullAuditedEntity<Guid>, IMultiTenant
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }
public Guid? BranchId { get; set; } public Guid? BranchId { get; set; }
public string Code { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string Address1 { get; set; } public string Address1 { get; set; }
public string Address2 { get; set; } public string Address2 { get; set; }

View file

@ -9,7 +9,6 @@ public class Cash : FullAuditedEntity<Guid>, IMultiTenant
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }
public Guid? BranchId { get; set; } public Guid? BranchId { get; set; }
public string Code { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string Description { get; set; } public string Description { get; set; }

View file

@ -0,0 +1,39 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class CheckNote : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid? BranchId { get; set; }
public string TypeId { get; set; }
public CheckType Type { get; set; }
public string StatusId { get; set; }
public CheckStatus Status { get; set; }
public string CheckNumber { get; set; }
public string BankName { get; set; }
public string BranchName { get; set; }
public string AccountNumber { get; set; }
public string DrawerName { get; set; } //Keşideci
public string PayeeName { get; set; } //Lehdar
public Guid? CurrentAccountId { get; set; }
public CurrentAccount? CurrentAccount { get; set; }
public DateTime IssueDate { get; set; } //Düzenleme Tarihi
public DateTime DueDate { get; set; } //Vade Tarihi
public decimal Amount { get; set; }
public string Currency { get; set; }
public DateTime? BankingDate { get; set; } //Bankaya Verilme Tarihi
public DateTime? CollectionDate { get; set; } //Tahsil Tarihi
public string EndorsedTo { get; set; } //Ciro Edilen Kişi
public string Notes { get; set; } //Açıklamalar
}

View file

@ -1,4 +1,6 @@
using System; using System;
using System.Collections;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
@ -12,7 +14,6 @@ public class CurrentAccount : FullAuditedEntity<Guid>, IMultiTenant
public Guid? PartnerId { get; set; } public Guid? PartnerId { get; set; }
public Partner? Partner { get; set; } public Partner? Partner { get; set; }
public string Code { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string Description { get; set; } public string Description { get; set; }
@ -24,8 +25,12 @@ public class CurrentAccount : FullAuditedEntity<Guid>, IMultiTenant
public string Currency { get; set; } public string Currency { get; set; }
public string Risk { get; set; } //Low, Medium, High, Blocked public string Risk { get; set; } //Low, Medium, High, Blocked
public Guid? PaymentTermId { get; set; } public string? PaymentTermId { get; set; }
public PaymentTerm? PaymentTerm { get; set; } public PaymentTerm? PaymentTerm { get; set; }
public bool IsActive { get; set; } public bool IsActive { get; set; }
public ICollection<Waybill> Waybills { get; set; }
public ICollection<Invoice> Invoices { get; set; }
public ICollection<CheckNote> Checks { get; set; }
} }

View file

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class Invoice : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid? BranchId { get; set; }
public string InvoiceTypeId { get; set; }
public InvoiceType InvoiceType { get; set; }
public Guid? CurrentAccountId { get; set; }
public CurrentAccount? CurrentAccount { get; set; }
public string StatusId { get; set; }
public InvoiceStatus Status { get; set; }
public string InvoiceNumber { get; set; }
public DateTime InvoiceDate { get; set; } // Fatura Tarihi
public DateTime DueDate { get; set; } // Vade Tarihi
public decimal Subtotal { get; set; } // Ara Toplam
public decimal TaxAmount { get; set; } // Vergi Tutarı
public decimal DiscountAmount { get; set; } // İndirim Tutarı
public decimal TotalAmount { get; set; } // Genel Toplam
public decimal PaidAmount { get; set; } // Ödenen Tutar
public decimal RemainingAmount { get; set; } // Kalan Tutar
public string Currency { get; set; } // Para Birimi
public string PaymentStatusId { get; set; }
public PaymentStatus PaymentStatus { get; set; }
public Guid? WaybillId { get; set; }
public string Notes { get; set; }
public ICollection<InvoiceItem> Items { get; set; }
}

View file

@ -0,0 +1,32 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class InvoiceItem : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid InvoiceId { get; set; }
public Invoice Invoice { get; set; }
public Guid? MaterialId { get; set; }
public Material Material { get; set; }
public string UomId { get; set; }
public Uom Uom { get; set; }
public decimal Quantity { get; set; } // Miktar
public decimal UnitPrice { get; set; } // Birim Fiyat
public decimal LineTotal { get; set; } // Miktar x Birim Fiyat
public decimal DiscountRate { get; set; } // İndirim Yüzdesi
public decimal DiscountAmount { get; set; } // Hesaplanan indirim tutarı
public decimal TaxRate { get; set; } // Vergi Yüzdesi
public decimal TaxAmount { get; set; } // Hesaplanan vergi tutarı
public decimal NetAmount { get; set; } // Vergi sonrası tutar
public string Description { get; set; }
}

View file

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class Waybill : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid? BranchId { get; set; }
public string WaybillTypeId { get; set; }
public WaybillType WaybillType { get; set; }
public Guid? CurrentAccountId { get; set; }
public CurrentAccount? CurrentAccount { get; set; }
public string WaybillStatusId { get; set; }
public WaybillStatus WaybillStatus { get; set; }
public string WaybillNumber { get; set; }
public DateTime WaybillDate { get; set; }
public DateTime? DeliveryDate { get; set; }
public decimal Subtotal { get; set; }
public decimal TaxAmount { get; set; }
public decimal DiscountAmount { get; set; }
public decimal TotalAmount { get; set; }
public string Currency { get; set; }
public bool IsInvoiced { get; set; }
public Guid? InvoiceId { get; set; }
public string DeliveryAddress { get; set; }
public string ReceiverName { get; set; }
public string ReceiverPhone { get; set; }
public string CarrierCompany { get; set; } // Shipping company
public string TrackingNumber { get; set; } // Shipping tracking number
public string Notes { get; set; }
public ICollection<WaybillItem> Items { get; set; }
}

View file

@ -0,0 +1,32 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class WaybillItem : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid WaybillId { get; set; }
public Waybill Waybill { get; set; }
public Guid? MaterialId { get; set; }
public Material Material { get; set; }
public string UomId { get; set; }
public Uom Uom { get; set; }
public decimal Quantity { get; set; }
public decimal UnitPrice { get; set; }
public decimal LineTotal { get; set; }
public decimal DiscountRate { get; set; }
public decimal DiscountAmount { get; set; }
public decimal TaxRate { get; set; }
public decimal TaxAmount { get; set; }
public decimal NetAmount { get; set; }
public string Description { get; set; }
}

View file

@ -5,7 +5,7 @@ namespace Erp.Platform.Entities;
public class AiBot : Entity<Guid> public class AiBot : Entity<Guid>
{ {
public string BotName { get; set; } public string Name { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string ApiUrl { get; set; } public string ApiUrl { get; set; }
public bool IsActive { get; set; } public bool IsActive { get; set; }

View file

@ -8,19 +8,17 @@ public class City : FullAuditedEntity<Guid>
{ {
public string Country { get; set; } public string Country { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string Code { get; set; }
public string PlateCode { get; set; } public string PlateCode { get; set; }
public ICollection<District> Districts { get; set; } public ICollection<District> Districts { get; set; }
protected City() { } protected City() { }
public City(Guid id, string country, string name, string code, string plateCode) public City(Guid id, string country, string name, string plateCode)
: base(id) : base(id)
{ {
Country = country; Country = country;
Name = name; Name = name;
Code = code;
PlateCode = plateCode; PlateCode = plateCode;
} }
} }

View file

@ -1,12 +1,10 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
namespace Erp.Platform.Entities; namespace Erp.Platform.Entities;
public class Country : FullAuditedEntity<Guid> public class Country : FullAuditedEntity<string>
{ {
public string Code { get; set; } // TR, US
public string Name { get; set; } public string Name { get; set; }
public string GroupName { get; set; } public string GroupName { get; set; }
public string Currency { get; set; } public string Currency { get; set; }
@ -20,8 +18,7 @@ public class Country : FullAuditedEntity<Guid>
protected Country() { } protected Country() { }
public Country( public Country(
Guid id, string id,
string code,
string name, string name,
string groupName, string groupName,
string currency, string currency,
@ -31,7 +28,6 @@ public class Country : FullAuditedEntity<Guid>
bool stateRequired = false) bool stateRequired = false)
: base(id) : base(id)
{ {
Code = code;
Name = name; Name = name;
GroupName = groupName; GroupName = groupName;
Currency = currency; Currency = currency;

View file

@ -3,13 +3,13 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Erp.Platform.Entities; namespace Erp.Platform.Entities;
public class CountryGroup : FullAuditedEntity<Guid> public class CountryGroup : FullAuditedEntity<string>
{ {
public string Name { get; set; } public string Name { get; set; }
protected CountryGroup() { } protected CountryGroup() { }
public CountryGroup(Guid id, string name) public CountryGroup(string id, string name)
: base(id) : base(id)
{ {
Name = name; Name = name;

View file

@ -3,13 +3,17 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Erp.Platform.Entities; namespace Erp.Platform.Entities;
public class Currency : FullAuditedEntity<Guid> public class Currency : FullAuditedEntity<string>
{ {
public string Code { get; set; } // TRY, USD, EUR
public string Symbol { get; set; } // ₺, $, etc. public string Symbol { get; set; } // ₺, $, etc.
public string Name { get; set; } // Turkish lira, US dollar, ... public string Name { get; set; } // Turkish lira, US dollar, ...
public decimal Rate { get; set; } // TRY başına değer public decimal Rate { get; set; } // TRY başına değer
public bool IsActive { get; set; } public bool IsActive { get; set; }
public DateTime? LastUpdated { get; set; } public DateTime? LastUpdated { get; set; }
public Currency(string id)
{
Id = id;
}
} }

View file

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Forum; namespace Erp.Platform.Forum;
@ -10,6 +9,7 @@ public class ForumTopic : FullAuditedEntity<Guid>
public string Title { get; set; } public string Title { get; set; }
public string Content { get; set; } public string Content { get; set; }
public Guid CategoryId { get; set; } public Guid CategoryId { get; set; }
public ForumCategory Category { get; set; }
public Guid AuthorId { get; set; } public Guid AuthorId { get; set; }
public string AuthorName { get; set; } public string AuthorName { get; set; }
public int ViewCount { get; set; } public int ViewCount { get; set; }
@ -24,7 +24,6 @@ public class ForumTopic : FullAuditedEntity<Guid>
public string LastPostUserName { get; set; } public string LastPostUserName { get; set; }
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }
public ForumCategory Category { get; set; }
public ICollection<ForumPost> Posts { get; set; } public ICollection<ForumPost> Posts { get; set; }
protected ForumTopic() { } protected ForumTopic() { }

View file

@ -67,18 +67,24 @@ public class ListForm : FullAuditedEntity<Guid>
/// <summary> Silme yapilacak harici sorgu. icerisinde @ID, @USERID, @USERNAME, @ROLES anahtarlari kullanilabilir. /// <summary> Silme yapilacak harici sorgu. icerisinde @ID, @USERID, @USERNAME, @ROLES anahtarlari kullanilabilir.
/// </summary> /// </summary>
public string DeleteCommand { get; set; } public string DeleteCommand { get; set; }
public string DeleteBeforeCommand { get; set; }
public string DeleteAfterCommand { get; set; }
/// <summary>Guncelleme yapilacak harici sorgu. /// <summary>Guncelleme yapilacak harici sorgu.
/// icerisinde @ID, @USERID, @USERNAME, @ROLES ozel anahtarlari kullanilabilir. /// icerisinde @ID, @USERID, @USERNAME, @ROLES ozel anahtarlari kullanilabilir.
/// ilaveten tabloya ait butun alanlar icin FieldName onune @ isareti eklenerek guncellenebilir. /// ilaveten tabloya ait butun alanlar icin FieldName onune @ isareti eklenerek guncellenebilir.
/// ornegin tablodaki Ad alanini guncellemek icin '@Ad' yazildiginda bu kisim ekrandan gelen deger ile degistirilir /// ornegin tablodaki Ad alanini guncellemek icin '@Ad' yazildiginda bu kisim ekrandan gelen deger ile degistirilir
/// </summary> /// </summary>
public string UpdateCommand { get; set; } public string UpdateCommand { get; set; }
public string UpdateBeforeCommand { get; set; }
public string UpdateAfterCommand { get; set; }
/// <summary>insert yapacak harici sorgu. /// <summary>insert yapacak harici sorgu.
/// icerisinde @USERID, @USERNAME ozel anahtarlari kullanilabilir. /// icerisinde @USERID, @USERNAME ozel anahtarlari kullanilabilir.
/// ilaveten tabloya ait butun alanlar icin FieldName onune @ isareti eklenerek guncellenebilir. /// ilaveten tabloya ait butun alanlar icin FieldName onune @ isareti eklenerek guncellenebilir.
/// ornegin tablodaki Ad alanini guncellemek icin '@Ad' yazildiginda bu kisim ekrandan gelen deger ile degistirilir /// ornegin tablodaki Ad alanini guncellemek icin '@Ad' yazildiginda bu kisim ekrandan gelen deger ile degistirilir
/// </summary> /// </summary>
public string InsertCommand { get; set; } public string InsertCommand { get; set; }
public string InsertBeforeCommand { get; set; }
public string InsertAfterCommand { get; set; }
/// <summary> Guncelleme islemini yapacak servis adresi /// <summary> Guncelleme islemini yapacak servis adresi
/// </summary> /// </summary>

Some files were not shown because too many files have changed in this diff Show more