Activities of "EngincanV"

Hi @mukremin, I've created an application with v5.1.4 and successfully generate CRUD pages so i could not reproduce your problem.

Can you check does your *.domain project has a reference to the Volo.Abp.Commercial.SuiteTemplates package?

If not, please add and rebuild your project. You can follow the below steps:

  • Add the following line to your *.Domain.csproj,
<ItemGroup>
    <PackageReference Include="Volo.Abp.Commercial.SuiteTemplates" Version="5.1.4" />
</ItemGroup>
  • Then add the following line to your *DomainModule class:
using Volo.Abp.Commercial.SuiteTemplates;

[DependsOn(
    //... other modules ...
    typeof(VoloAbpCommercialSuiteTemplatesModule), //add this line
    )]
public class MyAppDomainModule : AbpModule
{
}

Rebuild your application and try to generate CRUD pages, it should work.

Hi @improwise, I've just created an angular application and followed the steps that you've provided, but I didn't get any error and I could successfully create a migration even without specifying -Context parameter on Package Manager Console.

And also I could successfully run the Angular side by following the documentation.

Did you upgrade your application to v5.1.4 and what is your ng version?

Thanks for the information, I'll test and write you back asap.

Answer

Can you try to upgrade the source-map package? You can add a resolutions section to your package.json file as below:

"resolutions": {
    "source-map": "0.7.3"
}

and then run the abp install-libs command again.

Hi @mukremin, what is the ABP version of your application?

I've shared the solution with you via mail and it should fix your problem. So, I close the question, if you encounter a problem please feel free to re-open the question.

Best regards.

So you mean you are not using the dynamic form tag anymore ?

Yes, if the model has ExtraProperties property then dynamic-form try to create inputs for this property and therefore it duplicates input tags.

The problem will be fixed in the next release, you can either wait for the next release and upgrade or try to override the CreateModal and UpdateModal as mentioned above comment.

Hi @learnabp, as you've mentioned problem was related with dynamic-form creating 3 form-group for ExtraProperties. To be able to solve this problem, we've changed it as a form tag.

You can override the CreateModal and UpdateModal razor pages for Plan as below to fix this problem:

  • CreateModal.cs(Pages/Payment/Plans/CreateModal.cshtml)
@page

@using Microsoft.Extensions.Localization
@using Volo.Abp.Data
@using Volo.Payment.Admin.Web.Pages.Payment.Plans
@using Volo.Payment.Admin.Web.Pages
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using Volo.Abp.Localization
@using Volo.Abp.ObjectExtending
@inherits PaymentAdminPageBase
@model CreateModalModel
@inject IStringLocalizerFactory StringLocalizerFactory

@{
    Layout = null;
}

<form asp-page="/Payment/Plans/CreateModal">
    <abp-modal>
        <abp-modal-header title="@L["NewPlan"].Value"></abp-modal-header>
        <abp-modal-body>
            <abp-input asp-for="ViewModel.Name" />

            @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<CreateModalModel.PlanCreateViewModel>())
            {
                if (!propertyInfo.Name.EndsWith("_Text"))
                {
                    if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty())
                    {
                        if (propertyInfo.Type.IsEnum)
                        {
                            Model.ViewModel.ExtraProperties.ToEnum(propertyInfo.Name, propertyInfo.Type);
                        }

                        <abp-select asp-for="ViewModel.ExtraProperties[propertyInfo.Name]"
                                    label="@propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
                                    autocomplete-api-url="@propertyInfo.Lookup.Url"
                                    autocomplete-selected-item-name="@Model.ViewModel.GetProperty(propertyInfo.Name + "_Text")"
                                    autocomplete-selected-item-value="@Model.ViewModel.GetProperty(propertyInfo.Name)"
                                    autocomplete-filter-param-name="@propertyInfo.Lookup.FilterParamName"
                                    autocomplete-items-property-name="@propertyInfo.Lookup.ResultListPropertyName"
                                    autocomplete-display-property-name="@propertyInfo.Lookup.DisplayPropertyName"
                                    autocomplete-value-property-name="@propertyInfo.Lookup.ValuePropertyName">
                        </abp-select>
                    }
                    else
                    {
                        <abp-input type="@propertyInfo.GetInputType()"
                                   asp-for="ViewModel.ExtraProperties[propertyInfo.Name]"
                                   label="@propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
                                   asp-format="@propertyInfo.GetInputFormatOrNull()"
                                   value="@propertyInfo.GetInputValueOrNull(Model.ViewModel.GetProperty(propertyInfo.Name))"/>
                    }
                }
            }
        </abp-modal-body>
        <abp-modal-footer buttons="@(AbpModalButtons.Cancel | AbpModalButtons.Save)"></abp-modal-footer>
    </abp-modal>
