Login Tenant Arızası
This commit is contained in:
parent
d64a419396
commit
60bf112fd7
24 changed files with 26 additions and 1834 deletions
|
|
@ -22,27 +22,6 @@ public class GlobalSearchSeeder : IDataSeedContributor, ITransientDependency
|
||||||
#region GlobalSearch
|
#region GlobalSearch
|
||||||
|
|
||||||
await _globalSearchRepository.InsertManyAsync([
|
await _globalSearchRepository.InsertManyAsync([
|
||||||
new() {
|
|
||||||
System = "KIM",
|
|
||||||
Group = "Firma Listesi",
|
|
||||||
Term = "BRU TEXTILES",
|
|
||||||
Weight = "0.9",
|
|
||||||
Url = "/list/List-0009"
|
|
||||||
},
|
|
||||||
new() {
|
|
||||||
System = "KIM",
|
|
||||||
Group = "Sipariş Listesi",
|
|
||||||
Term = "BRUTEX_00002",
|
|
||||||
Weight = "0.5",
|
|
||||||
Url = "/list/List-0009"
|
|
||||||
},
|
|
||||||
new() {
|
|
||||||
System = "KIM",
|
|
||||||
Group = "Sipariş Listesi",
|
|
||||||
Term = "BRUTEX_00003",
|
|
||||||
Weight = "0.8",
|
|
||||||
Url = "/list/List-0009"
|
|
||||||
},
|
|
||||||
new() {
|
new() {
|
||||||
System = "Platform",
|
System = "Platform",
|
||||||
Group = "Setting Definitions",
|
Group = "Setting Definitions",
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -455,72 +455,6 @@ public class MenuSeeder : IDataSeedContributor, ITransientDependency
|
||||||
RequiredPermissionName = AppCodes.PublicApis
|
RequiredPermissionName = AppCodes.PublicApis
|
||||||
});
|
});
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region CRM
|
|
||||||
//CRM
|
|
||||||
var menuCRM = await _repository.InsertAsync(new Menu
|
|
||||||
{
|
|
||||||
Code = AppCodes.Crm.Default,
|
|
||||||
DisplayName = AppCodes.Crm.Default,
|
|
||||||
Order = 4,
|
|
||||||
IsDisabled = false,
|
|
||||||
ParentCode = null,
|
|
||||||
Icon = "FcContacts",
|
|
||||||
Target = null,
|
|
||||||
ElementId = null,
|
|
||||||
CssClass = null
|
|
||||||
});
|
|
||||||
|
|
||||||
//Orders
|
|
||||||
await _repository.InsertAsync(new Menu
|
|
||||||
{
|
|
||||||
Code = AppCodes.Crm.Orders,
|
|
||||||
DisplayName = AppCodes.Crm.Orders,
|
|
||||||
Order = 1,
|
|
||||||
IsDisabled = false,
|
|
||||||
ParentCode = menuCRM.Code,
|
|
||||||
Icon = "FcCustomerSupport",
|
|
||||||
Target = null,
|
|
||||||
ElementId = null,
|
|
||||||
CssClass = null,
|
|
||||||
Url = $"/list/{PlatformConsts.ListFormCodes.Order}",
|
|
||||||
RequiredPermissionName = AppCodes.Crm.Orders
|
|
||||||
});
|
|
||||||
|
|
||||||
//Complaints
|
|
||||||
await _repository.InsertAsync(new Menu
|
|
||||||
{
|
|
||||||
Code = AppCodes.Crm.Complaints,
|
|
||||||
DisplayName = AppCodes.Crm.Complaints,
|
|
||||||
Order = 2,
|
|
||||||
IsDisabled = false,
|
|
||||||
ParentCode = menuCRM.Code,
|
|
||||||
Icon = "FcCollaboration",
|
|
||||||
Target = null,
|
|
||||||
ElementId = null,
|
|
||||||
CssClass = null,
|
|
||||||
Url = $"/list/{PlatformConsts.ListFormCodes.Complaint}",
|
|
||||||
RequiredPermissionName = AppCodes.Crm.Complaints
|
|
||||||
});
|
|
||||||
|
|
||||||
//Shipments
|
|
||||||
await _repository.InsertAsync(new Menu
|
|
||||||
{
|
|
||||||
Code = AppCodes.Crm.Shipments,
|
|
||||||
DisplayName = AppCodes.Crm.Shipments,
|
|
||||||
Order = 3,
|
|
||||||
IsDisabled = false,
|
|
||||||
ParentCode = menuCRM.Code,
|
|
||||||
Icon = "FcShipped",
|
|
||||||
Target = null,
|
|
||||||
ElementId = null,
|
|
||||||
CssClass = null,
|
|
||||||
Url = $"/list/{PlatformConsts.ListFormCodes.Shipment}",
|
|
||||||
RequiredPermissionName = AppCodes.Crm.Shipments
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -685,75 +685,6 @@ public class PermissionSeeder : IDataSeedContributor, ITransientDependency
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Crm
|
|
||||||
await repositoryGroup.InsertAsync(new PermissionGroupDefinitionRecord
|
|
||||||
{
|
|
||||||
Name = AppCodes.Crm.Default,
|
|
||||||
DisplayName = AppCodes.Crm.Default
|
|
||||||
});
|
|
||||||
|
|
||||||
var permOrders = await repository.InsertAsync(
|
|
||||||
GetNewPermission(
|
|
||||||
AppCodes.Crm.Default,
|
|
||||||
AppCodes.Crm.Orders,
|
|
||||||
AppCodes.Crm.Orders
|
|
||||||
));
|
|
||||||
|
|
||||||
foreach (var item in CUDE)
|
|
||||||
{
|
|
||||||
permissionName = AppCodes.Crm.Orders + "." + item;
|
|
||||||
|
|
||||||
await repository.InsertAsync(
|
|
||||||
GetNewPermission(
|
|
||||||
AppCodes.Crm.Default,
|
|
||||||
permissionName,
|
|
||||||
item,
|
|
||||||
permOrders.Name
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
//Müşteri Şikayetleri
|
|
||||||
var permComplaints = await repository.InsertAsync(
|
|
||||||
GetNewPermission(
|
|
||||||
AppCodes.Crm.Default,
|
|
||||||
AppCodes.Crm.Complaints,
|
|
||||||
AppCodes.Crm.Complaints
|
|
||||||
));
|
|
||||||
|
|
||||||
foreach (var item in CUDE)
|
|
||||||
{
|
|
||||||
permissionName = AppCodes.Crm.Complaints + "." + item;
|
|
||||||
|
|
||||||
await repository.InsertAsync(
|
|
||||||
GetNewPermission(
|
|
||||||
AppCodes.Crm.Default,
|
|
||||||
permissionName,
|
|
||||||
item,
|
|
||||||
permComplaints.Name
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
var permShipments = await repository.InsertAsync(
|
|
||||||
GetNewPermission(
|
|
||||||
AppCodes.Crm.Default,
|
|
||||||
AppCodes.Crm.Shipments,
|
|
||||||
AppCodes.Crm.Shipments
|
|
||||||
));
|
|
||||||
|
|
||||||
foreach (var item in CUDE)
|
|
||||||
{
|
|
||||||
permissionName = AppCodes.Crm.Shipments + "." + item;
|
|
||||||
|
|
||||||
await repository.InsertAsync(
|
|
||||||
GetNewPermission(
|
|
||||||
AppCodes.Crm.Default,
|
|
||||||
permissionName,
|
|
||||||
item,
|
|
||||||
permShipments.Name
|
|
||||||
));
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PermissionDefinitionRecord GetNewPermission(
|
public static PermissionDefinitionRecord GetNewPermission(
|
||||||
|
|
|
||||||
|
|
@ -98,10 +98,6 @@ public class PlatformIdentityDataSeeder : IdentityDataSeeder
|
||||||
{
|
{
|
||||||
await permissionGrantRepository.InsertManyAsync(
|
await permissionGrantRepository.InsertManyAsync(
|
||||||
[
|
[
|
||||||
new(Guid.NewGuid(), AbpIdentity.Permissions.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
|
||||||
new(Guid.NewGuid(), AbpIdentity.Permissions.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
|
||||||
new(Guid.NewGuid(), AbpIdentity.Permissions.Update, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
|
||||||
new(Guid.NewGuid(), AbpIdentity.Permissions.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
|
||||||
new(Guid.NewGuid(), IdentityPermissions.Roles.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
new(Guid.NewGuid(), IdentityPermissions.Roles.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
||||||
new(Guid.NewGuid(), IdentityPermissions.Roles.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
new(Guid.NewGuid(), IdentityPermissions.Roles.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
||||||
new(Guid.NewGuid(), IdentityPermissions.Roles.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
new(Guid.NewGuid(), IdentityPermissions.Roles.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId),
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
"code": "Default",
|
"code": "Default",
|
||||||
"dataSourceType": 2,
|
"dataSourceType": 2,
|
||||||
"connectionString": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;"
|
"connectionString": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
"code": "Default",
|
"code": "Default",
|
||||||
"dataSourceType": 2,
|
"dataSourceType": 2,
|
||||||
"connectionString": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;"
|
"connectionString": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -906,30 +906,6 @@
|
||||||
"en": "Public Apis",
|
"en": "Public Apis",
|
||||||
"tr": "Genel Api'ler"
|
"tr": "Genel Api'ler"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "App.Crm",
|
|
||||||
"en": "CRM",
|
|
||||||
"tr": "MIY"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "App.Crm.Orders",
|
|
||||||
"en": "Orders",
|
|
||||||
"tr": "Sipariş Listesi"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "App.Crm.Complaints",
|
|
||||||
"en": "Complaints",
|
|
||||||
"tr": "Şikayet Listesi"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "App.Crm.Shipments",
|
|
||||||
"en": "Shipments",
|
|
||||||
"tr": "Yükleme Listesi"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "Abp.Identity.NotificationSettings",
|
"key": "Abp.Identity.NotificationSettings",
|
||||||
|
|
@ -4080,12 +4056,7 @@
|
||||||
{
|
{
|
||||||
"code": "Default",
|
"code": "Default",
|
||||||
"dataSourceType": 2,
|
"dataSourceType": 2,
|
||||||
"connectionString": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=Demo;"
|
"connectionString": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;"
|
||||||
},
|
|
||||||
{
|
|
||||||
"code": "KIM",
|
|
||||||
"dataSourceType": 1,
|
|
||||||
"connectionString": "Server=192.168.1.61;Database=KADIFETEKS;User Id=sa;password=Smgc3519;Trusted_Connection=False;TrustServerCertificate=True;"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Settings": [
|
"Settings": [
|
||||||
|
|
@ -4957,59 +4928,6 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Charts": [
|
"Charts": [
|
||||||
{
|
|
||||||
"chartCode": "Chart-0001",
|
|
||||||
"cultureName": "en",
|
|
||||||
"dataSourceCode": "KIM",
|
|
||||||
"userId": "",
|
|
||||||
"roleId": "",
|
|
||||||
"isTenant": true,
|
|
||||||
"IsOrganizationUnit": true,
|
|
||||||
"title": {
|
|
||||||
"text": "Top Selling",
|
|
||||||
"subtitle": ""
|
|
||||||
},
|
|
||||||
"dataSource": {
|
|
||||||
"query": "SELECT TOP 10 \"Kumaslar_Siparis_Yukleme_Sub\".\"DesenAdi\", SUM(\"Kumaslar_Siparis_Yukleme_Sub\".\"SipMiktar\") AS \"SipMiktar\", \"OrganizationUnitId\" FROM \"Kumaslar_Siparis_Yukleme\" WITH (NOLOCK) INNER JOIN \"Kumaslar_Siparis_Yukleme_Sub\" WITH (NOLOCK) ON \"Kumaslar_Siparis_Yukleme\".\"YuklemeID\" = \"Kumaslar_Siparis_Yukleme_Sub\".\"YuklemeID\" INNER JOIN \"Firmalar\" WITH (NOLOCK) ON \"Kumaslar_Siparis_Yukleme\".\"FirmaKodu\" = \"Firmalar\".\"FirmaKodu\" WHERE NOT \"OrganizationUnitId\" IS NULL AND CONVERT(DATE, \"Kumaslar_Siparis_Yukleme\".\"YuklemeTarihi\", 103) BETWEEN @startDate AND @endDate GROUP BY \"Kumaslar_Siparis_Yukleme_Sub\".\"DesenAdi\", \"OrganizationUnitId\" ORDER BY SUM(\"Kumaslar_Siparis_Yukleme_Sub\".\"SipMiktar\") DESC"
|
|
||||||
},
|
|
||||||
"series": [
|
|
||||||
{
|
|
||||||
"name": "Seri1",
|
|
||||||
"argumentField": "DesenAdi",
|
|
||||||
"valueField": "SipMiktar",
|
|
||||||
"type": "bar",
|
|
||||||
"label": {
|
|
||||||
"visible": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"crosshair": {
|
|
||||||
"enabled": true,
|
|
||||||
"color": "#949494",
|
|
||||||
"dashStyle": "dot",
|
|
||||||
"horizontalLine": {
|
|
||||||
"dashStyle": "solid"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"size": {
|
|
||||||
"width": 500,
|
|
||||||
"height": 250
|
|
||||||
},
|
|
||||||
"argumentAxis": {
|
|
||||||
"label": {
|
|
||||||
"displayMode": "rotate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"permission": {
|
|
||||||
"c": "App.Listforms.Chart.Create",
|
|
||||||
"r": "App.Listforms.Chart",
|
|
||||||
"u": "App.Listforms.Chart.Update",
|
|
||||||
"d": "App.Listforms.Chart.Delete"
|
|
||||||
},
|
|
||||||
"export": {
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"chartCode": "Chart-0002",
|
"chartCode": "Chart-0002",
|
||||||
"cultureName": "en",
|
"cultureName": "en",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
// "Default": "Server=sql;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
// "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
||||||
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;"
|
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
|
||||||
},
|
},
|
||||||
"Redis": {
|
"Redis": {
|
||||||
"IsEnabled": "true",
|
"IsEnabled": "true",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
// "Default": "Server=sql;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
// "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
||||||
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;"
|
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
|
||||||
},
|
},
|
||||||
"Redis": {
|
"Redis": {
|
||||||
"IsEnabled": "true",
|
"IsEnabled": "true",
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"Seed": false,
|
"Seed": false,
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
// "Default": "Server=localhost;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
// "Default": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
||||||
"Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=Demo;"
|
"Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;"
|
||||||
},
|
},
|
||||||
"Redis": {
|
"Redis": {
|
||||||
"IsEnabled": "true",
|
"IsEnabled": "true",
|
||||||
|
|
|
||||||
|
|
@ -282,13 +282,6 @@ public static class PlatformConsts
|
||||||
public const string Get = Default + ".Get";
|
public const string Get = Default + ".Get";
|
||||||
public const string Post = Default + ".Post";
|
public const string Post = Default + ".Post";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Crm
|
|
||||||
{
|
|
||||||
public const string Default = Prefix.App + ".Crm";
|
|
||||||
public const string Orders = Default + ".Orders";
|
|
||||||
public const string Complaints = Default + ".Complaints"; //Müşteri Şikayetleri
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ListFormCodes
|
public static class ListFormCodes
|
||||||
|
|
|
||||||
|
|
@ -350,14 +350,6 @@ public static class SeedConsts
|
||||||
|
|
||||||
public const string IpRestrictions = Prefix.App + ".IpRestrictions";
|
public const string IpRestrictions = Prefix.App + ".IpRestrictions";
|
||||||
public const string PublicApis = Prefix.App + ".PublicApis";
|
public const string PublicApis = Prefix.App + ".PublicApis";
|
||||||
|
|
||||||
public static class Crm
|
|
||||||
{
|
|
||||||
public const string Default = Prefix.App + ".Crm";
|
|
||||||
public const string Orders = Default + ".Orders";
|
|
||||||
public const string Complaints = Default + ".Complaints"; //Müşteri Şikayetleri
|
|
||||||
public const string Shipments = Default + ".Shipments";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -244,10 +244,6 @@ public class DatabaseMigrationEventHandler :
|
||||||
{
|
{
|
||||||
await PermissionGrantRepository.InsertManyAsync(
|
await PermissionGrantRepository.InsertManyAsync(
|
||||||
[
|
[
|
||||||
new(Guid.NewGuid(), AbpIdentity.Permissions.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
|
||||||
new(Guid.NewGuid(), AbpIdentity.Permissions.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
|
||||||
new(Guid.NewGuid(), AbpIdentity.Permissions.Update, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
|
||||||
new(Guid.NewGuid(), AbpIdentity.Permissions.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
|
||||||
new(Guid.NewGuid(), IdentityPermissions.Roles.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
new(Guid.NewGuid(), IdentityPermissions.Roles.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
||||||
new(Guid.NewGuid(), IdentityPermissions.Roles.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
new(Guid.NewGuid(), IdentityPermissions.Roles.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
||||||
new(Guid.NewGuid(), IdentityPermissions.Roles.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
new(Guid.NewGuid(), IdentityPermissions.Roles.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId),
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
"CdnPath": "/etc/api/cdn"
|
"CdnPath": "/etc/api/cdn"
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
// "Default": "Server=sql;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
// "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
||||||
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;"
|
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
|
||||||
},
|
},
|
||||||
"Redis": {
|
"Redis": {
|
||||||
"IsEnabled": "true",
|
"IsEnabled": "true",
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
"CdnPath": "/etc/api/cdn"
|
"CdnPath": "/etc/api/cdn"
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
// "Default": "Server=sql;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
// "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
||||||
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;"
|
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
|
||||||
},
|
},
|
||||||
"Redis": {
|
"Redis": {
|
||||||
"IsEnabled": "true",
|
"IsEnabled": "true",
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
"Version": "1.0.4"
|
"Version": "1.0.4"
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
// "Default": "Server=localhost;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
// "Default": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;"
|
||||||
"Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=Demo;"
|
"Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;"
|
||||||
},
|
},
|
||||||
"Redis": {
|
"Redis": {
|
||||||
"IsEnabled": "true",
|
"IsEnabled": "true",
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,15 @@ server {
|
||||||
ssl_certificate /etc/ssl/sozsoft.com/cert1.pem;
|
ssl_certificate /etc/ssl/sozsoft.com/cert1.pem;
|
||||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||||
|
|
||||||
|
underscores_in_headers on;
|
||||||
|
ignore_invalid_headers off;
|
||||||
|
large_client_header_buffers 4 16k;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:8080/;
|
proxy_pass http://127.0.0.1:8080/;
|
||||||
include /etc/nginx/proxy_params;
|
include /etc/nginx/proxy_params;
|
||||||
|
|
||||||
|
proxy_set_header __tenant $http___tenant; # ← ÖNEMLİ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
||||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||||
}, {
|
}, {
|
||||||
"url": "index.html",
|
"url": "index.html",
|
||||||
"revision": "0.8un1j0slu5o"
|
"revision": "0.ndk83qv1fe"
|
||||||
}], {});
|
}], {});
|
||||||
workbox.cleanupOutdatedCaches();
|
workbox.cleanupOutdatedCaches();
|
||||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,10 @@ let didInit = false
|
||||||
const Theme = (props: CommonProps) => {
|
const Theme = (props: CommonProps) => {
|
||||||
// ABP App Config'i uygulama acilirken al
|
// ABP App Config'i uygulama acilirken al
|
||||||
const { getConfig } = useStoreActions((a) => a.abpConfig)
|
const { getConfig } = useStoreActions((a) => a.abpConfig)
|
||||||
const { setTenantId } = useStoreActions((a) => a.auth)
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!didInit) {
|
if (!didInit) {
|
||||||
didInit = true
|
didInit = true
|
||||||
setTenantId('')
|
|
||||||
getConfig(false)
|
getConfig(false)
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
|
||||||
|
|
@ -1,78 +1,9 @@
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
import { useCallback, useEffect, useState } from 'react'
|
|
||||||
import WidgetFilter from './dashboard/WidgetFilter'
|
|
||||||
import { getDashboardWidgetList } from '@/proxy/dashboard/widgets'
|
|
||||||
import dayjs from 'dayjs'
|
|
||||||
import { WidgetsData } from './dashboard/models'
|
|
||||||
import Widgets from './dashboard/Widgets'
|
|
||||||
import WidgetProgress from './dashboard/WidgetProgress'
|
|
||||||
import WidgetBarChart from './dashboard/WidgetBarChart'
|
|
||||||
|
|
||||||
const Home = () => {
|
const Home = () => {
|
||||||
const { translate } = useLocalization()
|
const { translate } = useLocalization()
|
||||||
|
|
||||||
const [loading, setLoading] = useState(false)
|
|
||||||
const [widgetData, setWidgetData] = useState<WidgetsData[]>()
|
|
||||||
|
|
||||||
const [startDate, setStartDate] = useState<number>(dayjs().subtract(30, 'day').unix())
|
|
||||||
const [endDate, setEndDate] = useState<number>(dayjs().unix())
|
|
||||||
const startDateFormat = dayjs(startDate * 1000).format('YYYY-MM-DD')
|
|
||||||
const endDateFormat = dayjs(endDate * 1000).format('YYYY-MM-DD')
|
|
||||||
|
|
||||||
const [chartKey, setChartKey] = useState(0)
|
|
||||||
|
|
||||||
const handleDateChange = ([start, end]: [Date | null, Date | null]) => {
|
|
||||||
if (start && end) {
|
|
||||||
setStartDate(dayjs(start).unix())
|
|
||||||
setEndDate(dayjs(end).unix())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const getPerformancePercent = () => {
|
|
||||||
const orders = widgetData?.find((a) => a.label == 'Orders')?.datavalue ?? 0
|
|
||||||
const shipment = widgetData?.find((a) => a.label == 'Shipment')?.datavalue ?? 0
|
|
||||||
|
|
||||||
if (shipment > orders)
|
|
||||||
return (orders / shipment * 100.0)
|
|
||||||
else
|
|
||||||
return (shipment / orders * 100.0)
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDashboardWidgets = useCallback(async () => {
|
|
||||||
const dashboardWidgetsRequestDto = {
|
|
||||||
tarih1: startDateFormat,
|
|
||||||
tarih2: endDateFormat,
|
|
||||||
}
|
|
||||||
|
|
||||||
setChartKey((prevKey) => prevKey + 1)
|
|
||||||
|
|
||||||
try {
|
|
||||||
setLoading(true)
|
|
||||||
const response = await getDashboardWidgetList(dashboardWidgetsRequestDto)
|
|
||||||
if (response?.data) {
|
|
||||||
setWidgetData(
|
|
||||||
response.data.map((a) => ({
|
|
||||||
id: a.id,
|
|
||||||
label: a.label,
|
|
||||||
datavalue: a.dataValue,
|
|
||||||
datagrowShrink: a.dataGrowShrink,
|
|
||||||
valuePrefix: a.valuePrefix,
|
|
||||||
date: a.date,
|
|
||||||
})),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Dashboard widget yüklenirken hata oluştu:', error)
|
|
||||||
} finally {
|
|
||||||
setLoading(false)
|
|
||||||
}
|
|
||||||
}, [startDateFormat, endDateFormat])
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getDashboardWidgets()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet
|
<Helmet
|
||||||
|
|
@ -80,38 +11,6 @@ const Home = () => {
|
||||||
title={translate('::' + 'Home')}
|
title={translate('::' + 'Home')}
|
||||||
defaultTitle="Kurs Platform"
|
defaultTitle="Kurs Platform"
|
||||||
></Helmet>
|
></Helmet>
|
||||||
|
|
||||||
<WidgetFilter
|
|
||||||
onFilter={getDashboardWidgets}
|
|
||||||
handleDateChange={handleDateChange}
|
|
||||||
startDate={startDate}
|
|
||||||
endDate={endDate}
|
|
||||||
/>
|
|
||||||
<Widgets loading={loading} widgetData={widgetData} />
|
|
||||||
|
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-4 mt-4">
|
|
||||||
<WidgetBarChart
|
|
||||||
chartKey={`Chart-${chartKey}`}
|
|
||||||
startDateFormat={startDateFormat}
|
|
||||||
endDateFormat={endDateFormat}
|
|
||||||
/>
|
|
||||||
<WidgetProgress percent={getPerformancePercent()} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* <Button
|
|
||||||
onClick={() => {
|
|
||||||
// x.setConfig({
|
|
||||||
// component: 'RolesPermission',
|
|
||||||
// props: { name: 'admin' },
|
|
||||||
// })
|
|
||||||
// apiService.fetchData({
|
|
||||||
// method: 'GET',
|
|
||||||
// url: '/api/app/test/test',
|
|
||||||
// })
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
FIRE
|
|
||||||
</Button> */}
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ function TenantConnectionString({
|
||||||
|
|
||||||
if (response.data.length == 0) {
|
if (response.data.length == 0) {
|
||||||
isNew = true
|
isNew = true
|
||||||
value = 'User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=' + name + ';'
|
value = 'User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=' + name + ';'
|
||||||
} else {
|
} else {
|
||||||
isNew = false
|
isNew = false
|
||||||
value = response.data
|
value = response.data
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,7 @@ const Login = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const subDomainName = getSubdomain()
|
const subDomainName = getSubdomain()
|
||||||
|
//const subDomainName = 'KURS2'
|
||||||
const tenantId = useStoreState((a) => a.auth.tenantId) ?? subDomainName
|
const tenantId = useStoreState((a) => a.auth.tenantId) ?? subDomainName
|
||||||
const tenantStyle: React.CSSProperties | undefined =
|
const tenantStyle: React.CSSProperties | undefined =
|
||||||
subDomainName && subDomainName !== defaultSubDomain
|
subDomainName && subDomainName !== defaultSubDomain
|
||||||
|
|
@ -216,7 +217,7 @@ const Login = () => {
|
||||||
value={tenantId || ''}
|
value={tenantId || ''}
|
||||||
onChange={(e) => setTenantId(e.target.value)}
|
onChange={(e) => setTenantId(e.target.value)}
|
||||||
style={tenantStyle}
|
style={tenantStyle}
|
||||||
//aria-hidden={subDomainName && subDomainName !== defaultSubDomain ? 'true' : 'false'}
|
aria-hidden={subDomainName && subDomainName !== defaultSubDomain ? 'true' : 'false'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,6 @@ type LogProps = Omit<Log, 'updateContent'> & {
|
||||||
}
|
}
|
||||||
|
|
||||||
const logData: Log[] = [
|
const logData: Log[] = [
|
||||||
{
|
|
||||||
version: '1.0.4',
|
|
||||||
date: '07 Şubat 2025',
|
|
||||||
updateContent: [
|
|
||||||
'[Change] KIM Sistemi entegrasyonu',
|
|
||||||
'[Fix] OrganizationUnitId belirlenmesi',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
version: '1.0.3',
|
version: '1.0.3',
|
||||||
date: '04 Şubat 2025',
|
date: '04 Şubat 2025',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue