Skip to content

Commit d6f5bae

Browse files
committed
#14: implement tenant change on MVC project and update ABP
1 parent 053a86f commit d6f5bae

File tree

22 files changed

+43
-74
lines changed

22 files changed

+43
-74
lines changed

angular/src/AppPreBootstrap.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { AppConsts } from '@shared/AppConsts';
33
import { UrlHelper } from './shared/helpers/UrlHelper';
44
import * as _ from 'lodash';
5-
import { SubdomainTenancyNameFinder } from '@shared/helpers/SubdomainTenancyNameFinder';
65
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
76
import { Type, CompilerOptions, NgModuleRef } from '@angular/core';
87
import { UtilsService } from '@abp/utils/utils.service';
@@ -27,14 +26,8 @@ export class AppPreBootstrap {
2726
'Abp.TenantId': abp.multiTenancy.getTenantIdCookie()
2827
}
2928
}).done(result => {
30-
let subdomainTenancyNameFinder = new SubdomainTenancyNameFinder();
31-
var tenancyName = subdomainTenancyNameFinder.getCurrentTenancyNameOrNull(result.appBaseUrl);
32-
33-
AppConsts.appBaseUrlFormat = result.appBaseUrl;
34-
AppConsts.appBaseUrl = result.appBaseUrl.replace(AppConsts.tenancyNamePlaceHolderInUrl, tenancyName);
35-
36-
AppConsts.remoteServiceBaseUrlFormat = result.remoteServiceBaseUrl;
37-
AppConsts.remoteServiceBaseUrl = result.remoteServiceBaseUrl.replace(AppConsts.tenancyNamePlaceHolderInUrl, tenancyName);
29+
AppConsts.appBaseUrl = result.appBaseUrl;
30+
AppConsts.remoteServiceBaseUrl = result.remoteServiceBaseUrl;
3831

3932
callback();
4033
});

angular/src/account/account.component.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
.content.tenant-change-box {
66
padding: 16px 16px 0px 16px;
7-
text-align: center;
87
margin: 120px auto 0px auto;
98
max-width: 400px;
109

angular/src/shared/AppConsts.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
export class AppConsts {
22

33
static remoteServiceBaseUrl: string;
4-
static remoteServiceBaseUrlFormat: string;
54
static appBaseUrl: string;
6-
static appBaseUrlFormat: string;
75

86
static readonly userManagement = {
97
defaultAdminUserName: 'admin'

angular/src/shared/helpers/SubdomainTenancyNameFinder.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

aspnet-core/global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"projects": [ "src", "test" ],
33
"sdk": {
4-
"version": "1.0.0-preview2-003131"
4+
"version": "1.0.0-preview2-1-003177"
55
}
66
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/project.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"Nito.AsyncEx": "3.0.1",
1212
"AutoMapper": "5.2.0",
1313
"System.Collections.Immutable": "1.3.1",
14-
"Abp.AutoMapper": "1.4.1",
15-
"Abp.EntityFramework": "1.4.1",
16-
"Abp.Zero": "1.4.0"
14+
"Abp.AutoMapper": "1.5.0",
15+
"Abp.EntityFramework": "1.5.0",
16+
"Abp.Zero": "1.5.0"
1717
},
1818

1919
"frameworks": {

aspnet-core/src/AbpCompanyName.AbpProjectName.Core/Localization/SourceFiles/AbpProjectName-tr.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,10 @@
5454
<text name="No" value="Hayır" />
5555
<text name="Optional" value="Opsiyonel" />
5656
<text name="LeaveEmptyToSwitchToHost">Üst kullanıcıya geçiş için boş değer girin.</text>
57+
58+
<text name="CurrentTenant">Geçerli müşteri</text>
59+
<text name="NotSelected">Seçilmemiş</text>
60+
<text name="Change">Değiştir</text>
61+
<text name="ChangeTenant">Müşteri değiştir</text>
5762
</texts>
5863
</localizationDictionary>

aspnet-core/src/AbpCompanyName.AbpProjectName.Core/Localization/SourceFiles/AbpProjectName.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,10 @@
5454
<text name="No" value="No" />
5555
<text name="Optional" value="Optional" />
5656
<text name="LeaveEmptyToSwitchToHost">Leave empty to switch to the host</text>
57+
58+
<text name="CurrentTenant">Current tenant</text>
59+
<text name="NotSelected">Not selected</text>
60+
<text name="Change">Change</text>
61+
<text name="ChangeTenant">Change tenant</text>
5762
</texts>
5863
</localizationDictionary>

aspnet-core/src/AbpCompanyName.AbpProjectName.Core/project.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"version": "1.0.0.0-*",
33

44
"dependencies": {
5-
"Abp": "1.3.1",
6-
"Abp.AutoMapper": "1.3.1",
7-
"Abp.EntityFramework": "1.3.1",
8-
"Abp.Zero": "1.3.1",
5+
"Abp": "1.5.0",
6+
"Abp.AutoMapper": "1.5.0",
7+
"Abp.EntityFramework": "1.5.0",
8+
"Abp.Zero": "1.5.0",
99
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
1010
"Microsoft.Extensions.Configuration.Json": "1.1.0",
1111
"Microsoft.Extensions.Configuration.UserSecrets": "1.1.0"

aspnet-core/src/AbpCompanyName.AbpProjectName.EntityFramework/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"type": "build",
88
"version": "1.0.8"
99
},
10-
"Abp.EntityFramework": "1.4.1",
11-
"Abp.Zero.EntityFramework": "1.4.0"
10+
"Abp.EntityFramework": "1.5.0",
11+
"Abp.Zero.EntityFramework": "1.5.0"
1212
},
1313

1414
"tools": {

0 commit comments

Comments
 (0)