Activités de "Leonardo.Willrich"

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

Hi, I am implemeting my first CRUD using AbpCrudPageBase class. I have two questions about that:

  1. Is it allways required having two MODAL markup and repeat the fields? If the Create and Edit modal are exactly the same, do I need to repeat that?

  2. In events onChange, I have two variables, NewEntity and EditingEntity. How I know if I am editing or creating a new record? The only way that I've found to resolve that was creating two different events and then duplicating code or creating a third method and pass the EntityDto as parameter.

For example, to load an image in the event <FileEdit Changed="">, I did the code below. Is there a better way to do that?

protected async Task OnChangedLogoNew(FileChangedEventArgs e)
{
    await ChangedLogo(e, NewEntity);
}

protected async Task OnChangedLogoEditing(FileChangedEventArgs e)
{
    await ChangedLogo(e, EditingEntity);
}

protected async Task ChangedLogo(FileChangedEventArgs e, CreateUpdateSupplyNetworkDto currentDto)
{
    try
    {
        foreach (var file in e.Files)
        {
            // A stream is going to be the destination stream we're writing to.
            using (var stream = new MemoryStream())
            {
                await file.WriteToStreamAsync(stream);
                stream.Seek(0, SeekOrigin.Begin);
                currentDto.Logo = stream.ToArray();
            }
        }
    }
    catch (Exception exc)
    {
        Console.WriteLine(exc.Message);
    }
    finally
    {
        this.StateHasChanged();
    }
}
  • ABP Framework version: v4.2.2
  • UI type:Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi,

Im a modal form, I want to disable/enable the "Save" button based on the field validations. If there is no invalid field, then the button save should be enabled, otherwise, it should be disabled.

In my other native Blazor applicaiton, I am using the context from <EditForm>. But, using Blazorise it seems that there is no property like that available.

That is what I excepct to do: <button class="btn btn-primary" type="submit" disabled="@(!context.Validate())">Send</button> source: https://stackoverflow.com/questions/63770011/disable-enable-button-in-blazor-depending-on-what-is-in-the-form

What is the best way to do that using ABP.IO Blazor template with Blazorise?

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

Hi,

I have a modal with some fields SELECT. The first item is just a generic item to message the user to select an option. Those fields are required, I don't want leave the user save the modal with some not selected field. How can I do that? I've tried play with Validation component, but it doesn't work.

Here one of my SELECT code:

<Select TValue="int" @bind-SelectedValue="@NewEntity.NetworkTypeId">
    <SelectItem TValue="int" Value="0">@L["SupplyNetwork:SelectNetworkType"]</SelectItem>
    @foreach (var network in networkTypeList)
    {
        <SelectItem TValue="int" Value="@network.Id">
            @network.Name
        </SelectItem>
    }
</Select>
Question
  • ABP Framework version: v4.2.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi,

I wonder if there is an option for confirmation popups for Blazor template such as in ABP Framework?

For example: https://docs.abp.io/en/abp/latest/UI/Angular/Confirmation-Service https://aspnetboilerplate.com/Pages/Documents/Javascript-API/Message

To create a confirmation poup I create a Modal in my razor page. But, I don't want to do that always, it would be awesome if there was some to do that easily.

My code:

<Modal @ref="ActiveConfirmationModal">
    <ModalContent Centered="true">
        <ModalHeader>
            <ModalTitle>@L["SupplyNetwork:DesactiveTitle"]</ModalTitle>
            <CloseButton />
        </ModalHeader>
        <ModalBody>
            @L["SupplyNetwork:DesactiveMessage"]
        </ModalBody>
        <ModalFooter>
            <Button Color="Color.Primary" Clicked="@(() => ActiveConfirmationModal.Hide())">@L["Button:Yes"]</Button>
            <Button Color="Color.Secondary" Clicked="CancelActiveCheck">@L["Button:No"]</Button>
        </ModalFooter>
    </ModalContent>
</Modal>
  • ABP Framework version: v4.2.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi,

When I try to run DbMigrator.exe on deployed environment it says that the solution folder was not found. In the "...DbMigrationService.cs" I've found a method that gets the solution path. If not found, it raises an exception. See below:

private string GetDbMigrationsProjectFolderPath()
        {
            var slnDirectoryPath = GetSolutionDirectoryPath();

            if (slnDirectoryPath == null)
            {
                throw new Exception("Solution folder not found!");
            }

            var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src");

            return Directory.GetDirectories(srcDirectoryPath)
                .FirstOrDefault(d => d.EndsWith(".DbMigrations"));
        }

        private string GetSolutionDirectoryPath()
        {
            var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());

            while (Directory.GetParent(currentDirectory.FullName) != null)
            {
                currentDirectory = Directory.GetParent(currentDirectory.FullName);

                if (Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
                {
                    return currentDirectory.FullName;
                }
            }

            return null;
        }

Is that correct? Is DbMigrator suppose to be executed in deployment environement? I don't have my source code there, only the binary files generated by "Publish to Folder" option.

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

Hi, I have created a simple CRUD in the Blazor Commercial ABP.IO framework. I am trying to deploy to a IIS server and I am getting issue when clicking in Login link, it is returning Error 500. In the logs files, I could see:

2021-03-07 05:43:17.967 +00:00 [ERR] Invalid redirect_uri: https://avalancheocp.tvdinc.com/authentication/login-callback {"ClientId":"AvalancheOCP_Blazor","ClientName":"AvalancheOCP_Blazor","RedirectUri":null,"AllowedRedirectUris":["https://localhost:44307/authentication/login-callback"],"SubjectId":"anonymous","ResponseType":null,"ResponseMode":null,"GrantType":null,"RequestedScopes":"","State":null,"UiLocales":null,"Nonce":null,"AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":"","MaxAge":null,"LoginHint":null,"SessionId":null,"Raw":{"client_id":"AvalancheOCP_Blazor","redirect_uri":"https://avalancheocp.tvdinc.com/authentication/login-callback","response_type":"code","scope":"openid profile AvalancheOCP role email phone","state":"cf815de5d3414edc8f74d53c799f1a30","code_challenge":"krQ1k5KNh9_QFBaWHwRW-JR4wXFJMUTuzpgUYcSApHA","code_challenge_method":"S256","response_mode":"query"},"$type":"AuthorizeRequestValidationLog"}

I have already changed the appsettings.json as below, but, even restarting all IIS, it keeps showing https://localhost:44307. It seems to be hardcoded in some point.

appsettings.json:

"App": {
    "SelfUrl": "https://avalancheocp.host.tvdinc.com",
    "CorsOrigins": "https://*.tvdinc.com",
		"RedirectAllowedUrls": "https://avalancheocp.tvdinc.com"
  },

What would be wrong?

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

Hi,

I have two DBContext in my application and I want to know how to use DBMigrator to apply migration for both DBContext? To create (add-migration) and to update the database (update-database) I am using the argument -context <dbcontext>. But, how it will be possible using DBMigrator? I want to seed my database using DBMigrator.

Affichage de 41 à 47 sur 47 entrées
Made with ❤️ on ABP v8.2.0-preview Updated on mars 25, 2024, 15:11