Ashutosh_Task#513 #96
3381
Marco.Pms.DataAccess/Migrations/20250618112021_EnhancedWorkItemForParentId_Description.Designer.cs
generated
Normal file
3381
Marco.Pms.DataAccess/Migrations/20250618112021_EnhancedWorkItemForParentId_Description.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class EnhancedWorkItemForParentId_Description : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Description",
|
||||
table: "WorkItems",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ParentTaskId",
|
||||
table: "WorkItems",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Description",
|
||||
table: "WorkItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ParentTaskId",
|
||||
table: "WorkItems");
|
||||
}
|
||||
}
|
||||
}
|
@ -2182,6 +2182,12 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Property<double>("CompletedWork")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid?>("ParentTaskId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<double>("PlannedWork")
|
||||
.HasColumnType("double");
|
||||
|
||||
|
@ -11,5 +11,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
public Guid ActivityID { get; set; }
|
||||
public int PlannedWork { get; set; }
|
||||
public int CompletedWork { get; set; }
|
||||
public Guid? ParentTaskId { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,9 @@ namespace Marco.Pms.Model.Mapper
|
||||
WorkCategoryId = model.WorkCategoryId,
|
||||
TaskDate = DateTime.Now,
|
||||
TenantId = tenantId,
|
||||
WorkAreaId = model.WorkAreaID
|
||||
WorkAreaId = model.WorkAreaID,
|
||||
ParentTaskId = model.ParentTaskId,
|
||||
Description = model.Comment
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -20,11 +20,17 @@ namespace Marco.Pms.Model.Projects
|
||||
[ValidateNever]
|
||||
public ActivityMaster? ActivityMaster { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("WorkCategoryId")]
|
||||
[ValidateNever]
|
||||
public WorkCategoryMaster? WorkCategoryMaster { get; set; }
|
||||
|
||||
public Guid? ParentTaskId { get; set; }
|
||||
|
||||
public double PlannedWork { get; set; }
|
||||
public double CompletedWork { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
public DateTime TaskDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -903,11 +903,11 @@ namespace Marco.Pms.Services.Helpers
|
||||
List<ContactNote> notes = new List<ContactNote>();
|
||||
if (active)
|
||||
{
|
||||
notes = await _context.ContactNotes.Where(n => n.ContactId == contact.Id && n.IsActive && n.TenantId == tenantId).ToListAsync();
|
||||
notes = await _context.ContactNotes.Include(n => n.Createdby).Where(n => n.ContactId == contact.Id && n.IsActive && n.TenantId == tenantId).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
notes = await _context.ContactNotes.Where(n => n.ContactId == contact.Id && n.TenantId == tenantId).ToListAsync();
|
||||
notes = await _context.ContactNotes.Include(n => n.Createdby).Where(n => n.ContactId == contact.Id && n.TenantId == tenantId).ToListAsync();
|
||||
}
|
||||
var noteIds = notes.Select(n => n.Id).ToList();
|
||||
List<DirectoryUpdateLog>? updateLogs = await _context.DirectoryUpdateLogs.Include(l => l.Employee).Where(l => noteIds.Contains(l.RefereanceId)).ToListAsync();
|
||||
|
Loading…
x
Reference in New Issue
Block a user