Base solution for your next web application

Activities of "AstarIT"

Hello all, the information has been send to the ASP.NET Zero team. at [email protected]

Thank you to the ASP.NET Zero team.

Please let me know if you need something else from my end.

Yes, I will send you the informaiton and steps to get go to the issues. Thank you for all your help

Ok thank you I will try your approach

It happen also with DropPicture Zone same issues.

I think I did that, however it happends in all the application. I will send more samples its getting hard to work users start to complaining about his bug.

I also find out in the link before that in the UserManager can be done this public override Task<IdentityResult> CreateAsync(User user)

{
user.Name = user.Name ?? String.Empty; user.Surname = user.Surname ?? String.Empty; return base.CreateAsync(user); }

I used this but still have no results.

https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1274

Yes, it is a request for the server. When I click EDIT on the INDEX.CHTML, it goes to the server and all the information is rendeder OK. But the problem rises when I decided not to Save that model page and press the button CANCEL. Then I press EDIT again and my SELECT2 controls appar blanks as I show above. Steps

  1. I press EDIT and everyting seems to be Fine
  2. Cancel the EDIT
  3. Edit Again and the controls are gone.

It is what you need the Index.chtml page and index.js page?

This is th js of the index page

(function () {
    debugger;
    $(function () {
        debugger;
        var _$tenantExtendedsTable = $('#TenantExtendedsTable');
        var _tenantExtendedsService = abp.services.app.tenantExtendeds;
		
        $('.date-picker').datetimepicker({
            locale: abp.localization.currentLanguage.name,
            format: 'L'
        });

        var _permissions = {
            create: abp.auth.hasPermission('Pages.Administration.TenantExtendeds.Create'),
            edit: abp.auth.hasPermission('Pages.Administration.TenantExtendeds.Edit'),
            'delete': abp.auth.hasPermission('Pages.Administration.TenantExtendeds.Delete')
        };

        var _createOrEditModal = new app.ModalManager({
            viewUrl: abp.appPath + 'App/TenantExtendeds/CreateOrEditModal',
            scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/TenantExtendeds/_CreateOrEditModal.js',
            modalClass: 'CreateOrEditTenantExtendedModal'
        });

		 var _viewTenantExtendedModal = new app.ModalManager({
            viewUrl: abp.appPath + 'App/TenantExtendeds/ViewtenantExtendedModal',
            modalClass: 'ViewTenantExtendedModal'
        });

		
		

        var getDateFilter = function (element) {
            if (element.data("DateTimePicker").date() == null) {
                return null;
            }
            return element.data("DateTimePicker").date().format("YYYY-MM-DDT00:00:00Z"); 
        }

        var dataTable = _$tenantExtendedsTable.DataTable({
            paging: false,
            serverSide: true,
            processing: true,
            listAction: {
                ajaxFunction: _tenantExtendedsService.getAll,
                inputFilter: function () {
                    return {
					filter: $('#TenantExtendedsTableFilter').val(),
					countryNameFilter: $('#CountryNameFilterId').val(),
					logoFilter: $('#LogoFilterId').val(),
					cityFilter: $('#CityFilterId').val(),
					zipCodeFilter: $('#ZipCodeFilterId').val(),
					businessTypeFilter: $('#BusinessTypeFilterId').val(),
					industryTypeFilter: $('#IndustryTypeFilterId').val(),
					nAICSNamesFilter: $('#NAICSNamesFilterId').val(),
					dUNSNumberFilter: $('#DUNSNumberFilterId').val(),
					minStateIdFilter: $('#MinStateIdFilterId').val(),
					maxStateIdFilter: $('#MaxStateIdFilterId').val(),
                    };
                }
            },
            columnDefs: [
                {
                    width: 120,
                    targets: 0,
                    data: null,
                    orderable: false,
                    autoWidth: false,
                    defaultContent: '',
                    rowAction: {
                        cssClass: 'btn btn-brand dropdown-toggle',
                        text: '<i class="fa fa-cog"></i> ' + app.localize('Actions') + ' <span class="caret"></span>',
                        items: [
						{
                            text: app.localize('Edit'),
                            visible: function () {
                                return _permissions.edit;
                            },
                            action: function (data) {
                                _createOrEditModal.open({ id: data.record.tenantExtended.id });
                            }
                        }, 
						{
                            //text: app.localize('Delete'),
                            //visible: function () {
                            //    return _permissions.delete;
                            //},
                            //action: function (data) {
                            //    deleteTenantExtended(data.record.tenantExtended);
                            //}
                        }
                        ]
                    }
                },
					{
                        targets: 1,
                        data: "countryName",
                        name: "countryFk.name" 
						 
					},
					{
                        targets: 2,
                        data: "tenantExtended.logo",
                        name: "logo"   
						
					},
					{
                        targets: 3,
                        data: "tenantExtended.city",
                        name: "city"   
						
					},
					{
                        targets: 4,
                        data: "tenantExtended.zipCode",
                        name: "zipCode"   

						  
					},
					{
                        targets: 5,
                        data: "tenantExtended.businessType",
                        name: "businessType"  
					},
					{
                        targets: 6,
                        data: "tenantExtended.industryType",
                        name: "industryType"   

					},
					{
                        targets: 7,
                        data: "tenantExtended.naicsNames",
                        name: "naicsNames"   

					},
					{
						targets: 8,
                        data: "tenantExtended.dunsNumber",
                        name: "dunsNumber"   
					},
					{
						targets: 9,
                        data: "tenantExtended.stateId",
                        name: "stateId", 
                        visible: false
					}
            ]
        });

        function getTenantExtendeds() {
            dataTable.ajax.reload();
        }

        function deleteTenantExtended(tenantExtended) {
            abp.message.confirm(
                '',
                app.localize('AreYouSure'),
                function (isConfirmed) {
                    if (isConfirmed) {
                        _tenantExtendedsService.delete({
                            id: tenantExtended.id
                        }).done(function () {
                            getTenantExtendeds(true);
                            abp.notify.success(app.localize('SuccessfullyDeleted'));
                        });
                    }
                }
            );
        }

		$('#ShowAdvancedFiltersSpan').click(function () {
            $('#ShowAdvancedFiltersSpan').hide();
            $('#HideAdvancedFiltersSpan').show();
            $('#AdvacedAuditFiltersArea').slideDown();
        });

        $('#HideAdvancedFiltersSpan').click(function () {
            $('#HideAdvancedFiltersSpan').hide();
            $('#ShowAdvancedFiltersSpan').show();
            $('#AdvacedAuditFiltersArea').slideUp();
        });

        $('#CreateNewTenantExtendedButton').click(function () {
            _createOrEditModal.open();
        });

		

        abp.event.on('app.createOrEditTenantExtendedModalSaved', function () {
            getTenantExtendeds();
        });

		$('#GetTenantExtendedsButton').click(function (e) {
            e.preventDefault();
            getTenantExtendeds();
        });

		$(document).keypress(function(e) {
		  if(e.which === 13) {
			getTenantExtendeds();
		  }
		});
    });
})();

