Change Organization Name
This commit is contained in:
parent
643649fe77
commit
45b763776d
19 changed files with 6737 additions and 34 deletions
|
|
@ -11,7 +11,7 @@ public class CreateUpdateTenantInput
|
|||
public string AdminEmail { get; set; }
|
||||
public string AdminPassword { get; set; }
|
||||
public string ConnectionString { get; set; }
|
||||
public string InstitutionName { get; set; }
|
||||
public string OrganizationName { get; set; }
|
||||
public string Founder { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
public string TaxOffice { get; set; }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ public class CustomTenantDto
|
|||
public bool IsActive { get; set; }
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
public string InstitutionName { get; set; }
|
||||
public string OrganizationName { get; set; }
|
||||
public string Founder { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
public string TaxOffice { get; set; }
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class ListFormDynamicApiAppService : PlatformAppService, IListFormDynamic
|
|||
|
||||
var entity = await tenantRepository.InsertAsync(tenant, autoSave: true);
|
||||
entity.SetIsActive(input.Data.IsActive);
|
||||
entity.SetInstitutionName(input.Data.InstitutionName);
|
||||
entity.SetOrganizationName(input.Data.OrganizationName);
|
||||
entity.SetFounder(input.Data.Founder);
|
||||
entity.SetVknTckn(input.Data.VknTckn);
|
||||
entity.SetTaxOffice(input.Data.TaxOffice);
|
||||
|
|
@ -147,7 +147,7 @@ public class ListFormDynamicApiAppService : PlatformAppService, IListFormDynamic
|
|||
|
||||
await tenantManager.ChangeNameAsync(entity, input.Data.Name);
|
||||
entity.SetIsActive(input.Data.IsActive);
|
||||
entity.SetInstitutionName(input.Data.InstitutionName);
|
||||
entity.SetOrganizationName(input.Data.OrganizationName);
|
||||
entity.SetFounder(input.Data.Founder);
|
||||
entity.SetVknTckn(input.Data.VknTckn);
|
||||
entity.SetTaxOffice(input.Data.TaxOffice);
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ public class PublicAppService : PlatformAppService
|
|||
var entity = new Order()
|
||||
{
|
||||
TenantId = input.Tenant.Id,
|
||||
InstitutionName = input.Tenant.InstitutionName,
|
||||
OrganizationName = input.Tenant.OrganizationName,
|
||||
Founder = input.Tenant.Founder,
|
||||
VknTckn = input.Tenant.VknTckn,
|
||||
TaxOffice = input.Tenant.TaxOffice,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class PlatformTenantAppService : TenantAppService, IPlatformTenantAppServ
|
|||
|
||||
var dto = ObjectMapper.Map<Tenant, CustomTenantDto>(tenant);
|
||||
dto.IsActive = tenant.GetIsActive();
|
||||
dto.InstitutionName = tenant.GetInstitutionName();
|
||||
dto.OrganizationName = tenant.GetOrganizationName();
|
||||
dto.Founder = tenant.GetFounder();
|
||||
dto.VknTckn = tenant.GetVknTckn();
|
||||
dto.TaxOffice = tenant.GetTaxOffice();
|
||||
|
|
|
|||
|
|
@ -743,7 +743,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=2, DataField="InstitutionName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=2, DataField="OrganizationName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=3, DataField="Founder", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||
|
|
@ -872,7 +872,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "InstitutionName",
|
||||
FieldName = "OrganizationName",
|
||||
Width = 200,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
|
|
@ -14562,7 +14562,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
ItemType = "group",
|
||||
Items =
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "InstitutionName", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 1, DataField = "OrganizationName", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Founder", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "VknTckn", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "TaxOffice", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
|
|
@ -14637,7 +14637,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
ListFormCode = listFormPurchaseOrder.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "InstitutionName",
|
||||
FieldName = "OrganizationName",
|
||||
Width = 300,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
|
|
|
|||
|
|
@ -3058,7 +3058,7 @@
|
|||
"DisplayName": "App.DeveloperKit.Dashboard",
|
||||
"Order": 1,
|
||||
"Url": "/admin/developerkit",
|
||||
"Icon": "FcAndroidOs",
|
||||
"Icon": "FcBinoculars",
|
||||
"RequiredPermissionName": "App.DeveloperKit",
|
||||
"IsDisabled": false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public static class PlatformConsts
|
|||
public static class Tenants
|
||||
{
|
||||
public const string IsActive = "IsActive";
|
||||
public const string InstitutionName = "InstitutionName";
|
||||
public const string OrganizationName = "OrganizationName";
|
||||
public const string VknTckn = "VknTckn";
|
||||
public const string Founder = "Founder";
|
||||
public const string TaxOffice = "TaxOffice";
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ public static class AbpTenantExtensions
|
|||
return tenant.GetProperty<bool>(PlatformConsts.Tenants.IsActive);
|
||||
}
|
||||
|
||||
public static void SetInstitutionName(this Tenant tenant, string institutionName)
|
||||
public static void SetOrganizationName(this Tenant tenant, string organizationName)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.InstitutionName, institutionName);
|
||||
tenant.SetProperty(PlatformConsts.Tenants.OrganizationName, organizationName);
|
||||
}
|
||||
public static string GetInstitutionName(this Tenant tenant)
|
||||
public static string GetOrganizationName(this Tenant tenant)
|
||||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.InstitutionName);
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.OrganizationName);
|
||||
}
|
||||
|
||||
public static void SetFounder(this Tenant tenant, string founder)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Kurs.Platform.Orders;
|
|||
public class Order : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public string InstitutionName { get; set; }
|
||||
public string OrganizationName { get; set; }
|
||||
public string Founder { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
public string TaxOffice { get; set; }
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public static class PlatformEfCoreEntityExtensionMappings
|
|||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, string>(
|
||||
PlatformConsts.Tenants.InstitutionName,
|
||||
PlatformConsts.Tenants.OrganizationName,
|
||||
(entityBuilder, propertyBuilder) =>
|
||||
{
|
||||
propertyBuilder.HasMaxLength(64).HasDefaultValue(null);
|
||||
|
|
|
|||
6665
api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250823171403_OrgnanizationName.Designer.cs
generated
Normal file
6665
api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250823171403_OrgnanizationName.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,38 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OrgnanizationName : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "InstitutionName",
|
||||
table: "POrder",
|
||||
newName: "OrganizationName");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "InstitutionName",
|
||||
table: "AbpTenants",
|
||||
newName: "OrganizationName");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "OrganizationName",
|
||||
table: "POrder",
|
||||
newName: "InstitutionName");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "OrganizationName",
|
||||
table: "AbpTenants",
|
||||
newName: "InstitutionName");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4147,9 +4147,6 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<int?>("Installments")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("InstitutionName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
|
|
@ -4167,6 +4164,9 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<long>("Mobile")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("OrganizationName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PaymentDataJson")
|
||||
.HasMaxLength(4000)
|
||||
.HasColumnType("nvarchar(4000)");
|
||||
|
|
@ -6099,10 +6099,6 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<string>("Founder")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("InstitutionName")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
|
|
@ -6135,6 +6131,10 @@ namespace Kurs.Platform.Migrations
|
|||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<string>("OrganizationName")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<long>("Phone")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
|||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.1epkpfrpvl8"
|
||||
"revision": "0.c7pq42r4d5g"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ export const PaymentForm: React.FC<PaymentFormProps> = ({
|
|||
<span className="font-medium">
|
||||
{translate('::Public.payment.customer.company')}
|
||||
</span>
|
||||
<span>{tenant.institutionName}</span>
|
||||
<span>{tenant.organizationName}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
id: tenant.data.id,
|
||||
name: tenant.data.name,
|
||||
isActive: tenant.data.isActive,
|
||||
institutionName: tenant.data.institutionName,
|
||||
organizationName: tenant.data.organizationName,
|
||||
founder: tenant.data.founder,
|
||||
vknTckn: tenant.data.vknTckn,
|
||||
taxOffice: tenant.data.taxOffice,
|
||||
|
|
@ -155,7 +155,7 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
</button>
|
||||
</div>
|
||||
|
||||
{formData.institutionName && (
|
||||
{formData.organizationName && (
|
||||
<div className="grid grid-cols-1 gap-y-3 text-sm text-gray-700 p-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<FaUser className="w-4 h-4 text-gray-500" />
|
||||
|
|
@ -170,7 +170,7 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
<span className="font-medium">
|
||||
{translate('::Public.products.tenantForm.company')}
|
||||
</span>
|
||||
<span>{formData.institutionName}</span>
|
||||
<span>{formData.organizationName}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
|
|
@ -273,8 +273,8 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
required
|
||||
autoFocus
|
||||
placeholder="Enter your organization name"
|
||||
value={formData.institutionName || ''}
|
||||
onChange={(e) => handleInputChange('institutionName', e.target.value)}
|
||||
value={formData.organizationName || ''}
|
||||
onChange={(e) => handleInputChange('organizationName', e.target.value)}
|
||||
className="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ export const Dashboard: React.FC = () => {
|
|||
<button
|
||||
key={category.id}
|
||||
onClick={() => setSelectedCategory(category)}
|
||||
className={`w-full flex items-center space-x-3 px-2 py-3 rounded-lg text-left transition-colors ${
|
||||
className={`w-full flex items-center space-x-3 p-2 rounded-lg text-left transition-colors ${
|
||||
selectedCategory?.id === category.id
|
||||
? 'bg-blue-100 text-blue-700'
|
||||
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export interface CustomTenantDto extends TenantDto {
|
|||
id?: string
|
||||
name: string
|
||||
isActive: boolean
|
||||
institutionName: string
|
||||
organizationName: string
|
||||
founder?: string
|
||||
vknTckn: number
|
||||
taxOffice: string
|
||||
|
|
|
|||
Loading…
Reference in a new issue