api service not getting called in syncfusion Schedule widget asp.net boiler plates

Viewed 198

I want to show some data in syncfusion Schedule widget between range of specific dates But I am unable to get any type of data in syncfusion Schedule widget. I want to call Api Using jQuery. My Api is not getting called even I have tried to show some hard coded data but I am getting nothing in syncfusion Schedule widget. here is my view code. `

@{
    ViewBag.CurrentPageName = AppPageNames.Common.DayReportView;
}

@section Scripts
{
    <environment names="Development">
        <script src="/view-resources/Areas/App/Views/POSConfigurations/DayReportView/Index.js" asp-append-version="true"></script>
    </environment>

    <environment names="Staging,Production">
        <script src="/view-resources/Areas/App/Views/POSConfigurations/DayReportView/Index.min.js" asp-append-version="true"></script>
    </environment>

}

<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
    <abp-page-subheader title="@L("DayReportView")">
    </abp-page-subheader>
    <ejs-schedule id="schedule" , height="700px">

    </ejs-schedule>



</div>`

here is my index.js file code

(function () {
    $(function () {
        var _GetShortOvertimeService = abp.services.app.DayReport;
      
        $(function () {
            var dataManager = ej.DataManager({
                // get the required appointments from Web API service
                url: "_GetShortOvertimeService.GetShortOverFromDayReport",
                // enable cross domain
                crossDomain: true
            });

            $("#schedule").ejSchedule({
                currentDate: new Date(2022, 6, 22),
                appointmentSettings: {
                    // Configure the dataSource with dataManager object
                    dataSource: dataManager

                }
            });
        });
        
});

Here is Api that i want to call

 public class DayReportAppService : myAppServiceBase, IDayReportAppService
    {
        private readonly IDayReportRepository _dayReportRepository;
 public DayReportAppService(IDayReportRepository dayReportRepository){
_dayReportRepository = dayReportRepository;
}
 public async Task<decimal> GetShortOverFromDayReport(Guid? posId, DateTime? startDate, DateTime? endDate)
        {
            var shorOver = await _dayReportRepository.GetShortOverFromDayReportSP(posId, startDate, endDate);
            return shorOver;
        }
}

here is my controller code

public class DayReportViewController : myappControllerBase
    {
        public IActionResult Index()
        {
            
            return View();
        }
    }
}

here is my frontend view

0 Answers
Related