Hi @lan.dang
Firstly you have to complete configuration with following documentation: https://docs.abp.io/en/commercial/latest/modules/payment#subscriptions
After that, you have 2 options;
if you install both Volo.Saas
& Volo.Payment
modules properly, you'll see Plan Management and a Plan Selection dropdown in Edition modal:
You can inject ISubscriptionAppSerivce
and create a subscription:
public class IndexModel : PageModel
{
public EditionDto Edition { get; set; }
protected ISubscriptionAppService SubscriptionAppService { get; }
protected ICurrentTenant CurrentTenant { get; }
public IndexModel(
ISubscriptionAppService subscriptionAppService,
ICurrentTenant currentTenant)
{
SubscriptionAppService = subscriptionAppService;
CurrentTenant = currentTenant;
}
public async Task<IActionResult> OnPostAsync(Guid editionId)
{
var paymentRequest = await SubscriptionAppService.CreateSubscriptionAsync(editionId, CurrentTenant.GetId());
return LocalRedirectPreserveMethod("/Payment/GatewaySelection?paymentRequestId=" + paymentRequest.Id);
}
}
Saas Service will track updates, endings or any changes at subscription and updates tenant edition.
Firstly you have to create your profile menu contributor like below:
public class CustomProfileMenuContributor : IProfileManagementPageContributor
{
public Task ConfigureAsync(ProfileManagementPageCreationContext context)
{
context.Groups.ForEach(Console.WriteLine);
context.Groups.Remove(context.Groups.First(x => x.Id == "Volo-Abp-Account-TwoFactor"));
return Task.CompletedTask;
}
}
Then go to WebModule class and add your contributor via configuring ProfileManagementPageOptions
Configure<ProfileManagementPageOptions>(p =>
{
p.Contributors.Add(new CustomProfileMenuContributor());
});
You'll see Two Factor is removed:
Can you try remove bin
& obj
folders before build
Can you share stacktrace?
CMS Kit has only MVC UI implementation currently. On the roadmap, there is no plan about Angular Implementation in current & next milestones.
We'll consider it in next milestones.
Hi cleverplatform,
Have you ever tried to return object instead of NoContent()
from modal page:
public async Task<IActionResult> OnPostAsync()
{
var created = await _bookAppService.CreateAsync(ObjectMapper.Map<CreateBookViewModel, CreateUpdateBookDto>(Book));
return new OkObjectResult(created);
}
And add parameters to your javascript function to handle that object.
createModal.onResult(function (result, response)
{
// response.responseText is your returned object.
alert(response.responseText.id);
dataTable.ajax.reload();
});
If your LookupRequestDto inherits from PagedAndSortedResultRequestDto you can use Sorting
property to apply an order.
private IReadOnlyList<LookupDto<Guid?>> Users { get; set; } = new List<LookupDto<Guid?>>();
UsersNullable = (await XXXXAppService.GetAppUserLookupAsync(new LookupRequestDto
{
Filter = newValue,
Sorting = "UserName"
})).Items;
And if you implement on your own the repository:
public async Task<PagedResultDto<LookupDto<Guid?>>> GetAppUserLookupAsync(PagedAndSortedResultRequestDto input)
{
var list = await UserRepository.GetPagedListAsync(input.SkipCount, input.MaxResultCount, input.Sorting);
return new PagedResultDto<LookupDto<Guid?>>(
await UserRepository.GetCountAsync(),
ObjectMapper.Map<List<AppUser>, List<LookupDto<Guid?>>(list)
);
}
Hi @vijay.nallala
Guid
cannot be converted to ObjectId
because they are two different things(different sizes, algoritms).
(https://stackoverflow.com/a/5514441/7200126)
So, you can't change existing Entity ids to ObjectId. You can manage only your entities and your new entities can has ObjectId as Id.
hi davidc
It was not possible to connect to the redis server(s). UnableToConnect on 127.0.0.1:6379
You need set up the Redis for the Public website.
By the way, It's hightly recommended using public website with redis but you can still disable redis in appsettings.json
"Redis": {
"IsEnabled": "false",
"Configuration": "127.0.0.1"
}
following document helps for configuration: https://docs.abp.io/en/abp/latest/Redis-Cache#configuration