Supply Chain Approval
This commit is contained in:
parent
3ee51b2b3a
commit
f1a8f18070
21 changed files with 1086 additions and 147 deletions
|
|
@ -9265,6 +9265,12 @@
|
|||
"tr": "Onay İş Akışları",
|
||||
"en": "Approval Workflows"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SupplyChain.ApprovalStep",
|
||||
"tr": "Onay İş Akış Adımları",
|
||||
"en": "Approval Workflow Steps"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SupplyChain.Order",
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Accounting.BankAccount,
|
||||
Url=$"/admin/form/{utils.GetFormCodes(ListFormCodes.Lists.Bank)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Bank)}/@Id"
|
||||
},
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
|
|
@ -347,7 +347,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.Bank,
|
||||
utils.GetFormCodes(ListFormCodes.Lists.Bank),
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Bank Accounts",
|
||||
|
|
|
|||
|
|
@ -4070,7 +4070,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Skill,
|
||||
Url=$"/admin/form/{utils.GetFormCodes(ListFormCodes.Lists.SkillType)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.SkillType)}/@Id"
|
||||
},
|
||||
}),
|
||||
}, autoSave: true);
|
||||
|
|
@ -4115,7 +4115,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.SkillType,
|
||||
utils.GetFormCodes(ListFormCodes.Lists.SkillType),
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Skill Levels",
|
||||
|
|
@ -4437,7 +4436,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Uom,
|
||||
Url=$"/admin/form/{utils.GetFormCodes(ListFormCodes.Lists.UomCategory)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.UomCategory)}/@Id"
|
||||
},
|
||||
}),
|
||||
}, autoSave: true);
|
||||
|
|
@ -4482,7 +4481,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.UomCategory,
|
||||
utils.GetFormCodes(ListFormCodes.Lists.UomCategory),
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Uoms",
|
||||
|
|
|
|||
|
|
@ -2038,7 +2038,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
Text ="Questions",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Question,
|
||||
Url=$"/admin/form/{utils.GetFormCodes(ListFormCodes.Lists.QuestionPool)}/@Id",
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.QuestionPool)}/@Id",
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -2119,7 +2119,6 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.QuestionPool,
|
||||
utils.GetFormCodes(ListFormCodes.Lists.QuestionPool),
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Questions",
|
||||
|
|
|
|||
|
|
@ -4032,7 +4032,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Survey + ".Update",
|
||||
Url=$"/admin/form/{utils.GetFormCodes(ListFormCodes.Lists.Survey)}/@Id",
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Survey)}/@Id",
|
||||
}
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -4153,7 +4153,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.Survey,
|
||||
utils.GetFormCodes(ListFormCodes.Lists.Survey),
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Questions",
|
||||
|
|
@ -4179,7 +4178,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Hint = "Branches",
|
||||
Text = "Branches",
|
||||
AuthName = AppCodes.Branches,
|
||||
Url=$"/admin/form/{utils.GetFormCodes(ListFormCodes.Lists.Tenant)}/@Id",
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Tenant)}/@Id",
|
||||
},
|
||||
}),
|
||||
InsertServiceAddress = "list-form-dynamic-api/tenant-insert",
|
||||
|
|
@ -523,7 +523,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.Tenant,
|
||||
utils.GetFormCodes(ListFormCodes.Lists.Tenant),
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Branches",
|
||||
|
|
@ -1558,7 +1557,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Languages.LanguageText,
|
||||
Url=$"/admin/form/{utils.GetFormCodes(ListFormCodes.Lists.Language)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Language)}/@Id"
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -1654,7 +1653,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.Language,
|
||||
utils.GetFormCodes(ListFormCodes.Lists.Language),
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Language Texts",
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
#region Material Type
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialType))
|
||||
{
|
||||
var listFormMaterialType = await _listFormRepository.InsertAsync(
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
|
|
@ -97,9 +97,9 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
);
|
||||
|
||||
#region MaterialType Fields
|
||||
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listFormMaterialType.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
|
|
@ -114,7 +114,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialType.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Code",
|
||||
|
|
@ -130,7 +130,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialType.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
|
|
@ -148,7 +148,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialType.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
|
|
@ -164,7 +164,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
},
|
||||
|
||||
new() {
|
||||
ListFormCode = listFormMaterialType.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
|
|
@ -178,7 +178,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
});
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -186,7 +186,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
#region Material Group
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialGroup))
|
||||
{
|
||||
var listFormMaterialGroup = await _listFormRepository.InsertAsync(
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
|
|
@ -237,7 +237,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
#region MaterialGroup Fields
|
||||
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
|
||||
new() {
|
||||
ListFormCode = listFormMaterialGroup.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
|
|
@ -252,7 +252,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialGroup.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Code",
|
||||
|
|
@ -268,7 +268,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialGroup.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
|
|
@ -284,7 +284,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialGroup.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
|
|
@ -299,7 +299,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialGroup.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
|
|
@ -314,7 +314,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialGroup.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "ParentGroupId",
|
||||
|
|
@ -330,7 +330,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listFormMaterialGroup.ListFormCode,
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "HierarchyPath",
|
||||
|
|
@ -1137,7 +1137,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.SupplyChain.Supply,
|
||||
Url=$"/admin/form/{utils.GetFormCodes(ListFormCodes.Lists.Supply)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Supply)}/@Id"
|
||||
},
|
||||
}),
|
||||
}, autoSave: true);
|
||||
|
|
@ -1705,7 +1705,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.Supply,
|
||||
utils.GetFormCodes(ListFormCodes.Lists.Supply),
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Banks",
|
||||
|
|
@ -2438,5 +2437,366 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Approval Workflow
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Approval))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Approval,
|
||||
Name = AppCodes.SupplyChain.Approval,
|
||||
Title = AppCodes.SupplyChain.Approval,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.SupplyChain.Approval,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Approval)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
|
||||
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.Approval),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Approval)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.Approval, 500, 300, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "MaterialTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "AmountThreshold", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new() {
|
||||
Hint = "Manage",
|
||||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.SupplyChain.Approval,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Approval)}/@Id"
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region Approval Workflow Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Approval),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 250,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Approval),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "DepartmentId",
|
||||
Width = 200,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Department), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Approval),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "MaterialTypeId",
|
||||
Width = 200,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.MaterialType), "Id", "Name"),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Approval),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "AmountThreshold",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Approval),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Approval),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
|
||||
// Sub Forms for Approval Workflow
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
ListFormCodes.Lists.Approval,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Steps",
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = ListFormCodes.Lists.ApprovalStep,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "Id",
|
||||
ChildFieldName = "ApprovalId"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Approval Workflow Step
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.ApprovalStep))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.ApprovalStep,
|
||||
Name = AppCodes.SupplyChain.ApprovalStep,
|
||||
Title = AppCodes.SupplyChain.ApprovalStep,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.SupplyChain.ApprovalStep,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ApprovalStep)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
|
||||
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.ApprovalStep),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ApprovalStep)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.ApprovalStep, 500, 300, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "Level", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "EmployeeIds", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTagBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "TimeoutDays", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "IsRequired", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "IsParallel", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "ApprovalId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "TimeoutDays", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "IsRequired", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "IsParallel", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
#region Approval Workflow Step Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Approval),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int32,
|
||||
FieldName = "Level",
|
||||
Width = 100,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.ApprovalStep),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "EmployeeIds",
|
||||
Width = 500,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.ApprovalStep),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int32,
|
||||
FieldName = "TimeoutDays",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.ApprovalStep),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsRequired",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.ApprovalStep),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsParallel",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.ApprovalStep),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "ApprovalId",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Approval), "Id", "Name"),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.ApprovalStep),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,18 +152,14 @@
|
|||
"path": "/admin/menuManager",
|
||||
"componentPath": "@/views/menu/MenuManager",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Menus.Manager"
|
||||
]
|
||||
"authority": ["App.Menus.Manager"]
|
||||
},
|
||||
{
|
||||
"key": "admin.listFormManagement.wizard",
|
||||
"path": "/admin/listform/wizard",
|
||||
"componentPath": "@/views/admin/listForm/Wizard",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Listforms.Wizard"
|
||||
]
|
||||
"authority": ["App.Listforms.Wizard"]
|
||||
},
|
||||
{
|
||||
"key": "admin.listFormManagement.edit",
|
||||
|
|
@ -177,18 +173,14 @@
|
|||
"path": "/admin/forumManagement",
|
||||
"componentPath": "@/views/forum/Management",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.ForumManagement"
|
||||
]
|
||||
"authority": ["App.ForumManagement"]
|
||||
},
|
||||
{
|
||||
"key": "admin.ai",
|
||||
"path": "/admin/ai",
|
||||
"componentPath": "@/views/ai/Assistant",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"Abp.Identity.Ai"
|
||||
]
|
||||
"authority": ["Abp.Identity.Ai"]
|
||||
},
|
||||
{
|
||||
"key": "admin.profile.general",
|
||||
|
|
@ -230,36 +222,28 @@
|
|||
"path": "/admin/settings",
|
||||
"componentPath": "@/views/settings/Settings",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Setting"
|
||||
]
|
||||
"authority": ["App.Setting"]
|
||||
},
|
||||
{
|
||||
"key": "admin.identity.user.detail",
|
||||
"path": "/admin/users/detail/:userId",
|
||||
"componentPath": "@/views/admin/user-management/Details",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"AbpIdentity.Users.Update"
|
||||
]
|
||||
"authority": ["AbpIdentity.Users.Update"]
|
||||
},
|
||||
{
|
||||
"key": "admin.identity.ous",
|
||||
"path": "/admin/ous",
|
||||
"componentPath": "@/views/admin/organization-unit/OrganizationUnits",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"Abp.Identity.OrganizationUnits"
|
||||
]
|
||||
"authority": ["Abp.Identity.OrganizationUnits"]
|
||||
},
|
||||
{
|
||||
"key": "admin.forum",
|
||||
"path": "/admin/forum",
|
||||
"componentPath": "@/views/forum/Forum",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.ForumManagement.Publish"
|
||||
]
|
||||
"authority": ["App.ForumManagement.Publish"]
|
||||
},
|
||||
{
|
||||
"key": "admin.list",
|
||||
|
|
@ -301,216 +285,168 @@
|
|||
"path": "/admin/developerkit",
|
||||
"componentPath": "@/views/developerKit/DashboardPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit"
|
||||
]
|
||||
"authority": ["App.DeveloperKit"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities",
|
||||
"path": "/admin/developerkit/entities",
|
||||
"componentPath": "@/views/developerKit/EntityPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities.new",
|
||||
"path": "/admin/developerkit/entities/new",
|
||||
"componentPath": "@/views/developerKit/EntityDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities.edit",
|
||||
"path": "/admin/developerkit/entities/edit/:id",
|
||||
"componentPath": "@/views/developerKit/EntityDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.migrations",
|
||||
"path": "/admin/developerkit/migrations",
|
||||
"componentPath": "@/views/developerKit/MigrationPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Migrations"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Migrations"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.endpoints",
|
||||
"path": "/admin/developerkit/endpoints",
|
||||
"componentPath": "@/views/developerKit/CrudEndpointPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.CrudEndpoints"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.CrudEndpoints"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.dynamic-services",
|
||||
"path": "/admin/developerkit/dynamic-services",
|
||||
"componentPath": "@/views/developerKit/DynamicServicePage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.DynamicServices"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.DynamicServices"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components",
|
||||
"path": "/admin/developerkit/components",
|
||||
"componentPath": "@/views/developerKit/ComponentPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.new",
|
||||
"path": "/admin/developerkit/components/new",
|
||||
"componentPath": "@/views/developerKit/ComponentDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.view",
|
||||
"path": "/admin/developerkit/components/view/:id",
|
||||
"componentPath": "@/views/developerKit/ComponentDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.edit",
|
||||
"path": "/admin/developerkit/components/edit/:id",
|
||||
"componentPath": "@/views/developerKit/CodePage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.reportManagement",
|
||||
"path": "/admin/reports/management",
|
||||
"componentPath": "@/views/report/DashboardPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Reports.Management"
|
||||
]
|
||||
"authority": ["App.Reports.Management"]
|
||||
},
|
||||
{
|
||||
"key": "admin.reports.view",
|
||||
"path": "/admin/reports/:id",
|
||||
"componentPath": "@/views/report/ReportViewerPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Reports.Categories"
|
||||
]
|
||||
"authority": ["App.Reports.Categories"]
|
||||
},
|
||||
{
|
||||
"key": "admin.fileManagement",
|
||||
"path": "/admin/files",
|
||||
"componentPath": "@/views/admin/files/FileManager",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Files"
|
||||
]
|
||||
"authority": ["App.Files"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.dashboard",
|
||||
"path": "/admin/coordinator/classroom/dashboard",
|
||||
"componentPath": "@/views/coordinator/Classroom/Dashboard",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.Dashboard"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.Dashboard"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.classes",
|
||||
"path": "/admin/coordinator/classroom/classes",
|
||||
"componentPath": "@/views/coordinator/Classroom/ClassList",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.List"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.List"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.classroom",
|
||||
"path": "/admin/coordinator/classroom/room/:id",
|
||||
"componentPath": "@/views/coordinator/Classroom/RoomDetail",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.RoomDetail"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.RoomDetail"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.planning",
|
||||
"path": "/admin/coordinator/classroom/planning/:id",
|
||||
"componentPath": "@/views/coordinator/Classroom/PlanningPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.Planning"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.Planning"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.exams",
|
||||
"path": "/admin/coordinator/exams",
|
||||
"componentPath": "@/views/coordinator/Exams",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Exams"
|
||||
]
|
||||
"authority": ["App.Coordinator.Exams"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.examDetail",
|
||||
"path": "/admin/coordinator/exam/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/ExamInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Exams"
|
||||
]
|
||||
"authority": ["App.Coordinator.Exams"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.assignments",
|
||||
"path": "/admin/coordinator/assignments",
|
||||
"componentPath": "@/views/coordinator/Assignments",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Assignments"
|
||||
]
|
||||
"authority": ["App.Coordinator.Assignments"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.assignmentDetail",
|
||||
"path": "/admin/coordinator/assignment/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/ExamInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Assignments"
|
||||
]
|
||||
"authority": ["App.Coordinator.Assignments"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.tests",
|
||||
"path": "/admin/coordinator/tests",
|
||||
"componentPath": "@/views/coordinator/Tests",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Tests"
|
||||
]
|
||||
"authority": ["App.Coordinator.Tests"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.testDetail",
|
||||
"path": "/admin/coordinator/test/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/PDFTestInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Tests"
|
||||
]
|
||||
"authority": ["App.Coordinator.Tests"]
|
||||
},
|
||||
{
|
||||
"key": "admin.supplychain.requests",
|
||||
|
|
@ -568,13 +504,6 @@
|
|||
"routeType": "protected",
|
||||
"authority": null
|
||||
},
|
||||
{
|
||||
"key": "admin.supplychain.approvals",
|
||||
"path": "/admin/supplychain/approvals",
|
||||
"componentPath": "@/views/supplychain/components/ApprovalWorkflows",
|
||||
"routeType": "protected",
|
||||
"authority": null
|
||||
},
|
||||
{
|
||||
"key": "admin.supplychain.orders",
|
||||
"path": "/admin/supplychain/orders",
|
||||
|
|
@ -2428,11 +2357,11 @@
|
|||
"Code": "App.SupplyChain.Approval",
|
||||
"DisplayName": "App.SupplyChain.Approval",
|
||||
"Order": 8,
|
||||
"Url": "/admin/supplychain/approvals",
|
||||
"Url": "/admin/list/list-approval",
|
||||
"Icon": "FcApproval",
|
||||
"RequiredPermissionName": "App.SupplyChain.Approval",
|
||||
"IsDisabled": false
|
||||
},
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.SupplyChain",
|
||||
"Code": "App.SupplyChain.Request",
|
||||
|
|
@ -3054,4 +2983,4 @@
|
|||
"IsDisabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5812,6 +5812,70 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.MaterialType",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.SupplyChain.MaterialType",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.MaterialType.Create",
|
||||
"ParentName": "App.SupplyChain.MaterialType",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.MaterialType.Update",
|
||||
"ParentName": "App.SupplyChain.MaterialType",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.MaterialType.Delete",
|
||||
"ParentName": "App.SupplyChain.MaterialType",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.MaterialType.Export",
|
||||
"ParentName": "App.SupplyChain.MaterialType",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.MaterialType.Import",
|
||||
"ParentName": "App.SupplyChain.MaterialType",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.MaterialType.Activity",
|
||||
"ParentName": "App.SupplyChain.MaterialType",
|
||||
"DisplayName": "Activity",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
|
|
@ -6191,6 +6255,71 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.ApprovalStep",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.SupplyChain.ApprovalStep",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.ApprovalStep.Create",
|
||||
"ParentName": "App.SupplyChain.ApprovalStep",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.ApprovalStep.Update",
|
||||
"ParentName": "App.SupplyChain.ApprovalStep",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.ApprovalStep.Delete",
|
||||
"ParentName": "App.SupplyChain.ApprovalStep",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.ApprovalStep.Export",
|
||||
"ParentName": "App.SupplyChain.ApprovalStep",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.ApprovalStep.Import",
|
||||
"ParentName": "App.SupplyChain.ApprovalStep",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.ApprovalStep.Activity",
|
||||
"ParentName": "App.SupplyChain.ApprovalStep",
|
||||
"DisplayName": "Activity",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Order",
|
||||
|
|
|
|||
|
|
@ -11,15 +11,22 @@ public class SeederUtils : IDisposable
|
|||
public async Task<ListForm> CloneListFormWithFieldsAsync(
|
||||
IRepository<ListForm, Guid> listFormRepository,
|
||||
IRepository<ListFormField, Guid> listFormFieldRepository,
|
||||
string sourceListFormCode,
|
||||
string targetListFormCode,
|
||||
string listFormCode,
|
||||
string subFormsJson = "")
|
||||
{
|
||||
// load source form
|
||||
var sourceForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == sourceListFormCode);
|
||||
var sourceForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode);
|
||||
if (sourceForm == null)
|
||||
{
|
||||
return null!;
|
||||
return null;
|
||||
}
|
||||
|
||||
string targetListFormCode = GetDefaultFormCodes(listFormCode);
|
||||
|
||||
var targetForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == targetListFormCode);
|
||||
if (targetForm != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// create a shallow copy of the source form and set the target code
|
||||
|
|
@ -68,7 +75,7 @@ public class SeederUtils : IDisposable
|
|||
var insertedForm = await listFormRepository.InsertAsync(clonedForm);
|
||||
|
||||
// copy fields
|
||||
var fields = await listFormFieldRepository.GetListAsync(f => f.ListFormCode == sourceListFormCode);
|
||||
var fields = await listFormFieldRepository.GetListAsync(f => f.ListFormCode == listFormCode);
|
||||
if (fields != null && fields.Count > 0)
|
||||
{
|
||||
var clonedFields = new List<ListFormField>();
|
||||
|
|
@ -104,7 +111,7 @@ public class SeederUtils : IDisposable
|
|||
return insertedForm;
|
||||
}
|
||||
|
||||
public string GetFormCodes(string listCode)
|
||||
public string GetDefaultFormCodes(string listCode)
|
||||
{
|
||||
return listCode.Replace("list-", "form-");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,4 +149,6 @@ public enum TableNameEnum
|
|||
DynamicService,
|
||||
Material,
|
||||
MaterialSpecification,
|
||||
Approval,
|
||||
ApprovalStep,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -515,6 +515,8 @@ public static class PlatformConsts
|
|||
public const string SupplyBank = "list-supplybank";
|
||||
public const string SupplyCertificate = "list-supplycertificate";
|
||||
public const string SupplyContact = "list-supplycontact";
|
||||
public const string Approval = "list-approval";
|
||||
public const string ApprovalStep = "list-approvalstep";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,8 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.PaymentTerm), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.SupplyType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.SupplyCardType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.Approval), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.ApprovalStep), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
|
||||
//Crm
|
||||
{ nameof(TableNameEnum.CustomerSegment), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||
|
|
|
|||
|
|
@ -500,6 +500,8 @@ public static class SeedConsts
|
|||
public const string PartnerBank = Default + ".PartnerBank";
|
||||
public const string PartnerCertificate = Default + ".PartnerCertificate";
|
||||
public const string PartnerContact = Default + ".PartnerContact";
|
||||
public const string Approval = Default + ".Approval";
|
||||
public const string ApprovalStep = Default + ".ApprovalStep";
|
||||
}
|
||||
|
||||
public static class Accounting
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class Approval : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public Guid DepartmentId { get; set; }
|
||||
public Department Department { get; set; }
|
||||
|
||||
public Guid MaterialTypeId { get; set; }
|
||||
public MaterialType MaterialType { get; set; }
|
||||
|
||||
public decimal AmountThreshold { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<ApprovalStep> ApprovalSteps { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class ApprovalStep : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid ApprovalId { get; set; }
|
||||
public Approval Approval { get; set; }
|
||||
|
||||
public int Level { get; set; }
|
||||
public string EmployeeIds { get; set; }
|
||||
public int TimeoutDays { get; set; }
|
||||
public bool IsRequired { get; set; }
|
||||
public bool IsParallel { get; set; }
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
|
@ -16,5 +15,6 @@ public class MaterialType : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<Material> Materials { get; set; }
|
||||
public ICollection<Approval> ApprovalWorkflows { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@ public class PlatformDbContext :
|
|||
|
||||
public DbSet<CustomerType> CustomerTypes { get; set; }
|
||||
public DbSet<CustomerSegment> CustomerSegments { get; set; }
|
||||
public DbSet<Approval> Approvals { get; set; }
|
||||
public DbSet<ApprovalStep> ApprovalSteps { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Accounting
|
||||
|
|
@ -2527,6 +2529,37 @@ public class PlatformDbContext :
|
|||
.HasForeignKey(x => x.UnitId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<Approval>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Approval)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(200);
|
||||
b.Property(x => x.DepartmentId).IsRequired();
|
||||
b.Property(x => x.MaterialTypeId).IsRequired();
|
||||
b.Property(x => x.AmountThreshold).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
|
||||
b.HasOne(x => x.MaterialType)
|
||||
.WithMany(x => x.ApprovalWorkflows)
|
||||
.HasForeignKey(x => x.MaterialTypeId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<ApprovalStep>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ApprovalStep)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Level).IsRequired();
|
||||
b.Property(x => x.EmployeeIds).IsRequired().HasMaxLength(1000);
|
||||
b.Property(x => x.TimeoutDays).IsRequired().HasDefaultValue(0);
|
||||
|
||||
b.HasOne(x => x.Approval)
|
||||
.WithMany(x => x.ApprovalSteps)
|
||||
.HasForeignKey(x => x.ApprovalId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251112185040_Initial")]
|
||||
[Migration("20251113092739_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -802,6 +802,141 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Net_T_Announcement", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Approval", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("AmountThreshold")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("DepartmentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<Guid>("MaterialTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DepartmentId");
|
||||
|
||||
b.HasIndex("MaterialTypeId");
|
||||
|
||||
b.ToTable("Scp_T_Approval", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ApprovalStep", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("ApprovalId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("EmployeeIds")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<bool>("IsParallel")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsRequired")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<int>("Level")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<int>("TimeoutDays")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ApprovalId");
|
||||
|
||||
b.ToTable("Scp_T_ApprovalStep", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.BackgroundWorker", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -12690,6 +12825,36 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Approval", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Department", "Department")
|
||||
.WithMany()
|
||||
.HasForeignKey("DepartmentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.MaterialType", "MaterialType")
|
||||
.WithMany("ApprovalWorkflows")
|
||||
.HasForeignKey("MaterialTypeId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Department");
|
||||
|
||||
b.Navigation("MaterialType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ApprovalStep", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Approval", "Approval")
|
||||
.WithMany("ApprovalSteps")
|
||||
.HasForeignKey("ApprovalId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Approval");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.BankAccount", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Bank", "Bank")
|
||||
|
|
@ -13824,6 +13989,11 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Notifications");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Approval", b =>
|
||||
{
|
||||
b.Navigation("ApprovalSteps");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.BlogCategory", b =>
|
||||
{
|
||||
b.Navigation("Posts");
|
||||
|
|
@ -13961,6 +14131,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaterialType", b =>
|
||||
{
|
||||
b.Navigation("ApprovalWorkflows");
|
||||
|
||||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
|
|
@ -4566,6 +4566,42 @@ namespace Erp.Platform.Migrations
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Scp_T_Approval",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
MaterialTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
AmountThreshold = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Scp_T_Approval", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_Approval_Hr_T_Department_DepartmentId",
|
||||
column: x => x.DepartmentId,
|
||||
principalTable: "Hr_T_Department",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_Approval_Scp_T_MaterialType_MaterialTypeId",
|
||||
column: x => x.MaterialTypeId,
|
||||
principalTable: "Scp_T_MaterialType",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Hr_T_Employee",
|
||||
columns: table => new
|
||||
|
|
@ -4650,6 +4686,37 @@ namespace Erp.Platform.Migrations
|
|||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Scp_T_ApprovalStep",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
ApprovalId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Level = table.Column<int>(type: "int", nullable: false),
|
||||
EmployeeIds = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
TimeoutDays = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||
IsRequired = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsParallel = table.Column<bool>(type: "bit", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Scp_T_ApprovalStep", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_ApprovalStep_Scp_T_Approval_ApprovalId",
|
||||
column: x => x.ApprovalId,
|
||||
principalTable: "Scp_T_Approval",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Hr_T_Expense",
|
||||
columns: table => new
|
||||
|
|
@ -6166,6 +6233,21 @@ namespace Erp.Platform.Migrations
|
|||
table: "Sas_T_ReportTemplate",
|
||||
column: "CategoryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Approval_DepartmentId",
|
||||
table: "Scp_T_Approval",
|
||||
column: "DepartmentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Approval_MaterialTypeId",
|
||||
table: "Scp_T_Approval",
|
||||
column: "MaterialTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_ApprovalStep_ApprovalId",
|
||||
table: "Scp_T_ApprovalStep",
|
||||
column: "ApprovalId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Material_CurrencyId",
|
||||
table: "Scp_T_Material",
|
||||
|
|
@ -6626,6 +6708,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_ReportParameter");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_ApprovalStep");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_MaterialSpecification");
|
||||
|
||||
|
|
@ -6719,6 +6804,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_ReportTemplate");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_Approval");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AbpAuditLogs");
|
||||
|
||||
|
|
@ -799,6 +799,141 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Net_T_Announcement", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Approval", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("AmountThreshold")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("DepartmentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<Guid>("MaterialTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DepartmentId");
|
||||
|
||||
b.HasIndex("MaterialTypeId");
|
||||
|
||||
b.ToTable("Scp_T_Approval", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ApprovalStep", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("ApprovalId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("EmployeeIds")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<bool>("IsParallel")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsRequired")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<int>("Level")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<int>("TimeoutDays")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ApprovalId");
|
||||
|
||||
b.ToTable("Scp_T_ApprovalStep", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.BackgroundWorker", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -12687,6 +12822,36 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Approval", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Department", "Department")
|
||||
.WithMany()
|
||||
.HasForeignKey("DepartmentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.MaterialType", "MaterialType")
|
||||
.WithMany("ApprovalWorkflows")
|
||||
.HasForeignKey("MaterialTypeId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Department");
|
||||
|
||||
b.Navigation("MaterialType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ApprovalStep", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Approval", "Approval")
|
||||
.WithMany("ApprovalSteps")
|
||||
.HasForeignKey("ApprovalId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Approval");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.BankAccount", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Bank", "Bank")
|
||||
|
|
@ -13821,6 +13986,11 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Notifications");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Approval", b =>
|
||||
{
|
||||
b.Navigation("ApprovalSteps");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.BlogCategory", b =>
|
||||
{
|
||||
b.Navigation("Posts");
|
||||
|
|
@ -13958,6 +14128,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaterialType", b =>
|
||||
{
|
||||
b.Navigation("ApprovalWorkflows");
|
||||
|
||||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue