"Navneet@aol.com.au" की गतिविधियाँ

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v7.0.3
  • UI type: Angular / MVC / Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hello support team and other ABP users,

I have tried my level best to first search below issues but could not find solutions, I am a new developer so if any question is silly then sorry

Could you please help me with below:

  1. After I create a new Module via ABP Suite with UI, the Suite create all necessary CRUD pages, model, DTO and repositories, however when I change anything manually, for example N-2-N relationship it creates only one side of UI and I manually create another side, the suite change the code back to default if I re-run the same entity generation. I believe I can get around by creating partial class, but as suite create a lot of classes in domain, efcore, application, applicationcontracts... I end up some errors with referring partial classes in repositories. IS it ok if you can provide a sample of book entity created via suite and using partial class. I believe that will be helpful for other community member looking for similar solution.

  2. When I create a new application via suite and add Volo.Docs and Volo.Payment via suite, they are not part of Feature under Editions settings, but both are available under Role --> Permissions, can you please help me, how can I add them to Edition --> Features (can you please suggest any code I can override related class instead of changing source code, as I don’t have access to source code dueto my license)

  3. Regarding ABP.Volo.Payment, why tenant has permission to create plan or update plan by default. I am just trying to understand what is the logic to allow tenant to change plans created by host. Is it to allow my tenants to set their own payment Payment Gateway so my tenant can issue their own invoice and received payment from their customers, like B2B2C

  4. As I don’t have access to all commercial sourcecode due to license level, how can I override to make changes to base class, please code sample of only three, rest of classes I will figureout Replace OpenIddictApplication.cs with myOpenIddictApplication.cs Replace OpenIddictDbContextModelCreatingExtensions.cs with myOpenIddictDbContextModelCreatingExtensions.cs last, I want to replace AbpOpenIddictProPermissionDefinitionProvider.cs with my myAbpOpenIddictProPermissionDefinitionProvider

  5. When I publish my project, I noticed that appsettings.secrets.json is also in published folder, is it safe to give it to my client while hand overing the finished Application

  6. When I create a MVC Application with public page & CMS (identity & HostApi not separate), the public page does not use API but use database directly, how can I make it use API instead of interacting with DB directly (please note, I don’t want to have separate Identity & HostApi)

  7. MVC public page, in responsive mode, I don’t see login button, it’s hidden, can you please help me, how can I fix it? Screenshot attached:

Is there anyplace like GitHub, can I read Commercial Module change log for example - CRMpro module changes from 7.0.1 to 7.0.3, this will help me to plan before migrating to next version.

Please let me know if anything not clear and I will try to give more details Regards, Navneet

3

Regarding ABP.Volo.Payment, why tenant has permission to create plan or update plan by default. I am just trying to understand what is the logic to allow tenant to change plans created by host. Is it to allow my tenants to set their own payment Payment Gateway so my tenant can issue their own invoice and received payment from their customers, like B2B2C

It seems there is a logical issue in there, we'll try to enhance this logic in the next version but you can use the following workaround in your application for now;

  • Create a PermissionDefinition provider in your project. (Applcation.Contracts prefferred)

    And set multitenantcy side as Host for each permission in the group.

    public class PaymentFixPermissionDefinitionProvider : PermissionDefinitionProvider 
    { 
        public override void Define(IPermissionDefinitionContext context) 
        { 
            var paymentAdminGroup = context.GetGroupOrNull(PaymentAdminPermissions.GroupName); 
            if (paymentAdminGroup != null) 
            { 
                foreach (var permissionDefinition in paymentAdminGroup.Permissions) 
                { 
                    ConvertToHostSide(permissionDefinition); 
                } 
            } 
        } 
    
        private void ConvertToHostSide(PermissionDefinition permissionDefinition) 
        { 
            permissionDefinition.MultiTenancySide = Abp.MultiTenancy.MultiTenancySides.Host; 
    
            foreach(var childPermissionDefinition in permissionDefinition.Children)  
            { 
                ConvertToHostSide(childPermissionDefinition); 
            } 
        } 
    } 
    

Hi Enisn,

So, does it mean that It's only for Host purpose not Tenant purpose?

Regards, Navneet

1

You can customize the code templates to add partial keyword. https://docs.abp.io/en/commercial/latest/abp-suite/editing-templates

2

Because there is no such feature definition, you can add feature definitions in your own FeatureDefinitionProvider: https://docs.abp.io/en/abp/latest/Features#featuredefinitionprovider And hide the menu&icon if the feature is not enabled.

4

Replace OpenIddictApplication.cs with myOpenIddictApplication.cs Replace OpenIddictDbContextModelCreatingExtensions.cs with myOpenIddictDbContextModelCreatingExtensions.cs

You can't replace the OpenIddictApplication entity with your own. you can consider using the object extensions system: https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities

last, I want to replace AbpOpenIddictProPermissionDefinitionProvider.cs with my myAbpOpenIddictProPermissionDefinitionProvider

Configure<AbpPermissionOptions>(options => 
{ 
    options.DefinitionProviders.Remove<AbpOpenIddictProPermissionDefinitionProvider>(); 
}); 

5

It's necessary, and it's safe.

6

You can create a separate project and copycat the public project to your solution.

7

public class MyToolbarContributor : IToolbarContributor 
{ 
    public virtual Task ConfigureToolbarAsync(IToolbarConfigurationContext context) 
    { 
        
        if (!context.ServiceProvider.GetRequiredService<ICurrentUser>().IsAuthenticated) 
        { 
            context.Toolbar.Items.Add(new ToolbarItem(typeof(LoginLinkViewComponent))); 
        } 
 
        return Task.CompletedTask; 
    } 
} 
 
Configure<AbpToolbarOptions>(options => 
{ 
    options.Contributors.Add(new MyToolbarContributor()); 
}); 

Thanks liangshiwei

For point 1: Your method will apply to project wide, I have only three entity which I want to change generated by suite, can you please give me some sample code for entity “Book” and “Author” using partial class and using N-N navigation, I will use that sample to replicate in my project for other class.

For point 2: Thanks, I manage to create feature with below code, how to wireup with module so that I can control from FeatureManagement, by hiding icon & menu it does not disable if someone try to navigate manually.

Also, how can I show/hide in Roles --> Permission based on Feature is True/False

    public class DocPaymentDefinitionProvider : FeatureDefinitionProvider
    {
        public override void Define(IFeatureDefinitionContext context)
        {
            var myDocs = context.AddGroup("Docs");
            myDocs.AddFeature("Docs.Allow", defaultValue: "false");

            var myPayment = context.AddGroup("Payment");
            myPayment.AddFeature("Payment.Allow", defaultValue: "false");

        }
    }

For point 4: I need OpenIddictApplication.cs & OpenIddictDbContextModelCreatingExtensions.cs to inherit from my custom Iinterface class. Can you please help?

For point 7: The code you have suggested is already there in my project. On desktop screen login button is visible, however when I use on mobile device, the login button is not visible.

The links you have sent me see changelog, does not have details of change, it has simple summary in 2 or 3 word, how can I understand what is changed?

Regards, Navneet

Currently, tenants can't configure their own payment gateway configurations by default, all the configurations are made in appsettings.json, so tenants can't use different payment accounts (different stripe, payu accaounts etc.), so there is no meaning adding new productId by tenants. So, converting that permission for host only is a better approach over this condition. We'll make some overhauls on this in the next version.

Thanks for your quick response, I was about to commit tenant level payment function to my client.

Does the payment module has any built in Subscription feature, where I can save subscription details in host DB and call payment api gateway to process payment each month, I know that as per documentation, only stripe support recurring and subscription payment, but I want to manage subscription on my application so that my application can use all payment gateway.

Also, I have noticed that Volo.Docs also should be host only as tenant has access to host documents

Regards, Navneet

I am in love with ABP

Hi liangshiwei,

I will send you a sample project with issue I am facing

Regards, Navneet

HI Liangshiwei,

I have sent you email with download link

Regards, Navneet

Thanks liangshiwei,

For point 1, it has created another issue, please see below screenshot:

For Point 2, It is already referred in the project, please see screenshot:

The swagger UI missing some resources, does 7.0.3 has bugs?, please see attached screenshots:

Am I doing something incorrect while creating projects via ABP Suite?

Regards, Navneet

Hi,

For point 1, it has created another issue, please see below screenshot:

Please update the Default.cshtml

@using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.SideMenu.MainMenu 
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.Common.MobileGeneralSettings 
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.SideMenu.MobileNavbar 
@using Volo.Abp.LeptonX.Shared.Localization 
@using Microsoft.Extensions.Localization 
@using Volo.Abp.Users 
 
@model MobileNavbarViewModel 
@inject ICurrentUser CurrentUser 
@inject IStringLocalizer<LeptonXResource> L 
 
