feat/report #92

Merged
maxchil merged 1 commits from feat/report into master 2021-01-10 21:34:36 +01:00
3 changed files with 21 additions and 2 deletions

View File

@ -34,7 +34,8 @@ namespace InternshipSystem.Api.Controllers
.SingleAsync(i => i.Student.Id == user.PersonNumber, ct); .SingleAsync(i => i.Student.Id == user.PersonNumber, ct);
internship.Report.UpdateReport(reportValue.ToString(Formatting.None)); internship.Report.UpdateReport(reportValue.ToString(Formatting.None));
internship.AddInternshipEvaluation();
await _context.SaveChangesAsync(ct); await _context.SaveChangesAsync(ct);
return Ok(); return Ok();

View File

@ -53,5 +53,22 @@ namespace InternshipSystem.Core.Entity.Internship
// document.Scan = documentScan; // document.Scan = documentScan;
// document.State = DocumentState.Submitted; // document.State = DocumentState.Submitted;
} }
public void AddInternshipEvaluation()
{
if (Documentation.Any(d => d.Type == DocumentType.InternshipEvaluation))
{
return;
}
var document = new Document
{
Description = "",
Type = DocumentType.InternshipEvaluation,
State = DocumentState.Draft
};
Documentation.Add(document);
}
} }
} }

View File

@ -4,6 +4,7 @@
{ {
IppScan, IppScan,
DeanConsent, DeanConsent,
NnwIsurance NnwIsurance,
InternshipEvaluation
} }
} }