Project List

This commit is contained in:
Sedat ÖZTÜRK 2025-11-27 09:34:20 +03:00
parent fc124830f4
commit 43875b9af8
15 changed files with 333 additions and 211 deletions

View file

@ -312,7 +312,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
IsOrganizationUnit = false,
Description = listFormName,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProjectStatus)),
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Projects)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
@ -324,10 +324,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(listFormName),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectStatus)),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Projects)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 700, true, true, true, true, false),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 550, true, true, true, true, false),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{
@ -348,7 +348,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 1, DataField="StartDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 2, DataField="EndDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 3, DataField="Budget", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat },
new EditingFormItemDto { Order = 4, DataField="Currency", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 4, DataField="Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
]},
new() {
Order=3, ColCount=2, ColSpan=1, Caption="Actual", ItemType="group", Items =
@ -363,6 +363,11 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
]}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "StartDate", FieldDbType = DbType.DateTime , Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Progress", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Budget", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "ActualCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
}
@ -464,7 +469,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"),
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"),
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
@ -591,7 +596,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
@ -607,7 +611,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
@ -625,7 +628,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
@ -648,7 +650,6 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
ValueExpr = "Key",
LookupQuery = LookupQueryValues.CustomerValues,
}),
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson

View file

@ -152,18 +152,14 @@
"path": "/admin/menuManager",
"componentPath": "@/views/menu/MenuManager",
"routeType": "protected",
"authority": [
"App.Menus.Manager"
]
"authority": ["App.Menus.Manager"]
},
{
"key": "admin.listFormManagement.wizard",
"path": "/admin/listform/wizard",
"componentPath": "@/views/admin/listForm/Wizard",
"routeType": "protected",
"authority": [
"App.Listforms.Wizard"
]
"authority": ["App.Listforms.Wizard"]
},
{
"key": "admin.listFormManagement.edit",
@ -177,18 +173,14 @@
"path": "/admin/forumManagement",
"componentPath": "@/views/forum/Management",
"routeType": "protected",
"authority": [
"App.ForumManagement"
]
"authority": ["App.ForumManagement"]
},
{
"key": "admin.ai",
"path": "/admin/ai",
"componentPath": "@/views/ai/Assistant",
"routeType": "protected",
"authority": [
"Abp.Identity.Ai"
]
"authority": ["Abp.Identity.Ai"]
},
{
"key": "admin.profile.general",
@ -230,36 +222,28 @@
"path": "/admin/settings",
"componentPath": "@/views/settings/Settings",
"routeType": "protected",
"authority": [
"App.Setting"
]
"authority": ["App.Setting"]
},
{
"key": "admin.identity.user.detail",
"path": "/admin/users/detail/:userId",
"componentPath": "@/views/admin/user-management/Details",
"routeType": "protected",
"authority": [
"AbpIdentity.Users.Update"
]
"authority": ["AbpIdentity.Users.Update"]
},
{
"key": "admin.identity.ous",
"path": "/admin/ous",
"componentPath": "@/views/admin/organization-unit/OrganizationUnits",
"routeType": "protected",
"authority": [
"Abp.Identity.OrganizationUnits"
]
"authority": ["Abp.Identity.OrganizationUnits"]
},
{
"key": "admin.forum",
"path": "/admin/forum",
"componentPath": "@/views/forum/Forum",
"routeType": "protected",
"authority": [
"App.ForumManagement.Publish"
]
"authority": ["App.ForumManagement.Publish"]
},
{
"key": "admin.list",
@ -301,216 +285,168 @@
"path": "/admin/developerkit",
"componentPath": "@/views/developerKit/DashboardPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit"
]
"authority": ["App.DeveloperKit"]
},
{
"key": "admin.developerkit.entities",
"path": "/admin/developerkit/entities",
"componentPath": "@/views/developerKit/EntityPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.Entity"
]
"authority": ["App.DeveloperKit.Entity"]
},
{
"key": "admin.developerkit.entities.new",
"path": "/admin/developerkit/entities/new",
"componentPath": "@/views/developerKit/EntityDetailPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.Entity"
]
"authority": ["App.DeveloperKit.Entity"]
},
{
"key": "admin.developerkit.entities.edit",
"path": "/admin/developerkit/entities/edit/:id",
"componentPath": "@/views/developerKit/EntityDetailPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.Entity"
]
"authority": ["App.DeveloperKit.Entity"]
},
{
"key": "admin.developerkit.migrations",
"path": "/admin/developerkit/migrations",
"componentPath": "@/views/developerKit/MigrationPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.Migrations"
]
"authority": ["App.DeveloperKit.Migrations"]
},
{
"key": "admin.developerkit.endpoints",
"path": "/admin/developerkit/endpoints",
"componentPath": "@/views/developerKit/CrudEndpointPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.CrudEndpoints"
]
"authority": ["App.DeveloperKit.CrudEndpoints"]
},
{
"key": "admin.developerkit.dynamic-services",
"path": "/admin/developerkit/dynamic-services",
"componentPath": "@/views/developerKit/DynamicServicePage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.DynamicServices"
]
"authority": ["App.DeveloperKit.DynamicServices"]
},
{
"key": "admin.developerkit.components",
"path": "/admin/developerkit/components",
"componentPath": "@/views/developerKit/ComponentPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.Components"
]
"authority": ["App.DeveloperKit.Components"]
},
{
"key": "admin.developerkit.components.new",
"path": "/admin/developerkit/components/new",
"componentPath": "@/views/developerKit/ComponentDetailPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.Components"
]
"authority": ["App.DeveloperKit.Components"]
},
{
"key": "admin.developerkit.components.view",
"path": "/admin/developerkit/components/view/:id",
"componentPath": "@/views/developerKit/ComponentDetailPage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.Components"
]
"authority": ["App.DeveloperKit.Components"]
},
{
"key": "admin.developerkit.components.edit",
"path": "/admin/developerkit/components/edit/:id",
"componentPath": "@/views/developerKit/CodePage",
"routeType": "protected",
"authority": [
"App.DeveloperKit.Components"
]
"authority": ["App.DeveloperKit.Components"]
},
{
"key": "admin.reportManagement",
"path": "/admin/reports/management",
"componentPath": "@/views/report/DashboardPage",
"routeType": "protected",
"authority": [
"App.Reports.Management"
]
"authority": ["App.Reports.Management"]
},
{
"key": "admin.reports.view",
"path": "/admin/reports/:id",
"componentPath": "@/views/report/ReportViewerPage",
"routeType": "protected",
"authority": [
"App.Reports.Categories"
]
"authority": ["App.Reports.Categories"]
},
{
"key": "admin.fileManagement",
"path": "/admin/files",
"componentPath": "@/views/admin/files/FileManager",
"routeType": "protected",
"authority": [
"App.Files"
]
"authority": ["App.Files"]
},
{
"key": "admin.coordinator.classroom.dashboard",
"path": "/admin/coordinator/classroom/dashboard",
"componentPath": "@/views/coordinator/Classroom/Dashboard",
"routeType": "protected",
"authority": [
"App.Coordinator.Classroom.Dashboard"
]
"authority": ["App.Coordinator.Classroom.Dashboard"]
},
{
"key": "admin.coordinator.classroom.classes",
"path": "/admin/coordinator/classroom/classes",
"componentPath": "@/views/coordinator/Classroom/ClassList",
"routeType": "protected",
"authority": [
"App.Coordinator.Classroom.List"
]
"authority": ["App.Coordinator.Classroom.List"]
},
{
"key": "admin.coordinator.classroom.classroom",
"path": "/admin/coordinator/classroom/room/:id",
"componentPath": "@/views/coordinator/Classroom/RoomDetail",
"routeType": "protected",
"authority": [
"App.Coordinator.Classroom.RoomDetail"
]
"authority": ["App.Coordinator.Classroom.RoomDetail"]
},
{
"key": "admin.coordinator.classroom.planning",
"path": "/admin/coordinator/classroom/planning/:id",
"componentPath": "@/views/coordinator/Classroom/PlanningPage",
"routeType": "protected",
"authority": [
"App.Coordinator.Classroom.Planning"
]
"authority": ["App.Coordinator.Classroom.Planning"]
},
{
"key": "admin.coordinator.exams",
"path": "/admin/coordinator/exams",
"componentPath": "@/views/coordinator/Exams",
"routeType": "protected",
"authority": [
"App.Coordinator.Exams"
]
"authority": ["App.Coordinator.Exams"]
},
{
"key": "admin.coordinator.examDetail",
"path": "/admin/coordinator/exam/:id",
"componentPath": "@/views/coordinator/ExamInterface/ExamInterface",
"routeType": "protected",
"authority": [
"App.Coordinator.Exams"
]
"authority": ["App.Coordinator.Exams"]
},
{
"key": "admin.coordinator.assignments",
"path": "/admin/coordinator/assignments",
"componentPath": "@/views/coordinator/Assignments",
"routeType": "protected",
"authority": [
"App.Coordinator.Assignments"
]
"authority": ["App.Coordinator.Assignments"]
},
{
"key": "admin.coordinator.assignmentDetail",
"path": "/admin/coordinator/assignment/:id",
"componentPath": "@/views/coordinator/ExamInterface/ExamInterface",
"routeType": "protected",
"authority": [
"App.Coordinator.Assignments"
]
"authority": ["App.Coordinator.Assignments"]
},
{
"key": "admin.coordinator.tests",
"path": "/admin/coordinator/tests",
"componentPath": "@/views/coordinator/Tests",
"routeType": "protected",
"authority": [
"App.Coordinator.Tests"
]
"authority": ["App.Coordinator.Tests"]
},
{
"key": "admin.coordinator.testDetail",
"path": "/admin/coordinator/test/:id",
"componentPath": "@/views/coordinator/ExamInterface/PDFTestInterface",
"routeType": "protected",
"authority": [
"App.Coordinator.Tests"
]
"authority": ["App.Coordinator.Tests"]
},
{
"key": "admin.supplychain.requests",
@ -2663,7 +2599,7 @@
"Code": "App.Project.Projects",
"DisplayName": "App.Project.Projects",
"Order": 3,
"Url": "/admin/projects",
"Url": "/admin/list/App.Project.Projects",
"Icon": "FcTodoList",
"RequiredPermissionName": "App.Project.Projects",
"IsDisabled": false
@ -3079,4 +3015,4 @@
"IsDisabled": false
}
]
}
}

