Activity -> Note olarak değiştirildi.
This commit is contained in:
parent
20058de585
commit
f1b6838608
54 changed files with 866 additions and 745 deletions
|
|
@ -34,7 +34,7 @@ public class UploadFileDto
|
|||
|
||||
public string? ParentId { get; set; }
|
||||
|
||||
// ActivityModal pattern - Files array
|
||||
// NoteModal pattern - Files array
|
||||
public IRemoteStreamContent[]? Files { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ public class PermissionCrudDto
|
|||
public string D { get; set; } //Delete
|
||||
public string E { get; set; } //Export
|
||||
public string I { get; set; } //Import
|
||||
public string A { get; set; } //Activity
|
||||
public string N { get; set; } //Note
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -320,8 +320,8 @@ public class GridOptionsDto : AuditedEntityDto<Guid>
|
|||
public string ListFormType { get; set; } = ListFormTypeEnum.List;
|
||||
public bool IsSubForm { get; set; } = false;
|
||||
|
||||
/// <summary>Bu listform show activity gösterilsin mi?</summary>
|
||||
public bool ShowActivity { get; set; } = true;
|
||||
/// <summary>Bu listform show note gösterilsin mi?</summary>
|
||||
public bool ShowNote { get; set; } = true;
|
||||
|
||||
[JsonIgnore]
|
||||
public string SubFormsJson { get; set; } // Cagrilacak ListFormlar
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using Volo.Abp.Content;
|
|||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class ActivityDto : FullAuditedEntityDto<Guid>
|
||||
public class NoteDto : FullAuditedEntityDto<Guid>
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
namespace Erp.Platform.Activities;
|
||||
namespace Erp.Platform.Notes;
|
||||
|
||||
public class ActivityFileDto
|
||||
public class NoteFileDto
|
||||
{
|
||||
public string FileName { get; set; } // Dosya adı
|
||||
public string FileType { get; set; } // MIME tipi
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
public class ActivityListRequestDto : PagedAndSortedResultRequestDto
|
||||
public class NoteListRequestDto : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public string EntityName { get; set; }
|
||||
public string EntityId { get; set; }
|
||||
|
|
@ -32,7 +32,7 @@ public class FileManagementAppService : ApplicationService, IFileManagementAppSe
|
|||
{
|
||||
BlobContainerNames.Avatar,
|
||||
BlobContainerNames.Import,
|
||||
BlobContainerNames.Activity,
|
||||
BlobContainerNames.Note,
|
||||
BlobContainerNames.Intranet
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -611,7 +611,7 @@ public class ForumAppService : PlatformAppService, IForumAppService
|
|||
TotalTopics = totalTopics,
|
||||
TotalPosts = totalPosts,
|
||||
TotalUsers = totalUsers,
|
||||
ActiveUsers = totalUsers // This could be calculated based on recent activity
|
||||
ActiveUsers = totalUsers
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class ListFormsAppService : CrudAppService<
|
|||
item.FullHeight = input.FullHeight;
|
||||
item.Description = input.Description;
|
||||
item.IsSubForm = input.IsSubForm;
|
||||
item.ShowActivity = input.ShowActivity;
|
||||
item.ShowNote = input.ShowNote;
|
||||
item.ListFormType = input.ListFormType;
|
||||
item.LayoutJson = JsonSerializer.Serialize(input.LayoutDto);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,20 +16,20 @@ using Volo.Abp.Application.Services;
|
|||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.Identity;
|
||||
|
||||
namespace Erp.Platform.Activities;
|
||||
namespace Erp.Platform.Notes;
|
||||
|
||||
[Authorize]
|
||||
public class ActivityAppService : CrudAppService<
|
||||
Activity,
|
||||
ActivityDto,
|
||||
public class NoteAppService : CrudAppService<
|
||||
Note,
|
||||
NoteDto,
|
||||
Guid,
|
||||
ActivityListRequestDto>
|
||||
NoteListRequestDto>
|
||||
{
|
||||
private readonly IRepository<IdentityUser, Guid> _repositoryUser;
|
||||
private readonly BlobManager _blobContainer;
|
||||
|
||||
public ActivityAppService(
|
||||
IRepository<Activity, Guid> repo,
|
||||
public NoteAppService(
|
||||
IRepository<Note, Guid> repo,
|
||||
IRepository<IdentityUser, Guid> repositoryUser,
|
||||
BlobManager blobContainer
|
||||
) : base(repo)
|
||||
|
|
@ -48,18 +48,18 @@ public class ActivityAppService : CrudAppService<
|
|||
// }
|
||||
}
|
||||
|
||||
public async Task<ActivityFileDto> GetDownloadAsync(string savedFileName)
|
||||
public async Task<NoteFileDto> GetDownloadAsync(string savedFileName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(savedFileName))
|
||||
throw new UserFriendlyException("Dosya adı geçersiz");
|
||||
|
||||
var stream = await _blobContainer.GetAsync(BlobContainerNames.Activity, savedFileName);
|
||||
var stream = await _blobContainer.GetAsync(BlobContainerNames.Note, savedFileName);
|
||||
if (stream == null)
|
||||
throw new UserFriendlyException("Dosya bulunamadı");
|
||||
|
||||
var activities = await Repository.GetListAsync();
|
||||
var fileDto = activities
|
||||
.SelectMany(a => JsonSerializer.Deserialize<List<ActivityFileDto>>(a.FilesJson ?? "[]"))
|
||||
.SelectMany(a => JsonSerializer.Deserialize<List<NoteFileDto>>(a.FilesJson ?? "[]"))
|
||||
.FirstOrDefault(f => f.SavedFileName == savedFileName);
|
||||
|
||||
using var ms = new MemoryStream();
|
||||
|
|
@ -67,7 +67,7 @@ public class ActivityAppService : CrudAppService<
|
|||
var bytes = ms.ToArray();
|
||||
|
||||
// Base64 olarak encode ediyoruz
|
||||
return new ActivityFileDto
|
||||
return new NoteFileDto
|
||||
{
|
||||
FileName = fileDto?.FileName ?? savedFileName,
|
||||
FileType = fileDto?.FileType ?? "application/octet-stream",
|
||||
|
|
@ -75,7 +75,7 @@ public class ActivityAppService : CrudAppService<
|
|||
};
|
||||
}
|
||||
|
||||
public override async Task<PagedResultDto<ActivityDto>> GetListAsync(ActivityListRequestDto input)
|
||||
public override async Task<PagedResultDto<NoteDto>> GetListAsync(NoteListRequestDto input)
|
||||
{
|
||||
// 1️⃣ Filtreleme
|
||||
var query = await Repository.GetQueryableAsync();
|
||||
|
|
@ -107,21 +107,21 @@ public class ActivityAppService : CrudAppService<
|
|||
.ToListAsync();
|
||||
|
||||
// 5️⃣ DTO map ve kullanıcı adı ekleme
|
||||
var activityDtos = activities.Select(a =>
|
||||
var noteDtos = activities.Select(a =>
|
||||
{
|
||||
var dto = ObjectMapper.Map<Activity, ActivityDto>(a);
|
||||
var dto = ObjectMapper.Map<Note, NoteDto>(a);
|
||||
dto.CreateUserName = users.FirstOrDefault(u => u.Id == a.CreatorId)?.UserName ?? "Unknown";
|
||||
return dto;
|
||||
}).ToList();
|
||||
|
||||
// 6️⃣ Sonuç dön
|
||||
return new PagedResultDto<ActivityDto>(totalCount, activityDtos);
|
||||
return new PagedResultDto<NoteDto>(totalCount, noteDtos);
|
||||
}
|
||||
|
||||
|
||||
public override async Task<ActivityDto> CreateAsync([FromForm] ActivityDto input)
|
||||
public override async Task<NoteDto> CreateAsync([FromForm] NoteDto input)
|
||||
{
|
||||
var fileDtos = new List<ActivityFileDto>();
|
||||
var fileDtos = new List<NoteFileDto>();
|
||||
|
||||
if (input.Files != null && input.Files.Length > 0)
|
||||
{
|
||||
|
|
@ -131,14 +131,14 @@ public class ActivityAppService : CrudAppService<
|
|||
var savedFileName = $"{Guid.NewGuid()}_{file.FileName}";
|
||||
|
||||
await _blobContainer.SaveAsync(
|
||||
BlobContainerNames.Activity,
|
||||
BlobContainerNames.Note,
|
||||
savedFileName,
|
||||
stream,
|
||||
true
|
||||
);
|
||||
|
||||
// Dosya bilgisini DTO olarak ekle
|
||||
fileDtos.Add(new ActivityFileDto
|
||||
fileDtos.Add(new NoteFileDto
|
||||
{
|
||||
FileName = file.FileName,
|
||||
FileType = file.ContentType,
|
||||
|
|
@ -160,21 +160,21 @@ public class ActivityAppService : CrudAppService<
|
|||
public override async Task DeleteAsync(Guid id)
|
||||
{
|
||||
// Önce entity'i alıyoruz
|
||||
var activity = await Repository.GetAsync(id);
|
||||
var note = await Repository.GetAsync(id);
|
||||
|
||||
// if (!string.IsNullOrEmpty(activity.FilesJson))
|
||||
// if (!string.IsNullOrEmpty(note.FilesJson))
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// // FilesJson içindeki dosya bilgilerini deserialize ediyoruz
|
||||
// var files = JsonSerializer.Deserialize<List<ActivityFileDto>>(activity.FilesJson);
|
||||
// var files = JsonSerializer.Deserialize<List<NoteFileDto>>(note.FilesJson);
|
||||
|
||||
// if (files != null)
|
||||
// {
|
||||
// foreach (var file in files)
|
||||
// {
|
||||
// // Blob storage'dan sil
|
||||
// await _activityBlobContainer.DeleteAsync(file.SavedFileName, cancellationToken: default);
|
||||
// await _noteBlobContainer.DeleteAsync(file.SavedFileName, cancellationToken: default);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
using AutoMapper;
|
||||
using Erp.Platform.Entities;
|
||||
|
||||
namespace Erp.Platform.Activities;
|
||||
namespace Erp.Platform.Notes;
|
||||
|
||||
public class ActivityAutoMapperProfile : Profile
|
||||
public class NoteAutoMapperProfile : Profile
|
||||
{
|
||||
public ActivityAutoMapperProfile()
|
||||
public NoteAutoMapperProfile()
|
||||
{
|
||||
// Map from Activity to ActivityDto
|
||||
CreateMap<Activity, ActivityDto>()
|
||||
// Map from Note to NoteDto
|
||||
CreateMap<Note, NoteDto>()
|
||||
.ForMember(dest => dest.FilesJson, opt => opt.MapFrom(src => src.FilesJson))
|
||||
.ForMember(dest => dest.Files, opt => opt.Ignore()); // Ignore Files property as we handle it manually
|
||||
|
||||
// Mapping from ActivityDto to Activity
|
||||
CreateMap<ActivityDto, Activity>()
|
||||
// Mapping from NoteDto to Note
|
||||
CreateMap<NoteDto, Note>()
|
||||
.ForMember(dest => dest.TenantId, opt => opt.MapFrom(src => src.TenantId))
|
||||
.ForMember(dest => dest.EntityName, opt => opt.MapFrom(src => src.EntityName))
|
||||
.ForMember(dest => dest.EntityId, opt => opt.MapFrom(src => src.EntityId))
|
||||
|
|
@ -3765,9 +3765,9 @@
|
|||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.ShowActivity",
|
||||
"en": "Show Activity",
|
||||
"tr": "Etkinliği Göster"
|
||||
"key": "ListForms.ListFormEdit.ShowNote",
|
||||
"en": "Show Note",
|
||||
"tr": "Notu Göster"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -4095,9 +4095,9 @@
|
|||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.PermissionsActivity",
|
||||
"en": "Activity",
|
||||
"tr": "Etkinlik"
|
||||
"key": "ListForms.ListFormEdit.PermissionsNote",
|
||||
"en": "Note",
|
||||
"tr": "Not"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -9525,9 +9525,9 @@
|
|||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Crm.OpportunityAction",
|
||||
"tr": "Eylemler",
|
||||
"en": "Actions"
|
||||
"key": "App.Crm.OpportunityActivity",
|
||||
"tr": "Aktiviteler",
|
||||
"en": "Activities"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Bank,
|
||||
|
|
@ -376,6 +377,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.BankAccount,
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.PermissionGroup,
|
||||
|
|
@ -77,7 +78,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, AbpIdentity.PermissionGroups.Delete, AbpIdentity.PermissionGroups.Export, AbpIdentity.PermissionGroups.Import, AbpIdentity.PermissionGroups.Activity),
|
||||
PermissionJson = DefaultPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, AbpIdentity.PermissionGroups.Delete, AbpIdentity.PermissionGroups.Export, AbpIdentity.PermissionGroups.Import, AbpIdentity.PermissionGroups.Note),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AbpIdentity.PermissionGroups.Default, 800, 350, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
|
|
@ -171,6 +172,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Permission,
|
||||
|
|
@ -191,7 +193,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
SearchPanelJson= DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, AbpIdentity.Permissions.Delete, AbpIdentity.Permissions.Export, AbpIdentity.Permissions.Import, AbpIdentity.Permissions.Activity),
|
||||
PermissionJson = DefaultPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, AbpIdentity.Permissions.Delete, AbpIdentity.Permissions.Export, AbpIdentity.Permissions.Import, AbpIdentity.Permissions.Note),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AbpIdentity.Permissions.Default, 600, 350, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
|
|
@ -390,6 +392,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ClaimType,
|
||||
|
|
@ -595,6 +598,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Role,
|
||||
|
|
@ -616,7 +620,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, PlatformConsts.IdentityPermissions.Roles.Delete, PlatformConsts.IdentityPermissions.Roles.Export, PlatformConsts.IdentityPermissions.Roles.Import, PlatformConsts.IdentityPermissions.Roles.Activity),
|
||||
PermissionJson = DefaultPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, PlatformConsts.IdentityPermissions.Roles.Delete, PlatformConsts.IdentityPermissions.Roles.Export, PlatformConsts.IdentityPermissions.Roles.Import, PlatformConsts.IdentityPermissions.Roles.Note),
|
||||
EditingOptionJson = DefaultEditingOptionJson(PlatformConsts.IdentityPermissions.Roles.Default, 500, 300, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
|
||||
|
|
@ -725,6 +729,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.User,
|
||||
|
|
@ -747,7 +752,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, PlatformConsts.IdentityPermissions.Users.Delete, PlatformConsts.IdentityPermissions.Users.Export, PlatformConsts.IdentityPermissions.Users.Import, PlatformConsts.IdentityPermissions.Users.Activity),
|
||||
PermissionJson = DefaultPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, PlatformConsts.IdentityPermissions.Users.Delete, PlatformConsts.IdentityPermissions.Users.Export, PlatformConsts.IdentityPermissions.Users.Import, PlatformConsts.IdentityPermissions.Users.Note),
|
||||
DeleteCommand = $"UPDATE \"AbpUsers\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(PlatformConsts.IdentityPermissions.Users.Default, 500, 400, true, true, true, true, false),
|
||||
|
|
@ -930,6 +935,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.IpRestriction,
|
||||
|
|
@ -1066,6 +1072,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.AuditLog,
|
||||
|
|
@ -1253,6 +1260,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.CustomEndpoint,
|
||||
|
|
@ -1468,6 +1476,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ReportCategory,
|
||||
|
|
@ -1584,6 +1593,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.About,
|
||||
|
|
@ -1702,6 +1712,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Service,
|
||||
|
|
@ -1875,6 +1886,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Product,
|
||||
|
|
@ -2090,6 +2102,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.PaymentMethod,
|
||||
|
|
@ -2212,6 +2225,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.InstallmentOption,
|
||||
|
|
@ -2334,6 +2348,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.PurchaseOrder,
|
||||
|
|
@ -2772,6 +2787,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.BlogCategory,
|
||||
|
|
@ -2955,6 +2971,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.BlogPost,
|
||||
|
|
@ -3277,6 +3294,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Demo,
|
||||
|
|
@ -3487,6 +3505,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Contact,
|
||||
|
|
@ -3697,6 +3716,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.WorkHour,
|
||||
|
|
@ -3939,6 +3959,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Sector,
|
||||
|
|
@ -4027,6 +4048,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SkillType,
|
||||
|
|
@ -4151,6 +4173,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SkillLevel,
|
||||
|
|
@ -4291,6 +4314,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Skill,
|
||||
|
|
@ -4393,6 +4417,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
new ListForm {
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.UomCategory,
|
||||
|
|
@ -4506,6 +4531,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Uom,
|
||||
|
|
@ -4682,6 +4708,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Behavior,
|
||||
|
|
@ -4767,6 +4794,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Disease,
|
||||
|
|
@ -4854,6 +4882,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Document,
|
||||
|
|
@ -4938,6 +4967,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.EducationStatus,
|
||||
|
|
@ -5040,6 +5070,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Vaccine,
|
||||
|
|
@ -5125,6 +5156,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Vehicle,
|
||||
|
|
@ -5397,6 +5429,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Psychologist,
|
||||
|
|
@ -5572,6 +5605,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Lawyer,
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Program,
|
||||
|
|
@ -166,6 +167,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Schedule,
|
||||
|
|
@ -559,6 +561,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.RegistrationType,
|
||||
|
|
@ -704,6 +707,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.RegistrationMethod,
|
||||
|
|
@ -876,6 +880,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ClassType,
|
||||
|
|
@ -1083,6 +1088,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Class,
|
||||
|
|
@ -1255,6 +1261,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Level,
|
||||
|
|
@ -1526,6 +1533,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ClassCancellationReason,
|
||||
|
|
@ -1639,6 +1647,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.LessonPeriod,
|
||||
|
|
@ -1877,6 +1886,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.QuestionTag,
|
||||
|
|
@ -1996,6 +2006,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.QuestionPool,
|
||||
|
|
@ -2144,6 +2155,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Question,
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.CustomerType,
|
||||
|
|
@ -173,6 +174,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.CustomerSegment,
|
||||
|
|
@ -292,6 +294,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Customer,
|
||||
|
|
@ -986,6 +989,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.LossReason,
|
||||
|
|
@ -1154,6 +1158,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Opportunity,
|
||||
|
|
@ -1180,12 +1185,12 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Opportunity)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Crm.Opportunity, 500, 600, true, true, true, true, false),
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Crm.Opportunity, 800, 400, true, true, true, true, false),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
{
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =[
|
||||
new EditingFormItemDto { Order = 1, DataField="Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField="PartnerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
|
|
@ -1534,9 +1539,9 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
listForm.ListFormCode,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Actions",
|
||||
TabTitle = "Activity",
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = ListFormCodes.Lists.OpportunityAction,
|
||||
Code = ListFormCodes.Lists.OpportunityActivity,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "Id",
|
||||
|
|
@ -1560,26 +1565,27 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Action
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.OpportunityAction))
|
||||
#region Activity
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.OpportunityActivity))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.OpportunityAction,
|
||||
Name = AppCodes.Crm.OpportunityAction,
|
||||
Title = AppCodes.Crm.OpportunityAction,
|
||||
ListFormCode = ListFormCodes.Lists.OpportunityActivity,
|
||||
Name = AppCodes.Crm.OpportunityActivity,
|
||||
Title = AppCodes.Crm.OpportunityActivity,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Crm.OpportunityAction,
|
||||
Description = AppCodes.Crm.OpportunityActivity,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Action)),
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Activity)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
|
|
@ -1590,21 +1596,21 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(AppCodes.Crm.OpportunityAction),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Action)),
|
||||
PermissionJson = DefaultPermissionJson(AppCodes.Crm.OpportunityActivity),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Activity)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Crm.OpportunityAction, 500, 600, true, true, true, true, false),
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Crm.OpportunityActivity, 500, 600, true, true, true, true, false),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
{
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||
new EditingFormItemDto { Order = 1, DataField="ActionType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 1, DataField="ActivityType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 2, DataField="Subject", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 4, DataField="EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField="ActionDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 5, DataField="ActivityDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 6, DataField="StartTime", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 7, DataField="EndTime", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 8, DataField="Duration", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||
|
|
@ -1616,7 +1622,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "ActionDate", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||
new() { FieldName = "ActivityDate", FieldDbType = DbType.DateTime, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
|
@ -1643,7 +1649,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ActionType",
|
||||
FieldName = "ActivityType",
|
||||
Width = 100,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
|
|
@ -1722,7 +1728,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Date,
|
||||
FieldName = "ActionDate",
|
||||
FieldName = "ActivityDate",
|
||||
Width = 100,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
|
|
@ -1868,6 +1874,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.OpportunityCompetitor,
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.EmploymentType,
|
||||
|
|
@ -151,6 +152,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.JobPosition,
|
||||
|
|
@ -447,6 +449,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Department,
|
||||
|
|
@ -664,6 +667,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Badge,
|
||||
|
|
@ -969,6 +973,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.CostCenter,
|
||||
|
|
@ -1262,6 +1267,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Employee,
|
||||
|
|
@ -1978,6 +1984,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Leave,
|
||||
|
|
@ -2304,6 +2311,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Overtime,
|
||||
|
|
@ -2628,6 +2636,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Expense,
|
||||
|
|
@ -2908,6 +2917,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Payroll,
|
||||
|
|
@ -3269,6 +3279,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Template360,
|
||||
|
|
@ -3419,6 +3430,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Performance360,
|
||||
|
|
@ -3651,6 +3663,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Training,
|
||||
|
|
@ -3984,6 +3997,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Survey,
|
||||
|
|
@ -4191,6 +4205,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SurveyQuestion,
|
||||
|
|
@ -4368,6 +4383,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SurveyResponse,
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.EventType,
|
||||
|
|
@ -135,6 +136,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.EventCategory,
|
||||
|
|
@ -219,6 +221,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Event,
|
||||
|
|
@ -466,6 +469,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Meal,
|
||||
|
|
@ -654,6 +658,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Reservation,
|
||||
|
|
@ -902,6 +907,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ShuttleRoute,
|
||||
|
|
@ -1127,6 +1133,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Announcement,
|
||||
|
|
@ -1396,6 +1403,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Visitor,
|
||||
|
|
@ -1649,6 +1657,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SocialPost,
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.MeetingMethod,
|
||||
|
|
@ -193,6 +194,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.MeetingResult,
|
||||
|
|
@ -324,6 +326,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Source,
|
||||
|
|
@ -437,6 +440,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Interesting,
|
||||
|
|
@ -550,6 +554,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SalesRejectionReason,
|
||||
|
|
@ -695,6 +700,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.NoteType,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowActivity = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Tenant,
|
||||
|
|
@ -78,7 +78,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, TenantManagementPermissions.Tenants.Delete, TenantManagementPermissions.Tenants.Default + ".Export", TenantManagementPermissions.Tenants.Default + ".Import", TenantManagementPermissions.Tenants.Default + ".Activity"),
|
||||
PermissionJson = DefaultPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, TenantManagementPermissions.Tenants.Delete, TenantManagementPermissions.Tenants.Default + ".Export", TenantManagementPermissions.Tenants.Default + ".Import", TenantManagementPermissions.Tenants.Default + ".Note"),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(TenantManagementPermissions.Tenants.Default, 800, 800, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
|
|
@ -549,6 +549,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Branch,
|
||||
|
|
@ -991,6 +992,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SettingDefinition,
|
||||
|
|
@ -1361,6 +1363,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.GlobalSearch,
|
||||
|
|
@ -1511,6 +1514,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Language,
|
||||
|
|
@ -1678,6 +1682,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.LanguageText,
|
||||
|
|
@ -1837,6 +1842,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Route,
|
||||
|
|
@ -2009,6 +2015,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Menu,
|
||||
|
|
@ -2288,6 +2295,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.DataSource,
|
||||
|
|
@ -2417,6 +2425,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Listform,
|
||||
|
|
@ -2884,6 +2893,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.NotificationRule,
|
||||
|
|
@ -3115,6 +3125,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Notification,
|
||||
|
|
@ -3304,6 +3315,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.BackgroundWorker,
|
||||
|
|
@ -3525,6 +3537,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ContactTag,
|
||||
|
|
@ -3631,6 +3644,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ContactTitle,
|
||||
|
|
@ -3737,6 +3751,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Currency,
|
||||
|
|
@ -3890,6 +3905,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.CountryGroup,
|
||||
|
|
@ -3974,6 +3990,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Country,
|
||||
|
|
@ -4172,6 +4189,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.City,
|
||||
|
|
@ -4317,6 +4335,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.District,
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.MaterialType,
|
||||
|
|
@ -191,6 +192,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.MaterialGroup,
|
||||
|
|
@ -366,6 +368,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Material,
|
||||
|
|
@ -679,6 +682,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.PaymentTerm,
|
||||
|
|
@ -801,6 +805,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SupplyType,
|
||||
|
|
@ -923,6 +928,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.SupplyCardType,
|
||||
|
|
@ -1044,6 +1050,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Supply,
|
||||
|
|
@ -1735,6 +1742,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.PartnerBank,
|
||||
|
|
@ -2059,6 +2067,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.PartnerCertificate,
|
||||
|
|
@ -2212,6 +2221,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.PartnerContact,
|
||||
|
|
@ -2435,6 +2445,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Approval,
|
||||
|
|
@ -2622,6 +2633,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ApprovalStep,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -131,7 +131,7 @@ public static class SeederDefaults
|
|||
D = d,
|
||||
E = e,
|
||||
I = i,
|
||||
A = a,
|
||||
N = a,
|
||||
});
|
||||
}
|
||||
public static string DefaultPermissionJson(string permissionName)
|
||||
|
|
@ -144,7 +144,7 @@ public static class SeederDefaults
|
|||
D = permissionName + ".Delete",
|
||||
E = permissionName + ".Export",
|
||||
I = permissionName + ".Import",
|
||||
A = permissionName + ".Activity",
|
||||
N = permissionName + ".Note",
|
||||
});
|
||||
}
|
||||
public static string DefaultFieldPermissionJson(string permissionName)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class SeederUtils : IDisposable
|
|||
{
|
||||
ListFormType = sourceForm.ListFormType,
|
||||
IsSubForm = sourceForm.IsSubForm,
|
||||
ShowActivity = sourceForm.ShowActivity,
|
||||
ShowNote = sourceForm.ShowNote,
|
||||
LayoutJson = sourceForm.LayoutJson,
|
||||
SubFormsJson = subFormsJson ?? sourceForm.SubFormsJson,
|
||||
CultureName = sourceForm.CultureName,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public enum TableNameEnum
|
|||
ListFormCustomization,
|
||||
ListFormImport,
|
||||
ListFormImportExecute,
|
||||
Activity,
|
||||
Note,
|
||||
BackgroundWorker,
|
||||
ForumCategory,
|
||||
ForumTopic,
|
||||
|
|
@ -153,6 +153,6 @@ public enum TableNameEnum
|
|||
ApprovalStep,
|
||||
LossReason,
|
||||
Opportunity,
|
||||
Action,
|
||||
Activity,
|
||||
Competitor
|
||||
}
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ public static class PlatformConsts
|
|||
public const string Customer = "list-customer";
|
||||
public const string LossReason = "list-lossreason";
|
||||
public const string Opportunity = "list-opportunity";
|
||||
public const string OpportunityAction = "list-opportunityaction";
|
||||
public const string OpportunityActivity = "list-opportunityactivity";
|
||||
public const string OpportunityCompetitor = "list-opportunitycompetitor";
|
||||
|
||||
}
|
||||
|
|
@ -755,6 +755,7 @@ public static class PlatformConsts
|
|||
public const string UserId = "@USERID";
|
||||
public const string UserName = "@USERNAME";
|
||||
public const string Roles = "@ROLES";
|
||||
public const string Date = "@DATE";
|
||||
public const string Now = "@NOW";
|
||||
public const string Year = "@YEAR";
|
||||
public const string Month = "@MONTH";
|
||||
|
|
@ -810,7 +811,7 @@ public static class PlatformConsts
|
|||
public const string Delete = Default + ".Delete";
|
||||
public const string Export = Default + ".Export";
|
||||
public const string Import = Default + ".Import";
|
||||
public const string Activity = Default + ".Activity";
|
||||
public const string Note = Default + ".Note";
|
||||
public const string ManagePermissions = Default + ".ManagePermissions";
|
||||
}
|
||||
|
||||
|
|
@ -822,7 +823,7 @@ public static class PlatformConsts
|
|||
public const string Delete = Default + ".Delete";
|
||||
public const string Export = Default + ".Export";
|
||||
public const string Import = Default + ".Import";
|
||||
public const string Activity = Default + ".Activity";
|
||||
public const string Note = Default + ".Note";
|
||||
public const string ManagePermissions = Default + ".ManagePermissions";
|
||||
public const string ManageRoles = Update + ".ManageRoles";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.ForumPost), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
|
||||
// 🔹 TENANT TABLOLARI (GENEL)
|
||||
{ nameof(TableNameEnum.Activity), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Note), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Branch), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.BranchUsers), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.GlobalSearch), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
|
|
@ -179,7 +179,7 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.CustomerType), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||
{ nameof(TableNameEnum.LossReason), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||
{ nameof(TableNameEnum.Opportunity), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||
{ nameof(TableNameEnum.Action), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||
{ nameof(TableNameEnum.Activity), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||
{ nameof(TableNameEnum.Competitor), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||
|
||||
// 🔹 ACCOUNTING
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ public static class BlobContainerNames
|
|||
public const string Intranet = "intranet";
|
||||
public const string Avatar = "avatar";
|
||||
public const string Import = "import";
|
||||
public const string Activity = "activity";
|
||||
public const string Note = "note";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public static class SeedConsts
|
|||
public const string Delete = Default + ".Delete";
|
||||
public const string Export = Default + ".Export";
|
||||
public const string Import = Default + ".Import";
|
||||
public const string Activity = Default + ".Activity";
|
||||
public const string Note = Default + ".Note";
|
||||
}
|
||||
|
||||
public static class Permissions
|
||||
|
|
@ -39,7 +39,7 @@ public static class SeedConsts
|
|||
public const string Delete = Default + ".Delete";
|
||||
public const string Export = Default + ".Export";
|
||||
public const string Import = Default + ".Import";
|
||||
public const string Activity = Default + ".Activity";
|
||||
public const string Note = Default + ".Note";
|
||||
}
|
||||
|
||||
public static class Preferences
|
||||
|
|
@ -495,7 +495,7 @@ public static class SeedConsts
|
|||
public const string Customer = Default + ".Customer";
|
||||
public const string LossReason = Default + ".LossReason";
|
||||
public const string Opportunity = Default + ".Opportunity";
|
||||
public const string OpportunityAction = Default + ".OpportunityAction";
|
||||
public const string OpportunityActivity = Default + ".OpportunityActivity";
|
||||
public const string OpportunityCompetitor = Default + ".OpportunityCompetitor";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ public class ListForm : FullAuditedEntity<Guid>
|
|||
/// <summary>Bu listform sub olarak mı kullanılacak</summary>
|
||||
public bool IsSubForm { get; set; }
|
||||
|
||||
/// <summary>Bu listform show activity gösterilsin mi?</summary>
|
||||
public bool ShowActivity { get; set; }
|
||||
/// <summary>Bu listform show note gösterilsin mi?</summary>
|
||||
public bool ShowNote { get; set; } = true;
|
||||
|
||||
/// <summary>Bu listform'un sub listformlarının listesi ve ilişkileri</summary>
|
||||
public string SubFormsJson { get; set; }
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@ using Volo.Abp.MultiTenancy;
|
|||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class Action : FullAuditedEntity<Guid>, IMultiTenant
|
||||
public class Activity : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid? OpportunityId { get; set; }
|
||||
public Opportunity? Opportunity { get; set; }
|
||||
|
||||
public string ActionType { get; set; } //Call, Email, Meeting, Task, Note, Demo, Proposal
|
||||
public string ActivityType { get; set; } //Call, Email, Meeting, Task, Note, Demo, Proposal
|
||||
public string Subject { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
public Guid EmployeeId { get; set; }
|
||||
|
||||
public DateTime ActionDate { get; set; }
|
||||
public DateTime ActivityDate { get; set; }
|
||||
public DateTime? StartTime { get; set; }
|
||||
public DateTime? EndTime { get; set; }
|
||||
public int? Duration { get; set; }
|
||||
|
|
@ -39,12 +39,12 @@ public class Opportunity : FullAuditedEntity<Guid>, IMultiTenant
|
|||
|
||||
public string Status { get; set; } // Durum
|
||||
|
||||
public ICollection<Action> Actions { get; set; } //Aktiviteler
|
||||
public ICollection<Activity> Activities { get; set; } //Aktiviteler
|
||||
public ICollection<Competitor> Competitors { get; set; } //Rakipler
|
||||
|
||||
public Opportunity()
|
||||
{
|
||||
Actions = [];
|
||||
Activities = [];
|
||||
Competitors = [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using Volo.Abp.MultiTenancy;
|
|||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class Activity : FullAuditedEntity<Guid>, IMultiTenant
|
||||
public class Note : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
|
|
@ -11,7 +11,7 @@ public class PermissionCrudValueObject : ValueObject
|
|||
public string D { get; set; } //Delete
|
||||
public string I { get; set; } //Export
|
||||
public string E { get; set; } //Import
|
||||
public string A { get; set; } //Activity
|
||||
public string N { get; set; } //Note
|
||||
|
||||
protected override IEnumerable<object> GetAtomicValues()
|
||||
{
|
||||
|
|
@ -21,7 +21,7 @@ public class PermissionCrudValueObject : ValueObject
|
|||
yield return D;
|
||||
yield return I;
|
||||
yield return E;
|
||||
yield return A;
|
||||
yield return N;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class DefaultValueHelper : ITransientDependency
|
|||
public string GetDefaultValue(string strValue)
|
||||
{
|
||||
if (string.IsNullOrEmpty(strValue))
|
||||
return strValue;
|
||||
return strValue;
|
||||
|
||||
var now = _clock.Now;
|
||||
|
||||
|
|
@ -34,6 +34,7 @@ public class DefaultValueHelper : ITransientDependency
|
|||
.Replace(PlatformConsts.DefaultValues.UserId, _currentUser.Id?.ToString() ?? Guid.Empty.ToString())
|
||||
.Replace(PlatformConsts.DefaultValues.UserName, _currentUser.UserName ?? string.Empty)
|
||||
.Replace(PlatformConsts.DefaultValues.Roles, string.Join("','", _currentUser.Roles ?? []))
|
||||
.Replace(PlatformConsts.DefaultValues.Date, now.Date.ToString("O", CultureInfo.InvariantCulture))
|
||||
.Replace(PlatformConsts.DefaultValues.Now, now.ToString("O", CultureInfo.InvariantCulture))
|
||||
.Replace(PlatformConsts.DefaultValues.Day, now.Day.ToString(CultureInfo.InvariantCulture))
|
||||
.Replace(PlatformConsts.DefaultValues.Month, now.Month.ToString(CultureInfo.InvariantCulture))
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ public class DefaultValueManager : PlatformDomainService, IDefaultValueManager
|
|||
value = CurrentUser.Name;
|
||||
else if (field.Value == PlatformConsts.DefaultValues.Roles)
|
||||
value = CurrentUser.Roles; //.JoinAsString("','");
|
||||
else if (field.Value == PlatformConsts.DefaultValues.Date)
|
||||
value = Clock.Now.Date;
|
||||
else if (field.Value == PlatformConsts.DefaultValues.Now)
|
||||
value = Clock.Now;
|
||||
else if (field.Value == PlatformConsts.DefaultValues.Day)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class PlatformDbContext :
|
|||
public DbSet<ReportParameter> ReportParameters { get; set; }
|
||||
public DbSet<ReportGenerated> ReportGenerated { get; set; }
|
||||
public DbSet<ReportCategory> ReportCategories { get; set; }
|
||||
public DbSet<Activity> Activities { get; set; }
|
||||
public DbSet<Note> Activities { get; set; }
|
||||
public DbSet<IpRestriction> IpRestrictions { get; set; }
|
||||
public DbSet<ContactTag> ContactTags { get; set; }
|
||||
public DbSet<ContactTitle> ContactTitles { get; set; }
|
||||
|
|
@ -219,7 +219,7 @@ public class PlatformDbContext :
|
|||
#region Crm
|
||||
public DbSet<LossReason> LostReasons { get; set; }
|
||||
public DbSet<Opportunity> Opportunities { get; set; }
|
||||
public DbSet<Entities.Action> Actions { get; set; }
|
||||
public DbSet<Entities.Activity> Actions { get; set; }
|
||||
public DbSet<Competitor> Competitors { get; set; }
|
||||
#endregion
|
||||
|
||||
|
|
@ -546,9 +546,9 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.ErrorsJson).HasColumnType("text");
|
||||
});
|
||||
|
||||
builder.Entity<Activity>(b =>
|
||||
builder.Entity<Note>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Activity)), Prefix.DbSchema);
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Note)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Type).IsRequired();
|
||||
|
|
@ -2595,19 +2595,19 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.Status).IsRequired().HasMaxLength(50);
|
||||
});
|
||||
|
||||
builder.Entity<Entities.Action>(b =>
|
||||
builder.Entity<Entities.Activity>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Action)), Prefix.DbSchema);
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Activity)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.ActionType).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.ActivityType).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.Subject).IsRequired().HasMaxLength(200);
|
||||
b.Property(x => x.Description).HasMaxLength(1000);
|
||||
b.Property(x => x.EmployeeId).IsRequired();
|
||||
b.Property(x => x.ActionDate).IsRequired();
|
||||
b.Property(x => x.ActivityDate).IsRequired();
|
||||
|
||||
b.HasOne(x => x.Opportunity)
|
||||
.WithMany(x => x.Actions)
|
||||
.WithMany(x => x.Activities)
|
||||
.HasForeignKey(x => x.OpportunityId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251114120401_Initial")]
|
||||
[Migration("20251114204400_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -625,15 +625,15 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Adm_T_About", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Action", b =>
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("ActionDate")
|
||||
b.Property<DateTime>("ActivityDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("ActionType")
|
||||
b.Property<string>("ActivityType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
|
@ -712,74 +712,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasIndex("OpportunityId");
|
||||
|
||||
b.ToTable("Crm_T_Action", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("EntityId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("EntityName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FilesJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Sas_T_Activity", (string)null);
|
||||
b.ToTable("Crm_T_Activity", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.AiBot", b =>
|
||||
|
|
@ -5480,7 +5413,7 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("SeriesJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("ShowActivity")
|
||||
b.Property<bool>("ShowNote")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SizeJson")
|
||||
|
|
@ -6585,6 +6518,73 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Sas_H_Menu", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Note", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("EntityId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("EntityName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FilesJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Sas_T_Note", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.NoteType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -13150,7 +13150,7 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("NotificationRule");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Action", b =>
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Opportunity", "Opportunity")
|
||||
.WithMany("Actions")
|
||||
|
|
@ -1941,7 +1941,7 @@ namespace Erp.Platform.Migrations
|
|||
IsOrganizationUnit = table.Column<bool>(type: "bit", nullable: false),
|
||||
ListFormType = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
IsSubForm = table.Column<bool>(type: "bit", nullable: false),
|
||||
ShowActivity = table.Column<bool>(type: "bit", nullable: false),
|
||||
ShowNote = table.Column<bool>(type: "bit", nullable: false),
|
||||
SubFormsJson = table.Column<string>(type: "text", nullable: true),
|
||||
WidgetsJson = table.Column<string>(type: "text", nullable: true),
|
||||
ExtraFilterJson = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -2039,31 +2039,6 @@ namespace Erp.Platform.Migrations
|
|||
table.PrimaryKey("PK_Sas_H_Route", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_Activity",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EntityName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EntityId = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Type = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Subject = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
Content = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false),
|
||||
FilesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Sas_T_Activity", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_Branch",
|
||||
columns: table => new
|
||||
|
|
@ -2253,6 +2228,31 @@ namespace Erp.Platform.Migrations
|
|||
table.PrimaryKey("PK_Sas_T_IpRestriction", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_Note",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EntityName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EntityId = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Type = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Subject = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
Content = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false),
|
||||
FilesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Sas_T_Note", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_ReportCategory",
|
||||
columns: table => new
|
||||
|
|
@ -4440,17 +4440,17 @@ namespace Erp.Platform.Migrations
|
|||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Crm_T_Action",
|
||||
name: "Crm_T_Activity",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
OpportunityId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
ActionType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
ActivityType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Subject = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
EmployeeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
ActionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ActivityDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
StartTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
EndTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Duration = table.Column<int>(type: "int", nullable: true),
|
||||
|
|
@ -4468,7 +4468,7 @@ namespace Erp.Platform.Migrations
|
|||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Crm_T_Action", x => x.Id);
|
||||
table.PrimaryKey("PK_Crm_T_Activity", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
|
|
@ -5939,8 +5939,8 @@ namespace Erp.Platform.Migrations
|
|||
column: "QuestionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Crm_T_Action_OpportunityId",
|
||||
table: "Crm_T_Action",
|
||||
name: "IX_Crm_T_Activity_OpportunityId",
|
||||
table: "Crm_T_Activity",
|
||||
column: "OpportunityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
|
|
@ -6475,8 +6475,8 @@ namespace Erp.Platform.Migrations
|
|||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Crm_T_Action_Crm_T_Opportunity_OpportunityId",
|
||||
table: "Crm_T_Action",
|
||||
name: "FK_Crm_T_Activity_Crm_T_Opportunity_OpportunityId",
|
||||
table: "Crm_T_Activity",
|
||||
column: "OpportunityId",
|
||||
principalTable: "Crm_T_Opportunity",
|
||||
principalColumn: "Id",
|
||||
|
|
@ -6725,7 +6725,7 @@ namespace Erp.Platform.Migrations
|
|||
name: "Crd_T_QuestionTag");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_Action");
|
||||
name: "Crm_T_Activity");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_Competitor");
|
||||
|
|
@ -6859,9 +6859,6 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Sas_H_Route");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_Activity");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_ApiMigration");
|
||||
|
||||
|
|
@ -6889,6 +6886,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_IpRestriction");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_Note");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_ReportGenerated");
|
||||
|
||||
|
|
@ -622,15 +622,15 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Adm_T_About", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Action", b =>
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("ActionDate")
|
||||
b.Property<DateTime>("ActivityDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("ActionType")
|
||||
b.Property<string>("ActivityType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
|
@ -709,74 +709,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasIndex("OpportunityId");
|
||||
|
||||
b.ToTable("Crm_T_Action", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("EntityId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("EntityName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FilesJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Sas_T_Activity", (string)null);
|
||||
b.ToTable("Crm_T_Activity", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.AiBot", b =>
|
||||
|
|
@ -5477,7 +5410,7 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("SeriesJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("ShowActivity")
|
||||
b.Property<bool>("ShowNote")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SizeJson")
|
||||
|
|
@ -6582,6 +6515,73 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Sas_H_Menu", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Note", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("EntityId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("EntityName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FilesJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Sas_T_Note", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.NoteType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -13147,7 +13147,7 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("NotificationRule");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Action", b =>
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Opportunity", "Opportunity")
|
||||
.WithMany("Actions")
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ export interface GridOptionsDto extends AuditedEntityDto<string> {
|
|||
isOrganizationUnit: boolean
|
||||
listFormType: string
|
||||
isSubForm: boolean
|
||||
showActivity: boolean
|
||||
showNote: boolean
|
||||
subFormsJson?: string
|
||||
subFormsDto: SubFormDto[]
|
||||
extraFilterJson?: string
|
||||
|
|
@ -642,7 +642,7 @@ export interface PermissionCrudDto {
|
|||
d?: string
|
||||
e?: string
|
||||
i?: string
|
||||
a?: string
|
||||
n?: string
|
||||
}
|
||||
|
||||
export interface ListFormFieldPermissionDto {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { FullAuditedEntityDto } from '../abp'
|
||||
|
||||
export interface ActivityDto extends FullAuditedEntityDto {
|
||||
export interface NoteDto extends FullAuditedEntityDto {
|
||||
tenantId?: string
|
||||
entityName: string
|
||||
entityId: string
|
||||
|
|
@ -12,7 +12,7 @@ export interface ActivityDto extends FullAuditedEntityDto {
|
|||
files: File[]
|
||||
}
|
||||
|
||||
export interface ActivityFileDto {
|
||||
export interface NoteFileDto {
|
||||
fileName: string
|
||||
fileType: string
|
||||
fileSize: number
|
||||
|
|
@ -38,7 +38,7 @@ class FileManagementService {
|
|||
formData.append('parentId', request.parentId)
|
||||
}
|
||||
|
||||
// ActivityModal pattern - Files array
|
||||
// NoteModal pattern - Files array
|
||||
request.files.forEach(file => {
|
||||
formData.append('Files', file)
|
||||
})
|
||||
|
|
@ -51,7 +51,7 @@ class FileManagementService {
|
|||
})
|
||||
}
|
||||
|
||||
// Upload a file directly with FormData (ActivityModal pattern)
|
||||
// Upload a file directly with FormData (NoteModal pattern)
|
||||
async uploadFileDirectly(formData: FormData): Promise<{ data: FileItem }> {
|
||||
try {
|
||||
console.log('Uploading file directly with FormData')
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
import { PagedResultDto } from '@/proxy'
|
||||
import { ActivityDto, ActivityFileDto } from '@/proxy/activity/models'
|
||||
import { NoteDto, NoteFileDto } from '@/proxy/note/models'
|
||||
import apiService from '@/services/api.service'
|
||||
import { AxiosError } from 'axios'
|
||||
|
||||
class ActivityService {
|
||||
async getList(params?: any): Promise<PagedResultDto<ActivityDto>> {
|
||||
const response = await apiService.fetchData<PagedResultDto<ActivityDto>>({
|
||||
url: '/api/app/activity',
|
||||
class NoteService {
|
||||
async getList(params?: any): Promise<PagedResultDto<NoteDto>> {
|
||||
const response = await apiService.fetchData<PagedResultDto<NoteDto>>({
|
||||
url: '/api/app/note',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async get(id: string): Promise<ActivityDto> {
|
||||
const response = await apiService.fetchData<ActivityDto>({
|
||||
url: `/api/app/activity/${id}`,
|
||||
async get(id: string): Promise<NoteDto> {
|
||||
const response = await apiService.fetchData<NoteDto>({
|
||||
url: `/api/app/note/${id}`,
|
||||
method: 'GET',
|
||||
})
|
||||
return response.data
|
||||
|
|
@ -24,14 +24,14 @@ class ActivityService {
|
|||
async create(data: FormData): Promise<any> {
|
||||
try {
|
||||
const response = await apiService.fetchData({
|
||||
url: '/api/app/activity',
|
||||
url: '/api/app/note',
|
||||
method: 'POST',
|
||||
data, // FormData olduğu için headers belirtmeye gerek yok
|
||||
})
|
||||
return response.data
|
||||
} catch (error) {
|
||||
if (error instanceof AxiosError) {
|
||||
console.error('Error creating activity:', error.response?.data)
|
||||
console.error('Error creating note:', error.response?.data)
|
||||
return error.response?.data
|
||||
} else {
|
||||
console.error('Unexpected error:', error)
|
||||
|
|
@ -40,9 +40,9 @@ class ActivityService {
|
|||
}
|
||||
}
|
||||
|
||||
async update(id: string, data: ActivityDto): Promise<ActivityDto> {
|
||||
const response = await apiService.fetchData<ActivityDto>({
|
||||
url: `/api/app/activity/${id}`,
|
||||
async update(id: string, data: NoteDto): Promise<NoteDto> {
|
||||
const response = await apiService.fetchData<NoteDto>({
|
||||
url: `/api/app/note/${id}`,
|
||||
method: 'PUT',
|
||||
data: data as any,
|
||||
})
|
||||
|
|
@ -51,14 +51,14 @@ class ActivityService {
|
|||
|
||||
async delete(id: string): Promise<void> {
|
||||
await apiService.fetchData({
|
||||
url: `/api/app/activity/${id}`,
|
||||
url: `/api/app/note/${id}`,
|
||||
method: 'DELETE',
|
||||
})
|
||||
}
|
||||
|
||||
async downloadFile(savedFileName: string, fileName: string, fileType: string) {
|
||||
const response = await apiService.fetchData<ActivityFileDto>({
|
||||
url: `/api/app/activity/download?savedFileName=${savedFileName}`,
|
||||
const response = await apiService.fetchData<NoteFileDto>({
|
||||
url: `/api/app/note/download?savedFileName=${savedFileName}`,
|
||||
method: 'GET',
|
||||
})
|
||||
|
||||
|
|
@ -78,4 +78,4 @@ class ActivityService {
|
|||
}
|
||||
}
|
||||
|
||||
export const activityService = new ActivityService()
|
||||
export const noteService = new NoteService()
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { DepartmentDto } from '@/proxy/intranet/models'
|
||||
import { PriorityEnum } from './common'
|
||||
import { DepartmentDto } from './hr'
|
||||
import { MmMaterial } from './mm'
|
||||
|
||||
export type CalendarView = 'month' | 'week' | 'day'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { EmployeeDto } from '@/proxy/intranet/models'
|
||||
import { BusinessParty, PriorityEnum } from './common'
|
||||
import { EmployeeDto } from './hr'
|
||||
|
||||
export interface PsProject {
|
||||
// Proje
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ const FileManager = () => {
|
|||
const items = response.data.items || []
|
||||
// Manual protection for system folders
|
||||
const protectedItems = items.map((item) => {
|
||||
const isSystemFolder = ['avatar', 'import', 'activity'].includes(item.name.toLowerCase())
|
||||
const isSystemFolder = ['avatar', 'import', 'note'].includes(item.name.toLowerCase())
|
||||
return {
|
||||
...item,
|
||||
isReadOnly: item.isReadOnly || isSystemFolder,
|
||||
|
|
@ -228,10 +228,10 @@ const FileManager = () => {
|
|||
try {
|
||||
setUploading(true)
|
||||
for (const file of files) {
|
||||
// ActivityModal pattern'ini kullan - Files array ile FormData
|
||||
// NoteModal pattern'ini kullan - Files array ile FormData
|
||||
const formData = new FormData()
|
||||
formData.append('fileName', file.name)
|
||||
formData.append('Files', file) // ActivityModal pattern - Files array
|
||||
formData.append('Files', file) // NoteModal pattern - Files array
|
||||
if (currentFolderId) {
|
||||
formData.append('parentId', currentFolderId)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const schema = Yup.object().shape({
|
|||
description: Yup.string(),
|
||||
pageSize: Yup.number(),
|
||||
isSubForm: Yup.boolean(),
|
||||
showActivity: Yup.boolean(),
|
||||
showNote: Yup.boolean(),
|
||||
layoutDto: Yup.object().shape({
|
||||
grid: Yup.boolean(),
|
||||
card: Yup.boolean(),
|
||||
|
|
@ -177,13 +177,13 @@ function FormTabDetails(
|
|||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.ShowActivity')}
|
||||
invalid={errors.showActivity && touched.showActivity}
|
||||
errorMessage={errors.showActivity}
|
||||
label={translate('::ListForms.ListFormEdit.ShowNote')}
|
||||
invalid={errors.showNote && touched.showNote}
|
||||
errorMessage={errors.showNote}
|
||||
>
|
||||
<Field
|
||||
name="showActivity"
|
||||
placeholder={translate('::ListForms.ListFormEdit.ShowActivity')}
|
||||
name="showNote"
|
||||
placeholder={translate('::ListForms.ListFormEdit.ShowNote')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
|
|||
|
|
@ -211,15 +211,15 @@ function FormTabPermissions(props: FormEditProps) {
|
|||
</Field>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.PermissionsActivity')}
|
||||
invalid={errors.permissionDto?.a && touched.permissionDto?.a}
|
||||
errorMessage={errors.permissionDto?.a}
|
||||
label={translate('::ListForms.ListFormEdit.PermissionsNote')}
|
||||
invalid={errors.permissionDto?.n && touched.permissionDto?.n}
|
||||
errorMessage={errors.permissionDto?.n}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="permissionDto.a"
|
||||
placeholder={translate('::ListForms.ListFormEdit.PermissionsActivity')}
|
||||
name="permissionDto.n"
|
||||
placeholder={translate('::ListForms.ListFormEdit.PermissionsNote')}
|
||||
>
|
||||
{({ field, form }: FieldProps<SelectBoxOption>) => (
|
||||
<Select
|
||||
|
|
@ -228,7 +228,7 @@ function FormTabPermissions(props: FormEditProps) {
|
|||
isClearable={true}
|
||||
options={permissions}
|
||||
value={permissions?.filter(
|
||||
(option) => option.value === values.permissionDto.a,
|
||||
(option) => option.value === values.permissionDto.n,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { useGridData } from './useFormData'
|
|||
import { useCurrentMenuIcon } from '@/utils/hooks/useCurrentMenuIcon'
|
||||
import { Badge } from '@/components/ui'
|
||||
import { useState } from 'react'
|
||||
import { ActivityPanel } from './FormActivityPanel/ActivityPanel'
|
||||
import { NotePanel } from './notes/NotePanel'
|
||||
import { usePermission } from '@/utils/hooks/usePermission'
|
||||
|
||||
const FormEdit = (
|
||||
|
|
@ -28,14 +28,14 @@ const FormEdit = (
|
|||
const MenuIcon = useCurrentMenuIcon('w-5 h-5')
|
||||
const { checkPermission } = usePermission()
|
||||
|
||||
const [isActivityPanelVisible, setIsActivityPanelVisible] = useState(false)
|
||||
const isActivityPanel = () => {
|
||||
const [isNotePanelVisible, setIsNotePanelVisible] = useState(false)
|
||||
const isNotePanel = () => {
|
||||
return (
|
||||
listFormCode &&
|
||||
id &&
|
||||
!isSubForm &&
|
||||
gridDto?.gridOptions?.showActivity &&
|
||||
checkPermission(gridDto?.gridOptions.permissionDto.a)
|
||||
gridDto?.gridOptions?.showNote &&
|
||||
checkPermission(gridDto?.gridOptions.permissionDto.n)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ const FormEdit = (
|
|||
return (
|
||||
<>
|
||||
<Container
|
||||
className={`${isActivityPanelVisible && !isSubForm ? 'mr-[400px]' : ''} transition-all duration-300`}
|
||||
className={`${isNotePanelVisible && !isSubForm ? 'mr-[400px]' : ''} transition-all duration-300`}
|
||||
>
|
||||
{!isSubForm && (
|
||||
<Helmet
|
||||
|
|
@ -135,13 +135,13 @@ const FormEdit = (
|
|||
<SubForms gridDto={gridDto!} formData={formData} level={level ?? 0} />
|
||||
</Container>
|
||||
|
||||
{/* Activity Panel - sadece ana formda göster */}
|
||||
{isActivityPanel() && (
|
||||
<ActivityPanel
|
||||
{/* Note Panel - sadece ana formda göster */}
|
||||
{isNotePanel() && (
|
||||
<NotePanel
|
||||
entityName={listFormCode}
|
||||
entityId={id}
|
||||
isVisible={isActivityPanelVisible}
|
||||
onToggle={() => setIsActivityPanelVisible(!isActivityPanelVisible)}
|
||||
isVisible={isNotePanelVisible}
|
||||
onToggle={() => setIsNotePanelVisible(!isNotePanelVisible)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { useGridData } from './useFormData'
|
|||
import { useCurrentMenuIcon } from '@/utils/hooks/useCurrentMenuIcon'
|
||||
import { Badge } from '@/components/ui'
|
||||
import { useState } from 'react'
|
||||
import { ActivityPanel } from './FormActivityPanel/ActivityPanel'
|
||||
import { NotePanel } from './notes/NotePanel'
|
||||
import { usePermission } from '@/utils/hooks/usePermission'
|
||||
|
||||
const FormView = (
|
||||
|
|
@ -29,14 +29,14 @@ const FormView = (
|
|||
const MenuIcon = useCurrentMenuIcon('w-5 h-5')
|
||||
const { checkPermission } = usePermission()
|
||||
|
||||
const [isActivityPanelVisible, setIsActivityPanelVisible] = useState(false)
|
||||
const isActivityPanel = () => {
|
||||
const [isNotePanelVisible, setIsNotePanelVisible] = useState(false)
|
||||
const isNotePanel = () => {
|
||||
return (
|
||||
listFormCode &&
|
||||
id &&
|
||||
!isSubForm &&
|
||||
gridDto?.gridOptions?.showActivity &&
|
||||
checkPermission(gridDto?.gridOptions.permissionDto.a)
|
||||
gridDto?.gridOptions?.showNote &&
|
||||
checkPermission(gridDto?.gridOptions.permissionDto.n)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ const FormView = (
|
|||
return (
|
||||
<>
|
||||
<Container
|
||||
className={`${isActivityPanelVisible && !isSubForm ? 'mr-[400px]' : ''} transition-all duration-300`}
|
||||
className={`${isNotePanelVisible && !isSubForm ? 'mr-[400px]' : ''} transition-all duration-300`}
|
||||
>
|
||||
{!isSubForm && (
|
||||
<Helmet
|
||||
|
|
@ -135,13 +135,13 @@ const FormView = (
|
|||
/>
|
||||
</Container>
|
||||
|
||||
{/* Activity Panel - sadece ana formda göster */}
|
||||
{isActivityPanel() && (
|
||||
<ActivityPanel
|
||||
{/* Note Panel - sadece ana formda göster */}
|
||||
{isNotePanel() && (
|
||||
<NotePanel
|
||||
entityName={listFormCode}
|
||||
entityId={id}
|
||||
isVisible={isActivityPanelVisible}
|
||||
onToggle={() => setIsActivityPanelVisible(!isActivityPanelVisible)}
|
||||
isVisible={isNotePanelVisible}
|
||||
onToggle={() => setIsNotePanelVisible(!isNotePanelVisible)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
import React from 'react'
|
||||
import { FaStickyNote, FaEnvelope, FaTrash, FaDownload, FaClock, FaPaperclip } from 'react-icons/fa'
|
||||
import { Avatar, Button } from '@/components/ui'
|
||||
import { ActivityDto } from '@/proxy/activity/models'
|
||||
import { NoteDto } from '@/proxy/note/models'
|
||||
import { AVATAR_URL } from '@/constants/app.constant'
|
||||
import { useStoreState } from '@/store/store'
|
||||
|
||||
interface ActivityListProps {
|
||||
activities: ActivityDto[]
|
||||
onDeleteActivity?: (activityId: string) => void
|
||||
interface NoteListProps {
|
||||
notes: NoteDto[]
|
||||
onDeleteNote?: (noteId: string) => void
|
||||
onDownloadFile?: (fileData: any) => void
|
||||
}
|
||||
|
||||
export const ActivityList: React.FC<ActivityListProps> = ({
|
||||
activities,
|
||||
onDeleteActivity,
|
||||
export const NoteList: React.FC<NoteListProps> = ({
|
||||
notes,
|
||||
onDeleteNote,
|
||||
onDownloadFile,
|
||||
}) => {
|
||||
const user = useStoreState((state) => state.auth.user)
|
||||
|
||||
const getActivityStyle = (type: string) => {
|
||||
const getNoteStyle = (type: string) => {
|
||||
switch (type) {
|
||||
case 'note':
|
||||
return {
|
||||
|
|
@ -38,25 +38,25 @@ export const ActivityList: React.FC<ActivityListProps> = ({
|
|||
}
|
||||
}
|
||||
|
||||
if (activities.length === 0)
|
||||
if (notes.length === 0)
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center h-32 text-gray-500">
|
||||
<FaStickyNote className="text-4xl mb-2 opacity-50" />
|
||||
<p className="text-sm">Henüz hiçbir aktivite bulunmuyor</p>
|
||||
<p className="text-sm">Henüz hiçbir not bulunmuyor</p>
|
||||
</div>
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<div className="space-y-5 ml-5">
|
||||
{activities.map((activity, index) => {
|
||||
const files = activity.filesJson ? JSON.parse(activity.filesJson) : []
|
||||
const creationDate = activity.creationTime ? new Date(activity.creationTime) : null
|
||||
const { icon, border } = getActivityStyle(activity.type)
|
||||
{notes.map((note, index) => {
|
||||
const files = note.filesJson ? JSON.parse(note.filesJson) : []
|
||||
const creationDate = note.creationTime ? new Date(note.creationTime) : null
|
||||
const { icon, border } = getNoteStyle(note.type)
|
||||
|
||||
return (
|
||||
<div
|
||||
key={activity.id || index}
|
||||
key={note.id || index}
|
||||
className={`relative bg-white border-l-4 rounded-lg shadow-sm hover:shadow-md transition-shadow duration-200 ${border}`}
|
||||
>
|
||||
{/* Timeline Düğmesi */}
|
||||
|
|
@ -72,9 +72,9 @@ export const ActivityList: React.FC<ActivityListProps> = ({
|
|||
<Avatar
|
||||
size={25}
|
||||
shape="circle"
|
||||
src={AVATAR_URL(activity.creatorId, activity.tenantId)}
|
||||
src={AVATAR_URL(note.creatorId, note.tenantId)}
|
||||
/>
|
||||
{activity.createUserName}
|
||||
{note.createUserName}
|
||||
</div>
|
||||
{creationDate && (
|
||||
<div className="flex items-center gap-1 text-xs text-gray-400 mt-1 ml-1">
|
||||
|
|
@ -84,11 +84,11 @@ export const ActivityList: React.FC<ActivityListProps> = ({
|
|||
</div>
|
||||
|
||||
{/* Sil butonu */}
|
||||
{user?.id === activity.creatorId && (
|
||||
{user?.id === note.creatorId && (
|
||||
<Button
|
||||
variant="plain"
|
||||
size="xs"
|
||||
onClick={() => onDeleteActivity?.(activity.id as string)}
|
||||
onClick={() => onDeleteNote?.(note.id as string)}
|
||||
title="Sil"
|
||||
className="text-red-400 hover:text-red-600"
|
||||
>
|
||||
|
|
@ -99,11 +99,11 @@ export const ActivityList: React.FC<ActivityListProps> = ({
|
|||
|
||||
{/* Body */}
|
||||
<div className="mt-3 ml-1">
|
||||
{activity.subject && (
|
||||
<h4 className="text-sm font-bold text-gray-900 mb-1">{activity.subject}</h4>
|
||||
{note.subject && (
|
||||
<h4 className="text-sm font-bold text-gray-900 mb-1">{note.subject}</h4>
|
||||
)}
|
||||
{activity.content && (
|
||||
<div dangerouslySetInnerHTML={{ __html: activity.content }} />
|
||||
{note.content && (
|
||||
<div dangerouslySetInnerHTML={{ __html: note.content }} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
|
@ -3,7 +3,7 @@ import { Button, Input, Dialog, FormContainer, FormItem, Upload, Radio } from '@
|
|||
import { FaFileAlt, FaFileUpload, FaPlus, FaTrash } from 'react-icons/fa'
|
||||
import { Field, FieldProps, Form, Formik } from 'formik'
|
||||
import * as Yup from 'yup'
|
||||
import { activityService } from '@/services/activity.service'
|
||||
import { noteService } from '@/services/note.service'
|
||||
import {
|
||||
sizeValues,
|
||||
fontSizeOptions,
|
||||
|
|
@ -20,20 +20,20 @@ const validationSchema = Yup.object({
|
|||
content: Yup.string().required('İçerik zorunludur'),
|
||||
})
|
||||
|
||||
interface ActivityModalProps {
|
||||
interface NoteModalProps {
|
||||
entityName: string
|
||||
entityId: string
|
||||
isOpen: boolean
|
||||
onClose: () => void
|
||||
onActivityAdded?: (activity: any) => void
|
||||
onNoteAdded?: (note: any) => void
|
||||
}
|
||||
|
||||
export const ActivityModal: React.FC<ActivityModalProps> = ({
|
||||
export const NoteModal: React.FC<NoteModalProps> = ({
|
||||
entityName,
|
||||
entityId,
|
||||
isOpen,
|
||||
onClose,
|
||||
onActivityAdded,
|
||||
onNoteAdded: onActivityAdded,
|
||||
}) => {
|
||||
const [uploading, setUploading] = useState(false)
|
||||
const [fileList, setFileList] = useState<File[]>([])
|
||||
|
|
@ -55,7 +55,7 @@ export const ActivityModal: React.FC<ActivityModalProps> = ({
|
|||
formData.append('content', values.content)
|
||||
fileList.forEach((file) => formData.append('Files', file))
|
||||
|
||||
const createdActivity = await activityService.create(formData)
|
||||
const createdActivity = await noteService.create(formData)
|
||||
if (onActivityAdded) onActivityAdded(createdActivity)
|
||||
setFileList([])
|
||||
onClose()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useState, useRef, useEffect } from 'react'
|
||||
import { ActivityModal } from './ActivityModal'
|
||||
import { ActivityList } from './ActivityList'
|
||||
import { NoteModal } from './NoteModal'
|
||||
import { NoteList } from './NoteList'
|
||||
import { Button, Badge } from '@/components/ui'
|
||||
import {
|
||||
FaChevronLeft,
|
||||
|
|
@ -11,24 +11,24 @@ import {
|
|||
FaChevronUp,
|
||||
FaChevronDown,
|
||||
} from 'react-icons/fa'
|
||||
import { activityService } from '@/services/activity.service'
|
||||
import { ActivityDto } from '@/proxy/activity/models'
|
||||
import { noteService } from '@/services/note.service'
|
||||
import { NoteDto } from '@/proxy/note/models'
|
||||
|
||||
interface ActivityPanelProps {
|
||||
interface NotePanelProps {
|
||||
entityName: string
|
||||
entityId: string
|
||||
isVisible: boolean
|
||||
onToggle: () => void
|
||||
}
|
||||
|
||||
export const ActivityPanel: React.FC<ActivityPanelProps> = ({
|
||||
export const NotePanel: React.FC<NotePanelProps> = ({
|
||||
entityName,
|
||||
entityId,
|
||||
isVisible,
|
||||
onToggle,
|
||||
}) => {
|
||||
const [showAddModal, setShowAddModal] = useState(false)
|
||||
const [activities, setActivities] = useState<ActivityDto[]>([])
|
||||
const [activities, setActivities] = useState<NoteDto[]>([])
|
||||
const [buttonPosition, setButtonPosition] = useState({ top: '75%' })
|
||||
const [isDragging, setIsDragging] = useState(false)
|
||||
const [dragStart, setDragStart] = useState({ y: 0, startTop: 0 })
|
||||
|
|
@ -38,7 +38,7 @@ export const ActivityPanel: React.FC<ActivityPanelProps> = ({
|
|||
// Fetch activities
|
||||
const fetchActivities = async () => {
|
||||
try {
|
||||
const res = await activityService.getList({ entityName, entityId })
|
||||
const res = await noteService.getList({ entityName, entityId })
|
||||
if (res?.items) setActivities(res.items)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
|
|
@ -52,7 +52,7 @@ export const ActivityPanel: React.FC<ActivityPanelProps> = ({
|
|||
const handleDownloadFile = async (fileData: any) => {
|
||||
if (!fileData?.SavedFileName) return
|
||||
try {
|
||||
await activityService.downloadFile(
|
||||
await noteService.downloadFile(
|
||||
fileData.SavedFileName,
|
||||
fileData.FileName,
|
||||
fileData.FileType,
|
||||
|
|
@ -65,7 +65,7 @@ export const ActivityPanel: React.FC<ActivityPanelProps> = ({
|
|||
const handleDeleteActivity = async (activityId: string) => {
|
||||
if (!confirm('Bu aktiviteyi silmek istediğinize emin misiniz?')) return
|
||||
try {
|
||||
await activityService.delete(activityId)
|
||||
await noteService.delete(activityId)
|
||||
setActivities((prev) => prev.filter((a) => a.id !== activityId))
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
|
|
@ -161,7 +161,7 @@ export const ActivityPanel: React.FC<ActivityPanelProps> = ({
|
|||
<div className="p-4 border-b border-gray-200 bg-gray-50">
|
||||
{/* Üst Satır: Başlık, Kayıt Bilgisi Toggle ve Kapat Butonu */}
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<h3 className="text-lg font-semibold text-gray-800">Aktiviteler</h3>
|
||||
<h3 className="text-lg font-semibold text-gray-800">Notlar</h3>
|
||||
|
||||
<div className="flex items-center gap-3">
|
||||
{/* 👇 Kayıt Bilgisi Aç/Kapa Butonu */}
|
||||
|
|
@ -208,9 +208,9 @@ export const ActivityPanel: React.FC<ActivityPanelProps> = ({
|
|||
</div>
|
||||
|
||||
<div className="flex-1 overflow-y-auto p-4">
|
||||
<ActivityList
|
||||
activities={activities}
|
||||
onDeleteActivity={handleDeleteActivity}
|
||||
<NoteList
|
||||
notes={activities}
|
||||
onDeleteNote={handleDeleteActivity}
|
||||
onDownloadFile={handleDownloadFile}
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -218,12 +218,12 @@ export const ActivityPanel: React.FC<ActivityPanelProps> = ({
|
|||
</div>
|
||||
|
||||
{/* Modal */}
|
||||
<ActivityModal
|
||||
<NoteModal
|
||||
entityName={entityName}
|
||||
entityId={entityId}
|
||||
isOpen={showAddModal}
|
||||
onClose={() => setShowAddModal(false)}
|
||||
onActivityAdded={(act) => setActivities((prev) => [act, ...prev])}
|
||||
onNoteAdded={(act) => setActivities((prev) => [act, ...prev])}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
Loading…
Reference in a new issue