SnapShot Fixed - bugSectionWorkflow Completed

This commit is contained in:
gozareshgir
2026-01-28 12:34:23 +03:30
parent 23d42bd8f5
commit 2f45d519b9
4 changed files with 1307 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ using GozareshgirProgramManager.Application.Modules.Workflows.Queries.WorkflowLi
namespace GozareshgirProgramManager.Application.Modules.Workflows.Queries.WorkflowList;
public record WorkflowCountResponse(int Total, int Rejected, int NotAssigned, int PendingForApproval);
public record WorkflowCountResponse(int Total, int Rejected, int NotAssigned, int PendingForApproval,int BugSection);
public record WorkflowCountQuery() : IBaseQuery<WorkflowCountResponse>;
@@ -28,6 +28,7 @@ public class WorkflowCountQueryHandler : IBaseQueryHandler<WorkflowCountQuery, W
int rejectedCount = 0;
int notAssignedCount = 0;
int pendingForApprovalCount = 0;
int bugSectionCount = 0;
foreach (var provider in _providers)
{
@@ -40,11 +41,13 @@ public class WorkflowCountQueryHandler : IBaseQueryHandler<WorkflowCountQuery, W
notAssignedCount += count; break;
case WorkflowType.PendingForApproval:
pendingForApprovalCount += count; break;
case WorkflowType.BugSection:
bugSectionCount += count; break;
}
}
var total = rejectedCount + notAssignedCount + pendingForApprovalCount;
var response = new WorkflowCountResponse(total, rejectedCount, notAssignedCount, pendingForApprovalCount);
var total = rejectedCount + notAssignedCount + pendingForApprovalCount + bugSectionCount;
var response = new WorkflowCountResponse(total, rejectedCount, notAssignedCount, pendingForApprovalCount, bugSectionCount);
return OperationResult<WorkflowCountResponse>.Success(response);
}
}

View File

@@ -0,0 +1,24 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GozareshgirProgramManager.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class test : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View File

@@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace GozareshgirProgramManager.Infrastructure.Migrations
{
[DbContext(typeof(ProgramManagerDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
partial class ProgramManagerDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
@@ -262,7 +262,7 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations
b.ToTable("BugSections", (string)null);
});
modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b =>
modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.PhaseSection", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -904,7 +904,7 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations
modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b =>
{
b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", "ProjectTask")
b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", "ProjectTask")
.WithMany("BugSectionList")
.HasForeignKey("TaskId")
.OnDelete(DeleteBehavior.Cascade)
@@ -939,9 +939,9 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations
b.Navigation("ProjectTask");
});
modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b =>
modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.PhaseSection", b =>
{
b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", "Phase")
b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.ProjectPhase", "Phase")
.WithMany("PhaseSections")
.HasForeignKey("PhaseId")
.OnDelete(DeleteBehavior.Cascade)