AspNet Zero Power Tools ? YES

THis is the Index Page

@using OneServDemo.Authorization
@using OneServDemo.Web.Areas.App.Models.TenantExtendeds
@using OneServDemo.Web.Areas.App.Startup
@model TenantExtendedsViewModel
@{
    ViewBag.CurrentPageName = AppPageNames.Common.TenantExtendeds;
}

@*added by Cesar*@

@section Styles
{

    <link rel="stylesheet" abp-href="/view-resources/Areas/App/Views/_Bundles/tenantextended.css" asp-append-version="true" />
    <link href="~/view-resources/Areas/App/Views/TenantExtendeds/CreateOrEditModal.css" rel="stylesheet" />
    <link href="~/assets/dropzone/dropzone.min.css" rel="stylesheet" />
}

@*@section Scripts
    {
        <script abp-src="/view-resources/Areas/App/Views/TenantExtendeds/Index.js" asp-append-version="true"></script>
        <script src="~/assets/dropzone/dropzone.min.js"></script>
    }*@

@*end added by Cesar*@


<div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor">
    <div class="kt-subheader kt-grid__item">
        <div class="@(await GetContainerClass())">
            <div class="kt-subheader__main">
                <h3 class="kt-subheader__title">
                    <span>@L("TenantExtendeds")</span>
                </h3>
                <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                <span class="kt-subheader__desc">
                    @L("TenantExtendedsHeaderInfo")
                </span>
            </div>
            <div class="kt-subheader__toolbar">
                <div class="kt-subheader__wrapper">
                    @if (IsGranted(AppPermissions.Pages_Administration_TenantExtendeds_Create))
                    {
                        @if (ViewBag.TenantExist == "No")
                        {
                            <button id="CreateNewTenantExtendedButton" class="btn btn-primary blue"><i class="fa fa-plus"></i> @L("CreateNewTenantExtended")</button>
                        }
                    }
                </div>
            </div>
        </div>
    </div>
    <div class="@(await GetContainerClass()) kt-grid__item kt-grid__item--fluid">
        <div class="kt-portlet kt-portlet--mobile">
            <div class="kt-portlet__body">
                <div class="kt-form">
                    <div class="row align-items-center mb-4">
                        <div class="col-xl-12">
                            <div class="form-group align-items-center">
                                @*Filter Disable by Cesar*@
                                @*<div class="input-group">
                                        <input type="text" id="TenantExtendedsTableFilter" class="form-control m-input" placeholder="@L("SearchWithThreeDot")" value="@Model.FilterText">
                                        <span class="input-group-btn">
                                            <button id="GetTenantExtendedsButton" class="btn btn-primary" type="submit"><i class="flaticon-search-1"></i></button>
                                        </span>
                                    </div>*@
                            </div>
                        </div>
                    </div>
                </div>
                <div id="AdvacedAuditFiltersArea" style="display: none" class="row mb-4">
                    <div class="col-md-12">
                        <div class="kt-separator kt-separator--border-dashed"></div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="CountryNameFilterId">(@L("Country"))</label>
                            <input type="text" class="form-control" name="countryNameFilter" id="CountryNameFilterId">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="LogoFilterId">@L("State")</label>
                            <input type="text" class="form-control" name="logoFilter" id="LogoFilterId">
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="CityFilterId">@L("City")</label>
                            <input type="text" class="form-control" name="cityFilter" id="CityFilterId">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="ZipCodeFilterId">@L("ZipCode")</label>
                            <input type="text" class="form-control" name="zipCodeFilter" id="ZipCodeFilterId">
                        </div>
                    </div>

                    @*<div class="col-md-3">
                            <div class="form-group">
                                <label for="MinStateIdFilterId">@L("MinMax") @L("StateId")</label>
                                <div class="input-group">
                                    <input type="number" class="form-control m-input" placeholder="@L("MinValue")" name="minStateIdFilter" id="MinStateIdFilterId" />
                                    <input type="number" class="form-control m-input" placeholder="@L("MaxValue")" name="maxStateIdFilter" id="MaxStateIdFilterId" />
                                </div>
                            </div>
                        </div>*@

                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="BusinessTypeFilterId">@L("BusinessType")</label>
                            <input type="text" class="form-control" name="businessTypeFilter" id="BusinessTypeFilterId">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="IndustryTypeFilterId">@L("IndustryType")</label>
                            <input type="text" class="form-control" name="industryTypeFilter" id="IndustryTypeFilterId">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="NAICSNamesFilterId">@L("NAICSNames")</label>
                            <input type="text" class="form-control" name="naicsNamesFilter" id="NAICSNamesFilterId">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="DUNSNumberFilterId">@L("DUNSNumber")</label>
                            <input type="text" class="form-control" name="dunsNumberFilter" id="DUNSNumberFilterId">
                        </div>
                    </div>

                </div>
                @*Filters Disable by Cesar*@
                @*<div class="row mb-4">
                        <div class="col-xl-12">
                            <span id="ShowAdvancedFiltersSpan" class="text-muted clickable-item"><i class="fa fa-angle-down"></i> @L("ShowAdvancedFilters")</span>
                            <span id="HideAdvancedFiltersSpan" class="text-muted clickable-item" style="display: none"><i class="fa fa-angle-up"></i> @L("HideAdvancedFilters")</span>
                        </div>
                    </div>*@
                <div class="row align-items-center">
                    <table id="TenantExtendedsTable" class="display table table-striped table-bordered table-hover dt-responsive nowrap">
                        <thead>
                            <tr>
                                <th>@L("Actions")</th>
                                <th>@L("CountryName")</th>
                                <th>@L("State")</th>
                                <th>@L("City")</th>
                                <th>@L("ZipCode")</th>
                                <th>@L("BusinessType")</th>
                                <th>@L("IndustryType")</th>
                                <th>@L("NAICSNames")</th>
                                <th>@L("DUNSNumber")</th>
                                <th>@L("StateId")</th>
                            </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
@section Scripts {
    <environment names="Development">
        <script src="~/view-resources/Areas/App/Views/TenantExtendeds/_CreateOrEditModal.js"></script>
        <script abp-src="/view-resources/Areas/App/Views/TenantExtendeds/Index.js" asp-append-version="true"></script>
        <script src="~/assets/dropzone/dropzone.min.js"></script>
    </environment>

    <environment names="Staging,Production">
    </environment>
}
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
Showing 1 to 10 of 36 entries