Activities of "liangshiwei"

Hi,

Because the domain resolver has a higher priority than the cookie resolver.

Hi,

Seems it work for you. I will close the ticket, please open again if you still have problem.

I thinik this is no related to SweetAlert2

package.json

{
  "version": "1.0.0",
  "name": "my-app",
  "private": true,
  "dependencies": {
    ......
    "sweetalert2": "^11.0.18"
  }
}

abp.resourcemapping.js

module.exports = {
    aliases: {

    },
    mappings: {
        "@node_modules/sweetalert2/dist/sweetalert2.all.min.js": "@libs/sweetalert2/dist"
    }
};

Add global.js to wwwroot

var abp = abp || {};

abp.libs = abp.libs || {};
abp.libs.sweetAlert = {
    config: {
        'default': {

        },
        info: {
            icon: 'info'
        },
        success: {
            icon: 'success'
        },
        warn: {
            icon: 'warning'
        },
        error: {
            icon: 'error'
        },
        confirm: {
            icon: 'warning',
            title: 'Are you sure?',
            buttons: ['Cancel', 'Yes']
        }
    }
};

var showMessage = function (type, message, title) {
    if (!title) {
        title = message;
        message = undefined;
    }

    var opts = $.extend(
        {},
        abp.libs.sweetAlert.config['default'],
        abp.libs.sweetAlert.config[type],
        {
            title: title,
            html: message
        }
    );

    return $.Deferred(function ($dfd) {
        Swal.fire(opts).then(function () {
            $dfd.resolve();
        });
        // sweetAlert(opts).then(function () {
        //     $dfd.resolve();
        // });
    });
};

abp.message.info = function (message, title) {
    return showMessage('info', message, title);
};

abp.message.success = function (message, title) {
    return showMessage('success', message, title);
};

abp.message.warn = function (message, title) {
    return showMessage('warn', message, title);
};

abp.message.error = function (message, title) {
    return showMessage('error', message, title);
};

WebModule

private void ConfigureBundles()
{
    Configure<AbpBundlingOptions>(options =>
    {
        options.StyleBundles.Configure(
            BasicThemeBundles.Styles.Global,
            bundle =>
            {
                bundle.AddFiles("/global-styles.css");
            }
        );
        options.ScriptBundles.Configure(
            BasicThemeBundles.Scripts.Global,
            bundle =>
            {
                bundle.AddFiles("/libs/sweetalert2/dist/sweetalert2.all.min.js");
                bundle.AddFiles("/global.js");
            }
        );
    });
}

Hi,

Resource-based authorization in ASP.NET Core is standard way and is part of ASPNET Core Identity.

It abstracts the AuthorizationHandler and allows you to customize the handler class.

It’s actually easier to use the second way, they are both ok. you can choose the way you like

See https://docs.abp.io/en/commercial/latest/startup-templates/microservice/gateways

Hi,

ABP using the SweetAlert library by default. but seems SweetAlert does not support html content.

You can use sweetAlert2 to replace it.

Hi,

Can you provide a project to reproduce? shiwei.liang@volosoft.com thanks.

Hi,

We also provide FullAuditedAggregateRootWithUser base class. you can use it. see https://docs.abp.io/en/abp/latest/Entities#auditing-base-classes

Hi,

May be you need add the [UnitOfWork] to the SeedAsync method

[UnitOfWork]
public virtual async Task SeedAsync()
{
    ......
    contact = await _contactRepository.InsertAsync(contact, true);
    customer = await _customerRepository.GetAsync(customerId);
    customer.AddContact(contact);

    _logger.LogInformation($"\t Adding contact to customer {customer.Name}");

    customer = await _customerRepository.UpdateAsync(customer, true);
}
Showing 5501 to 5510 of 6446 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 15, 2025, 12:18