<div class="lpx-mobile-navbar-container"> 
  <div class="lpx-mobile-navbar"> 
  	<ul class="lpx-mobile-nav-tabs"> 
 
  		@foreach (var viewModel in Model.SelectedMenuItems) 
  		{ 
  			var url = string.IsNullOrEmpty(viewModel.MenuItem.Url) ? "#" : Url.IsLocalUrl(viewModel.MenuItem.Url) ? Url.Content(viewModel.MenuItem.Url.EnsureStartsWith('~')) : viewModel.MenuItem.Url; 
 
  			<li class="lpx-mobile-nav-tab"> 
  				<a id="@viewModel.MenuItem.ElementId" href="@url" target="@viewModel.MenuItem.Target" class="lpx-mobile-nav-item @viewModel.MenuItem.CssClass"> 
  					<i class="menu-item-icon @viewModel.MenuItem.Icon" aria-hidden="true"></i> 
  					<span class="mobile-item-text"> @viewModel.MenuItem.DisplayName </span> 
  				</a> 
  			</li> 
  		} 
 
  		<li class="lpx-mobile-nav-tab menu-toggle"> 
  			<a href="javascript:void(0)" class="lpx-mobile-hamburger" data-lpx-mobile-menu-toggle="routes"> 
  				<span class="hamburger-icon" aria-hidden="true"> 
  					<span class="icon-part"></span> 
  					<span class="icon-part"></span> 
  					<span class="icon-part"></span> 
  					<span class="icon-part"></span> 
  					<span class="icon-part"></span> 
  					<span class="icon-part"></span> 
  				</span> 
  			</a> 
  		</li> 
 
  		<li class="lpx-mobile-nav-tab"> 
  			<a class="lpx-mobile-nav-item" data-lpx-mobile-menu-toggle="settings"> 
  				<i class="menu-item-icon bi bi-gear-wide-connected" aria-hidden="true"></i> 
  				<span class="mobile-item-text">Settings</span> 
  			</a> 
  		</li> 
  		<li class="lpx-mobile-nav-tab"> 
  			@if (CurrentUser.IsAuthenticated) 
  			{ 
  			  <a class="lpx-mobile-nav-item" data-lpx-mobile-menu-toggle="user"> 
  			  <div class="lpx-avatar"> 
  				   <img class="lpx-avatar-img" src="@Model.ProfileImageUrl" alt="admin avatar"> 
  				</div> 
 
  			    <span class="mobile-item-text">@CurrentUser.UserName</span> 
  			  </a> 
  			} 
  			else 
  			{ 
  			  <a href="~/account/login" class="lpx-mobile-nav-item"> 
  			    <i class="menu-item-icon bi bi-person-fill" aria-hidden="true"></i> 
  			    <span class="mobile-item-text">@L["Login"]</span> 
  			  </a> 
  			} 
  		</li> 
  	</ul> 
  </div> 
 
  <div class="lpx-mobile-menu hidden"> 
  	<div class="lpx-logo-container"> 
  		<a href="/"> 
  			<div class="lpx-brand-logo"></div> 
  		</a> 
  	</div> 
  	<ul class="lpx-nav-menu d-none" data-lpx-mobile-menu="routes"> 
  		@await Component.InvokeAsync(typeof(MainMenuViewComponent)) 
  	</ul> 
 
  	<ul class="lpx-nav-menu d-none" data-lpx-mobile-menu="settings"> 
  		@await Component.InvokeAsync(typeof(MobileGeneralSettingsViewComponent)) 
  	</ul> 
 
  	<ul class="lpx-nav-menu d-none" data-lpx-mobile-menu="user"> 
  		<div class="d-flex ps-3 pe-3"> 
  			<div class="lpx-avatar me-2"> 
  				<a class="lpx-mobile-nav-item"><img class="lpx-avatar-img" src="@Model.ProfileImageUrl" alt=""></a> 
  			</div> 
 
  			<div class="d-flex flex-column" style="line-height: normal"> 
  				<span class="fs-12">@L["Welcome"] <span class="color-active-text"> @CurrentUser.UserName </span> </span> 
  				<span class="color-active-text">@CurrentUser.Name @CurrentUser.SurName</span> 
  				<span class="fs-12">@CurrentUser.Email</span> 
  			</div> 
  		</div> 
 
  		@if (Model.UserMenu != null) 
  		{ 
  			foreach (var menuItem in Model.UserMenu.Items) 
  			{ 
  				var url = string.IsNullOrEmpty(menuItem.Url) ? "#" : Url.IsLocalUrl(menuItem.Url) ? Url.Content(menuItem.Url.EnsureStartsWith('~')) : menuItem.Url; 
 
  				<li class="outer-menu-item"> 
  					<a class="lpx-menu-item-link lpx-menu-item @menuItem.CssClass" href="@url" target="@menuItem.Target" id="@menuItem.ElementId"> 
  						<span class="lpx-menu-item-icon"><i class="lpx-icon bi @menuItem.Icon" aria-hidden="true"></i></span> 
 
  						<span class="lpx-menu-item-text hidden-in-hover-trigger">@menuItem.DisplayName</span> 
  					</a> 
  				</li> 
  			} 
  		} 
  	</ul> 
  </div> 
</div> 

For Point 2, It is already referred in the project, please see screenshot:

You also need to install admin.application , admin.application.contract, admin.httpapi etc... packages.

The swagger UI missing some resources, does 7.0.3 has bugs?, please see attached screenshots:

You can move the DocsWebModule to the WebPublic project.

Hi,

Your suggested html didn't fix the issue (Please note, I didn't find any difference in HTML you sent me earlier and Yesterday, both looks same), I am using LeptonX version 2.0.5 and ABP pro 7.0.3

Hi,

Sorry again,

The rich text editor convert my reply and make it wrong.

Please try this: https://gist.github.com/realLiangshiwei/7ffd48434a102097ca9168016a8a5359

We are getting close to fix, however there is still icon missing from list, please see below:


For Point 2, It is already referred in the project, please see screenshot:

You also need to install admin.application , admin.application.contract, admin.httpapi etc... packages.

after adding volo docs admin modules, I can now add documents and pull from GitHub, however I am getting below errors: . . . In UI header and value is mapped incorrectly, however in database everything looks correct: .

. . Maybe because of above, I am getting error while browsing: . . . Regards, Navneet

53 प्रविष्टियों में 1 से 10 दिखा रहा है
Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11