District içerisine Postal Code eklendi.
This commit is contained in:
parent
c42a8d2bd1
commit
cda9aa6a72
20 changed files with 5076 additions and 2525 deletions
|
|
@ -52,7 +52,7 @@ public static class LookupQueryValues
|
|||
$"\"AbpTenants\".\"Name\" AS \"Name\" " +
|
||||
$"FROM \"AbpTenants\"" +
|
||||
$") AS \"List\" " +
|
||||
$"ORDER BY \"Name\"";
|
||||
$"ORDER BY \"Name\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -118,14 +118,15 @@ public static class LookupQueryValues
|
|||
public static string TownshipValues =
|
||||
$"SELECT " +
|
||||
$"\"Township\" AS \"Key\", " +
|
||||
$"\"Township\" AS \"Name\" " +
|
||||
$"\"Township\" AS \"Name\", " +
|
||||
$"\"PostalCode\" AS \"Group\" " +
|
||||
$"FROM \"{FullNameTable(TableNameEnum.District)}\" " +
|
||||
$"WHERE " +
|
||||
$"(\"Country\" = @param0 OR @param0 IS NULL) " +
|
||||
$"AND (\"City\" = @param1 OR @param1 IS NULL) " +
|
||||
$"AND (\"Name\" = @param2 OR @param2 IS NULL) " +
|
||||
$"AND \"IsDeleted\" = 'false' " +
|
||||
$"GROUP BY \"Township\" " +
|
||||
$"GROUP BY \"Township\", \"PostalCode\" " +
|
||||
$"ORDER BY \"Township\";";
|
||||
|
||||
public static string RoleValues =
|
||||
|
|
@ -260,7 +261,7 @@ public static class LookupQueryValues
|
|||
$"OR jp.\"ParentId\" IS NULL " +
|
||||
$") " +
|
||||
$"ORDER BY jp.\"Name\";";
|
||||
|
||||
|
||||
public static string SurveyQuestionValues =
|
||||
$"SELECT " +
|
||||
$"\"Id\" AS \"Key\", " +
|
||||
|
|
|
|||
|
|
@ -9,4 +9,5 @@ public class DistrictDto : AuditedEntityDto<Guid>
|
|||
public string City { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Township { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,6 +278,7 @@ public class ListFormDynamicApiAppService : PlatformAppService, IListFormDynamic
|
|||
Country = order.Country,
|
||||
City = order.City,
|
||||
District = order.District,
|
||||
Township = order.Township,
|
||||
Address1 = order.Address1,
|
||||
Address2 = order.Address2,
|
||||
PostalCode = order.PostalCode,
|
||||
|
|
|
|||
|
|
@ -474,9 +474,10 @@ public class PublicAppService : PlatformAppService
|
|||
TaxOffice = input.Tenant.TaxOffice,
|
||||
Address1 = input.Tenant.Address1,
|
||||
Address2 = input.Tenant.Address2,
|
||||
District = input.Tenant.District,
|
||||
Country = input.Tenant.Country,
|
||||
City = input.Tenant.City,
|
||||
District = input.Tenant.District,
|
||||
Township = input.Tenant.Township,
|
||||
PostalCode = input.Tenant.PostalCode,
|
||||
MobileNumber = NormalizePhoneNumber(input.Tenant.MobileNumber, input.Tenant.Country),
|
||||
PhoneNumber = NormalizePhoneNumber(input.Tenant.PhoneNumber, input.Tenant.Country),
|
||||
|
|
@ -827,15 +828,14 @@ public class PublicAppService : PlatformAppService
|
|||
.OrderBy(district => district.Name));
|
||||
|
||||
return entities
|
||||
.GroupBy(district => district.Name, StringComparer.OrdinalIgnoreCase)
|
||||
.Select(group => group.First())
|
||||
.Select(district => new DistrictDto
|
||||
{
|
||||
Id = district.Id,
|
||||
Country = district.Country,
|
||||
City = district.City,
|
||||
Name = district.Name,
|
||||
Township = district.Township
|
||||
Township = district.Township,
|
||||
PostalCode = district.PostalCode
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -342,11 +342,11 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
|
||||
// 1. Mevcut kayıtları çek (tek sorguda)
|
||||
var existingDistricts = await dbCtx.Set<District>()
|
||||
.Select(d => new { d.Country, d.City, d.Name, d.Township })
|
||||
.Select(d => new { d.Country, d.City, d.Name, d.Township, d.PostalCode })
|
||||
.ToListAsync();
|
||||
|
||||
var existingSet = existingDistricts
|
||||
.Select(d => $"{d.Country}:{d.City}:{d.Name}:{d.Township}")
|
||||
.Select(d => $"{d.Country}:{d.City}:{d.Name}:{d.Township}:{d.PostalCode}")
|
||||
.ToHashSet();
|
||||
|
||||
var options = new JsonSerializerOptions
|
||||
|
|
@ -362,7 +362,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
if (item == null) continue;
|
||||
|
||||
var key = $"{item.Country}:{item.City}:{item.Name}:{item.Township}";
|
||||
var key = $"{item.Country}:{item.City}:{item.Name}:{item.Township}:{item.PostalCode}";
|
||||
if (existingSet.Contains(key)) continue;
|
||||
|
||||
buffer.Add(new District(
|
||||
|
|
@ -370,7 +370,8 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
item.Country,
|
||||
item.City,
|
||||
item.Name,
|
||||
item.Township
|
||||
item.Township,
|
||||
item.PostalCode
|
||||
));
|
||||
|
||||
if (buffer.Count >= 5000) // 3. Batch
|
||||
|
|
|
|||
|
|
@ -8223,8 +8223,8 @@
|
|||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Public.products.tenantForm.orgName",
|
||||
"tr": "Şirket Adı",
|
||||
"en": "Company Name"
|
||||
"tr": "Kurum Adı",
|
||||
"en": "Organization Name"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -14262,12 +14262,6 @@
|
|||
"en": "Commission",
|
||||
"tr": "Komisyon"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Listform.ListformField.CompanyName",
|
||||
"en": "Company Name",
|
||||
"tr": "Şirket Adı"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Listform.ListformField.ComponentPath",
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
new() { Order=1, ColCount=4, ColSpan=1, ItemType="group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order=1, DataField = "Name", ColSpan=1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=2, DataField = "OrganizationName", ColSpan=1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=1, DataField = "OrganizationName", ColSpan=4, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=2, DataField = "Name", ColSpan=1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=3, DataField = "Founder", ColSpan=1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=4, DataField = "VknTckn", ColSpan=1, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order=5, DataField = "TaxOffice", ColSpan=1, EditorType2=EditorTypes.dxTextBox },
|
||||
|
|
@ -107,17 +107,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order=10, DataField = "Email", ColSpan=1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=11, DataField = "Website", ColSpan=1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order=12, DataField = "IsActive", ColSpan=1, EditorType2=EditorTypes.dxCheckBox },
|
||||
]
|
||||
},
|
||||
new() { Order=2, ColCount=4, ColSpan=1, ItemType="group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order=1, DataField = "Country", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=2, DataField = "City", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=3, DataField = "District", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=4, DataField = "Township", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=5, DataField = "PostalCode", ColSpan=1, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=6, DataField = "Address1", ColSpan=3, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order=7, DataField = "Address2", ColSpan=4, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order=13, DataField = "Country", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=14, DataField = "City", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=15, DataField = "District", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=16, DataField = "Township", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton, EditorScript = PlatformConsts.EditorScriptValues.SourceFieldItemWritetoDestination("Township", "Group", "PostalCode") },
|
||||
new EditingFormItemDto { Order=17, DataField = "PostalCode", ColSpan=1, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order=18, DataField = "Address1", ColSpan=4, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order=19, DataField = "Address2", ColSpan=4, EditorType2=EditorTypes.dxTextArea },
|
||||
]
|
||||
}
|
||||
}),
|
||||
|
|
@ -2139,6 +2135,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order = 2, DataField = "City", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "Township", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "PostalCode", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
]
|
||||
}
|
||||
}),
|
||||
|
|
@ -2246,6 +2243,23 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
AllowSearch = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "PostalCode",
|
||||
CaptionName = "App.Listform.ListformField.PostalCode",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
AllowSearch = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
|
|
@ -6991,26 +7005,27 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order = 9, DataField = "Country", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 10, DataField = "City", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 11, DataField = "District", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 12, DataField = "PostalCode", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 13, DataField = "PhoneNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
|
||||
new EditingFormItemDto { Order = 14, DataField = "MobileNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
|
||||
new EditingFormItemDto { Order = 15, DataField = "FaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
|
||||
new EditingFormItemDto { Order = 12, DataField = "Township", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton, EditorScript = PlatformConsts.EditorScriptValues.SourceFieldItemWritetoDestination("Township", "Group", "PostalCode") },
|
||||
new EditingFormItemDto { Order = 13, DataField = "PostalCode", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 14, DataField = "PhoneNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
|
||||
new EditingFormItemDto { Order = 15, DataField = "MobileNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
|
||||
new EditingFormItemDto { Order = 16, DataField = "FaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
|
||||
]
|
||||
},
|
||||
new() { Order=2, ColCount=4, ColSpan=1, ItemType="group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order = 16, DataField = "PaymentMethodId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 17, DataField = "Installment", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 18, DataField = "LicenseStartTime", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 19, DataField = "BillingCycle", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 20, DataField = "Period", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 21, DataField = "LicenseEndTime", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 22, DataField = "Email", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 23, DataField = "Website", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 24, DataField = "Subtotal", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
|
||||
new EditingFormItemDto { Order = 25, DataField = "VatTotal", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
|
||||
new EditingFormItemDto { Order = 26, DataField = "Commission", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
|
||||
new EditingFormItemDto { Order = 27, DataField = "Total", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
|
||||
new EditingFormItemDto { Order = 1, DataField = "PaymentMethodId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Installment", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "LicenseStartTime", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "BillingCycle", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Period", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "LicenseEndTime", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 7, DataField = "Email", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "Website", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 9, DataField = "Subtotal", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
|
||||
new EditingFormItemDto { Order = 10, DataField = "VatTotal", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
|
||||
new EditingFormItemDto { Order = 11, DataField = "Commission", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
|
||||
new EditingFormItemDto { Order = 12, DataField = "Total", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat() },
|
||||
]
|
||||
}
|
||||
}),
|
||||
|
|
@ -7359,6 +7374,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CascadeRelationField = "City",
|
||||
CascadeFilterOperator="=",
|
||||
CascadeParentFields = "Country,City",
|
||||
CascadeEmptyFields = "Township"
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
|
|
@ -7366,6 +7382,33 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Township",
|
||||
CaptionName = "App.Listform.ListformField.Township",
|
||||
Width = 0,
|
||||
ListOrderNo = 17,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.TownshipValues,
|
||||
CascadeRelationField = "District",
|
||||
CascadeFilterOperator="=",
|
||||
CascadeParentFields = "Country,City,District"
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
|
|
@ -7373,7 +7416,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "PhoneNumber",
|
||||
CaptionName = "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 17,
|
||||
ListOrderNo = 18,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7392,7 +7435,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "MobileNumber",
|
||||
CaptionName = "App.Listform.ListformField.MobileNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 18,
|
||||
ListOrderNo = 19,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7411,7 +7454,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "FaxNumber",
|
||||
CaptionName = "App.Listform.ListformField.FaxNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 19,
|
||||
ListOrderNo = 20,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7429,7 +7472,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "Website",
|
||||
CaptionName = "App.Listform.ListformField.Website",
|
||||
Width = 0,
|
||||
ListOrderNo = 20,
|
||||
ListOrderNo = 21,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7448,7 +7491,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CaptionName = "App.Listform.ListformField.Subtotal",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
ListOrderNo = 21,
|
||||
ListOrderNo = 22,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7468,7 +7511,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CaptionName = "App.Listform.ListformField.VatTotal",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
ListOrderNo = 22,
|
||||
ListOrderNo = 23,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7488,7 +7531,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
CaptionName = "App.Listform.ListformField.Commission",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
ListOrderNo = 23,
|
||||
ListOrderNo = 24,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7527,7 +7570,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "PaymentMethodId",
|
||||
CaptionName = "App.Listform.ListformField.PaymentMethodId",
|
||||
Width = 0,
|
||||
ListOrderNo = 24,
|
||||
ListOrderNo = 26,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7546,7 +7589,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "Installment",
|
||||
CaptionName = "App.Listform.ListformField.Installment",
|
||||
Width = 0,
|
||||
ListOrderNo = 26,
|
||||
ListOrderNo = 27,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7565,7 +7608,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "IsActive",
|
||||
CaptionName = "App.Listform.ListformField.IsActive",
|
||||
Width = 0,
|
||||
ListOrderNo = 27,
|
||||
ListOrderNo = 28,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7582,7 +7625,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "PostalCode",
|
||||
CaptionName = "App.Listform.ListformField.PostalCode",
|
||||
Width = 0,
|
||||
ListOrderNo = 27,
|
||||
ListOrderNo = 29,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
@ -7600,7 +7643,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "Email",
|
||||
CaptionName = "App.Listform.ListformField.Email",
|
||||
Width = 0,
|
||||
ListOrderNo = 28,
|
||||
ListOrderNo = 30,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@
|
|||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Public",
|
||||
"DisplayName": "App.Public",
|
||||
"Order": 0,
|
||||
"Order": 1,
|
||||
"Url": null,
|
||||
"Icon": "FcTemplate",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -630,32 +630,11 @@
|
|||
"IsDisabled": false
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "AbpTenantManagement.Tenants",
|
||||
"DisplayName": "AbpTenantManagement.Tenants",
|
||||
"Order": 1,
|
||||
"Url": "/admin/list/AbpTenantManagement.Tenants",
|
||||
"Icon": "FcDepartment",
|
||||
"RequiredPermissionName": "AbpTenantManagement.Tenants",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Branches",
|
||||
"DisplayName": "App.Branches",
|
||||
"Order": 2,
|
||||
"Url": "/admin/list/App.Branches",
|
||||
"Icon": "FcTreeStructure",
|
||||
"RequiredPermissionName": "App.Branches",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Saas.Definitions",
|
||||
"DisplayName": "App.Definitions",
|
||||
"Order": 3,
|
||||
"Order": 2,
|
||||
"Url": null,
|
||||
"Icon": "FcFilingCabinet",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -771,6 +750,27 @@
|
|||
"RequiredPermissionName": "App.Definitions.Sequence",
|
||||
"IsDisabled": false
|
||||
},
|
||||
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "AbpTenantManagement.Tenants",
|
||||
"DisplayName": "AbpTenantManagement.Tenants",
|
||||
"Order": 3,
|
||||
"Url": "/admin/list/AbpTenantManagement.Tenants",
|
||||
"Icon": "FcDepartment",
|
||||
"RequiredPermissionName": "AbpTenantManagement.Tenants",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Branches",
|
||||
"DisplayName": "App.Branches",
|
||||
"Order": 4,
|
||||
"Url": "/admin/list/App.Branches",
|
||||
"Icon": "FcTreeStructure",
|
||||
"RequiredPermissionName": "App.Branches",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.SettingDefinitions",
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ public static class PlatformConsts
|
|||
public static string CalcTotalHoursFromTimes = "(()=>{const toD=v=>!v?null:(v instanceof Date?v:new Date(v));const next={...formData,[e.dataField]:e.value};const s=toD(next.StartTime),t=toD(next.EndTime);let h=null;if(s&&t){h=(t-s)/36e5;if(h<0)h+=24;h=Math.round(h*10)/10;}setFormData({...next,TotalHours:h});})();";
|
||||
public static string MaterialOnChange = "(() => { const p=e.component.option('selectedItem')||{}; const q=Math.round((parseFloat(p.Quantity)||0)*100); const u=Math.round((parseFloat(p.UnitPrice)||0)*100); setFormData({ ...formData, Quantity:q/100, UnitPrice:u/100, UomId:p.UomId, TotalAmount:Math.round((q*u)/100)/100 }); })();";
|
||||
public static string CalcTotalAmount = "(() => { const n={...formData,[e.dataField]:e.value}; const q=Math.round((parseFloat(n.Quantity)||0)*100); const u=Math.round((parseFloat(n.UnitPrice)||0)*100); setFormData({ ...n, TotalAmount:Math.round((q*u)/100)/100 }); })();";
|
||||
public static string SourceFieldItemWritetoDestination(string sourceField = "Township", string itemName = "Group", string destinationField = "PostalCode") => $"(async()=>{{const townshipField=\"{sourceField}\",groupField=\"{itemName}\",postalCodeField=\"{destinationField}\";const currentField=(typeof editor!=='undefined'&&editor?.dataField)||e?.dataField||townshipField;const next={{...formData,[currentField]:e?.value}};const isReady=e?.scriptEvent===\"contentReady\";const selectedItem=(()=>{{try{{return e?.component?.option?e.component.option(\"selectedItem\"):null;}}catch{{return null;}}}})();if(!isReady)next[postalCodeField]=selectedItem?selectedItem[groupField]:next[postalCodeField];if(!isReady&&typeof setFormData===\"function\")setFormData(next);}})();";
|
||||
}
|
||||
|
||||
public static class Prefix
|
||||
|
|
|
|||
|
|
@ -9,16 +9,18 @@ public class District : FullAuditedEntity<Guid>
|
|||
public string City { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Township { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
|
||||
protected District() { }
|
||||
|
||||
public District(Guid id, string country, string city, string name, string township)
|
||||
public District(Guid id, string country, string city, string name, string township, string postalCode)
|
||||
: base(id)
|
||||
{
|
||||
Country = country;
|
||||
City = city;
|
||||
Name = name;
|
||||
Township = township;
|
||||
PostalCode = postalCode;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,12 +11,13 @@ public class Order : FullAuditedEntity<Guid>
|
|||
public string Founder { get; set; }
|
||||
public long? VknTckn { get; set; }
|
||||
public string TaxOffice { get; set; }
|
||||
public string Address1 { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string District { get; set; }
|
||||
public string Country { get; set; }
|
||||
public string City { get; set; }
|
||||
public string District { get; set; }
|
||||
public string Township { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public string Address1 { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string MobileNumber { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public string FaxNumber { get; set; }
|
||||
|
|
|
|||
|
|
@ -1024,12 +1024,13 @@ public class PlatformDbContext :
|
|||
b.Property(o => o.OrganizationName).HasMaxLength(128);
|
||||
b.Property(o => o.Founder).HasMaxLength(128);
|
||||
b.Property(o => o.TaxOffice).HasMaxLength(128);
|
||||
b.Property(o => o.Address1).HasMaxLength(512);
|
||||
b.Property(o => o.Address2).HasMaxLength(512);
|
||||
b.Property(o => o.District).HasMaxLength(128);
|
||||
b.Property(o => o.Country).HasMaxLength(128);
|
||||
b.Property(o => o.City).HasMaxLength(128);
|
||||
b.Property(o => o.District).HasMaxLength(128);
|
||||
b.Property(o => o.Township).HasMaxLength(128);
|
||||
b.Property(o => o.PostalCode).HasMaxLength(16);
|
||||
b.Property(o => o.Address1).HasMaxLength(512);
|
||||
b.Property(o => o.Address2).HasMaxLength(512);
|
||||
b.Property(o => o.MobileNumber).HasMaxLength(20);
|
||||
b.Property(o => o.PhoneNumber).HasMaxLength(20);
|
||||
b.Property(o => o.FaxNumber).HasMaxLength(20);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Sozsoft.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20260707105700_Initial")]
|
||||
[Migration("20260707205022_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -2260,6 +2260,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("PostalCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Township")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
|
@ -4213,6 +4216,10 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("Township")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<decimal>("VatTotal")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
|
@ -1575,12 +1575,13 @@ namespace Sozsoft.Platform.Migrations
|
|||
Founder = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
VknTckn = table.Column<long>(type: "bigint", nullable: true),
|
||||
TaxOffice = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
Address1 = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
Address2 = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
District = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
Country = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
City = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
District = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
Township = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
PostalCode = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
|
||||
Address1 = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
Address2 = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
MobileNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
PhoneNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
FaxNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
|
|
@ -3418,6 +3419,7 @@ namespace Sozsoft.Platform.Migrations
|
|||
City = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Township = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
PostalCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CityId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
|
|
@ -2257,6 +2257,9 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("PostalCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Township")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
|
@ -4210,6 +4213,10 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("Township")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<decimal>("VatTotal")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"commit": "708bfd0",
|
||||
"commit": "c42a8d2",
|
||||
"releases": [
|
||||
{
|
||||
"version": "1.1.06",
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ const REQUIRED_NEW_CUSTOMER_FIELDS: Array<keyof CustomTenantDto> = [
|
|||
'country',
|
||||
'city',
|
||||
'district',
|
||||
'township',
|
||||
'postalCode',
|
||||
'address1',
|
||||
'phoneNumber',
|
||||
|
|
@ -62,6 +63,7 @@ const REQUIRED_EXISTING_CUSTOMER_FIELDS: Array<keyof CustomTenantDto> = [
|
|||
'country',
|
||||
'city',
|
||||
'district',
|
||||
'township',
|
||||
'address1',
|
||||
'email',
|
||||
]
|
||||
|
|
@ -139,6 +141,33 @@ const hasRequiredFields = (
|
|||
|
||||
const normalizeCode = (value?: string) => value?.trim().toLowerCase() || ''
|
||||
|
||||
const getDistrictPostalCode = (district?: DistrictDto) =>
|
||||
district?.postalCode ||
|
||||
(district as (DistrictDto & { PostalCode?: string }) | undefined)?.PostalCode ||
|
||||
''
|
||||
|
||||
const getUniqueLocationOptions = <T,>(
|
||||
items: T[],
|
||||
getKey: (item: T) => string,
|
||||
getLabel: (item: T) => string,
|
||||
): LocationOption<T>[] => {
|
||||
const seen = new Set<string>()
|
||||
|
||||
return items.reduce<LocationOption<T>[]>((options, item) => {
|
||||
const key = getKey(item)
|
||||
if (!key || seen.has(key)) return options
|
||||
|
||||
seen.add(key)
|
||||
options.push({
|
||||
label: getLabel(item),
|
||||
value: key,
|
||||
data: item,
|
||||
})
|
||||
|
||||
return options
|
||||
}, [])
|
||||
}
|
||||
|
||||
type TenantFormDraft = Partial<CustomTenantDto> & {
|
||||
isExisting?: boolean
|
||||
foundTenantName?: string
|
||||
|
|
@ -200,6 +229,8 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
country: defaultCountry.name,
|
||||
city: '',
|
||||
district: '',
|
||||
township: '',
|
||||
postalCode: '',
|
||||
phoneNumber: `+${defaultCountry.phoneCode}`,
|
||||
},
|
||||
)
|
||||
|
|
@ -349,6 +380,8 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
country: defaultCountry.name,
|
||||
city: '',
|
||||
district: '',
|
||||
township: '',
|
||||
postalCode: '',
|
||||
phoneNumber: `+${defaultCountry.phoneCode}`,
|
||||
}
|
||||
: {}
|
||||
|
|
@ -383,6 +416,8 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
country: country?.name || '',
|
||||
city: '',
|
||||
district: '',
|
||||
township: '',
|
||||
postalCode: '',
|
||||
phoneNumber: country ? `+${country.phoneCode}` : '',
|
||||
}))
|
||||
setCities([])
|
||||
|
|
@ -403,7 +438,13 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
|
||||
const handleCityChange = async (option: LocationOption<CityDto> | null) => {
|
||||
const city = option?.data
|
||||
setFormData((prev) => ({ ...prev, city: city?.name || '', district: '' }))
|
||||
setFormData((prev) => ({
|
||||
...prev,
|
||||
city: city?.name || '',
|
||||
district: '',
|
||||
township: '',
|
||||
postalCode: '',
|
||||
}))
|
||||
setDistricts([])
|
||||
|
||||
if (!city || !formData.country) return
|
||||
|
|
@ -418,6 +459,23 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
}
|
||||
}
|
||||
|
||||
const handleDistrictChange = (option: LocationOption<DistrictDto> | null) => {
|
||||
setFormData((prev) => ({
|
||||
...prev,
|
||||
district: option?.data.name || '',
|
||||
township: '',
|
||||
postalCode: '',
|
||||
}))
|
||||
}
|
||||
|
||||
const handleTownshipChange = (option: LocationOption<DistrictDto> | null) => {
|
||||
setFormData((prev) => ({
|
||||
...prev,
|
||||
township: option?.data.township || '',
|
||||
postalCode: getDistrictPostalCode(option?.data),
|
||||
}))
|
||||
}
|
||||
|
||||
const countryOptions: LocationOption<CountryDto>[] = countries.map((country) => ({
|
||||
label: country.name,
|
||||
value: country.name,
|
||||
|
|
@ -428,11 +486,16 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
value: city.name,
|
||||
data: city,
|
||||
}))
|
||||
const districtOptions: LocationOption<DistrictDto>[] = districts.map((district) => ({
|
||||
label: district.name,
|
||||
value: district.name,
|
||||
data: district,
|
||||
}))
|
||||
const districtOptions = getUniqueLocationOptions(
|
||||
districts,
|
||||
(district) => district.name,
|
||||
(district) => district.name,
|
||||
)
|
||||
const townshipOptions = getUniqueLocationOptions(
|
||||
districts.filter((district) => district.name === formData.district && district.township),
|
||||
(district) => `${district.township || ''}:${getDistrictPostalCode(district)}`,
|
||||
(district) => district.township || '',
|
||||
)
|
||||
|
||||
const getTenantInfo = async () => {
|
||||
const tenantName = formData.name?.trim()
|
||||
|
|
@ -458,6 +521,7 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
country: tenant.data.country,
|
||||
city: tenant.data.city,
|
||||
district: tenant.data.district,
|
||||
township: tenant.data.township,
|
||||
postalCode: tenant.data.postalCode,
|
||||
phoneNumber: tenant.data.phoneNumber,
|
||||
mobileNumber: tenant.data.mobileNumber,
|
||||
|
|
@ -648,6 +712,14 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
<span>{formData.district}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<FaMap className="w-4 h-4 text-gray-500" />
|
||||
<span className="font-medium">
|
||||
{translate('::App.Listform.ListformField.Township')}:
|
||||
</span>
|
||||
<span>{formData.township}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<FaMapPin className="w-4 h-4 text-gray-500" />
|
||||
<span className="font-medium">
|
||||
|
|
@ -686,24 +758,24 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
</div>
|
||||
) : (
|
||||
<div className="space-y-4">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{translate('::Public.products.tenantForm.orgName')}
|
||||
</label>
|
||||
<div className="relative">
|
||||
<FaBuilding className="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 w-5 h-5" />
|
||||
<input
|
||||
type="text"
|
||||
required
|
||||
autoFocus
|
||||
placeholder="Enter your organization name"
|
||||
value={formData.organizationName || ''}
|
||||
onChange={(e) => handleInputChange('organizationName', e.target.value)}
|
||||
className="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg bg-white text-gray-900 placeholder-gray-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-400 focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{translate('::Public.products.tenantForm.orgName')}
|
||||
</label>
|
||||
<div className="relative">
|
||||
<FaBuilding className="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 w-5 h-5" />
|
||||
<input
|
||||
type="text"
|
||||
required
|
||||
autoFocus
|
||||
placeholder="Enter your organization name"
|
||||
value={formData.organizationName || ''}
|
||||
onChange={(e) => handleInputChange('organizationName', e.target.value)}
|
||||
className="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg bg-white text-gray-900 placeholder-gray-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-400 focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{translate('::LoginPanel.Profil')}
|
||||
|
|
@ -720,9 +792,6 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{translate('::Public.payment.customer.country')}
|
||||
|
|
@ -741,6 +810,9 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{translate('::Public.common.city')}
|
||||
|
|
@ -758,9 +830,6 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{translate('::Public.payment.customer.district')}
|
||||
|
|
@ -776,13 +845,35 @@ export const TenantForm: React.FC<TenantFormProps> = ({ onSubmit }) => {
|
|||
districtOptions.find((option) => option.value === formData.district) ||
|
||||
null
|
||||
}
|
||||
onChange={(option) =>
|
||||
handleInputChange('district', option?.data.name || '')
|
||||
}
|
||||
onChange={handleDistrictChange}
|
||||
placeholder={formData.city ? 'İlçe seçin' : 'Önce şehir seçin'}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{translate('::App.Listform.ListformField.Township')}
|
||||
</label>
|
||||
<div className="relative">
|
||||
<Select<LocationOption<DistrictDto>>
|
||||
required
|
||||
isClearable
|
||||
isDisabled={!formData.district}
|
||||
options={townshipOptions}
|
||||
value={
|
||||
townshipOptions.find(
|
||||
(option) => option.data.township === formData.township,
|
||||
) || null
|
||||
}
|
||||
onChange={handleTownshipChange}
|
||||
placeholder={formData.district ? 'Township seçin' : 'Önce ilçe seçin'}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
{translate('::Public.payment.customer.postalCode')}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ export interface CustomTenantDto extends TenantDto {
|
|||
country: string
|
||||
city: string
|
||||
district: string
|
||||
township: string
|
||||
address1: string
|
||||
address2: string
|
||||
postalCode: string
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export interface DistrictDto {
|
|||
city: string
|
||||
name: string
|
||||
township?: string
|
||||
postalCode?: string
|
||||
}
|
||||
|
||||
export const getCountries = () =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue