SubForm List Form Title
This commit is contained in:
parent
6e6599ba15
commit
a9a137a08c
10 changed files with 21 additions and 23 deletions
|
|
@ -5703,13 +5703,13 @@
|
|||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Definitions.Bank",
|
||||
"key": "App.Accounting.Bank",
|
||||
"tr": "Bankalar",
|
||||
"en": "Banks"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Definitions.BankAccount",
|
||||
"key": "App.Accounting.BankAccount",
|
||||
"tr": "Banka Hesapları",
|
||||
"en": "Bank Accounts"
|
||||
},
|
||||
|
|
@ -9810,12 +9810,6 @@
|
|||
"tr": "Kasa",
|
||||
"en": "Cash"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Accounting.Bank",
|
||||
"tr": "Banka",
|
||||
"en": "Bank"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Accounting.CheckNote",
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
string listFormCode = string.Empty;
|
||||
|
||||
#region Bank
|
||||
listFormCode = AppCodes.Accounting.Bank;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == AppCodes.Accounting.Bank))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
|
|
@ -59,11 +61,11 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
ListFormCode = AppCodes.Accounting.Bank,
|
||||
Name = AppCodes.Accounting.Bank,
|
||||
Title = AppCodes.Accounting.Bank,
|
||||
Description = AppCodes.Accounting.Bank,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = true,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Accounting.Bank,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank)),
|
||||
KeyFieldName = "Id",
|
||||
|
|
@ -493,7 +495,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
AppCodes.Accounting.Bank,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Bank Accounts",
|
||||
TabTitle = AppCodes.Accounting.BankAccount,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Accounting.BankAccount,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
|
|||
|
|
@ -4349,7 +4349,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
AppCodes.Definitions.SkillType,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Skill Levels",
|
||||
TabTitle = AppCodes.Definitions.SkillLevel,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Definitions.SkillLevel,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
@ -4655,7 +4655,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
AppCodes.Definitions.UomCategory,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Uoms",
|
||||
TabTitle = AppCodes.Definitions.Uom,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Definitions.Uom,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
|
|||
|
|
@ -2416,7 +2416,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
AppCodes.Definitions.QuestionPool,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Questions",
|
||||
TabTitle = AppCodes.Definitions.Question,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Definitions.Question,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
|
|||
|
|
@ -1935,7 +1935,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
AppCodes.Crm.Opportunity,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Activity",
|
||||
TabTitle = AppCodes.Crm.OpportunityActivity,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Crm.OpportunityActivity,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
|
|||
|
|
@ -4481,7 +4481,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
AppCodes.Hr.Survey,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Questions",
|
||||
TabTitle = AppCodes.Hr.SurveyQuestion,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Hr.SurveyQuestion,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
|
|||
|
|
@ -1256,7 +1256,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
AppCodes.Maintenance.Plan,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Materials",
|
||||
TabTitle = AppCodes.Maintenance.PlanMaterial,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Maintenance.PlanMaterial,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
|
|||
|
|
@ -968,7 +968,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
TenantManagementPermissions.Tenants.Default,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Branches",
|
||||
TabTitle = AppCodes.Branches,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Branches,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
@ -1820,7 +1820,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
AppCodes.Languages.Language,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Language Texts",
|
||||
TabTitle = AppCodes.Languages.LanguageText,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Languages.LanguageText,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
|
|||
|
|
@ -2353,7 +2353,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
AppCodes.SupplyChain.Supply,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Banks",
|
||||
TabTitle = AppCodes.SupplyChain.PartnerBank,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.SupplyChain.PartnerBank,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
@ -2398,7 +2398,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
AppCodes.Crm.Customer,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Banks",
|
||||
TabTitle = AppCodes.SupplyChain.PartnerBank,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.SupplyChain.PartnerBank,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
@ -2768,7 +2768,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
AppCodes.SupplyChain.Approval,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Steps",
|
||||
TabTitle = AppCodes.SupplyChain.ApprovalStep,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.SupplyChain.ApprovalStep,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
@ -3374,7 +3374,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
AppCodes.SupplyChain.Request,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Malzemeler",
|
||||
TabTitle = AppCodes.SupplyChain.RequestItem,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.SupplyChain.RequestItem,
|
||||
Relation = new List<dynamic>() {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import { GridDto, SubFormDto, SubFormTabTypeEnum } from '@/proxy/form/models'
|
|||
import FormEdit from './FormEdit'
|
||||
import FormNew from './FormNew'
|
||||
import FormView from './FormView'
|
||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||
|
||||
const SubForms = (props: {
|
||||
gridDto: GridDto
|
||||
|
|
@ -24,6 +25,7 @@ const SubForms = (props: {
|
|||
const [currentTab, setCurrentTab] = useState<string>()
|
||||
const [subForms, setSubForms] = useState<SubFormDto[]>()
|
||||
const navigate = useNavigate()
|
||||
const { translate } = useLocalization()
|
||||
|
||||
useEffect(() => {
|
||||
if (hash && level === 0) {
|
||||
|
|
@ -89,7 +91,7 @@ const SubForms = (props: {
|
|||
value={subForm.code}
|
||||
icon={subForm.tabType == SubFormTabTypeEnum.List ? <FaList /> : <FaChartBar />}
|
||||
>
|
||||
{subForm.tabTitle}
|
||||
{translate('::' + subForm.tabTitle)}
|
||||
</TabNav>
|
||||
)
|
||||
})}
|
||||
|
|
|
|||
Loading…
Reference in a new issue