Open Closed

Question on adding a new profile group for additional entity properties #7725


User avatar
0
balessi75 created

ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme

Hi, We have extended identityuser to include several new properties to determine if certain application specific email notifications are turned on for the users 'my account' area.

We then successfully added a new 'Email Notifications' profile group under the 'my account' area (see last image below).

A new model NotificationsInfoModel is declared in our GroupViewComponent for notifications and this model is used in our default.cshtml page for notifications.

Our default.cshtml page is defined as follows...

@model FM.nVision.Blazor.Pages.Account.Components.ProfileManagementGroup.Notifications.AccountProfileNotificationsGroupViewComponent.NotificationsInfoModel

<form id="NotificationsForm">

    <div class="mb-3">

        <h4 class="pt-2 pb-3">@L["Time Off Requests"]</h4>

        <abp-row class="pb-4">
            <abp-column>
                <div>Submit Confirmation</div>
                <div class="text-subtle">Occurs every time you submit a time off request</div>
            </abp-column>
            <abp-column>
                <div class="form-switch ps-2">
                    <abp-input asp-for="NotifyTimeOffRequestSubmit" class="mb-4" />
                </div>
                    
            </abp-column>

        </abp-row>

	...

    </div>
    <abp-button type="submit" button-type="Primary" text="@L["Submit"].Value" />
</form>

Our question is how do we handle the server side action that is performed when the submit button is clicked? We looked at the abp implementation of 'Personal Info', 'Change Password', etc. but we can't determine what gets executed when the submit button gets clicked. What makes that determination? We are not that familiar with MVC as we are building a Blazor Server application.

We essentially want to call an new method to an overridden ProfileAppService that contains a new method to save email notification preferences.

Any guidance is greatly appreciated. Thank you.


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    you can use js to commit the changes.

    for example:

  • User Avatar
    0
    balessi75 created

    Thanks @liangshiwei

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09