Hr Announcements
This commit is contained in:
parent
007c15765c
commit
850e81862b
15 changed files with 1478 additions and 172 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using DocumentFormat.OpenXml.Spreadsheet;
|
||||||
using Kurs.Languages.Languages;
|
using Kurs.Languages.Languages;
|
||||||
using Kurs.Platform.Entities;
|
using Kurs.Platform.Entities;
|
||||||
using Kurs.Platform.Enums;
|
using Kurs.Platform.Enums;
|
||||||
|
|
@ -39760,6 +39761,583 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Announncements
|
||||||
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Announcement))
|
||||||
|
{
|
||||||
|
var listFormAnnouncement = await _listFormRepository.InsertAsync(
|
||||||
|
new ListForm()
|
||||||
|
{
|
||||||
|
ListFormType = ListFormTypeEnum.List,
|
||||||
|
IsSubForm = true,
|
||||||
|
LayoutJson = JsonSerializer.Serialize(new LayoutDto()
|
||||||
|
{
|
||||||
|
Grid = true,
|
||||||
|
Card = true,
|
||||||
|
Pivot = true,
|
||||||
|
Chart = true,
|
||||||
|
DefaultLayout = "grid",
|
||||||
|
CardLayoutColumn = 3
|
||||||
|
}),
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = ListFormCodes.Lists.Announcement,
|
||||||
|
Name = AppCodes.Hr.Announcement,
|
||||||
|
Title = AppCodes.Hr.Announcement,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = true,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = AppCodes.Hr.Announcement,
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Announcement)),
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
DefaultFilter = "\"IsDeleted\" = 'false'",
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
|
||||||
|
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||||
|
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||||
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||||
|
SelectionJson = JsonSerializer.Serialize(new SelectionDto
|
||||||
|
{
|
||||||
|
Mode = GridOptions.SelectionModeSingle,
|
||||||
|
AllowSelectAll = false
|
||||||
|
}),
|
||||||
|
ColumnOptionJson = JsonSerializer.Serialize(new
|
||||||
|
{
|
||||||
|
ColumnFixingEnabled = true,
|
||||||
|
ColumnAutoWidth = true,
|
||||||
|
ColumnChooserEnabled = true,
|
||||||
|
AllowColumnResizing = true,
|
||||||
|
AllowColumnReordering = true,
|
||||||
|
ColumnResizingMode = "widget",
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
D = AppCodes.Hr.Announcement + ".Delete",
|
||||||
|
E = AppCodes.Hr.Announcement + ".Export",
|
||||||
|
I = AppCodes.Hr.Announcement + ".Import",
|
||||||
|
A = AppCodes.Hr.Announcement + ".Activity",
|
||||||
|
}),
|
||||||
|
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Announcement))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||||
|
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() {
|
||||||
|
FieldName = "DeleterId",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@USERID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() {
|
||||||
|
FieldName = "Id",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@ID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||||
|
}),
|
||||||
|
PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto
|
||||||
|
{
|
||||||
|
Visible = true,
|
||||||
|
AllowedPageSizes = "10,20,50,100",
|
||||||
|
ShowPageSizeSelector = true,
|
||||||
|
ShowNavigationButtons = true,
|
||||||
|
ShowInfo = false,
|
||||||
|
InfoText = "Page {0} of {1} ({2} items)",
|
||||||
|
DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive,
|
||||||
|
ScrollingMode = GridColumnOptions.ScrollingModeStandard,
|
||||||
|
LoadPanelEnabled = "auto",
|
||||||
|
LoadPanelText = "Loading..."
|
||||||
|
}),
|
||||||
|
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||||
|
{
|
||||||
|
Popup = new GridEditingPopupDto()
|
||||||
|
{
|
||||||
|
Title = "Announcement Form",
|
||||||
|
Width = 500,
|
||||||
|
Height = 600
|
||||||
|
},
|
||||||
|
AllowDeleting = true,
|
||||||
|
AllowAdding = true,
|
||||||
|
AllowUpdating = true,
|
||||||
|
SendOnlyChangedFormValuesUpdate = false,
|
||||||
|
}),
|
||||||
|
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() {
|
||||||
|
FieldName = "CreationTime",
|
||||||
|
FieldDbType = DbType.DateTime,
|
||||||
|
Value = "@NOW",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() {
|
||||||
|
FieldName = "CreatorId",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@USERID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() {
|
||||||
|
FieldName = "IsDeleted",
|
||||||
|
FieldDbType = DbType.Boolean,
|
||||||
|
Value = "false",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
}),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
|
{
|
||||||
|
new() {
|
||||||
|
Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =
|
||||||
|
[
|
||||||
|
new EditingFormItemDto { Order = 1, DataField = "Title", IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField = "Excerpt", IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField = "Content", IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions },
|
||||||
|
new EditingFormItemDto { Order = 4, DataField = "ImageUrl", EditorType2 = EditorTypes.dxTagBox },
|
||||||
|
new EditingFormItemDto { Order = 5, DataField = "Category", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 6, DataField = "EmployeeId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 7, DataField = "PublishDate", EditorType2 = EditorTypes.dxDateBox },
|
||||||
|
new EditingFormItemDto { Order = 8, DataField = "ExpiryDate", IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
||||||
|
new EditingFormItemDto { Order = 9, DataField = "IsPinned", EditorType2 = EditorTypes.dxCheckBox },
|
||||||
|
new EditingFormItemDto { Order = 10, DataField = "Departments", EditorType2 = EditorTypes.dxTagBox },
|
||||||
|
new EditingFormItemDto { Order = 11, DataField = "Attachments", EditorType2 = EditorTypes.dxTagBox }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
|
||||||
|
{
|
||||||
|
new() {
|
||||||
|
FieldName = "IsPinned",
|
||||||
|
FieldDbType = DbType.Boolean,
|
||||||
|
Value = "false",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() {
|
||||||
|
FieldName = "PublishDate",
|
||||||
|
FieldDbType = DbType.Date,
|
||||||
|
Value = "@NOW",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
#region Announcement Fields
|
||||||
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "Id",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
SortIndex = 0,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||||
|
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Title",
|
||||||
|
Width = 250,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||||
|
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Excerpt",
|
||||||
|
Width = 300,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||||
|
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Content",
|
||||||
|
Width = 400,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||||
|
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "ImageUrl",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Category",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 6,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||||
|
DisplayExpr = "name",
|
||||||
|
ValueExpr = "key",
|
||||||
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
|
new () { Key= "general", Name= "General" },
|
||||||
|
new () { Key= "event", Name= "Event" },
|
||||||
|
new () { Key= "urgent", Name= "Urgent" },
|
||||||
|
new () { Key= "announcement", Name= "Announcement" },
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||||
|
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "EmployeeId",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 7,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "name",
|
||||||
|
ValueExpr = "key",
|
||||||
|
LookupQuery = LookUpQueryValues.EmployeeValues
|
||||||
|
}),
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||||
|
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.DateTime,
|
||||||
|
FieldName = "PublishDate",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||||
|
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.DateTime,
|
||||||
|
FieldName = "ExpiryDate",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 9,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "IsPinned",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 10,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Departments",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 11,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "name",
|
||||||
|
ValueExpr = "key",
|
||||||
|
LookupQuery = LookUpQueryValues.DepartmentValues
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listFormAnnouncement.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Attachments",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 12,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
{
|
||||||
|
AllowReordering = true,
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = AppCodes.Hr.Announcement + ".Create",
|
||||||
|
R = AppCodes.Hr.Announcement,
|
||||||
|
U = AppCodes.Hr.Announcement + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,5 +120,6 @@ public enum TableNameEnum
|
||||||
Training,
|
Training,
|
||||||
Certificate,
|
Certificate,
|
||||||
Reservation,
|
Reservation,
|
||||||
ShuttleRoute
|
ShuttleRoute,
|
||||||
|
Announcement
|
||||||
}
|
}
|
||||||
|
|
@ -531,6 +531,7 @@ public static class PlatformConsts
|
||||||
public const string Training = "list-training";
|
public const string Training = "list-training";
|
||||||
public const string Reservation = "list-reservation";
|
public const string Reservation = "list-reservation";
|
||||||
public const string ShuttleRoute = "list-shuttleroute";
|
public const string ShuttleRoute = "list-shuttleroute";
|
||||||
|
public const string Announcement = "list-announcement";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,7 @@ public static class TableNameResolver
|
||||||
{ nameof(TableNameEnum.Meal), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Hr) },
|
{ nameof(TableNameEnum.Meal), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Hr) },
|
||||||
{ nameof(TableNameEnum.Reservation), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
{ nameof(TableNameEnum.Reservation), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
||||||
{ nameof(TableNameEnum.ShuttleRoute), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
{ nameof(TableNameEnum.ShuttleRoute), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
||||||
|
{ nameof(TableNameEnum.Announcement), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
|
||||||
|
|
||||||
// 🔹 ACCOUNTING
|
// 🔹 ACCOUNTING
|
||||||
{ nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
{ nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
||||||
|
|
|
||||||
|
|
@ -469,6 +469,7 @@ public static class SeedConsts
|
||||||
public const string Meal = Default + ".Meal";
|
public const string Meal = Default + ".Meal";
|
||||||
public const string Reservation = Default + ".Reservation";
|
public const string Reservation = Default + ".Reservation";
|
||||||
public const string ShuttleRoute = Default + ".ShuttleRoute";
|
public const string ShuttleRoute = Default + ".ShuttleRoute";
|
||||||
|
public const string Announcement = Default + ".Announcement";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Accounting
|
public static class Accounting
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
// Domain/Entities/Announcement.cs
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Kurs.Platform.Entities;
|
||||||
|
|
||||||
|
public class Announcement : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
|
public string Title { get; set; }
|
||||||
|
public string Excerpt { get; set; }
|
||||||
|
public string Content { get; set; }
|
||||||
|
public string ImageUrl { get; set; }
|
||||||
|
public string Category { get; set; } // Örneğin: "Genel", "Etkinlik", "Duyuru"
|
||||||
|
public Guid? EmployeeId { get; set; } // Employee referansı metin olarak saklanır
|
||||||
|
public Employee Employee { get; set; }
|
||||||
|
public DateTime PublishDate { get; set; }
|
||||||
|
public DateTime? ExpiryDate { get; set; }
|
||||||
|
public bool IsPinned { get; set; }
|
||||||
|
public int ViewCount { get; set; }
|
||||||
|
public string Departments { get; set; } // ["Yazılım Geliştirme"]
|
||||||
|
public string Attachments { get; set; } // [{name,url,size}]
|
||||||
|
}
|
||||||
|
|
@ -181,6 +181,7 @@ public class PlatformDbContext :
|
||||||
public DbSet<Certificate> Certificates { get; set; }
|
public DbSet<Certificate> Certificates { get; set; }
|
||||||
public DbSet<Reservation> Reservations { get; set; }
|
public DbSet<Reservation> Reservations { get; set; }
|
||||||
public DbSet<ShuttleRoute> ShuttleRoutes { get; set; }
|
public DbSet<ShuttleRoute> ShuttleRoutes { get; set; }
|
||||||
|
public DbSet<Announcement> Announcements { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -1945,5 +1946,21 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.Capacity).HasDefaultValue(0);
|
b.Property(x => x.Capacity).HasDefaultValue(0);
|
||||||
b.Property(x => x.Available).HasDefaultValue(0);
|
b.Property(x => x.Available).HasDefaultValue(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
builder.Entity<Announcement>(b =>
|
||||||
|
{
|
||||||
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Announcement)), Prefix.DbSchema);
|
||||||
|
b.ConfigureByConvention();
|
||||||
|
|
||||||
|
b.Property(x => x.Title).IsRequired().HasMaxLength(200);
|
||||||
|
b.Property(x => x.Excerpt).IsRequired().HasMaxLength(500);
|
||||||
|
b.Property(x => x.Content).IsRequired().HasMaxLength(4000);
|
||||||
|
b.Property(x => x.ImageUrl).HasMaxLength(500);
|
||||||
|
b.Property(x => x.Category).IsRequired().HasMaxLength(50);
|
||||||
|
b.Property(x => x.PublishDate).IsRequired();
|
||||||
|
b.Property(x => x.Departments).HasMaxLength(1000);
|
||||||
|
b.Property(x => x.Attachments).HasMaxLength(2000);
|
||||||
|
b.Property(x => x.ViewCount).HasDefaultValue(0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Kurs.Platform.Migrations
|
namespace Kurs.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251024144858_Initial")]
|
[Migration("20251025170721_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -707,6 +707,101 @@ namespace Kurs.Platform.Migrations
|
||||||
b.ToTable("P_P_AiBot", (string)null);
|
b.ToTable("P_P_AiBot", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kurs.Platform.Entities.Announcement", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Attachments")
|
||||||
|
.HasMaxLength(2000)
|
||||||
|
.HasColumnType("nvarchar(2000)");
|
||||||
|
|
||||||
|
b.Property<string>("Category")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Content")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(4000)
|
||||||
|
.HasColumnType("nvarchar(4000)");
|
||||||
|
|
||||||
|
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>("Departments")
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("EmployeeId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Excerpt")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("nvarchar(500)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("ExpiryDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("ImageUrl")
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("nvarchar(500)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<bool>("IsPinned")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<DateTime>("PublishDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.Property<int>("ViewCount")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasDefaultValue(0);
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("EmployeeId");
|
||||||
|
|
||||||
|
b.ToTable("T_Hr_Announcement", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -10480,6 +10575,15 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Navigation("NotificationRule");
|
b.Navigation("NotificationRule");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kurs.Platform.Entities.Announcement", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kurs.Platform.Entities.Employee", "Employee")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EmployeeId");
|
||||||
|
|
||||||
|
b.Navigation("Employee");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity")
|
b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity")
|
||||||
|
|
@ -3901,6 +3901,37 @@ namespace Kurs.Platform.Migrations
|
||||||
principalColumn: "Id");
|
principalColumn: "Id");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "T_Hr_Announcement",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||||
|
Excerpt = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
|
||||||
|
Content = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: false),
|
||||||
|
ImageUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||||
|
Category = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||||
|
EmployeeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
PublishDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
ExpiryDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
IsPinned = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
ViewCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||||
|
Departments = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||||
|
Attachments = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, 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_T_Hr_Announcement", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "T_Hr_CostCenter",
|
name: "T_Hr_CostCenter",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -4798,6 +4829,11 @@ namespace Kurs.Platform.Migrations
|
||||||
table: "T_Crd_QuestionOption",
|
table: "T_Crd_QuestionOption",
|
||||||
column: "QuestionId");
|
column: "QuestionId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_T_Hr_Announcement_EmployeeId",
|
||||||
|
table: "T_Hr_Announcement",
|
||||||
|
column: "EmployeeId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_T_Hr_Certificate_TrainingId",
|
name: "IX_T_Hr_Certificate_TrainingId",
|
||||||
table: "T_Hr_Certificate",
|
table: "T_Hr_Certificate",
|
||||||
|
|
@ -4953,6 +4989,13 @@ namespace Kurs.Platform.Migrations
|
||||||
table: "T_Sas_ReportTemplate",
|
table: "T_Sas_ReportTemplate",
|
||||||
column: "CategoryId");
|
column: "CategoryId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_T_Hr_Announcement_T_Hr_Employee_EmployeeId",
|
||||||
|
table: "T_Hr_Announcement",
|
||||||
|
column: "EmployeeId",
|
||||||
|
principalTable: "T_Hr_Employee",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
migrationBuilder.AddForeignKey(
|
||||||
name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId",
|
name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId",
|
||||||
table: "T_Hr_CostCenter",
|
table: "T_Hr_CostCenter",
|
||||||
|
|
@ -5000,16 +5043,16 @@ namespace Kurs.Platform.Migrations
|
||||||
table: "T_Acc_BankAccount");
|
table: "T_Acc_BankAccount");
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
migrationBuilder.DropForeignKey(
|
||||||
name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId",
|
name: "FK_T_Hr_CostCenter_T_Hr_Employee_ResponsibleEmployeeId",
|
||||||
table: "T_Hr_CostCenter");
|
table: "T_Hr_CostCenter");
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
migrationBuilder.DropForeignKey(
|
||||||
name: "FK_T_Hr_Employee_T_Hr_Department_DepartmentId",
|
name: "FK_T_Hr_Department_T_Hr_Employee_ManagerId",
|
||||||
table: "T_Hr_Employee");
|
table: "T_Hr_Department");
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
migrationBuilder.DropForeignKey(
|
||||||
name: "FK_T_Hr_JobPosition_T_Hr_Department_DepartmentId",
|
name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId",
|
||||||
table: "T_Hr_JobPosition");
|
table: "T_Hr_CostCenter");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AbpAuditLogActions");
|
name: "AbpAuditLogActions");
|
||||||
|
|
@ -5245,6 +5288,9 @@ namespace Kurs.Platform.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Crd_QuestionTag");
|
name: "T_Crd_QuestionTag");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_Hr_Announcement");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Hr_Certificate");
|
name: "T_Hr_Certificate");
|
||||||
|
|
||||||
|
|
@ -5446,12 +5492,6 @@ namespace Kurs.Platform.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Acc_Bank");
|
name: "T_Acc_Bank");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "T_Hr_Department");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "T_Hr_CostCenter");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Hr_Employee");
|
name: "T_Hr_Employee");
|
||||||
|
|
||||||
|
|
@ -5466,6 +5506,12 @@ namespace Kurs.Platform.Migrations
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Hr_JobPosition");
|
name: "T_Hr_JobPosition");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_Hr_Department");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_Hr_CostCenter");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -704,6 +704,101 @@ namespace Kurs.Platform.Migrations
|
||||||
b.ToTable("P_P_AiBot", (string)null);
|
b.ToTable("P_P_AiBot", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kurs.Platform.Entities.Announcement", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Attachments")
|
||||||
|
.HasMaxLength(2000)
|
||||||
|
.HasColumnType("nvarchar(2000)");
|
||||||
|
|
||||||
|
b.Property<string>("Category")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Content")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(4000)
|
||||||
|
.HasColumnType("nvarchar(4000)");
|
||||||
|
|
||||||
|
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>("Departments")
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("EmployeeId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Excerpt")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("nvarchar(500)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("ExpiryDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("ImageUrl")
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("nvarchar(500)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<bool>("IsPinned")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<DateTime>("PublishDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.Property<int>("ViewCount")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasDefaultValue(0);
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("EmployeeId");
|
||||||
|
|
||||||
|
b.ToTable("T_Hr_Announcement", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -10477,6 +10572,15 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Navigation("NotificationRule");
|
b.Navigation("NotificationRule");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kurs.Platform.Entities.Announcement", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kurs.Platform.Entities.Employee", "Employee")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EmployeeId");
|
||||||
|
|
||||||
|
b.Navigation("Employee");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity")
|
b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity")
|
||||||
|
|
|
||||||
|
|
@ -3572,5 +3572,62 @@
|
||||||
"available": 12,
|
"available": 12,
|
||||||
"type": "evening"
|
"type": "evening"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"Announcements": [
|
||||||
|
{
|
||||||
|
"title": "🎉 Yeni Ofis Açılışı",
|
||||||
|
"content": "Ankara ofisimiz 1 Kasım tarihinde hizmete başlıyor! Tüm çalışanlarımızı açılış törenimize davet ediyoruz.",
|
||||||
|
"excerpt": "Ankara ofisimiz 1 Kasım tarihinde hizmete başlıyor!",
|
||||||
|
"category": "general",
|
||||||
|
"employeeCode": "EMP-001",
|
||||||
|
"publishDate": "12-10-2024",
|
||||||
|
"isPinned": true,
|
||||||
|
"viewCount": 156,
|
||||||
|
"imageUrl": "https://images.unsplash.com/photo-1497366216548-37526070297c?w=800&q=80"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "📅 Performans Değerlendirme Dönemi",
|
||||||
|
"content": "Yıl sonu performans değerlendirmelerimiz 20 Ekim - 5 Kasım tarihleri arasında gerçekleştirilecektir. Lütfen formları zamanında doldurunuz.",
|
||||||
|
"excerpt": "Yıl sonu performans değerlendirmeleri başlıyor.",
|
||||||
|
"category": "hr",
|
||||||
|
"employeeCode": "EMP-002",
|
||||||
|
"publishDate": "08-10-2024",
|
||||||
|
"expiryDate": "05-11-2024",
|
||||||
|
"isPinned": true,
|
||||||
|
"viewCount": 89,
|
||||||
|
"departmentCodes": "ÜRT|BAK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "💻 Sistem Bakımı Duyurusu",
|
||||||
|
"content": "Bu Cumartesi saat 02: 00 - 06: 00 arası sistemlerimizde bakım çalışması yapılacaktır. Bu süre içinde sistemlere erişim sağlanamayacaktır.",
|
||||||
|
"excerpt": "Cumartesi gecesi planlı bakım çalışması",
|
||||||
|
"category": "it",
|
||||||
|
"employeeCode": "EMP-003",
|
||||||
|
"publishDate": "08-10-2024",
|
||||||
|
"isPinned": false,
|
||||||
|
"viewCount": 234
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "🎓 React İleri Seviye Eğitimi",
|
||||||
|
"content": "Yazılım Geliştirme ekibimiz için React İleri Seviye eğitimi 25-26 Ekim tarihlerinde düzenlenecektir. Katılım için IK birimine başvurunuz.",
|
||||||
|
"excerpt": "React İleri Seviye eğitimi kayıtları başladı",
|
||||||
|
"category": "event",
|
||||||
|
"employeeCode": "EMP-003",
|
||||||
|
"publishDate": "09-10-2024",
|
||||||
|
"isPinned": false,
|
||||||
|
"viewCount": 67,
|
||||||
|
"departmentCodes": "IDR"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "⚠️ Güvenlik Politikası Güncellemesi",
|
||||||
|
"content": "Bilgi güvenliği politikamız güncellenmiştir. Tüm çalışanlarımızın yeni politikayı okuması ve onaylaması gerekmektedir.",
|
||||||
|
"excerpt": "Güvenlik politikası güncellendi - Onay gerekli",
|
||||||
|
"category": "urgent",
|
||||||
|
"employeeCode": "EMP-002",
|
||||||
|
"publishDate": "04-10-2024",
|
||||||
|
"isPinned": true,
|
||||||
|
"viewCount": 312,
|
||||||
|
"departmentCodes": "BAK|DEP"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
private readonly IRepository<Training, Guid> _trainingRepository;
|
private readonly IRepository<Training, Guid> _trainingRepository;
|
||||||
private readonly IRepository<Reservation, Guid> _reservationRepository;
|
private readonly IRepository<Reservation, Guid> _reservationRepository;
|
||||||
private readonly IRepository<ShuttleRoute, Guid> _shuttleRouteRepository;
|
private readonly IRepository<ShuttleRoute, Guid> _shuttleRouteRepository;
|
||||||
|
private readonly IRepository<Announcement, Guid> _announcementRepository;
|
||||||
|
|
||||||
public TenantDataSeeder(
|
public TenantDataSeeder(
|
||||||
IRepository<IdentityUser, Guid> repositoryUser,
|
IRepository<IdentityUser, Guid> repositoryUser,
|
||||||
|
|
@ -135,7 +136,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IRepository<Performans360, Guid> performans360Repository,
|
IRepository<Performans360, Guid> performans360Repository,
|
||||||
IRepository<Training, Guid> trainingRepository,
|
IRepository<Training, Guid> trainingRepository,
|
||||||
IRepository<Reservation, Guid> reservationRepository,
|
IRepository<Reservation, Guid> reservationRepository,
|
||||||
IRepository<ShuttleRoute, Guid> shuttleRouteRepository
|
IRepository<ShuttleRoute, Guid> shuttleRouteRepository,
|
||||||
|
IRepository<Announcement, Guid> announcementRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_repositoryUser = repositoryUser;
|
_repositoryUser = repositoryUser;
|
||||||
|
|
@ -196,6 +198,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
_trainingRepository = trainingRepository;
|
_trainingRepository = trainingRepository;
|
||||||
_reservationRepository = reservationRepository;
|
_reservationRepository = reservationRepository;
|
||||||
_shuttleRouteRepository = shuttleRouteRepository;
|
_shuttleRouteRepository = shuttleRouteRepository;
|
||||||
|
_announcementRepository = announcementRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IConfigurationRoot BuildConfiguration()
|
private static IConfigurationRoot BuildConfiguration()
|
||||||
|
|
@ -1248,5 +1251,36 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
Type = item.Type
|
Type = item.Type
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var item in items.Announcements)
|
||||||
|
{
|
||||||
|
var exists = await _announcementRepository.AnyAsync(x => x.Title == item.Title);
|
||||||
|
if (exists)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode);
|
||||||
|
var targetDepartments = new List<Department>();
|
||||||
|
|
||||||
|
if (item.DepartmentCodes != null)
|
||||||
|
{
|
||||||
|
targetDepartments = await _departmentRepository.GetListAsync(x =>
|
||||||
|
item.DepartmentCodes.Split('|', StringSplitOptions.RemoveEmptyEntries).Contains(x.Code));
|
||||||
|
}
|
||||||
|
|
||||||
|
await _announcementRepository.InsertAsync(new Announcement
|
||||||
|
{
|
||||||
|
Title = item.Title,
|
||||||
|
Excerpt = item.Excerpt,
|
||||||
|
Content = item.Content,
|
||||||
|
ImageUrl = item.ImageUrl,
|
||||||
|
Category = item.Category,
|
||||||
|
EmployeeId = employee != null ? employee.Id : null,
|
||||||
|
PublishDate = item.PublishDate,
|
||||||
|
ExpiryDate = item.ExpiryDate,
|
||||||
|
IsPinned = item.IsPinned,
|
||||||
|
ViewCount = item.ViewCount,
|
||||||
|
Departments = string.Join("|", targetDepartments.Select(d => d.Id)),
|
||||||
|
}, autoSave: true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,24 @@ public class TenantSeederDto
|
||||||
public List<TrainingSeedDto> Trainings { get; set; }
|
public List<TrainingSeedDto> Trainings { get; set; }
|
||||||
public List<ReservationSeedDto> Reservations { get; set; }
|
public List<ReservationSeedDto> Reservations { get; set; }
|
||||||
public List<ShuttleRouteSeedDto> ShuttleRoutes { get; set; }
|
public List<ShuttleRouteSeedDto> ShuttleRoutes { get; set; }
|
||||||
|
public List<AnnouncementSeedDto> Announcements { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class AnnouncementSeedDto
|
||||||
|
{
|
||||||
|
public string Title { get; set; }
|
||||||
|
public string Excerpt { get; set; }
|
||||||
|
public string Content { get; set; }
|
||||||
|
public string ImageUrl { get; set; }
|
||||||
|
public string Category { get; set; }
|
||||||
|
public string EmployeeCode { get; set; }
|
||||||
|
public DateTime PublishDate { get; set; }
|
||||||
|
public DateTime? ExpiryDate { get; set; }
|
||||||
|
public bool IsPinned { get; set; }
|
||||||
|
public int ViewCount { get; set; }
|
||||||
|
public string DepartmentCodes { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class ShuttleRouteSeedDto
|
public class ShuttleRouteSeedDto
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -15,74 +15,6 @@ import {
|
||||||
SocialPost,
|
SocialPost,
|
||||||
} from '@/types/intranet'
|
} from '@/types/intranet'
|
||||||
|
|
||||||
export const mockAnnouncements: Announcement[] = [
|
|
||||||
{
|
|
||||||
id: 'ann1',
|
|
||||||
title: '🎉 Yeni Ofis Açılışı',
|
|
||||||
content:
|
|
||||||
'Ankara ofisimiz 1 Kasım tarihinde hizmete başlıyor! Tüm çalışanlarımızı açılış törenimize davet ediyoruz.',
|
|
||||||
excerpt: 'Ankara ofisimiz 1 Kasım tarihinde hizmete başlıyor!',
|
|
||||||
category: 'general',
|
|
||||||
author: mockEmployees[4],
|
|
||||||
publishDate: new Date('2024-10-15T09:00:00'),
|
|
||||||
isPinned: true,
|
|
||||||
viewCount: 156,
|
|
||||||
imageUrl: 'https://images.unsplash.com/photo-1497366216548-37526070297c?w=800&q=80',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'ann2',
|
|
||||||
title: '📅 Performans Değerlendirme Dönemi',
|
|
||||||
content:
|
|
||||||
'Yıl sonu performans değerlendirmelerimiz 20 Ekim - 5 Kasım tarihleri arasında gerçekleştirilecektir. Lütfen formları zamanında doldurunuz.',
|
|
||||||
excerpt: 'Yıl sonu performans değerlendirmeleri başlıyor.',
|
|
||||||
category: 'hr',
|
|
||||||
author: mockEmployees[3],
|
|
||||||
publishDate: new Date('2024-10-18T10:30:00'),
|
|
||||||
expiryDate: new Date('2024-11-05'),
|
|
||||||
isPinned: true,
|
|
||||||
viewCount: 89,
|
|
||||||
departments: ['Tüm Departmanlar'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'ann3',
|
|
||||||
title: '💻 Sistem Bakımı Duyurusu',
|
|
||||||
content:
|
|
||||||
'Bu Cumartesi saat 02:00-06:00 arası sistemlerimizde bakım çalışması yapılacaktır. Bu süre içinde sistemlere erişim sağlanamayacaktır.',
|
|
||||||
excerpt: 'Cumartesi gecesi planlı bakım çalışması',
|
|
||||||
category: 'it',
|
|
||||||
author: mockEmployees[2],
|
|
||||||
publishDate: new Date('2024-10-17T14:00:00'),
|
|
||||||
isPinned: false,
|
|
||||||
viewCount: 234,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'ann4',
|
|
||||||
title: '🎓 React İleri Seviye Eğitimi',
|
|
||||||
content:
|
|
||||||
'Yazılım Geliştirme ekibimiz için React İleri Seviye eğitimi 25-26 Ekim tarihlerinde düzenlenecektir. Katılım için IK birimine başvurunuz.',
|
|
||||||
excerpt: 'React İleri Seviye eğitimi kayıtları başladı',
|
|
||||||
category: 'event',
|
|
||||||
author: mockEmployees[0],
|
|
||||||
publishDate: new Date('2024-10-16T11:00:00'),
|
|
||||||
isPinned: false,
|
|
||||||
viewCount: 67,
|
|
||||||
departments: ['Yazılım Geliştirme'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'ann5',
|
|
||||||
title: '⚠️ Güvenlik Politikası Güncellemesi',
|
|
||||||
content:
|
|
||||||
'Bilgi güvenliği politikamız güncellenmiştir. Tüm çalışanlarımızın yeni politikayı okuması ve onaylaması gerekmektedir.',
|
|
||||||
excerpt: 'Güvenlik politikası güncellendi - Onay gerekli',
|
|
||||||
category: 'urgent',
|
|
||||||
author: mockEmployees[4],
|
|
||||||
publishDate: new Date('2024-10-18T08:00:00'),
|
|
||||||
isPinned: true,
|
|
||||||
viewCount: 312,
|
|
||||||
attachments: [{ name: 'Bilgi_Guvenligi_Politikasi_v2.pdf', url: '#', size: '2.4 MB' }],
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
export const mockEvents: CalendarEvent[] = [
|
export const mockEvents: CalendarEvent[] = [
|
||||||
{
|
{
|
||||||
id: 'evt1',
|
id: 'evt1',
|
||||||
|
|
@ -979,4 +911,72 @@ export const mockShuttleRoutes: ShuttleRoute[] = [
|
||||||
available: 12,
|
available: 12,
|
||||||
type: 'evening',
|
type: 'evening',
|
||||||
},
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
export const mockAnnouncements: Announcement[] = [
|
||||||
|
{
|
||||||
|
id: 'ann1',
|
||||||
|
title: '🎉 Yeni Ofis Açılışı',
|
||||||
|
content:
|
||||||
|
'Ankara ofisimiz 1 Kasım tarihinde hizmete başlıyor! Tüm çalışanlarımızı açılış törenimize davet ediyoruz.',
|
||||||
|
excerpt: 'Ankara ofisimiz 1 Kasım tarihinde hizmete başlıyor!',
|
||||||
|
category: 'general',
|
||||||
|
author: mockEmployees[4],
|
||||||
|
publishDate: new Date('2024-10-15T09:00:00'),
|
||||||
|
isPinned: true,
|
||||||
|
viewCount: 156,
|
||||||
|
imageUrl: 'https://images.unsplash.com/photo-1497366216548-37526070297c?w=800&q=80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'ann2',
|
||||||
|
title: '📅 Performans Değerlendirme Dönemi',
|
||||||
|
content:
|
||||||
|
'Yıl sonu performans değerlendirmelerimiz 20 Ekim - 5 Kasım tarihleri arasında gerçekleştirilecektir. Lütfen formları zamanında doldurunuz.',
|
||||||
|
excerpt: 'Yıl sonu performans değerlendirmeleri başlıyor.',
|
||||||
|
category: 'hr',
|
||||||
|
author: mockEmployees[3],
|
||||||
|
publishDate: new Date('2024-10-18T10:30:00'),
|
||||||
|
expiryDate: new Date('2024-11-05'),
|
||||||
|
isPinned: true,
|
||||||
|
viewCount: 89,
|
||||||
|
departments: ['Tüm Departmanlar'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'ann3',
|
||||||
|
title: '💻 Sistem Bakımı Duyurusu',
|
||||||
|
content:
|
||||||
|
'Bu Cumartesi saat 02:00-06:00 arası sistemlerimizde bakım çalışması yapılacaktır. Bu süre içinde sistemlere erişim sağlanamayacaktır.',
|
||||||
|
excerpt: 'Cumartesi gecesi planlı bakım çalışması',
|
||||||
|
category: 'it',
|
||||||
|
author: mockEmployees[2],
|
||||||
|
publishDate: new Date('2024-10-17T14:00:00'),
|
||||||
|
isPinned: false,
|
||||||
|
viewCount: 234,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'ann4',
|
||||||
|
title: '🎓 React İleri Seviye Eğitimi',
|
||||||
|
content:
|
||||||
|
'Yazılım Geliştirme ekibimiz için React İleri Seviye eğitimi 25-26 Ekim tarihlerinde düzenlenecektir. Katılım için IK birimine başvurunuz.',
|
||||||
|
excerpt: 'React İleri Seviye eğitimi kayıtları başladı',
|
||||||
|
category: 'event',
|
||||||
|
author: mockEmployees[0],
|
||||||
|
publishDate: new Date('2024-10-16T11:00:00'),
|
||||||
|
isPinned: false,
|
||||||
|
viewCount: 67,
|
||||||
|
departments: ['Yazılım Geliştirme'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'ann5',
|
||||||
|
title: '⚠️ Güvenlik Politikası Güncellemesi',
|
||||||
|
content:
|
||||||
|
'Bilgi güvenliği politikamız güncellenmiştir. Tüm çalışanlarımızın yeni politikayı okuması ve onaylaması gerekmektedir.',
|
||||||
|
excerpt: 'Güvenlik politikası güncellendi - Onay gerekli',
|
||||||
|
category: 'urgent',
|
||||||
|
author: mockEmployees[4],
|
||||||
|
publishDate: new Date('2024-10-18T08:00:00'),
|
||||||
|
isPinned: true,
|
||||||
|
viewCount: 312,
|
||||||
|
attachments: [{ name: 'Bilgi_Guvenligi_Politikasi_v2.pdf', url: '#', size: '2.4 MB' }],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
Loading…
Reference in a new issue