Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: egress changed added in projectName #493

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BL/Models/EgressSubmission.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class EgressSubmission
public string? OutputBucket { get; set; }



public string ProjectName { get; set; }
public DateTime? Completed { get; set; }
public string? Reviewer { get; set; }
public virtual List<EgressFile> Files { get; set; }
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions src/Data-Egress-API/Migrations/20231218110801_ProjectName.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Data_Egress_API.Migrations
{
/// <inheritdoc />
public partial class ProjectName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SubFolder",
table: "EgressSubmissions");

migrationBuilder.AddColumn<string>(
name: "ProjectName",
table: "EgressSubmissions",
type: "text",
nullable: false,
defaultValue: "");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ProjectName",
table: "EgressSubmissions");

migrationBuilder.AddColumn<string>(
name: "SubFolder",
table: "EgressSubmissions",
type: "text",
nullable: true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.11")
.HasAnnotation("ProductVersion", "7.0.13")
.HasAnnotation("Proxies:ChangeTracking", false)
.HasAnnotation("Proxies:CheckEquality", false)
.HasAnnotation("Proxies:LazyLoading", true)
Expand Down Expand Up @@ -69,15 +69,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("OutputBucket")
.HasColumnType("text");

b.Property<string>("ProjectName")
.IsRequired()
.HasColumnType("text");

b.Property<string>("Reviewer")
.HasColumnType("text");

b.Property<int>("Status")
.HasColumnType("integer");

b.Property<string>("SubFolder")
.HasColumnType("text");

b.Property<string>("SubmissionId")
.HasColumnType("text");

Expand Down
4 changes: 2 additions & 2 deletions src/Data-Egress-UI/Views/Data/GetAllEgresses.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</tr>
</thead>
<tbody>
@foreach (var egressSubmission in Model)
@foreach (var egressSubmission in Model.OrderByDescending(x => x.Completed))
{
<tr>
<td>
Expand All @@ -46,7 +46,7 @@
</a>
</td>
<td>
Project Name
@* @egressSubmission.ProjectName*@
</td>
<td>
@egressSubmission.Files.Count
Expand Down
5 changes: 5 additions & 0 deletions src/TRE-API/Controllers/SubmissionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,14 @@ public IActionResult FilesReadyForReview([FromBody] ReviewFiles review)
{
_subHelper.UpdateStatusForTre(review.SubId, StatusType.DataOutRequested, "");
var bucket = _subHelper.GetOutputBucketGuts(review.SubId, false);
//var subId = Int32.Parse(review.SubId);
//var ProjectName = "";
//ProjectName = _dbContext.Projects.Where(x => x.SubmissionProjectId == subId).FirstOrDefault().SubmissionProjectName;
var egsub = new EgressSubmission()
{
SubmissionId = review.SubId,

//ProjectName = ProjectName,
OutputBucket = bucket.Bucket,
Status = EgressStatus.NotCompleted,
Files = new List<EgressFile>()
Expand Down
Loading