feat/report (#92)
XD Co-authored-by: Michal Bohdanowicz <m.w.bohdanowicz@gmail.com>
This commit is contained in:
parent
b68a8480bd
commit
de1cb296d3
@ -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();
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@
|
|||||||
{
|
{
|
||||||
IppScan,
|
IppScan,
|
||||||
DeanConsent,
|
DeanConsent,
|
||||||
NnwIsurance
|
NnwIsurance,
|
||||||
|
InternshipEvaluation
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user