[CLAUDE] PurchaseEvaluation: +mục E "Link hồ sơ" (hyperlink NAS) + rename "Dự trù PRO"->"Ngân sách PRO"
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m25s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m25s
Anh Kiệt (FDC UAT): (1) thêm mục "e. Link hồ sơ" dưới mục "d. Bản so sánh" — 1 ô dán hyperlink tới thư mục hồ sơ trên NAS công ty, hiện dạng <a> bấm-mở (target _blank rel noopener noreferrer), null-safe; (2) đổi nhãn "Dự trù PRO"->"Ngân sách PRO" (cả badge + row label; GIỮ "Ghi chú từ PRO" + field-code/biến). - BE: PurchaseEvaluation +HoSoLink string? (Mig AddHoSoLinkToPurchaseEvaluation — nvarchar(1000) nullable, no new table, Down reversible) + Create/Update command (+trailing optional =null -> backward-compat, 0 call-site break) + Detail DTO + projection. Build slnx PASS. - FE x2 app SHA256 mirror (PeDetailTabs + PeWorkspaceCreateView): mục E input/hyperlink + rename. types +hoSoLink. Workflow fan-out (BE song song FE -> review); FE+reviewer return-rỗng -> em main recover disk + build-verify x3 + self-gate (bắt badge sót rename). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -206,6 +206,8 @@ public record PurchaseEvaluationDetailBundleDto(
|
||||
string TenGoiThau,
|
||||
string? DiaDiem,
|
||||
string? MoTa,
|
||||
// [HoSoLink] hyperlink thư mục hồ sơ NAS — FE render hyperlink bấm-mở.
|
||||
string? HoSoLink,
|
||||
Guid ProjectId,
|
||||
string ProjectName,
|
||||
// [Mig 49 S57bis] Hạng mục công việc — loose-Guid resolve giống ProjectName.
|
||||
|
||||
@ -25,7 +25,8 @@ public record CreatePurchaseEvaluationCommand(
|
||||
string? PaymentTerms,
|
||||
decimal? BudgetPeriodAmount, // [S61 Mig 50] "Ngân sách - kỳ này" — drafter nhập, optional lúc tạo (guard lúc submit)
|
||||
Guid? ApprovalWorkflowId = null, // [Mig 23] User chọn quy trình duyệt V2 lúc tạo
|
||||
Guid? WorkItemId = null) : IRequest<Guid>; // [Mig 49 S57bis] Hạng mục công việc — flow create PHẢI chọn (validator NotEmpty)
|
||||
Guid? WorkItemId = null, // [Mig 49 S57bis] Hạng mục công việc — flow create PHẢI chọn (validator NotEmpty)
|
||||
string? HoSoLink = null) : IRequest<Guid>; // [HoSoLink] hyperlink thư mục hồ sơ NAS — optional, max 1000
|
||||
|
||||
public class CreatePurchaseEvaluationCommandValidator : AbstractValidator<CreatePurchaseEvaluationCommand>
|
||||
{
|
||||
@ -42,6 +43,8 @@ public class CreatePurchaseEvaluationCommandValidator : AbstractValidator<Create
|
||||
.WithMessage("Phải chọn hạng mục công việc.");
|
||||
RuleFor(x => x.DiaDiem).MaximumLength(500);
|
||||
RuleFor(x => x.MoTa).MaximumLength(2000);
|
||||
// [HoSoLink] MaxLength MATCH EF config HasMaxLength(1000) (S35 lesson).
|
||||
RuleFor(x => x.HoSoLink).MaximumLength(1000);
|
||||
// [S61] >0 khi có nhập — KHÔNG bắt buộc lúc tạo, submit guard mới chặn.
|
||||
RuleFor(x => x.BudgetPeriodAmount).GreaterThan(0)
|
||||
.When(x => x.BudgetPeriodAmount.HasValue)
|
||||
@ -134,6 +137,7 @@ public class CreatePurchaseEvaluationCommandHandler(
|
||||
DepartmentId = request.DepartmentId,
|
||||
DiaDiem = request.DiaDiem,
|
||||
MoTa = request.MoTa,
|
||||
HoSoLink = request.HoSoLink, // [HoSoLink] hyperlink thư mục hồ sơ NAS
|
||||
DrafterUserId = currentUser.UserId,
|
||||
WorkflowDefinitionId = activeWfId,
|
||||
ApprovalWorkflowId = request.ApprovalWorkflowId, // Mig 23 — schema mới V2
|
||||
@ -208,7 +212,8 @@ public record UpdatePurchaseEvaluationDraftCommand(
|
||||
decimal? BudgetPeriodAmount = null, // [S61] null-safe: null = GIỮ giá trị cũ (chống null-hóa bug-class S42)
|
||||
decimal? ExpectedRemainingAmount = null, // [S61] null-safe: null = GIỮ giá trị cũ
|
||||
Guid? ApprovalWorkflowId = null, // [Mig 23] cho User đổi quy trình khi sửa Nháp
|
||||
Guid? WorkItemId = null) : IRequest; // [Mig 49 S57bis] cho User đổi hạng mục công việc khi sửa Nháp/Trả lại
|
||||
Guid? WorkItemId = null, // [Mig 49 S57bis] cho User đổi hạng mục công việc khi sửa Nháp/Trả lại
|
||||
string? HoSoLink = null) : IRequest; // [HoSoLink] hyperlink thư mục hồ sơ NAS — absolute-set như MoTa/DiaDiem (null = clear link)
|
||||
|
||||
public class UpdatePurchaseEvaluationDraftCommandValidator : AbstractValidator<UpdatePurchaseEvaluationDraftCommand>
|
||||
{
|
||||
@ -217,6 +222,8 @@ public class UpdatePurchaseEvaluationDraftCommandValidator : AbstractValidator<U
|
||||
RuleFor(x => x.TenGoiThau).NotEmpty().MaximumLength(500);
|
||||
RuleFor(x => x.DiaDiem).MaximumLength(500);
|
||||
RuleFor(x => x.MoTa).MaximumLength(2000);
|
||||
// [HoSoLink] MaxLength MATCH EF config HasMaxLength(1000) (S35 lesson).
|
||||
RuleFor(x => x.HoSoLink).MaximumLength(1000);
|
||||
RuleFor(x => x.BudgetPeriodAmount).GreaterThan(0)
|
||||
.When(x => x.BudgetPeriodAmount.HasValue)
|
||||
.WithMessage("Ngân sách kỳ này phải lớn hơn 0.");
|
||||
@ -264,6 +271,7 @@ public class UpdatePurchaseEvaluationDraftCommandHandler(
|
||||
entity.TenGoiThau = request.TenGoiThau;
|
||||
entity.DiaDiem = request.DiaDiem;
|
||||
entity.MoTa = request.MoTa;
|
||||
entity.HoSoLink = request.HoSoLink; // [HoSoLink] absolute-set như MoTa/DiaDiem (Section 1 text field, null = clear)
|
||||
entity.PaymentTerms = request.PaymentTerms;
|
||||
entity.ApprovalWorkflowId = request.ApprovalWorkflowId; // Mig 23 — User đổi quy trình
|
||||
// [S61] null-safe 2 field ngân sách mới (mirror WorkItemId bên dưới):
|
||||
@ -1028,6 +1036,7 @@ public class GetPurchaseEvaluationQueryHandler(
|
||||
|
||||
return new PurchaseEvaluationDetailBundleDto(
|
||||
e.Id, e.MaPhieu, e.Type, e.Phase, e.TenGoiThau, e.DiaDiem, e.MoTa,
|
||||
e.HoSoLink, // [HoSoLink] hyperlink thư mục hồ sơ NAS
|
||||
e.ProjectId, project?.Name ?? "",
|
||||
e.WorkItemId, workItem?.Name, workItem?.Code,
|
||||
e.DepartmentId, department?.Name,
|
||||
|
||||
Reference in New Issue
Block a user