Merge branch 'develop' into adiDev
This commit is contained in:
commit
3bbf4e26e7
11 changed files with 107 additions and 9 deletions
|
|
@ -135,6 +135,18 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
[HttpPost("profiles-send")]
|
||||
public async Task<ActionResult<ResponseObject>> UpdatePropertyByUserProfiles_send([FromBody] NotisSendRequest req)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationsLinkSendAsync(
|
||||
req.ReceiverUserIds,
|
||||
req.Subject,
|
||||
req.Body,
|
||||
req.Payload
|
||||
);
|
||||
return Success();
|
||||
}
|
||||
|
||||
[HttpPut("{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> ReplyPropertyByUser([FromBody] NotiReplyRequest req, Guid id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
//private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.Claims?.Any(claim => new[] { "placement", "placement1", "placement2" }.Contains(claim.Value));
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
//private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.Claims?.Any(claim => new[] { "placement", "placement1", "placement2" }.Contains(claim.Value));
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
private string? token => _httpContextAccessor.HttpContext.Request.Headers["Authorization"];
|
||||
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
//private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement");
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.Claims?.Any(claim => new[] { "placement", "placement1", "placement2" }.Contains(claim.Value));
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
@ -1531,6 +1532,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
var report_data = (from p in _context.PlacementProfiles
|
||||
.Include(x => x.Placement)
|
||||
.Include(x => x.PlacementEducations)
|
||||
.Include(x => x.PositionCandidate)
|
||||
// .ThenInclude(x => x.PlacementType)
|
||||
.Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString()))
|
||||
// .Where(x => x.Placement!.PlacementType!.Name != "สอบแข่งขัน")
|
||||
|
|
@ -1548,7 +1550,12 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
PositionName = p.positionName == null ? "" : p.positionName,
|
||||
ExamNumber = p.ExamNumber == null ? "0" : p.ExamNumber.Value.ToString().ToThaiNumber(),
|
||||
PlacementName = $"{p.Placement.Name.ToThaiNumber()} ครั้งที่ {p.Placement.Round.ToThaiNumber()}/{p.Placement.Year.ToThaiYear().ToString().ToThaiNumber()}",
|
||||
Oc = (p.positionName == null ? "" : p.positionName) + "/" + (p.root == null ? "" : p.root),
|
||||
Oc = p.root == null ? "" :
|
||||
p.node == 4 ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
|
||||
p.node == 3 ? $"{p.child3}/{p.child2}/{p.child1}/{p.root}" :
|
||||
p.node == 2 ? $"{p.child2}/{p.child1}/{p.root}" :
|
||||
p.node == 1 ? $"{p.child1}/{p.root}" :
|
||||
p.node == 0 ? $"{p.root}" : "",
|
||||
PositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
PositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
PositionNumber = p.posMasterNo == null ? "" :
|
||||
|
|
@ -1561,6 +1568,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
RemarkHorizontal = r.RemarkHorizontal,
|
||||
RemarkVertical = r.RemarkVertical,
|
||||
OccupationPosition = p.OccupationPosition == null ? "" : p.OccupationPosition, //ตำแหน่งเก่าก่อนสอบ
|
||||
PositionCandidate = p.PositionCandidate == null ? "" : p.PositionCandidate.Name //ตำแหน่งที่สอบแข่งขัน
|
||||
}).ToList();
|
||||
return Success(report_data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
//private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.Claims?.Any(claim => new[] { "placement", "placement1", "placement2" }.Contains(claim.Value));
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
//private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.Claims?.Any(claim => new[] { "placement", "placement1", "placement2" }.Contains(claim.Value));
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
|
||||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
//private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.Claims?.Any(claim => new[] { "placement", "placement1", "placement2" }.Contains(claim.Value));
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
//private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.Claims?.Any(claim => new[] { "placement", "placement1", "placement2" }.Contains(claim.Value));
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
//private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.Claims?.Any(claim => new[] { "placement", "placement1", "placement2" }.Contains(claim.Value));
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue