Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "rickwheeler"

Okay great. Thanks for the quick reply!

Hi,

I haven't been able to figure out how to fix this yet. I tried to find a solution for you but couldn't so perhaps you can help.

The "active" state on the administration menu seems a little buggy. Here are the steps to replicate with a fresh install of ABP Zero.

I'm using the SPA/Angular version of Zero.

  • Log in as admin, the tenants screen is shown. Notice on the left there is a solid blue border showing.

  • Click "Administration", the admin menu drops down.

  • Click "Organization Units". Notice how the administration is now collapsed (It shouldn't be collapsed), there are no menu items highlighed and nothing with a solid blue border on the left.

  • Click "Administration" again

  • Click "Roles". Notice that Administration menu is now highlighed with a solid blue border on the left.

  • Click "Users". The menu continues to stay as highlighted.

  • Click "Tenants". Notice how there are now TWO menu items highlighted!

  • Click "Editions". The admin menu collapses and only one menu item is highlighed now.

  • An item under the admin menu needs to be clicked twice in order for it to be highlighted

  • The admin menu should not collapse after clicking the first item

  • The admin menu should not stay highlighted after click back to tenants/editions

The issue appears to have something to do with angular ui router and $state as well as the ui-sref-active directive. I'd say it has something to do with the nested nature of the menu but unfortunately I haven't been able to figure out what is causing this.

Can you please investigate this problem?

Hi,

Thanks for your help. I can confirm that both of these issues are resolved.

#2 was because the database was refreshed and I forgot to set my time-zone again.

Regards, Sean

You may also like to add a unique index to the table on Name + EditionId + TenantId

The seed method is creating duplicate records in AbpFeatures table. The issue is even worse if update-database has been run more than once

Issue:

Id	Name	Value	CreationTime	CreatorUserId	EditionId	TenantId	Discriminator
1	App.ChatFeature	True	2016-09-05 15:27:34.967	NULL	1	NULL	EditionFeatureSetting
2	App.ChatFeature	True	2016-09-05 15:27:34.967	NULL	1	NULL	EditionFeatureSetting
3	App.ChatFeature	True	2016-09-05 15:27:34.970	NULL	1	NULL	EditionFeatureSetting
4	App.ChatFeature	True	2016-09-05 15:27:34.970	NULL	1	NULL	EditionFeatureSetting
5	App.ChatFeature	True	2016-09-05 15:35:37.130	NULL	1	NULL	EditionFeatureSetting
6	App.ChatFeature	True	2016-09-05 15:35:37.130	NULL	1	NULL	EditionFeatureSetting
7	App.ChatFeature	True	2016-09-05 15:35:46.173	NULL	1	NULL	EditionFeatureSetting
8	App.ChatFeature	True	2016-09-05 15:35:46.173	NULL	1	NULL	EditionFeatureSetting

Fix: In ABPZero.EntityFramework/Migrations/Seed/Host/DefaultEditionCreator.cs

Replace

_context.EditionFeatureSettings.Add(new EditionFeatureSetting
     {
         Name = AppFeatures.ChatFeature,

With

_context.EditionFeatureSettings.Add(new EditionFeatureSetting
     {
         Name = featureName,

I noticed that in all the grids of the interface, the date format and time was displaying incorrectly.

Problem 1: Date format was incorrect Since I'm in australia, our date format is dd/MM/yyyy.

In all of the ABP Zero grids, the date was showing as MM/dd/yyyy which is wrong.

The grid options displayed as follows

{
    name: app.localize('AnImportantDate'),
    field: 'anImportantDate',
    cellFilter: 'momentFormat: \'L LT\'' // Moment.js Local string format. Formats to local locale settings
}

This should mean that the items in the grid would display in the locale set in moment js.

Problem 2: Time was incorrect. Since my time zone is UTC+10, I saved an item at 9am 05/05/2016 and it was displaying in the grid as 04/05/2016 (One day earlier). This is because the UTC time passed by AppService is not being converted to local time in the GUI.

To Fix: XYZ.Web/App/Common/Filters/momentjs-filters.js

// need load the moment.js to use these filters. 

(function () {

    appModule.filter('momentFormat', function () {
        return function (date, formatStr) {
            if (!date) {
                return '-';
            }
            
             moment.locale(window.navigator.userLanguage || window.navigator.language); // Fixes problem 1
             return moment(date).local().format(formatStr); // Fixes problem 2
        };
    })
    .filter('fromNow', function () {
        return function (date) {
            return moment(date).fromNow();
        };
    });

})();
Question

Hi,

What is required for an AbpSession to be populated on a controller?

I am creating a custom REST API that uses an API Key to authenticate users and I want my API controller to inherit from AbpApiController. So I need to know what to set in the pipeline in order for AbpSession to be populated on the ApiController. Does it use Thread.CurrentPrincipal?

Regards, Sean

Can you please provide an example of how to do this for organization unit?

Hi,

I've noticed that the database generated by ASP.NET Zero is severely lacking in any real referential integrity. There are no foreign keys on many of the tables which use a TenantId or a UserId.

Can you please explain why this is and if you have any plans to fix it? When a relational database has no relations it is a little concerning.

Thanks, Sean

In case anyone is in need of help on this, I solved my connection issue by changing my server name to "(localdb)\ProjectsV13":

<add name="Default" connectionString="Server=(localdb)\ProjectsV13; Database=FreightHub; Trusted_Connection=True;" providerName="System.Data.SqlClient" />

It's not ideal since VS2015 introduced non-versioned database connections, but helped me get started with the framework until I find the cause of the issue.

Showing 11 to 20 of 24 entries