</form>
  • UpdateModal.cshtml (Pages/Payment/Plans/UpdateModal.cshtml)
@page

@using Microsoft.Extensions.Localization
@using Volo.Abp.Data
@using Volo.Payment.Admin.Web.Pages.Payment.Plans
@using Volo.Payment.Admin.Web.Pages
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using Volo.Abp.Localization
@using Volo.Abp.ObjectExtending
@inherits PaymentAdminPageBase
@model UpdateModalModel
@inject IStringLocalizerFactory StringLocalizerFactory

@{
    Layout = null;
}

<form asp-page="/Payment/Plans/UpdateModal">
    <abp-modal>
        <abp-modal-header title="@L["Edit"].Value"></abp-modal-header>
        <abp-modal-body>
            <abp-input asp-for="Id"/>
            <abp-input asp-for="ViewModel.Name" />
            <abp-input asp-for="ViewModel.ConcurrencyStamp" />

            @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<UpdateModalModel.PlanUpdateViewModel>())
            {
                if (!propertyInfo.Name.EndsWith("_Text"))
                {
                    if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty())
                    {
                        if (propertyInfo.Type.IsEnum)
                        {
                            Model.ViewModel.ExtraProperties.ToEnum(propertyInfo.Name, propertyInfo.Type);
                        }

                        <abp-select asp-for="ViewModel.ExtraProperties[propertyInfo.Name]"
                                    label="@propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
                                    autocomplete-api-url="@propertyInfo.Lookup.Url"
                                    autocomplete-selected-item-name="@Model.ViewModel.GetProperty(propertyInfo.Name + "_Text")"
                                    autocomplete-selected-item-value="@Model.ViewModel.GetProperty(propertyInfo.Name)"
                                    autocomplete-filter-param-name="@propertyInfo.Lookup.FilterParamName"
                                    autocomplete-items-property-name="@propertyInfo.Lookup.ResultListPropertyName"
                                    autocomplete-display-property-name="@propertyInfo.Lookup.DisplayPropertyName"
                                    autocomplete-value-property-name="@propertyInfo.Lookup.ValuePropertyName">
                        </abp-select>
                    }
                    else
                    {
                        <abp-input type="@propertyInfo.GetInputType()"
                                   asp-for="ViewModel.ExtraProperties[propertyInfo.Name]"
                                   label="@propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
                                   asp-format="@propertyInfo.GetInputFormatOrNull()"
                                   value="@propertyInfo.GetInputValueOrNull(Model.ViewModel.GetProperty(propertyInfo.Name))"/>
                    }
                }
            }
        </abp-modal-body>
        <abp-modal-footer buttons="@(AbpModalButtons.Cancel | AbpModalButtons.Save)"></abp-modal-footer>
    </abp-modal>
</form>

Thanks @oshabani, I'll examine it and inform you asap.

I've tested just before and there is a problem indeed. Thanks for reporting the problem, it'll be fixed in the next release. FYI @learnabp

Showing 541 to 550 of 730 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11