View file

@ -188,7 +188,7 @@ public enum TableNameEnum
Bom,
BomOperation,
BomComponent,
Project,
Projects,
ProjectType,
ProjectStatus
}

View file

@ -229,7 +229,7 @@ public static class TableNameResolver
// 🔹 R&D
{ nameof(TableNameEnum.ProjectType), (TablePrefix.TenantByName, MenuPrefix.Project) },
{ nameof(TableNameEnum.ProjectStatus), (TablePrefix.TenantByName, MenuPrefix.Project) },
{ nameof(TableNameEnum.Project), (TablePrefix.TenantByName, MenuPrefix.Project) },
{ nameof(TableNameEnum.Projects), (TablePrefix.TenantByName, MenuPrefix.Project) },
};
public static string GetFullTableName(string tableName)

View file

@ -564,7 +564,7 @@ public static class SeedConsts
public const string Default = Prefix.App + ".Project";
public const string ProjectType = Default + ".ProjectType";
public const string ProjectStatus = Default + ".ProjectStatus";
public const string Projects = Default + ".Project";
public const string Projects = Default + ".Projects";
}
public static class Mrp

View file

@ -19,7 +19,8 @@ public class Project : FullAuditedEntity<Guid>, IMultiTenant
public Guid? StatusId { get; set; } //Planlanıyor, Devam Ediyor, Tamamlandı, Beklemede, İptal Edildi
public ProjectStatus Status { get; set; }
public string Priority { get; set; } //Düşük, Orta, Yüksek, Kritik, Acil
public Guid ManagerId { get; set; }
public Guid? ManagerId { get; set; }
public Employee Manager { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
@ -27,6 +28,7 @@ public class Project : FullAuditedEntity<Guid>, IMultiTenant
public DateTime? ActualEndDate { get; set; }
public Guid? CustomerId { get; set; }
public Partner Customer { get; set; }
public decimal Budget { get; set; }
public decimal ActualCost { get; set; }

View file

@ -3228,7 +3228,7 @@ public class PlatformDbContext :
builder.Entity<Project>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Project)), Prefix.DbSchema);
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Projects)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Code).IsRequired().HasMaxLength(100);

