Base solution for your next web application

Activities of "dntframework"

Question

Hi,

I´ve an issue when using jTable in a "bootstrap modal"... The fact is that the table is not loading the records...

I've implemented the jTable in the "products table" sucessfully, but when I tried to do it in the "options table" opened from products in a bootstrap modal the table doesn't load the records despite the "GetTable" method is called properly and the response has records

Any suggestion is welcome, thanks in advance!

Question

Hi,

I downloaded the repository and tried to follow the tutorial that is indicated here "https://github.com/aspnetzero/metronic" but an error occurs when executing the GULP command (Run gulp command at location metronic \ default \ tools) so I can not continue

Could you please help us

Thanks in advance

Answer

Thanks! fixed!

Question

Hi,

We have created a new project using the configuration "ASP.NET MVC 5.x & jQuery" and we are trying to change the visual style of it, for this we want to use some other theme as you do in the demonstration site and from there customize some aspects of it.

The problem is that in the downloaded project we do not have all the available themes and we did not find information or tools on how to use the themes indicated above.

If we follow the instructions for creating a custom theme as indicated here "https://github.com/aspnetzero/metronic" the generated design seems to correspond to a template of "Metronic 5.5" but the project we have downloaded uses "Metronic 4.7 .5 "(judging by the structure of directories and files).

How can we check which version of metronic is using and update it if required up to the latest version?

Thanks in advance!

Answer

Thanks!

Hi,

We are creating our project under the "ASP.NET CORE MVC & JQUERY" development model and after several revisions we find the following problem when trying to save a record in a table of the database following the tutorial provided by asp.net.zero (https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Developing-Step-By-Step-Core-Saving-Person)

Uncaught TypeError: Cannot read property 'createRecord' of undefined
at app.modals.CreateRecordModal.save (<anonymous>:24:24)
at _saveModal (common-scripts.min.js?v=vA1O4M4uaZQnqZ9HNaBPBzScMHs9G2pV771ZD1B3Pqo:1321)
at HTMLDivElement.<anonymous> (common-scripts.min.js?v=vA1O4M4uaZQnqZ9HNaBPBzScMHs9G2pV771ZD1B3Pqo:1362)
at HTMLDivElement.dispatch (app-layout-libs.min.js?v=kiKOH3Y_fJm5plIXFqEXEi1gXe_Aq_p_UmJ3EA2xe-k:5666)
at HTMLDivElement.elemData.handle (app-layout-libs.min.js?v=kiKOH3Y_fJm5plIXFqEXEi1gXe_Aq_p_UmJ3EA2xe-k:5474)

The error occurs in the file "_CreateRecordModal.js" since the object "_myService" has an "undefined" value

(function($) {
    app.modals.CreateRecordModal = function() {
        var _modalManager;
        var _myService = abp.services.app.productsBrands;
        var _$form = null;
        this.init = function(modalManager) {
            _modalManager = modalManager;
            _$form = _modalManager.getModal().find('form');
            _$form.validate();
        };
        this.save = function() {
            if (!_$form.valid()) {
                return;
            }
            var record = _$form.serializeFormToObject();
            _modalManager.setBusy(true);
            _myService.createRecord(record).done(function() {
                _modalManager.close();
                location.reload();
            }).always(function() {
                _modalManager.setBusy(false);
            });
        };
    };
})(jQuery);

Analyzing the content of the object "abp.services.app" we can see the following properties:

