seed/data Seeder SocialPost
This commit is contained in:
parent
a20d47cab8
commit
76091c0518
15 changed files with 931 additions and 413 deletions
|
|
@ -1210,7 +1210,7 @@ Kök menü `App.Administration`. Bu menünün tabloları `Adm_T_*` — yani **ki
|
||||||
| **Settings** | `App.Setting` · `/admin/settings` | — | `SettingDefinition` kayıtlarından üretilen ayar ekranı; değerler burada girilir. |
|
| **Settings** | `App.Setting` · `/admin/settings` | — | `SettingDefinition` kayıtlarından üretilen ayar ekranı; değerler burada girilir. |
|
||||||
| **Intranet › Announcement (+Like/Comment)** | `App.Intranet.Announcement` | `Adm_T_Announcement` · `Adm_T_AnnouncementLike` · `Adm_T_AnnouncementComment` | Duyuru + beğeni + yorum: **ana kayıt / alt etkileşim** kalıbının hazır örneği. |
|
| **Intranet › Announcement (+Like/Comment)** | `App.Intranet.Announcement` | `Adm_T_Announcement` · `Adm_T_AnnouncementLike` · `Adm_T_AnnouncementComment` | Duyuru + beğeni + yorum: **ana kayıt / alt etkileşim** kalıbının hazır örneği. |
|
||||||
| **Intranet › Survey (+Question/Option/Response/Answer)** | `App.Intranet.Survey` | `Adm_T_Survey` · `Adm_T_SurveyQuestion` · `Adm_T_SurveyQuestionOption` · `Adm_T_SurveyResponse` · `Adm_T_SurveyAnswer` | Anket motoru; soru–seçenek–yanıt zinciri **iki seviyeli alt form** ihtiyacının referansıdır. |
|
| **Intranet › Survey (+Question/Option/Response/Answer)** | `App.Intranet.Survey` | `Adm_T_Survey` · `Adm_T_SurveyQuestion` · `Adm_T_SurveyQuestionOption` · `Adm_T_SurveyResponse` · `Adm_T_SurveyAnswer` | Anket motoru; soru–seçenek–yanıt zinciri **iki seviyeli alt form** ihtiyacının referansıdır. |
|
||||||
| **Intranet › Social Post (+Comment/Like)** | `App.Intranet.SocialPost` | `Adm_T_SocialPost` · `Adm_T_SocialComment` · `Adm_T_SocialLike` (+ `SocialPollOption`, `SocialMedia`, `SocialLocation`) | Kurum içi akış; `IsLiked`, `IsOwnPost` gibi hesaplanmış kolonların view içinde üretilmesine örnek. |
|
| **Intranet › Social Post (+Comment/Like)** | `App.Intranet.SocialPost` | `Adm_T_SocialPost` · `Adm_T_SocialComment` · `Adm_T_SocialLike` (+ `SocialPollOption`, `SocialMedia`, `SocialLocation`) | Kurum içi akış; `IsLiked`, `IsOwnPost` gibi hesaplanmış kolonların view içinde üretilmesine örnek. Alt formlar: `App.Intranet.SocialMedia`, `SocialComment`, `SocialLike` (`Id` → `SocialPostId`); anket seçenekleri (`App.Intranet.SocialPollOption`) medyaya bağlı olduğu için `SocialMedia` ekranının alt formudur (`Id` → `SocialMediaId`). |
|
||||||
| **Intranet › Event Type / Category / Event (+Like/Comment)** | `App.Intranet.Events.*` | `Adm_T_EventType` · `Adm_T_EventCategory` · `Adm_T_Event` · `Adm_T_EventPhoto` · `Adm_T_EventLike` · `Adm_T_EventComment` | Etkinlik yönetimi; foto ve katılımcı sayacı olan kayıt kalıbı. `EventComment` menüde Intranet altında (Documents'ın üstünde), `EventPhoto` menüde yer almaz; ikisinin yetkisi de `App.Intranet.Events.Event` altındadır. `Adm_T_EventPhoto` tablosu `configs/seeds/host/sql/object/Adm_T_EventPhoto.sql` ile oluşturulur. |
|
| **Intranet › Event Type / Category / Event (+Like/Comment)** | `App.Intranet.Events.*` | `Adm_T_EventType` · `Adm_T_EventCategory` · `Adm_T_Event` · `Adm_T_EventPhoto` · `Adm_T_EventLike` · `Adm_T_EventComment` | Etkinlik yönetimi; foto ve katılımcı sayacı olan kayıt kalıbı. `EventComment` menüde Intranet altında (Documents'ın üstünde), `EventPhoto` menüde yer almaz; ikisinin yetkisi de `App.Intranet.Events.Event` altındadır. `Adm_T_EventPhoto` tablosu `configs/seeds/host/sql/object/Adm_T_EventPhoto.sql` ile oluşturulur. |
|
||||||
| **Restrictions › Work Hour** | `App.Restrictions.WorkHour` | `Adm_T_WorkHour` | Gün bazlı çalışma saati (`Monday`…`Sunday`, `StartTime`, `EndTime`); kullanıcıya `AbpUsers.WorkHour` ile bağlanır. "Sadece mesai saatinde girilebilsin" burada çözülür. |
|
| **Restrictions › Work Hour** | `App.Restrictions.WorkHour` | `Adm_T_WorkHour` | Gün bazlı çalışma saati (`Monday`…`Sunday`, `StartTime`, `EndTime`); kullanıcıya `AbpUsers.WorkHour` ile bağlanır. "Sadece mesai saatinde girilebilsin" burada çözülür. |
|
||||||
| **Restrictions › IP Restrictions** | `App.Restrictions.IpRestrictions` | `Adm_T_IpRestriction` | `ResourceType` + `ResourceId` + `IP` — kullanıcı/rol bazlı IP kısıtı. |
|
| **Restrictions › IP Restrictions** | `App.Restrictions.IpRestrictions` | `Adm_T_IpRestriction` | `ResourceType` + `ResourceId` + `IP` — kullanıcı/rol bazlı IP kısıtı. |
|
||||||
|
|
|
||||||
|
|
@ -6606,6 +6606,96 @@
|
||||||
"tr": "Yorumlar",
|
"tr": "Yorumlar",
|
||||||
"en": "Comments"
|
"en": "Comments"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Intranet.SocialMedia",
|
||||||
|
"en": "Medias",
|
||||||
|
"tr": "Medyalar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Intranet.SocialMedia.Description",
|
||||||
|
"en": "Social post media",
|
||||||
|
"tr": "Gönderi medyası"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Intranet.SocialPollOption",
|
||||||
|
"en": "Poll Options",
|
||||||
|
"tr": "Anket Seçenekleri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Intranet.SocialPollOption.Description",
|
||||||
|
"en": "Social post poll options",
|
||||||
|
"tr": "Gönderi anket seçenekleri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.SocialPost",
|
||||||
|
"en": "Post",
|
||||||
|
"tr": "Gönderi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.SocialMedia",
|
||||||
|
"en": "Media",
|
||||||
|
"tr": "Medya"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.Urls",
|
||||||
|
"en": "Urls",
|
||||||
|
"tr": "Bağlantılar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.PollQuestion",
|
||||||
|
"en": "Poll Question",
|
||||||
|
"tr": "Anket Sorusu"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.PollTotalVotes",
|
||||||
|
"en": "Total Votes",
|
||||||
|
"tr": "Toplam Oy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.PollEndsAt",
|
||||||
|
"en": "Poll Ends At",
|
||||||
|
"tr": "Anket Bitişi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.PollUserVoteId",
|
||||||
|
"en": "User Vote",
|
||||||
|
"tr": "Kullanıcı Oyu"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.Votes",
|
||||||
|
"en": "Votes",
|
||||||
|
"tr": "Oy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.StaticLookup.Image",
|
||||||
|
"en": "Image",
|
||||||
|
"tr": "Görsel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.StaticLookup.Video",
|
||||||
|
"en": "Video",
|
||||||
|
"tr": "Video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.StaticLookup.Poll",
|
||||||
|
"en": "Poll",
|
||||||
|
"tr": "Anket"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Intranet.SurveyQuestion",
|
"key": "App.Intranet.SurveyQuestion",
|
||||||
|
|
@ -6645,8 +6735,8 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Events.Comments",
|
"key": "App.Events.Comments",
|
||||||
"tr": "Yorumlar",
|
"tr": "Etkinlik Yorumları",
|
||||||
"en": "Comments"
|
"en": "Event Comments"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
|
||||||
|
|
@ -4323,6 +4323,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
Description = $"{listFormName}.Description",
|
Description = $"{listFormName}.Description",
|
||||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialPost)),
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialPost)),
|
||||||
|
SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName),
|
||||||
|
SeedSyncInsert = false,
|
||||||
|
SeedSyncUpdate = false,
|
||||||
|
SeedSyncDelete = false,
|
||||||
KeyFieldName = "Id",
|
KeyFieldName = "Id",
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
DefaultFilter = DefaultFilterJson,
|
DefaultFilter = DefaultFilterJson,
|
||||||
|
|
@ -4363,6 +4367,18 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
new {
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
TabTitle = AppCodes.Intranet.SocialMedia,
|
||||||
|
Code = AppCodes.Intranet.SocialMedia,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "SocialPostId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
new {
|
new {
|
||||||
TabType = ListFormTabTypeEnum.List,
|
TabType = ListFormTabTypeEnum.List,
|
||||||
TabTitle = AppCodes.Intranet.SocialLike,
|
TabTitle = AppCodes.Intranet.SocialLike,
|
||||||
|
|
@ -4507,6 +4523,387 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region SocialMedia
|
||||||
|
listFormName = AppCodes.Intranet.SocialMedia;
|
||||||
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
{
|
||||||
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
|
new ListForm
|
||||||
|
{
|
||||||
|
ListFormType = ListFormTypeEnum.List,
|
||||||
|
PageSize = 10,
|
||||||
|
ExportJson = DefaultExportJson,
|
||||||
|
IsSubForm = true,
|
||||||
|
ShowNote = false,
|
||||||
|
LayoutJson = DefaultLayoutJson(),
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = listFormName,
|
||||||
|
Name = listFormName,
|
||||||
|
Title = listFormName,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = true,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = $"{listFormName}.Description",
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialMedia)),
|
||||||
|
SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName),
|
||||||
|
SeedSyncInsert = false,
|
||||||
|
SeedSyncUpdate = false,
|
||||||
|
SeedSyncDelete = false,
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
DefaultFilter = DefaultFilterJson,
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = DefaultFilterRowJson(),
|
||||||
|
HeaderFilterJson = DefaultHeaderFilterJson(),
|
||||||
|
SearchPanelJson = DefaultSearchPanelJson(),
|
||||||
|
GroupPanelJson = DefaultGroupPanelJson(),
|
||||||
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
|
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||||
|
PermissionJson = DefaultPermissionJson(listFormName),
|
||||||
|
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialMedia)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 550, true, true, true, true, false, true),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||||
|
{
|
||||||
|
new() { Order = 1, ColCount = 2, ColSpan = 1, ItemType = "group" },
|
||||||
|
}),
|
||||||
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "Type", FieldDbType = DbType.String, Value = "image", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "PollTotalVotes", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
}),
|
||||||
|
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
TabTitle = AppCodes.Intranet.SocialPollOption,
|
||||||
|
Code = AppCodes.Intranet.SocialPollOption,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "SocialMediaId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#region SocialMedia Fields
|
||||||
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "Id",
|
||||||
|
CaptionName = "App.Listform.ListformField.Id",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "SocialPostId",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 1,
|
||||||
|
EditorType2 = EditorTypes.dxSelectBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
EditorOptions = EditorOptions.ShowClearButton(),
|
||||||
|
CaptionName = "App.Listform.ListformField.SocialPost",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SocialPost), "Id", "Content"),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Type",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 2,
|
||||||
|
EditorType2 = EditorTypes.dxSelectBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
EditorOptions = EditorOptions.ShowClearButton(),
|
||||||
|
CaptionName = "App.Listform.ListformField.Type",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||||
|
DisplayExpr = "name",
|
||||||
|
ValueExpr = "key",
|
||||||
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
|
new () { Key = "image", Name = "App.StaticLookup.Image" },
|
||||||
|
new () { Key = "video", Name = "App.StaticLookup.Video" },
|
||||||
|
new () { Key = "poll", Name = "App.StaticLookup.Poll" },
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "PollQuestion",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 3,
|
||||||
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.PollQuestion",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Int32,
|
||||||
|
FieldName = "PollTotalVotes",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 4,
|
||||||
|
EditorType2 = EditorTypes.dxNumberBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.PollTotalVotes",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.DateTime,
|
||||||
|
FieldName = "PollEndsAt",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 5,
|
||||||
|
EditorType2 = EditorTypes.dxDateBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.PollEndsAt",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 6,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "PollUserVoteId",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 6,
|
||||||
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.PollUserVoteId",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 7,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Urls",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 7,
|
||||||
|
EditorType2 = EditorTypes.dxTextArea,
|
||||||
|
ColSpan = 2,
|
||||||
|
CaptionName = "App.Listform.ListformField.Urls",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SocialPollOption
|
||||||
|
listFormName = AppCodes.Intranet.SocialPollOption;
|
||||||
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
{
|
||||||
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
|
new ListForm
|
||||||
|
{
|
||||||
|
ListFormType = ListFormTypeEnum.List,
|
||||||
|
PageSize = 10,
|
||||||
|
ExportJson = DefaultExportJson,
|
||||||
|
IsSubForm = true,
|
||||||
|
ShowNote = false,
|
||||||
|
LayoutJson = DefaultLayoutJson(),
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = listFormName,
|
||||||
|
Name = listFormName,
|
||||||
|
Title = listFormName,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = true,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = $"{listFormName}.Description",
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialPollOption)),
|
||||||
|
SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName),
|
||||||
|
SeedSyncInsert = false,
|
||||||
|
SeedSyncUpdate = false,
|
||||||
|
SeedSyncDelete = false,
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
DefaultFilter = DefaultFilterJson,
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = DefaultFilterRowJson(),
|
||||||
|
HeaderFilterJson = DefaultHeaderFilterJson(),
|
||||||
|
SearchPanelJson = DefaultSearchPanelJson(),
|
||||||
|
GroupPanelJson = DefaultGroupPanelJson(),
|
||||||
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
|
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||||
|
PermissionJson = DefaultPermissionJson(listFormName),
|
||||||
|
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialPollOption)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 320, true, true, true, true, false),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||||
|
{
|
||||||
|
new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group" },
|
||||||
|
}),
|
||||||
|
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTimeOffset, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@NEWID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() { FieldName = "Votes", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
}),
|
||||||
|
UpdateFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "LastModifierId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#region SocialPollOption Fields
|
||||||
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "Id",
|
||||||
|
CaptionName = "App.Listform.ListformField.Id",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "SocialMediaId",
|
||||||
|
CaptionName = "App.Listform.ListformField.SocialMedia",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SocialMedia), "Id", "PollQuestion"),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Text",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 2,
|
||||||
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.Text",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Int32,
|
||||||
|
FieldName = "Votes",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 3,
|
||||||
|
EditorType2 = EditorTypes.dxNumberBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.Votes",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Social Comment
|
#region Social Comment
|
||||||
listFormName = AppCodes.Intranet.SocialComment;
|
listFormName = AppCodes.Intranet.SocialComment;
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
|
@ -4531,6 +4928,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
Description = $"{listFormName}.Description",
|
Description = $"{listFormName}.Description",
|
||||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialComment)),
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialComment)),
|
||||||
|
SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName),
|
||||||
|
SeedSyncInsert = false,
|
||||||
|
SeedSyncUpdate = false,
|
||||||
|
SeedSyncDelete = false,
|
||||||
KeyFieldName = "Id",
|
KeyFieldName = "Id",
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
DefaultFilter = DefaultFilterJson,
|
DefaultFilter = DefaultFilterJson,
|
||||||
|
|
@ -4592,6 +4993,31 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "UserId",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 2,
|
||||||
|
EditorType2 = EditorTypes.dxSelectBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "Abp.Mailing.Smtp.UserName",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = LookupQueryValues.UserValues
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -4642,6 +5068,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
Description = $"{listFormName}.Description",
|
Description = $"{listFormName}.Description",
|
||||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialLike)),
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SocialLike)),
|
||||||
|
SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName),
|
||||||
|
SeedSyncInsert = false,
|
||||||
|
SeedSyncUpdate = false,
|
||||||
|
SeedSyncDelete = false,
|
||||||
KeyFieldName = "Id",
|
KeyFieldName = "Id",
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
DefaultFilter = DefaultFilterJson,
|
DefaultFilter = DefaultFilterJson,
|
||||||
|
|
|
||||||
|
|
@ -4107,6 +4107,114 @@
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"Modules": "Sas|Adm"
|
"Modules": "Sas|Adm"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialMedia",
|
||||||
|
"ParentName": "App.Intranet.SocialPost",
|
||||||
|
"DisplayName": "App.Intranet.SocialMedia",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialMedia.Create",
|
||||||
|
"ParentName": "App.Intranet.SocialMedia",
|
||||||
|
"DisplayName": "App.Platform.Create",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialMedia.Update",
|
||||||
|
"ParentName": "App.Intranet.SocialMedia",
|
||||||
|
"DisplayName": "App.Platform.Update",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialMedia.Delete",
|
||||||
|
"ParentName": "App.Intranet.SocialMedia",
|
||||||
|
"DisplayName": "App.Platform.Delete",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialMedia.Export",
|
||||||
|
"ParentName": "App.Intranet.SocialMedia",
|
||||||
|
"DisplayName": "Export",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialMedia.Import",
|
||||||
|
"ParentName": "App.Intranet.SocialMedia",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialPollOption",
|
||||||
|
"ParentName": "App.Intranet.SocialPost",
|
||||||
|
"DisplayName": "App.Intranet.SocialPollOption",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialPollOption.Create",
|
||||||
|
"ParentName": "App.Intranet.SocialPollOption",
|
||||||
|
"DisplayName": "App.Platform.Create",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialPollOption.Update",
|
||||||
|
"ParentName": "App.Intranet.SocialPollOption",
|
||||||
|
"DisplayName": "App.Platform.Update",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialPollOption.Delete",
|
||||||
|
"ParentName": "App.Intranet.SocialPollOption",
|
||||||
|
"DisplayName": "App.Platform.Delete",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialPollOption.Export",
|
||||||
|
"ParentName": "App.Intranet.SocialPollOption",
|
||||||
|
"DisplayName": "Export",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Administration",
|
||||||
|
"Name": "App.Intranet.SocialPollOption.Import",
|
||||||
|
"ParentName": "App.Intranet.SocialPollOption",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"Modules": "Sas|Adm"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Administration",
|
"GroupName": "App.Administration",
|
||||||
"Name": "App.Intranet.SocialComment",
|
"Name": "App.Intranet.SocialComment",
|
||||||
|
|
|
||||||
|
|
@ -431,7 +431,7 @@ public class WizardDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
return;
|
return;
|
||||||
|
|
||||||
await _repoModule.InsertAsync(new Module(cleaned) { Name = cleaned }, autoSave: true);
|
await _repoModule.InsertAsync(new Module(cleaned) { Name = cleaned }, autoSave: true);
|
||||||
_logger.LogInformation("Module '{ModuleId}' seed sirasinda olusturuldu.", cleaned);
|
_logger.LogInformation("Module '{ModuleId}' created.", cleaned);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<PermissionDefinitionRecord> InsertPermissionAsync(
|
private async Task<PermissionDefinitionRecord> InsertPermissionAsync(
|
||||||
|
|
|
||||||
|
|
@ -340,6 +340,8 @@ public static class SeedConsts
|
||||||
public const string SocialPost = Default + ".SocialPost";
|
public const string SocialPost = Default + ".SocialPost";
|
||||||
public const string SocialComment = Default + ".SocialComment";
|
public const string SocialComment = Default + ".SocialComment";
|
||||||
public const string SocialLike = Default + ".SocialLike";
|
public const string SocialLike = Default + ".SocialLike";
|
||||||
|
public const string SocialMedia = Default + ".SocialMedia";
|
||||||
|
public const string SocialPollOption = Default + ".SocialPollOption";
|
||||||
|
|
||||||
public const string Events = Default + ".Events";
|
public const string Events = Default + ".Events";
|
||||||
public const string EventType = Events + ".EventType";
|
public const string EventType = Events + ".EventType";
|
||||||
|
|
|
||||||
|
|
@ -1,67 +1,4 @@
|
||||||
{
|
{
|
||||||
"Abouts": [
|
|
||||||
{
|
|
||||||
"stats": [
|
|
||||||
{
|
|
||||||
"Icon": "FaUser",
|
|
||||||
"Value": "740\u002B",
|
|
||||||
"LabelKey": "App.AboutStats.Users",
|
|
||||||
"UseCounter": true,
|
|
||||||
"CounterEnd": "740\u002B",
|
|
||||||
"CounterSuffix": "\u002B",
|
|
||||||
"CounterDuration": 3000
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon": "FaUsers",
|
|
||||||
"value": "310+",
|
|
||||||
"labelKey": "App.AboutStats.Clients",
|
|
||||||
"useCounter": true,
|
|
||||||
"counterEnd": "310+",
|
|
||||||
"counterSuffix": "+",
|
|
||||||
"counterDuration": 2500
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon": "FaAward",
|
|
||||||
"value": "25",
|
|
||||||
"labelKey": "App.AboutStats.Experience",
|
|
||||||
"useCounter": true,
|
|
||||||
"counterEnd": "20",
|
|
||||||
"counterSuffix": "+",
|
|
||||||
"counterDuration": 2000
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon": "FaClock",
|
|
||||||
"value": "7/24",
|
|
||||||
"labelKey": "App.AboutStats.Support",
|
|
||||||
"useCounter": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon": "FaGlobe",
|
|
||||||
"value": "3",
|
|
||||||
"labelKey": "App.Definitions.Country",
|
|
||||||
"useCounter": true,
|
|
||||||
"counterEnd": "3",
|
|
||||||
"counterDuration": 1500
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"descriptions": [
|
|
||||||
"App.AboutDescription.Part1",
|
|
||||||
"App.AboutDescription.Motto",
|
|
||||||
"App.AboutDescription.Part2",
|
|
||||||
"App.AboutDescription.Closing"
|
|
||||||
],
|
|
||||||
"sections": [
|
|
||||||
{
|
|
||||||
"key": "App.PublicAbout.Mission",
|
|
||||||
"descKey": "App.AboutMission.MissionDesc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "App.PublicAbout.Vision",
|
|
||||||
"descKey": "App.AboutVision.VisionDesc"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Homes": [
|
"Homes": [
|
||||||
{
|
{
|
||||||
"heroBackgroundImageKey": "Public.home.hero.backgroundImage",
|
"heroBackgroundImageKey": "Public.home.hero.backgroundImage",
|
||||||
|
|
@ -209,6 +146,69 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"Abouts": [
|
||||||
|
{
|
||||||
|
"stats": [
|
||||||
|
{
|
||||||
|
"Icon": "FaUser",
|
||||||
|
"Value": "740\u002B",
|
||||||
|
"LabelKey": "App.AboutStats.Users",
|
||||||
|
"UseCounter": true,
|
||||||
|
"CounterEnd": "740\u002B",
|
||||||
|
"CounterSuffix": "\u002B",
|
||||||
|
"CounterDuration": 3000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "FaUsers",
|
||||||
|
"value": "310+",
|
||||||
|
"labelKey": "App.AboutStats.Clients",
|
||||||
|
"useCounter": true,
|
||||||
|
"counterEnd": "310+",
|
||||||
|
"counterSuffix": "+",
|
||||||
|
"counterDuration": 2500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "FaAward",
|
||||||
|
"value": "25",
|
||||||
|
"labelKey": "App.AboutStats.Experience",
|
||||||
|
"useCounter": true,
|
||||||
|
"counterEnd": "20",
|
||||||
|
"counterSuffix": "+",
|
||||||
|
"counterDuration": 2000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "FaClock",
|
||||||
|
"value": "7/24",
|
||||||
|
"labelKey": "App.AboutStats.Support",
|
||||||
|
"useCounter": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "FaGlobe",
|
||||||
|
"value": "3",
|
||||||
|
"labelKey": "App.Definitions.Country",
|
||||||
|
"useCounter": true,
|
||||||
|
"counterEnd": "3",
|
||||||
|
"counterDuration": 1500
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"descriptions": [
|
||||||
|
"App.AboutDescription.Part1",
|
||||||
|
"App.AboutDescription.Motto",
|
||||||
|
"App.AboutDescription.Part2",
|
||||||
|
"App.AboutDescription.Closing"
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"key": "App.PublicAbout.Mission",
|
||||||
|
"descKey": "App.AboutMission.MissionDesc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "App.PublicAbout.Vision",
|
||||||
|
"descKey": "App.AboutVision.VisionDesc"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"Services": [
|
"Services": [
|
||||||
{
|
{
|
||||||
"icon": "FaCode",
|
"icon": "FaCode",
|
||||||
|
|
@ -356,176 +356,5 @@
|
||||||
"referrerPolicy": "no-referrer-when-downgrade"
|
"referrerPolicy": "no-referrer-when-downgrade"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"SocialPosts": [
|
|
||||||
{
|
|
||||||
"content": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"likeCount": 0,
|
|
||||||
"isLiked": false,
|
|
||||||
"isOwnPost": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"content": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"likeCount": 0,
|
|
||||||
"isLiked": false,
|
|
||||||
"isOwnPost": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"content": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"likeCount": 0,
|
|
||||||
"isLiked": false,
|
|
||||||
"isOwnPost": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"content": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"likeCount": 0,
|
|
||||||
"isLiked": false,
|
|
||||||
"isOwnPost": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"content": "Ekip üyelerimize yeni eğitim programımızı duyurmak istiyorum! 🎓 React, TypeScript ve Modern Web Geliştirme konularında kapsamlı bir program hazırladık.",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"likeCount": 0,
|
|
||||||
"isLiked": false,
|
|
||||||
"isOwnPost": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"content": "Bugün müşteri ile harika bir toplantı yaptık! Yeni projenin detaylarını konuştuk. 🎯",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"likeCount": 0,
|
|
||||||
"isLiked": false,
|
|
||||||
"isOwnPost": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"SocialLocations": [
|
|
||||||
{
|
|
||||||
"postContent": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀",
|
|
||||||
"name": "Taksim Meydanı",
|
|
||||||
"address": "Taksim, Gümüşsuyu Mahallesi, 34437 Beyoğlu/İstanbul",
|
|
||||||
"lat": 41.0369,
|
|
||||||
"lng": 28.985,
|
|
||||||
"placeId": "ChIJBQRGmL25yhQRXwqRTHAwAAQ"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Bugün müşteri ile harika bir toplantı yaptık! Yeni projenin detaylarını konuştuk. 🎯",
|
|
||||||
"name": "Sultanahmet Meydanı",
|
|
||||||
"address": "Sultanahmet Mahallesi, 34122 Fatih/İstanbul",
|
|
||||||
"lat": 41.0058,
|
|
||||||
"lng": 28.9768,
|
|
||||||
"placeId": "ChIJ7fVVZiy5yhQRzsXXXXXXXXk"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"SocialMedias": [
|
|
||||||
{
|
|
||||||
"postContent": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀",
|
|
||||||
"type": "image",
|
|
||||||
"urls": [
|
|
||||||
"https://images.unsplash.com/photo-1633356122544-f134324a6cee?w=800&q=80"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!",
|
|
||||||
"type": "poll",
|
|
||||||
"pollQuestion": "Hangi özelliği öncelikli olarak geliştirmeliyiz?",
|
|
||||||
"pollTotalVotes": 0,
|
|
||||||
"pollEndsAt": "2024-10-20T23:59:59",
|
|
||||||
"pollUserVoteId": "p3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨",
|
|
||||||
"type": "image",
|
|
||||||
"urls": [
|
|
||||||
"https://images.unsplash.com/photo-1561070791-2526d30994b5?w=800&q=80",
|
|
||||||
"https://images.unsplash.com/photo-1586717799252-bd134ad00e26?w=800&q=80",
|
|
||||||
"https://images.unsplash.com/photo-1609921212029-bb5a28e60960?w=800&q=80"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪",
|
|
||||||
"type": "video",
|
|
||||||
"urls": ["https://www.w3schools.com/html/mov_bbb.mp4"]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"SocialPollOptions": [
|
|
||||||
{
|
|
||||||
"postContent": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!",
|
|
||||||
"pollQuestion": "Hangi özelliği öncelikli olarak geliştirmeliyiz?",
|
|
||||||
"Text": "Kullanıcı profilleri",
|
|
||||||
"Votes": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!",
|
|
||||||
"pollQuestion": "Hangi özelliği öncelikli olarak geliştirmeliyiz?",
|
|
||||||
"Text": "Bildirim sistemi",
|
|
||||||
"Votes": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!",
|
|
||||||
"pollQuestion": "Hangi özelliği öncelikli olarak geliştirmeliyiz?",
|
|
||||||
"Text": "Mesajlaşma",
|
|
||||||
"Votes": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!",
|
|
||||||
"pollQuestion": "Hangi özelliği öncelikli olarak geliştirmeliyiz?",
|
|
||||||
"Text": "Raporlama",
|
|
||||||
"Votes": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"SocialComments": [
|
|
||||||
{
|
|
||||||
"postContent": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"content": "Harika görünüyor! Başarılar 👏"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"content": "TypeScript gerçekten fark yaratıyor!"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"content": "Mesajlaşma özelliğine kesinlikle ihtiyacımız var!"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"content": "Tasarımlar çok şık! Renk paleti özellikle güzel 😍"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"content": "Dark mode opsiyonu da olacak mı?"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"content": "Harika iş! Detayları paylaşabilir misin?"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Ekip üyelerimize yeni eğitim programımızı duyurmak istiyorum! 🎓 React, TypeScript ve Modern Web Geliştirme konularında kapsamlı bir program hazırladık.",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"content": "Ne zaman başlıyor?"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Ekip üyelerimize yeni eğitim programımızı duyurmak istiyorum! 🎓 React, TypeScript ve Modern Web Geliştirme konularında kapsamlı bir program hazırladık.",
|
|
||||||
"userName": "system@sozsoft.com",
|
|
||||||
"content": "Gelecek hafta başlıyoruz! Kayıt linki mail ile paylaşılacak."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"SocialLikes": [
|
|
||||||
{
|
|
||||||
"postContent": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀",
|
|
||||||
"userName": "system@sozsoft.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"postContent": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨",
|
|
||||||
"userName": "system@sozsoft.com"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,55 +34,6 @@ public class TenantSeederDto
|
||||||
//Forum
|
//Forum
|
||||||
|
|
||||||
//Intranet
|
//Intranet
|
||||||
public List<SocialPostSeedDto> SocialPosts { get; set; }
|
|
||||||
public List<SocialMediaSeedDto> SocialMedias { get; set; }
|
|
||||||
public List<SocialPollOptionSeedDto> SocialPollOptions { get; set; }
|
|
||||||
public List<SocialCommentSeedDto> SocialComments { get; set; }
|
|
||||||
public List<SocialLikeSeedDto> SocialLikes { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SocialPostSeedDto
|
|
||||||
{
|
|
||||||
public string Content { get; set; }
|
|
||||||
public string UserName { get; set; }
|
|
||||||
public int LikeCount { get; set; }
|
|
||||||
public bool IsLiked { get; set; }
|
|
||||||
public bool IsOwnPost { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SocialMediaSeedDto
|
|
||||||
{
|
|
||||||
public string PostContent { get; set; }
|
|
||||||
public string Type { get; set; }
|
|
||||||
public string[] Urls { get; set; }
|
|
||||||
|
|
||||||
public string PollQuestion { get; set; }
|
|
||||||
public int? PollTotalVotes { get; set; }
|
|
||||||
public DateTime? PollEndsAt { get; set; }
|
|
||||||
public string PollUserVoteId { get; set; }
|
|
||||||
|
|
||||||
public List<SocialPollOptionSeedDto> PollOptions { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SocialPollOptionSeedDto
|
|
||||||
{
|
|
||||||
public string PostContent { get; set; }
|
|
||||||
public string PollQuestion { get; set; }
|
|
||||||
public string Text { get; set; }
|
|
||||||
public int Votes { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SocialCommentSeedDto
|
|
||||||
{
|
|
||||||
public string PostContent { get; set; }
|
|
||||||
public string UserName { get; set; }
|
|
||||||
public string Content { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SocialLikeSeedDto
|
|
||||||
{
|
|
||||||
public string PostContent { get; set; }
|
|
||||||
public string UserName { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ServiceSeedDto
|
public class ServiceSeedDto
|
||||||
|
|
@ -172,11 +123,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
private readonly IRepository<Service, Guid> _servicesRepository;
|
private readonly IRepository<Service, Guid> _servicesRepository;
|
||||||
private readonly IRepository<Contact, Guid> _contactRepository;
|
private readonly IRepository<Contact, Guid> _contactRepository;
|
||||||
private readonly IIdentityUserRepository _repositoryUser;
|
private readonly IIdentityUserRepository _repositoryUser;
|
||||||
private readonly IRepository<SocialPost, Guid> _socialPostRepository;
|
|
||||||
private readonly IRepository<SocialMedia, Guid> _socialMediaRepository;
|
|
||||||
private readonly IRepository<SocialPollOption, Guid> _socialPollOptionRepository;
|
|
||||||
private readonly IRepository<SocialComment, Guid> _socialCommentRepository;
|
|
||||||
private readonly IRepository<SocialLike, Guid> _socialLikeRepository;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -187,13 +133,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IRepository<Home, Guid> homeRepository,
|
IRepository<Home, Guid> homeRepository,
|
||||||
IRepository<About, Guid> aboutRepository,
|
IRepository<About, Guid> aboutRepository,
|
||||||
IRepository<Service, Guid> servicesRepository,
|
IRepository<Service, Guid> servicesRepository,
|
||||||
IRepository<Contact, Guid> contactRepository,
|
IRepository<Contact, Guid> contactRepository
|
||||||
|
|
||||||
IRepository<SocialPost, Guid> socialPostRepository,
|
|
||||||
IRepository<SocialMedia, Guid> socialMediaRepository,
|
|
||||||
IRepository<SocialPollOption, Guid> socialPollOptionRepository,
|
|
||||||
IRepository<SocialComment, Guid> socialCommentRepository,
|
|
||||||
IRepository<SocialLike, Guid> socialLikeRepository
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_lookupNormalizer = lookupNormalizer;
|
_lookupNormalizer = lookupNormalizer;
|
||||||
|
|
@ -203,11 +144,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
_servicesRepository = servicesRepository;
|
_servicesRepository = servicesRepository;
|
||||||
_aboutRepository = aboutRepository;
|
_aboutRepository = aboutRepository;
|
||||||
_contactRepository = contactRepository;
|
_contactRepository = contactRepository;
|
||||||
_socialPostRepository = socialPostRepository;
|
|
||||||
_socialMediaRepository = socialMediaRepository;
|
|
||||||
_socialPollOptionRepository = socialPollOptionRepository;
|
|
||||||
_socialCommentRepository = socialCommentRepository;
|
|
||||||
_socialLikeRepository = socialLikeRepository;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task SeedAsync(DataSeedContext context)
|
public async Task SeedAsync(DataSeedContext context)
|
||||||
|
|
@ -298,107 +234,5 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var item in items.SocialPosts)
|
|
||||||
{
|
|
||||||
var exists = await _socialPostRepository.AnyAsync(x => x.Content == item.Content);
|
|
||||||
if (exists)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var user = await _repositoryUser.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName(item.UserName));
|
|
||||||
|
|
||||||
await _socialPostRepository.InsertAsync(new SocialPost(Guid.NewGuid())
|
|
||||||
{
|
|
||||||
UserId = user != null ? user.Id : null,
|
|
||||||
Content = item.Content,
|
|
||||||
LikeCount = item.LikeCount,
|
|
||||||
IsLiked = item.IsLiked,
|
|
||||||
IsOwnPost = item.IsOwnPost
|
|
||||||
}, autoSave: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var item in items.SocialMedias)
|
|
||||||
{
|
|
||||||
var post = await _socialPostRepository.FirstOrDefaultAsync(x => x.Content == item.PostContent);
|
|
||||||
|
|
||||||
if (post == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var exists = await _socialMediaRepository.AnyAsync(x => x.SocialPostId == post.Id);
|
|
||||||
if (exists)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
await _socialMediaRepository.InsertAsync(new SocialMedia(Guid.NewGuid())
|
|
||||||
{
|
|
||||||
SocialPostId = post != null ? post.Id : Guid.Empty,
|
|
||||||
Type = item.Type,
|
|
||||||
Urls = item.Urls,
|
|
||||||
PollQuestion = item.PollQuestion,
|
|
||||||
PollTotalVotes = item.PollTotalVotes,
|
|
||||||
PollEndsAt = item.PollEndsAt,
|
|
||||||
PollUserVoteId = item.PollUserVoteId
|
|
||||||
}, autoSave: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var item in items.SocialPollOptions)
|
|
||||||
{
|
|
||||||
var post = await _socialPostRepository.FirstOrDefaultAsync(x => x.Content == item.PostContent);
|
|
||||||
if (post == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var media = await _socialMediaRepository.FirstOrDefaultAsync(x => x.SocialPostId == post.Id && x.PollQuestion == item.PollQuestion);
|
|
||||||
if (media == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var exists = await _socialPollOptionRepository.AnyAsync(x => x.SocialMediaId == media.Id && x.Text == item.Text);
|
|
||||||
if (exists)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
await _socialPollOptionRepository.InsertAsync(new SocialPollOption(Guid.NewGuid())
|
|
||||||
{
|
|
||||||
SocialMediaId = media != null ? media.Id : Guid.Empty,
|
|
||||||
Text = item.Text,
|
|
||||||
Votes = item.Votes
|
|
||||||
}, autoSave: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var item in items.SocialComments)
|
|
||||||
{
|
|
||||||
var post = await _socialPostRepository.FirstOrDefaultAsync(x => x.Content == item.PostContent);
|
|
||||||
|
|
||||||
if (post == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var exists = await _socialCommentRepository.AnyAsync(x => x.SocialPostId == post.Id && x.Content == item.Content);
|
|
||||||
if (exists)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var user = await _repositoryUser.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName(item.UserName));
|
|
||||||
await _socialCommentRepository.InsertAsync(new SocialComment(Guid.NewGuid())
|
|
||||||
{
|
|
||||||
UserId = user != null ? user.Id : null,
|
|
||||||
SocialPostId = post != null ? post.Id : Guid.Empty,
|
|
||||||
Content = item.Content
|
|
||||||
}, autoSave: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var item in items.SocialLikes)
|
|
||||||
{
|
|
||||||
var post = await _socialPostRepository.FirstOrDefaultAsync(x => x.Content == item.PostContent);
|
|
||||||
|
|
||||||
if (post == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var exists = await _socialLikeRepository.AnyAsync(x => x.SocialPostId == post.Id);
|
|
||||||
if (exists)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var user = await _repositoryUser.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName(item.UserName));
|
|
||||||
await _socialLikeRepository.InsertAsync(new SocialLike(Guid.NewGuid())
|
|
||||||
{
|
|
||||||
SocialPostId = post != null ? post.Id : Guid.Empty,
|
|
||||||
UserId = user != null ? user.Id : null
|
|
||||||
}, autoSave: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
56
configs/seeds/host/data/App.Intranet.SocialComment.json
Normal file
56
configs/seeds/host/data/App.Intranet.SocialComment.json
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
"ListFormCode": "App.Intranet.SocialComment",
|
||||||
|
"KeyFieldName": "Id",
|
||||||
|
"GeneratedAt": "2026-09-04T00:00:00Z",
|
||||||
|
"Order": 20,
|
||||||
|
"Rows": [
|
||||||
|
{
|
||||||
|
"Id": "9cc62f3f-a139-5614-bd61-73b916fd17e7",
|
||||||
|
"SocialPostId": "372da38a-5a7e-5437-b816-15d015e47310",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Harika görünüyor! Başarılar 👏"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "c6717cac-eee1-502d-838f-fed9f9923331",
|
||||||
|
"SocialPostId": "372da38a-5a7e-5437-b816-15d015e47310",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "TypeScript gerçekten fark yaratıyor!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "23189c70-ba21-5d19-b183-0d304cc78170",
|
||||||
|
"SocialPostId": "5ed8facb-e24e-573d-86dc-4450bfd201fc",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Mesajlaşma özelliğine kesinlikle ihtiyacımız var!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "9c86c8d9-d2a7-5316-a97a-4852a470ca11",
|
||||||
|
"SocialPostId": "8a396162-94bf-570e-9085-1a6078900f18",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Tasarımlar çok şık! Renk paleti özellikle güzel 😍"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "c0f2d671-54e1-5aa2-87f8-a36b83568464",
|
||||||
|
"SocialPostId": "8a396162-94bf-570e-9085-1a6078900f18",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Dark mode opsiyonu da olacak mı?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "11b92683-2a57-56f1-978e-d9f963b436c7",
|
||||||
|
"SocialPostId": "5ce6f463-48e8-51d7-8ce2-62a321383f8d",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Harika iş! Detayları paylaşabilir misin?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "a848cede-f479-51b5-a03a-8329ffffd65d",
|
||||||
|
"SocialPostId": "f5dab744-d837-5756-904e-24ff8c199367",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Ne zaman başlıyor?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "fca04aab-a0cb-509f-846e-70577e72d085",
|
||||||
|
"SocialPostId": "f5dab744-d837-5756-904e-24ff8c199367",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Gelecek hafta başlıyoruz! Kayıt linki mail ile paylaşılacak."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
18
configs/seeds/host/data/App.Intranet.SocialLike.json
Normal file
18
configs/seeds/host/data/App.Intranet.SocialLike.json
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"ListFormCode": "App.Intranet.SocialLike",
|
||||||
|
"KeyFieldName": "Id",
|
||||||
|
"GeneratedAt": "2026-09-04T00:00:00Z",
|
||||||
|
"Order": 20,
|
||||||
|
"Rows": [
|
||||||
|
{
|
||||||
|
"Id": "d6c4f425-39f7-5817-9ea7-9fbb53ae89fe",
|
||||||
|
"SocialPostId": "372da38a-5a7e-5437-b816-15d015e47310",
|
||||||
|
"UserId": "@USER:system@sozsoft.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "3e5d11fc-4a55-5313-aaab-bafff96405d2",
|
||||||
|
"SocialPostId": "8a396162-94bf-570e-9085-1a6078900f18",
|
||||||
|
"UserId": "@USER:system@sozsoft.com"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
48
configs/seeds/host/data/App.Intranet.SocialMedia.json
Normal file
48
configs/seeds/host/data/App.Intranet.SocialMedia.json
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"ListFormCode": "App.Intranet.SocialMedia",
|
||||||
|
"KeyFieldName": "Id",
|
||||||
|
"GeneratedAt": "2026-09-04T00:00:00Z",
|
||||||
|
"Order": 20,
|
||||||
|
"Rows": [
|
||||||
|
{
|
||||||
|
"Id": "ba901b98-93de-5ad7-8a92-094d3c27ea9c",
|
||||||
|
"SocialPostId": "372da38a-5a7e-5437-b816-15d015e47310",
|
||||||
|
"Type": "image",
|
||||||
|
"Urls": "[\"https://images.unsplash.com/photo-1633356122544-f134324a6cee?w=800&q=80\"]",
|
||||||
|
"PollQuestion": null,
|
||||||
|
"PollTotalVotes": null,
|
||||||
|
"PollEndsAt": null,
|
||||||
|
"PollUserVoteId": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "abfe92ba-bc27-5d37-b108-38962a436561",
|
||||||
|
"SocialPostId": "5ed8facb-e24e-573d-86dc-4450bfd201fc",
|
||||||
|
"Type": "poll",
|
||||||
|
"Urls": "[]",
|
||||||
|
"PollQuestion": "Hangi özelliği öncelikli olarak geliştirmeliyiz?",
|
||||||
|
"PollTotalVotes": 0,
|
||||||
|
"PollEndsAt": "2024-10-20T23:59:59",
|
||||||
|
"PollUserVoteId": "p3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "3a8b9883-5017-5143-afb0-9203803bf3be",
|
||||||
|
"SocialPostId": "8a396162-94bf-570e-9085-1a6078900f18",
|
||||||
|
"Type": "image",
|
||||||
|
"Urls": "[\"https://images.unsplash.com/photo-1561070791-2526d30994b5?w=800&q=80\",\"https://images.unsplash.com/photo-1586717799252-bd134ad00e26?w=800&q=80\",\"https://images.unsplash.com/photo-1609921212029-bb5a28e60960?w=800&q=80\"]",
|
||||||
|
"PollQuestion": null,
|
||||||
|
"PollTotalVotes": null,
|
||||||
|
"PollEndsAt": null,
|
||||||
|
"PollUserVoteId": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "efe7ae34-a1db-54e1-96e5-5003716d4227",
|
||||||
|
"SocialPostId": "5ce6f463-48e8-51d7-8ce2-62a321383f8d",
|
||||||
|
"Type": "video",
|
||||||
|
"Urls": "[\"https://www.w3schools.com/html/mov_bbb.mp4\"]",
|
||||||
|
"PollQuestion": null,
|
||||||
|
"PollTotalVotes": null,
|
||||||
|
"PollEndsAt": null,
|
||||||
|
"PollUserVoteId": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
32
configs/seeds/host/data/App.Intranet.SocialPollOption.json
Normal file
32
configs/seeds/host/data/App.Intranet.SocialPollOption.json
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"ListFormCode": "App.Intranet.SocialPollOption",
|
||||||
|
"KeyFieldName": "Id",
|
||||||
|
"GeneratedAt": "2026-09-04T00:00:00Z",
|
||||||
|
"Order": 30,
|
||||||
|
"Rows": [
|
||||||
|
{
|
||||||
|
"Id": "ea1900e6-3862-5e40-87b4-d40aeaac8dc5",
|
||||||
|
"SocialMediaId": "abfe92ba-bc27-5d37-b108-38962a436561",
|
||||||
|
"Text": "Kullanıcı profilleri",
|
||||||
|
"Votes": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "91c0447d-7c75-5160-931d-73ce1fcc46e2",
|
||||||
|
"SocialMediaId": "abfe92ba-bc27-5d37-b108-38962a436561",
|
||||||
|
"Text": "Bildirim sistemi",
|
||||||
|
"Votes": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "aab8c13d-0199-5580-b36a-6f2e5c0c4376",
|
||||||
|
"SocialMediaId": "abfe92ba-bc27-5d37-b108-38962a436561",
|
||||||
|
"Text": "Mesajlaşma",
|
||||||
|
"Votes": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "da639632-d29b-5033-8fd8-9ef7409d69d8",
|
||||||
|
"SocialMediaId": "abfe92ba-bc27-5d37-b108-38962a436561",
|
||||||
|
"Text": "Raporlama",
|
||||||
|
"Votes": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
56
configs/seeds/host/data/App.Intranet.SocialPost.json
Normal file
56
configs/seeds/host/data/App.Intranet.SocialPost.json
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
"ListFormCode": "App.Intranet.SocialPost",
|
||||||
|
"KeyFieldName": "Id",
|
||||||
|
"GeneratedAt": "2026-09-04T00:00:00Z",
|
||||||
|
"Order": 10,
|
||||||
|
"Rows": [
|
||||||
|
{
|
||||||
|
"Id": "372da38a-5a7e-5437-b816-15d015e47310",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀",
|
||||||
|
"LikeCount": 0,
|
||||||
|
"IsLiked": false,
|
||||||
|
"IsOwnPost": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "5ed8facb-e24e-573d-86dc-4450bfd201fc",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!",
|
||||||
|
"LikeCount": 0,
|
||||||
|
"IsLiked": false,
|
||||||
|
"IsOwnPost": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "8a396162-94bf-570e-9085-1a6078900f18",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨",
|
||||||
|
"LikeCount": 0,
|
||||||
|
"IsLiked": false,
|
||||||
|
"IsOwnPost": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "5ce6f463-48e8-51d7-8ce2-62a321383f8d",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪",
|
||||||
|
"LikeCount": 0,
|
||||||
|
"IsLiked": false,
|
||||||
|
"IsOwnPost": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "f5dab744-d837-5756-904e-24ff8c199367",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Ekip üyelerimize yeni eğitim programımızı duyurmak istiyorum! 🎓 React, TypeScript ve Modern Web Geliştirme konularında kapsamlı bir program hazırladık.",
|
||||||
|
"LikeCount": 0,
|
||||||
|
"IsLiked": false,
|
||||||
|
"IsOwnPost": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": "183ddf97-ebcd-5e6c-97a9-d146636fc600",
|
||||||
|
"UserId": "@USER:system@sozsoft.com",
|
||||||
|
"Content": "Bugün müşteri ile harika bir toplantı yaptık! Yeni projenin detaylarını konuştuk. 🎯",
|
||||||
|
"LikeCount": 0,
|
||||||
|
"IsLiked": false,
|
||||||
|
"IsOwnPost": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
10
ui/src/utils/validation.ts
Normal file
10
ui/src/utils/validation.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { number } from 'yup'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Boş bırakılan number input'u NaN yerine null'a çevirir; aksi hâlde hem doğrulama
|
||||||
|
* "must be a number" ile düşer hem de sunucuya boş string gider.
|
||||||
|
*/
|
||||||
|
export const nullableNumber = () =>
|
||||||
|
number()
|
||||||
|
.transform((value, original) => (original === '' || original === null ? null : value))
|
||||||
|
.nullable()
|
||||||
|
|
@ -3,7 +3,7 @@ import { ColumnFormatEditDto, ListFormFieldEditTabs } from '@/proxy/admin/list-f
|
||||||
import { SelectBoxOption } from '@/types/shared'
|
import { SelectBoxOption } from '@/types/shared'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { Field, FieldProps, Form, Formik } from 'formik'
|
import { Field, FieldProps, Form, Formik } from 'formik'
|
||||||
import { bool, number, object, string } from 'yup'
|
import { bool, object, string } from 'yup'
|
||||||
import { columnEditorTypeListOptions, sortDirectionOptions } from '../options'
|
import { columnEditorTypeListOptions, sortDirectionOptions } from '../options'
|
||||||
import { FormFieldEditProps } from './FormFields'
|
import { FormFieldEditProps } from './FormFields'
|
||||||
import { EditingFormDto, SortDirectionEnum } from '@/proxy/form/models'
|
import { EditingFormDto, SortDirectionEnum } from '@/proxy/form/models'
|
||||||
|
|
@ -12,15 +12,16 @@ import { useState } from 'react'
|
||||||
import EditorScriptBuilderDialog from '../json-row-operations/EditorScriptBuilderDialog'
|
import EditorScriptBuilderDialog from '../json-row-operations/EditorScriptBuilderDialog'
|
||||||
import SelectField from '../shared/SelectField'
|
import SelectField from '../shared/SelectField'
|
||||||
import { useFieldPermission } from './useFieldPermission'
|
import { useFieldPermission } from './useFieldPermission'
|
||||||
|
import { nullableNumber } from '@/utils/validation'
|
||||||
|
|
||||||
const schema = object().shape({
|
const schema = object().shape({
|
||||||
listOrderNo: number(),
|
listOrderNo: nullableNumber(),
|
||||||
width: number(),
|
width: nullableNumber(),
|
||||||
sortDirection: string().oneOf(Object.values(SortDirectionEnum) as string[]),
|
sortDirection: string().oneOf(Object.values(SortDirectionEnum) as string[]),
|
||||||
sortIndex: number(),
|
sortIndex: nullableNumber(),
|
||||||
editGroupOrderNo: number().nullable(),
|
editGroupOrderNo: nullableNumber(),
|
||||||
editOrderNo: number().nullable(),
|
editOrderNo: nullableNumber(),
|
||||||
colSpan: number().nullable(),
|
colSpan: nullableNumber(),
|
||||||
allowEditing: bool().required(),
|
allowEditing: bool().required(),
|
||||||
allowAdding: bool().required(),
|
allowAdding: bool().required(),
|
||||||
editorScript: string(),
|
editorScript: string(),
|
||||||
|
|
@ -58,7 +59,11 @@ function FormFieldTabOptions({
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
validationSchema={schema}
|
validationSchema={schema}
|
||||||
onSubmit={async (values, formikHelpers) => {
|
onSubmit={async (values, formikHelpers) => {
|
||||||
await onSubmit(ListFormFieldEditTabs.OptionsForm, values, formikHelpers)
|
await onSubmit(
|
||||||
|
ListFormFieldEditTabs.OptionsForm,
|
||||||
|
schema.cast(values) as ColumnFormatEditDto,
|
||||||
|
formikHelpers,
|
||||||
|
)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ touched, errors, isSubmitting, values, setFieldValue }) => (
|
{({ touched, errors, isSubmitting, values, setFieldValue }) => (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue