prasadnarwadkar_ASPNETCorePostgreSQL/ASPNETIdentityPostgres/Areas/ADT/Views/Patients/CamundaHREval.cshtml
@model ASPNETIdentityPostgres.Areas.ADT.Models.CamundaPMEvalTaskData

@{
    ViewData["Title"] = "HR Evaluation";

    var username = User.Identity.Name;

    var bpmRole = "";

    var mapping = ASPNETIdentityPostgres.Areas.ADT.Models.WebAppAndBPMUserMap.mappings.FirstOrDefault(m => m.UserNameOnWebApp.ToLower() == username.ToLower());

    if (mapping != null)
    {
        bpmRole = mapping.UserRoleOnjBPMEngineOrApp;
    }
}

<h3>HR Evaluation (Camunda Engine)</h3>

<div>
    @if (bpmRole == "hr_admin")
    {

    <div class="row">
        <div class="col-md-4">
            <form asp-action="CamundaHREval">
                @Html.HiddenFor(model => model.taskInstanceID)
                @Html.HiddenFor(model => model.processData.initiator)

                <div asp-validation-summary="All" class="text-danger"></div>

                <div class="form-group">
                    <label asp-for="processData.employee" class="control-label">Employee</label>
                    <input asp-for="processData.employee" class="form-control" readonly />
                    <span asp-validation-for="processData.employee" class="text-danger"></span>
                </div>

                <div class="form-group">
                    <label asp-for="processData.self" class="control-label">Performance (self notes)</label>
                    <input asp-for="processData.self" class="form-control" readonly />
                    <span asp-validation-for="processData.self" class="text-danger"></span>
                </div>

                <div class="form-group">
                    <label asp-for="processData.pm" class="control-label">PM comments</label>
                    <input asp-for="processData.pm" class="form-control" readonly/>
                    <span asp-validation-for="processData.pm" class="text-danger"></span>
                </div>

                <div class="form-group">
                    <label asp-for="processData.hr" class="control-label">HR comments</label>
                    <input asp-for="processData.hr" class="form-control" />
                    <span asp-validation-for="processData.hr" class="text-danger"></span>
                </div>

                <div class="form-group">
                    <input type="submit" value="Submit" class="btn btn-primary" />
                </div>

                <div class="form-group">
                    <a asp-action="CamundaMyEmpEvals" class="btn btn-danger" title="I do not have Camunda Engine/Platform running on my machine.">Cancel</a>
                </div>
            </form>
        </div>
    </div>
    }
</div>