View file

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Erp.Platform.Migrations
{
[DbContext(typeof(PlatformDbContext))]
[Migration("20251126210300_Initial")]
[Migration("20251127061452_Initial")]
partial class Initial
{
/// <inheritdoc />
@ -9827,7 +9827,7 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<Guid>("ManagerId")
b.Property<Guid?>("ManagerId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
@ -9860,11 +9860,15 @@ namespace Erp.Platform.Migrations
b.HasKey("Id");
b.HasIndex("CustomerId");
b.HasIndex("ManagerId");
b.HasIndex("ProjectTypeId");
b.HasIndex("StatusId");
b.ToTable("Prj_T_Project", (string)null);
b.ToTable("Prj_T_Projects", (string)null);
});
modelBuilder.Entity("Erp.Platform.Entities.ProjectStatus", b =>
@ -17106,6 +17110,14 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.Project", b =>
{
b.HasOne("Erp.Platform.Entities.Partner", "Customer")
.WithMany()
.HasForeignKey("CustomerId");
b.HasOne("Erp.Platform.Entities.Employee", "Manager")
.WithMany()
.HasForeignKey("ManagerId");
b.HasOne("Erp.Platform.Entities.ProjectType", "ProjectType")
.WithMany("Projects")
.HasForeignKey("ProjectTypeId")
@ -17118,6 +17130,10 @@ namespace Erp.Platform.Migrations
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Customer");
b.Navigation("Manager");
b.Navigation("ProjectType");
b.Navigation("Status");

View file

@ -3526,54 +3526,6 @@ namespace Erp.Platform.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Prj_T_Project",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ProjectTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
StatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Priority = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
ManagerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ActualStartDate = table.Column<DateTime>(type: "datetime2", nullable: true),
ActualEndDate = table.Column<DateTime>(type: "datetime2", nullable: true),
CustomerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Budget = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
ActualCost = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
Currency = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
Progress = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: 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_Prj_T_Project", x => x.Id);
table.ForeignKey(
name: "FK_Prj_T_Project_Prj_T_ProjectStatus_StatusId",
column: x => x.StatusId,
principalTable: "Prj_T_ProjectStatus",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Prj_T_Project_Prj_T_ProjectType_ProjectTypeId",
column: x => x.ProjectTypeId,
principalTable: "Prj_T_ProjectType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Sas_H_Country",
columns: table => new
@ -5996,6 +5948,64 @@ namespace Erp.Platform.Migrations
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Prj_T_Projects",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ProjectTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
StatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Priority = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
ManagerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ActualStartDate = table.Column<DateTime>(type: "datetime2", nullable: true),
ActualEndDate = table.Column<DateTime>(type: "datetime2", nullable: true),
CustomerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Budget = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
ActualCost = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
Currency = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
Progress = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: 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_Prj_T_Projects", x => x.Id);
table.ForeignKey(
name: "FK_Prj_T_Projects_Adm_T_Partner_CustomerId",
column: x => x.CustomerId,
principalTable: "Adm_T_Partner",
principalColumn: "Id");
table.ForeignKey(
name: "FK_Prj_T_Projects_Hr_T_Employee_ManagerId",
column: x => x.ManagerId,
principalTable: "Hr_T_Employee",
principalColumn: "Id");
table.ForeignKey(
name: "FK_Prj_T_Projects_Prj_T_ProjectStatus_StatusId",
column: x => x.StatusId,
principalTable: "Prj_T_ProjectStatus",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Prj_T_Projects_Prj_T_ProjectType_ProjectTypeId",
column: x => x.ProjectTypeId,
principalTable: "Prj_T_ProjectType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Scp_T_Request",
columns: table => new
@ -7655,13 +7665,23 @@ namespace Erp.Platform.Migrations
column: "NotificationRuleId");
migrationBuilder.CreateIndex(
name: "IX_Prj_T_Project_ProjectTypeId",
table: "Prj_T_Project",
name: "IX_Prj_T_Projects_CustomerId",
table: "Prj_T_Projects",
column: "CustomerId");
migrationBuilder.CreateIndex(
name: "IX_Prj_T_Projects_ManagerId",
table: "Prj_T_Projects",
column: "ManagerId");
migrationBuilder.CreateIndex(
name: "IX_Prj_T_Projects_ProjectTypeId",
table: "Prj_T_Projects",
column: "ProjectTypeId");
migrationBuilder.CreateIndex(
name: "IX_Prj_T_Project_StatusId",
table: "Prj_T_Project",
name: "IX_Prj_T_Projects_StatusId",
table: "Prj_T_Projects",
column: "StatusId");
migrationBuilder.CreateIndex(
@ -8313,7 +8333,7 @@ namespace Erp.Platform.Migrations
name: "Plat_H_SettingDefinition");
migrationBuilder.DropTable(
name: "Prj_T_Project");
name: "Prj_T_Projects");
migrationBuilder.DropTable(
name: "Prt_T_Interesting");
@ -8435,9 +8455,6 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Adm_T_Order");
migrationBuilder.DropTable(
name: "Adm_T_Partner");
migrationBuilder.DropTable(
name: "Adm_T_SkillType");
@ -8507,6 +8524,9 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Plat_H_NotificationRule");
migrationBuilder.DropTable(
name: "Adm_T_Partner");
migrationBuilder.DropTable(
name: "Prj_T_ProjectStatus");
@ -8549,24 +8569,6 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "AbpAuditLogs");
migrationBuilder.DropTable(
name: "Crm_T_CustomerSegment");
migrationBuilder.DropTable(
name: "Crm_T_CustomerType");
migrationBuilder.DropTable(
name: "Sas_T_Sector");
migrationBuilder.DropTable(
name: "Scp_T_PaymentTerm");
migrationBuilder.DropTable(
name: "Scp_T_SupplyCardType");
migrationBuilder.DropTable(
name: "Scp_T_SupplyType");
migrationBuilder.DropTable(
name: "Crd_B_RegistrationType");
@ -8594,9 +8596,6 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Mrp_T_BomType");
migrationBuilder.DropTable(
name: "Scp_T_Material");
migrationBuilder.DropTable(
name: "Mrp_T_OperationType");
@ -8615,6 +8614,27 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Plat_H_BackgroundWorker_MailQueueTableFormat");
migrationBuilder.DropTable(
name: "Crm_T_CustomerSegment");
migrationBuilder.DropTable(
name: "Crm_T_CustomerType");
migrationBuilder.DropTable(
name: "Sas_T_Sector");
migrationBuilder.DropTable(
name: "Scp_T_Material");
migrationBuilder.DropTable(
name: "Scp_T_PaymentTerm");
migrationBuilder.DropTable(
name: "Scp_T_SupplyCardType");
migrationBuilder.DropTable(
name: "Scp_T_SupplyType");
migrationBuilder.DropTable(
name: "Sas_H_Country");
@ -8645,15 +8665,15 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Mnt_T_Workcenter");
migrationBuilder.DropTable(
name: "Mrp_T_OperationCategory");
migrationBuilder.DropTable(
name: "Scp_T_MaterialGroup");
migrationBuilder.DropTable(
name: "Scp_T_MaterialType");
migrationBuilder.DropTable(
name: "Mrp_T_OperationCategory");
migrationBuilder.DropTable(
name: "Sas_H_CountryGroup");

View file

@ -9824,7 +9824,7 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<Guid>("ManagerId")
b.Property<Guid?>("ManagerId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
@ -9857,11 +9857,15 @@ namespace Erp.Platform.Migrations
b.HasKey("Id");
b.HasIndex("CustomerId");
b.HasIndex("ManagerId");
b.HasIndex("ProjectTypeId");
b.HasIndex("StatusId");
b.ToTable("Prj_T_Project", (string)null);
b.ToTable("Prj_T_Projects", (string)null);
});
modelBuilder.Entity("Erp.Platform.Entities.ProjectStatus", b =>
@ -17103,6 +17107,14 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.Project", b =>
{
b.HasOne("Erp.Platform.Entities.Partner", "Customer")
.WithMany()
.HasForeignKey("CustomerId");
b.HasOne("Erp.Platform.Entities.Employee", "Manager")
.WithMany()
.HasForeignKey("ManagerId");
b.HasOne("Erp.Platform.Entities.ProjectType", "ProjectType")
.WithMany("Projects")
.HasForeignKey("ProjectTypeId")
@ -17115,6 +17127,10 @@ namespace Erp.Platform.Migrations
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Customer");
b.Navigation("Manager");
b.Navigation("ProjectType");
b.Navigation("Status");

View file

@ -100,9 +100,7 @@
"props": null,
"description": null,
"isActive": true,
"dependencies": [
"DynamicEntityComponent"
]
"dependencies": ["DynamicEntityComponent"]
}
],
"ReportCategories": [
@ -2431,12 +2429,7 @@
"minSalary": 80000,
"maxSalary": 120000,
"currency": "USD",
"requiredSkills": [
"JavaScript",
"TypeScript",
"React",
"Node.js"
],
"requiredSkills": ["JavaScript", "TypeScript", "React", "Node.js"],
"responsibilities": [
"Develop frontend and backend applications",
"Write clean and maintainable code",
@ -4131,9 +4124,7 @@
{
"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"
]
"urls": ["https://www.w3schools.com/html/mov_bbb.mp4"]
}
],
"SocialPollOptions": [
@ -5869,5 +5860,83 @@
"description": "Projenin iptal edildiğini ifade eder",
"isActive": true
}
],
"Projects": [
{
"code": "PRJ-2024-001",
"name": "Erp Sistemi Geliştirme",
"description": "Kurumsal kaynak planlama sistemi geliştirilmesi",
"projectTypeName": "Dahili",
"statusName": "Aktif",
"priority": "High",
"customerCode": "CUST-001",
"managerCode": "EMP-001",
"startDate": "2024-01-15T00:00:00.000Z",
"endDate": "2024-12-31T00:00:00.000Z",
"actualStartDate": "2024-01-20T00:00:00.000Z",
"actualEndDate": null,
"budget": 500000,
"actualCost": 250000,
"currency": "TRY",
"progress": 65,
"isActive": true
},
{
"code": "PRJ-2024-002",
"name": "Mobil Uygulama Geliştirme",
"description": "iOS ve Android mobil uygulama geliştirilmesi",
"projectTypeName": "Müşteri",
"statusName": "Planlama",
"priority": "Medium",
"customerCode": "CUST-002",
"managerCode": "EMP-002",
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-08-31T00:00:00.000Z",
"actualStartDate": null,
"actualEndDate": null,
"budget": 300000,
"actualCost": 50000,
"currency": "TRY",
"progress": 15,
"isActive": true
},
{
"code": "PRJ-2024-003",
"name": "Veri Merkezi Kurulumu",
"description": "Yeni veri merkezi altyapısının kurulması",
"projectTypeName": "Dahili",
"statusName": "Tamamlandı",
"priority": "High",
"customerCode": null,
"managerCode": "EMP-003",
"startDate": "2024-06-01T00:00:00.000Z",
"endDate": "2024-10-31T00:00:00.000Z",
"actualStartDate": "2024-06-05T00:00:00.000Z",
"actualEndDate": "2024-10-28T00:00:00.000Z",
"budget": 800000,
"actualCost": 750000,
"currency": "TRY",
"progress": 100,
"isActive": true
},
{
"code": "PRJ-2024-004",
"name": "E-ticaret Platform Entegrasyonu",
"description": "Mevcut sisteme e-ticaret platformu entegrasyonu",
"projectTypeName": "Müşteri",
"statusName": "Beklemede",
"priority": "Low",
"customerCode": "CUST-001",
"managerCode": "EMP-001",
"startDate": "2024-09-01T00:00:00.000Z",
"endDate": "2024-12-15T00:00:00.000Z",
"actualStartDate": null,
"actualEndDate": null,
"budget": 200000,
"actualCost": 25000,
"currency": "TRY",
"progress": 10,
"isActive": true
}
]
}
}

