hi how to hide <abp-tab> from screen i want to keep the code but make it hidden in screen type="hidden" => not work display:none; => not work
<partial name="@Model.CurrentStep.ViewPath"
model="@Model.CurrentStep.Model"
view-data="@Model.CurrentStep.ViewData" />
but it is not working and gives me error

i know there is AbpViewComponent and i already used it in another thing,
but here i want to use pages already done before to avoide recode again in viewComponent
hi i am trying to create partial view screen i almost done but i got some problem if abp framework can solve it by using injection,class inherit or something else i attached video to see behavior i want avoid that sidebar && toolbar are visible for almost 4 || 5 sec then disappear they are disappear till page has rendering i want to make them always display: none i used js code => not work created new methods for checking if screen display or not then do the style => not work so if you can help or abp gives simple solution please share it here is the behavior video https://streamable.com/4r550a
here is my code
@page
@model Horizon.HorizonERP.Web.Pages.WizardSrs.IndexModel
@using Horizon.CoreSetting.Permissions
@using Horizon.HorizonERP.Web.Menus
@using Horizon.MainAccounting.Localization
@using Horizon.MainAccounting.Permissions
@using Horizon.MainAccounting.Web.Menus
@using Microsoft.AspNetCore.Authorization
@using Microsoft.Extensions.Localization
@using System.Net
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@inject IStringLocalizer<MainAccountingResource> L
@inject IAuthorizationService Authorization
@inject IPageLayout PageLayout
@{
PageLayout.Content.Title = L["Wizard Steps"].Value;
PageLayout.Content.MenuItemName = HorizonERPMenus.MainWizard;
}
@section styles
{
<abp-style src="/Pages/WizardSrs/style.css" />
}
<form method="post" id="wizardForm">
<abp-container>
<div class="wizard-header d-flex justify-content-center align-items-center mb-4 flex-wrap" id="wizardHeader"></div>
<abp-card>
<div class="wizard-content" id="wizardContent">
<abp-card-body id="cardBody" class="wizard_body"></abp-card-body>
</div>
</abp-card>
<div class="d-flex justify-content-between mt-1">
<div class="wizard-navigation">
<button class="btn btn-secondary" id="prev-btn" type="button" disabled>Previous</button>
<button class="btn btn-primary" id="next-btn" type="button">Next</button>
</div>
</div>
</abp-container>
</form>
<script>
document.addEventListener("DOMContentLoaded", function () {
let currentStepIndex = 0;
let wizardSteps = [];
// Fetch steps from the server
async function getWizardSteps() {
try {
const response = await fetch("/api/CoreSetting/Wizard/getsteps");
if (!response.ok) throw new Error(`Failed to fetch steps: ${response.statusText}`);
const data = await response.json();
if (!Array.isArray(data)) throw new Error("Invalid steps format.");
wizardSteps = data;
renderWizardSteps();
loadWizardContent();
} catch (error) {
console.error("Error fetching wizard steps:", error);
}
}
function renderWizardSteps() {
const wizardHeader = document.getElementById("wizardHeader");
wizardHeader.innerHTML = "";
wizardSteps.forEach((step, index) => {
const stepElement = document.createElement("div");
stepElement.classList.add("wizard-step");
if (index === currentStepIndex) stepElement.classList.add("active");
stepElement.innerHTML = `
<div class="circle">${step.stepsSort}</div>
<a href="${step.url || "#"}" class="label">${step.program}</a>
${index < wizardSteps.length - 1 ? '<div class="wizard-line"></div>' : ""}
`;
wizardHeader.appendChild(stepElement);
const linkElement = stepElement.querySelector("a");
if (linkElement) {
linkElement.classList.remove("lpx-sidebar-container", "lpx-toolbar-container");
}
});
updateButtonStates();
}
function updateButtonStates() {
document.getElementById("prev-btn").disabled = currentStepIndex === 0;
document.getElementById("next-btn").disabled = currentStepIndex === wizardSteps.length - 1;
}
function loadWizardContent() {
const currentStep = wizardSteps[currentStepIndex];
const wizardContent = document.getElementById("wizardContent");
wizardContent.innerHTML = `
<iframe src="${currentStep.url || "#"}" style="width: 100%; height: 500px; border: none;"></iframe>
`;
const iframe = wizardContent.querySelector("iframe");
// Apply styles immediately while the iframe is loading
iframe.onload = () => applyStylesToIframe(iframe);
iframe.addEventListener("loadstart", () => {
try {
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
injectStyles(iframeDoc); // Apply styles as soon as possible
} catch (error) {
console.error("Could not inject styles immediately:", error);
}
});
}
function applyStylesToIframe(iframe) {
try {
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
injectStyles(iframeDoc); // Apply styles when iframe is fully loaded
} catch (error) {
console.error("Could not apply styles to iframe:", error);
}
}
function injectStyles(iframeDoc) {
// Add the styles dynamically
const style = iframeDoc.createElement("style");
style.textContent = `
.lpx-sidebar-container,
.lpx-toolbar-container
{
display: none !important;
}
{
display: none !important;
}
`;
iframeDoc.head.appendChild(style);
}
// Button Click Handlers
document.getElementById("prev-btn").addEventListener("click", () => {
if (currentStepIndex > 0) {
currentStepIndex--;
renderWizardSteps();
loadWizardContent();
}
});
document.getElementById("next-btn").addEventListener("click", () => {
if (currentStepIndex < wizardSteps.length - 1) {
currentStepIndex++;
renderWizardSteps();
loadWizardContent();
}
});
// Initialize Wizard
getWizardSteps();
});
</script>
hi i tried to create partial view in my project at first my project about multi modules each module has it's own logic, pages , services, permissions ...... etc i created new component called (Wizard) in Src project i want to make partial view within it to get a multiple pages on his own card and make me do an operation CRUD on it like it's pages i do js code and it get the correct page using it's url but call the all page with the side bars (which including menus and logout and icons) and i wanna just the main card(body) of it
hi i have multi modules project each module has his own permissions and seeder so i want when creating new tenant create two roles by default with specific permissions
i achieved creating roles but permissions no i get the code which give them all permissions
var multiTenancySide = CurrentTenant.GetMultiTenancySide();
var allPermissionNames = (await PermissionDefinitionManager.GetPermissionsAsync())
.Where(p => p.MultiTenancySide.HasFlag(multiTenancySide))
.Select(p => p.Name)
.ToArray();
i created new array and put my permissions within it ===> not work i get all permission then filter them ===> not work here is my code
using Horizon.CoreSetting;
using Horizon.EInvoice;
using Horizon.HRMS1;
using Horizon.Inventory;
using Horizon.MainAccounting;
using Horizon.POS;
using Microsoft.Extensions.Options;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using System;
using System.Linq;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Guids;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
using Microsoft.AspNetCore.Identity;
using System.Collections.Generic;
namespace Horizon.HorizonERP.ERP
{
public class ERPDataSeedContributor : IDataSeedContributor, ITransientDependency
{
protected IGuidGenerator GuidGenerator { get; }
protected IIdentityRoleRepository RoleRepository { get; }
protected IIdentityUserRepository UserRepository { get; }
protected ILookupNormalizer LookupNormalizer { get; }
protected IdentityUserManager UserManager { get; }
protected IdentityRoleManager RoleManager { get; }
protected ICurrentTenant CurrentTenant { get; }
protected IOptions<IdentityOptions> IdentityOptions { get; }
protected IPermissionDefinitionManager PermissionDefinitionManager { get; }
protected IPermissionDataSeeder PermissionDataSeeder { get; }
private readonly InventoryDataSeederContributor _inventoryDataSeederContributor;
private readonly POSDataSeederContributor _POsDataSeederContributor;
public ERPDataSeedContributor(
InventoryDataSeederContributor inventoryDataSeederContributor
IGuidGenerator guidGenerator,
IIdentityRoleRepository roleRepository,
IIdentityUserRepository userRepository,
ILookupNormalizer lookupNormalizer,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
ICurrentTenant currentTenant,
IOptions<IdentityOptions> identityOptions,
IPermissionDefinitionManager permissionDefinitionManager,
IPermissionDataSeeder permissionDataSeeder)
{
GuidGenerator = guidGenerator;
RoleRepository = roleRepository;
UserRepository = userRepository;
LookupNormalizer = lookupNormalizer;
UserManager = userManager;
RoleManager = roleManager;
CurrentTenant = currentTenant;
IdentityOptions = identityOptions;
PermissionDefinitionManager = permissionDefinitionManager;
PermissionDataSeeder = permissionDataSeeder;
_inventoryDataSeederContributor = inventoryDataSeederContributor;
_POsDataSeederContributor = pOsDataSeederContributor;
}
[UnitOfWork]
public async Task SeedAsync(DataSeedContext context)
{
await _inventoryDataSeederContributor.SeedAsync(context);
await _POsDataSeederContributor.SeedAsync(context);
var tenantId = context.TenantId;
using (CurrentTenant.Change(tenantId))
{
await IdentityOptions.SetAsync();
// "Accounting" and "Cashier" roles
const string accRoleName = "Accounting";
const string cashRoleName = "Cashier";
var accRoleNameRole = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName(accRoleName));
if (accRoleNameRole == null)
{
accRoleNameRole = new Volo.Abp.Identity.IdentityRole(GuidGenerator.Create(), accRoleName, tenantId)
{
IsPublic = true
};
(await RoleManager.CreateAsync(accRoleNameRole)).CheckErrors();
}
var cashRoleNameRole = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName(cashRoleName));
if (cashRoleNameRole == null)
{
cashRoleNameRole = new Volo.Abp.Identity.IdentityRole(GuidGenerator.Create(), cashRoleName, tenantId)
{
IsPublic = true
};
(await RoleManager.CreateAsync(cashRoleNameRole)).CheckErrors();
}
//var user = await UserRepository.FindAsync(tenantId.Value);//your user id
//(await UserManager.AddToRoleAsync(user, accRoleName)).CheckErrors();
//(await UserManager.AddToRoleAsync(user, cashRoleName)).CheckErrors();
var multiTenancySide = CurrentTenant.GetMultiTenancySide();
var allPermissionNames = (await PermissionDefinitionManager.GetPermissionsAsync())
.Where(p => p.MultiTenancySide.HasFlag(multiTenancySide))
.Select(p => p.Name)
.ToArray();
var accPermissions = new[]
{
"AccountIntegrations.Create",
"AccountIntegrations.Edit",
"AccountIntegrations.Delete",
};
await PermissionDataSeeder.SeedAsync(
RolePermissionValueProvider.ProviderName,
accRoleName,
accPermissions,
context?.TenantId
//allPermissionNames,
);
var cashPermissions = new[]
{
"BasketReturn.Create"
};
await PermissionDataSeeder.SeedAsync(
RolePermissionValueProvider.ProviderName,
cashRoleName,
cashPermissions,
context?.TenantId
//allPermissionNames,
);
}
}
}
}
hi sir
i have an entity (company) with it's logic and pages this entity within (core) module
now i want to transfer company createModal page to tenant page
to make user when he add new tenant add new company add year add product ..... etc
so i my work will be within tenant screen
i created cs class and cshtml
cs class without errors but cshtml
i got error
hi according to Q #3440 you said that you are working to allow Wizard Component in the future is there any updated or still abp not support Wizard Component ??
hi
i wish i can explain
i want to make logic that allows me open page or not according to Authorization
i attached some images to explain what i want
what i want is:
if i have 2 users (x ,y)
x has permission for specific pages so i must give him requiredPolicy within route.provider.ts file
and not open the page if he hasn't permission put in my case what happen is just router link appear or not according to permission and page still open even if (x) hasn't permission
both if has permission or not will open this page and i don't want this just open it if has permission