{
    timing: {…},
    tenantDashboard: {…},
    session: {…},
    organizationUnit: {…},
    notification: {…},
    …
}
account: { isTenantAvailable: ƒ, resolveTenantId: ƒ, register: ƒ, sendPasswordResetCode: ƒ, resetPassword: ƒ, …}
auditLog: { getAuditLogs: ƒ, getAuditLogsToExcel: ƒ, getEntityHistoryObjectTypes: ƒ, getEntityChanges: ƒ, getEntityTypeChanges: ƒ, …}
caching: { getAllCaches: ƒ, clearCache: ƒ, clearAllCaches: ƒ}
chat: { getUserChatFriendsWithSettings: ƒ, getUserChatMessages: ƒ, markAllUnreadMessagesOfUserAsRead: ƒ}
commonLookup: { getEditionsForCombobox: ƒ, findUsers: ƒ, getDefaultEditionName: ƒ}
demoUiComponents: { sendAndGetDate: ƒ, sendAndGetDateTime: ƒ, sendAndGetDateRange: ƒ, getCountries: ƒ, sendAndGetSelectedCountries: ƒ, …}
edition: { getEditions: ƒ, getEditionForEdit: ƒ, createEdition: ƒ, updateEdition: ƒ, deleteEdition: ƒ, …}
friendship: { createFriendshipRequest: ƒ, createFriendshipRequestByUserName: ƒ, blockUser: ƒ, unblockUser: ƒ, acceptFriendshipRequest: ƒ}
hostDashboard: { getDashboardStatisticsData: ƒ, getIncomeStatistics: ƒ, getEditionTenantStatistics: ƒ}
hostSettings: { getAllSettings: ƒ, updateAllSettings: ƒ, sendTestEmail: ƒ}
install: { setup: ƒ, getAppSettingsJson: ƒ, checkDatabase: ƒ}
invoice: { getInvoiceInfo: ƒ, createInvoice: ƒ}
language: { getLanguages: ƒ, getLanguageForEdit: ƒ, createOrUpdateLanguage: ƒ, deleteLanguage: ƒ, setDefaultLanguage: ƒ, …}
notification: { getUserNotifications: ƒ, setAllNotificationsAsRead: ƒ, setNotificationAsRead: ƒ, getNotificationSettings: ƒ, updateNotificationSettings: ƒ, …}
organizationUnit: { getOrganizationUnits: ƒ, getOrganizationUnitUsers: ƒ, getOrganizationUnitRoles: ƒ, createOrganizationUnit: ƒ, updateOrganizationUnit: ƒ, …}
payPalPayment: { confirmPayment: ƒ, getConfiguration: ƒ, cancelPayment: ƒ}
payment: { getPaymentInfo: ƒ, createPayment: ƒ, cancelPayment: ƒ, getPaymentHistory: ƒ, getActiveGateways: ƒ, …}
permission: { getAllPermissions: ƒ}
profile: { getCurrentUserProfileForEdit: ƒ, updateGoogleAuthenticatorKey: ƒ, sendVerificationSms: ƒ, verifySmsCode: ƒ, prepareCollectedData: ƒ, …}
role: { getRoles: ƒ, getRoleForEdit: ƒ, createOrUpdateRole: ƒ, deleteRole: ƒ}
session: { getCurrentLoginInformations: ƒ, updateUserSignInToken: ƒ}
stripePayment: { confirmPayment: ƒ, createSubscription: ƒ, updateSubscription: ƒ, getConfiguration: ƒ}
subscription: { upgradeTenantToEquivalentEdition: ƒ, disableRecurringPayments: ƒ, enableRecurringPayments: ƒ}
tenant: { getTenants: ƒ, createTenant: ƒ, getTenantForEdit: ƒ, updateTenant: ƒ, deleteTenant: ƒ, …}
tenantDashboard: { getMemberActivity: ƒ, getDashboardData: ƒ, getSalesSummary: ƒ, getRegionalStats: ƒ, getGeneralStats: ƒ}
tenantRegistration: { registerTenant: ƒ, getEditionsForSelect: ƒ, getEdition: ƒ}
tenantSettings: { getAllSettings: ƒ, updateAllSettings: ƒ, clearLogo: ƒ, clearCustomCss: ƒ, sendTestEmail: ƒ}
timing: { getTimezones: ƒ, getTimezoneComboboxItems: ƒ}
uiCustomizationSettings: { getUiManagementSettings: ƒ, changeThemeWithDefaultValues: ƒ, updateUiManagementSettings: ƒ, updateDefaultUiManagementSettings: ƒ, useSystemDefaultSettings: ƒ}
user: { getUsers: ƒ, getUsersToExcel: ƒ, getUserForEdit: ƒ, getUserPermissionsForEdit: ƒ, resetUserSpecificPermissions: ƒ, …}
userLink: { linkToUser: ƒ, getLinkedUsers: ƒ, getRecentlyUsedLinkedUsers: ƒ, unlinkUser: ƒ }
userLogin: { getRecentUserLoginAttempts: ƒ }
webLog: { getLatestWebLogs: ƒ, downloadWebLogs: ƒ }
proto: Object

Here we can see that the proxy is not being generated dynamically as indicated at the end of the tutorial ("Notice that; We used PersonAppService's createPerson method directly from javascript. This is possible by ABP's dynamic javascript proxy system.")

Could you help us with this?

Thanks

Yes, we have the corresponding interface and implementation. Up to here "https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Developing-Step-By-Step-Core-Using-GetPeople-Method-From-MVC-Controller" the project works correctly.

Then, in the "Creating a new person" stage, it works well until the "Opening the person modal" step, but the next step "Saving person" is where the error occurs and, as indicated in the previous ticket, we have detected that the problem is because the proxy "abp.services.app.person" has the value "undefined"

Thanks

Could you please confirm what part of code would you like to see (I've included in the first email part of the function).

Thanks

using Abp.Application.Services;
using Abp.Application.Services.Dto;
using System.Threading.Tasks;
using cscDemo.Dto.ProductsBrands;

namespace cscDemo
{
   public interface IProductsBrandsAppService : IApplicationService
   {
       ListResultDto<GetTableDto> GetTable(GetTableFilters input);
       //Task<GetRecordDto> GetRecord(IEntityDto input);
       //Task DeleteRecord(EntityDto input);
       Task CreateRecord(CreateRecordInput input);
   }
}

I've just copied the code, thanks!

Showing 1 to 10 of 13 entries