Open Closed

Add a JavaScript File for a User Page (extending the user actions like delete, edit) #106


User avatar
0
rajasekhard2015 created

Hi,

I want add one more option for seeting the each user loggedin info..
please suggest me the process how to add one modal (Actions like edit, claims and delete user) want add one more action.


8 Answer(s)
  • User Avatar
    1
    liangshiwei created
    Support Team Fullstack Developer

    Hi See https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface#example-add-a-javascript-file-for-a-specific-page for add a .js file to page.

  • User Avatar
    0
    rajasekhard2015 created

    Hi I have added the functionality like,

    $(function() { abp.log.info('My custom user script file has been loaded!');

    //TODO how to get user instance to add another action
    

    });

    JavaScript Then add this file to the bundle of the role management page:

    Configure<AbpBundlingOptions>(options => { options.ScriptBundles .Configure( typeof(Volo.Abp.Identity.Web.Pages.Identity.Users.IndexModel).FullName, bundleConfig => { bundleConfig.AddFiles("/Pages/Identity/Users/myuser.js"); }); });

    In Js file how can i get the user page instance please give me that steps

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I think you can directly overwrite index.js Copy the index.js source file and update it.

       rowAction: {
                            items:
                                [
                                      Add your actions
                                ]
                        }
    

    You can use js to dynamically add a action modal dom, or you can choose to overwrite the page.

  • User Avatar
    0
    rajasekhard2015 created

    index.js file where can i get that.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    You can find it in the browser's Developer Tools "Sources" window

  • User Avatar
    0
    rajasekhard2015 created

    Thank you liangshiwei its working.

  • User Avatar
    0
    rajasekhard2015 created

    Its not working in release mode. its showing the error like $ not found and abp notfound And also css also not coming.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi I cannot reproduce your problem, can you use the CLI to create a simple project to reproduce the problem.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11