View file

@ -130,6 +130,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
private readonly IRepository<BomOperation, Guid> _bomOperationRepository;
private readonly IRepository<ProjectType, Guid> _projectTypeRepository;
private readonly IRepository<ProjectStatus, Guid> _projectStatusRepository;
private readonly IRepository<Project, Guid> _projectRepository;
public TenantDataSeeder(
IClock clock,
@ -242,7 +243,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
IRepository<BomComponent, Guid> bomComponentRepository,
IRepository<BomOperation, Guid> bomOperationRepository,
IRepository<ProjectType, Guid> projectTypeRepository,
IRepository<ProjectStatus, Guid> projectStatusRepository
IRepository<ProjectStatus, Guid> projectStatusRepository,
IRepository<Project, Guid> projectRepository
)
{
_clock = clock;
@ -357,6 +359,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
_bomOperationRepository = bomOperationRepository;
_projectTypeRepository = projectTypeRepository;
_projectStatusRepository = projectStatusRepository;
_projectRepository = projectRepository;
}
private static IConfigurationRoot BuildConfiguration()
@ -2480,6 +2483,39 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
IsActive = item.IsActive
}, autoSave: true);
}
foreach (var item in items.Projects)
{
var exists = await _projectRepository.AnyAsync(x => x.Code == item.Code);
if (exists)
continue;
var projectType = await _projectTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ProjectTypeName);
var projectStatus = await _projectStatusRepository.FirstOrDefaultAsync(x => x.Name == item.StatusName);
var customer = await _partnerRepository.FirstOrDefaultAsync(x => x.Code == item.CustomerCode);
var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.ManagerCode);
await _projectRepository.InsertAsync(new Project
{
Code = item.Code,
Name = item.Name,
Description = item.Description,
ProjectTypeId = projectType?.Id,
StatusId = projectStatus?.Id,
Priority = item.Priority,
CustomerId = customer?.Id,
ManagerId = employee?.Id,
StartDate = item.StartDate,
EndDate = item.EndDate,
ActualStartDate = item.ActualStartDate,
ActualEndDate = item.ActualEndDate,
Budget = item.Budget,
ActualCost = item.ActualCost,
Currency = item.Currency,
Progress = item.Progress,
IsActive = item.IsActive
}, autoSave: true);
}
}
}

View file

@ -130,6 +130,32 @@ public class TenantSeederDto
//Project
public List<ProjectTypeSeedDto> ProjectTypes { get; set; }
public List<ProjectStatusSeedDto> ProjectStatuses { get; set; }
public List<ProjectSeedDto> Projects { get; set; }
}
public class ProjectSeedDto
{
public string Code { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string ProjectTypeName { get; set; }
public string StatusName { get; set; }
public string Priority { get; set; }
public string CustomerCode { get; set; }
public string ManagerCode { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public DateTime? ActualStartDate { get; set; }
public DateTime? ActualEndDate { get; set; }
public decimal Budget { get; set; }
public decimal ActualCost { get; set; }
public string Currency { get; set; }
public int Progress { get; set; }
public bool IsActive { get; set; }
}
public class ProjectStatusSeedDto