Activities of "liangshiwei"

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);
}

Hi,

You can use creatorId and lastmodifierId to query users

like:

  var model = _modelRepository.GetAsync(id);
  
  var createUser = _userRepository.GetAsync(model.CreatorId);

Hi,

Try install olo.Abp.SettingManagement.Application to your application project. and:

[DependsOn(typeof(AbpSettingManagementApplicationModule))]
public class ...ApplicationModule : AbpModule

Hi,

We have fixed this problem, you can wait for the 4.4 stable version release. ps: ticket returned

Showing 5751 to 5760 of 6693 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.