Service List Form Seeder
This commit is contained in:
parent
7a57112e0b
commit
8df54adc52
5 changed files with 358 additions and 22 deletions
|
|
@ -8062,7 +8062,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order = 5, DataField = "Sql", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" },
|
||||
new EditingFormItemDto { Order = 6, DataField = "ParametersJson", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" },
|
||||
new EditingFormItemDto { Order = 7, DataField = "PermissionsJson", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" },
|
||||
new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" },
|
||||
]
|
||||
}
|
||||
}),
|
||||
|
|
@ -15439,6 +15439,275 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Services
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Service))
|
||||
{
|
||||
var listFormService = await _listFormRepository.InsertAsync(
|
||||
new ListForm
|
||||
{
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Service,
|
||||
Name = AppCodes.Services,
|
||||
Title = AppCodes.Services,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = false,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Services,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = SelectCommandByTableName("Service"),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
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 = false }),
|
||||
SelectionJson = JsonSerializer.Serialize(new SelectionDto
|
||||
{
|
||||
Mode = GridOptions.SelectionModeSingle,
|
||||
AllowSelectAll = false
|
||||
}),
|
||||
ColumnOptionJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
ColumnFixingEnabled = true,
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||
{
|
||||
C = AppCodes.Services + ".Create",
|
||||
R = AppCodes.Services,
|
||||
U = AppCodes.Services + ".Update",
|
||||
D = AppCodes.Services + ".Delete",
|
||||
E = AppCodes.Services + ".Export",
|
||||
I = AppCodes.Services + ".Import"
|
||||
}),
|
||||
PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto
|
||||
{
|
||||
Visible = true,
|
||||
AllowedPageSizes = "10,20,50,100",
|
||||
ShowPageSizeSelector = true,
|
||||
ShowNavigationButtons = true,
|
||||
ShowInfo = false,
|
||||
InfoText = "Page {0} of {1} ({2} items)",
|
||||
DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive,
|
||||
ScrollingMode = GridColumnOptions.ScrollingModeStandard,
|
||||
LoadPanelEnabled = "auto",
|
||||
LoadPanelText = "Loading..."
|
||||
}),
|
||||
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||
{
|
||||
Popup = new GridEditingPopupDto
|
||||
{
|
||||
Title = "Service Form",
|
||||
Width = 500,
|
||||
Height = 450
|
||||
},
|
||||
AllowDeleting = true,
|
||||
AllowAdding = true,
|
||||
AllowUpdating = true,
|
||||
SendOnlyChangedFormValuesUpdate = false
|
||||
}),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||
{
|
||||
new()
|
||||
{
|
||||
Order = 1,
|
||||
ColCount = 1,
|
||||
ColSpan = 2,
|
||||
ItemType = "group",
|
||||
Items =
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Icon", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "Type", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Features", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" },
|
||||
]
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
#region Services Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormService.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||
{
|
||||
new ValidationRuleDto { Type = "required" }
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Services + ".Create",
|
||||
R = AppCodes.Services,
|
||||
U = AppCodes.Services + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormService.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Title",
|
||||
Width = 200,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = lookupQueryLanguageKeyValues
|
||||
}),
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||
{
|
||||
new ValidationRuleDto { Type = "required" }
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Services + ".Create",
|
||||
R = AppCodes.Services,
|
||||
U = AppCodes.Services + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormService.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Icon",
|
||||
Width = 150,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||
{
|
||||
new ValidationRuleDto { Type = "required" }
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Services + ".Create",
|
||||
R = AppCodes.Services,
|
||||
U = AppCodes.Services + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormService.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 150,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = lookupQueryLanguageKeyValues
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Demos + ".Create",
|
||||
R = AppCodes.Demos,
|
||||
U = AppCodes.Demos + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormService.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Type",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||
{
|
||||
new ValidationRuleDto { Type = "required" }
|
||||
}),
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key="service",Name="Service" },
|
||||
new () { Key="support",Name="Support" },
|
||||
}),
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Services + ".Create",
|
||||
R = AppCodes.Services,
|
||||
U = AppCodes.Services + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormService.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Features",
|
||||
Width = 200,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new[]
|
||||
{
|
||||
new ValidationRuleDto { Type = "required" }
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Services + ".Create",
|
||||
R = AppCodes.Services,
|
||||
U = AppCodes.Services + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
})
|
||||
}
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,10 @@
|
|||
{
|
||||
"Name": "App.Demos",
|
||||
"DisplayName": "App.Demos"
|
||||
},
|
||||
{
|
||||
"Name": "App.Services",
|
||||
"DisplayName": "App.Services"
|
||||
}
|
||||
],
|
||||
"PermissionDefinitionRecords": [
|
||||
|
|
@ -2641,6 +2645,54 @@
|
|||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Services",
|
||||
"Name": "App.Services",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Services",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Services",
|
||||
"Name": "App.Services.Create",
|
||||
"ParentName": "App.Services",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Services",
|
||||
"Name": "App.Services.Update",
|
||||
"ParentName": "App.Services",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Services",
|
||||
"Name": "App.Services.Delete",
|
||||
"ParentName": "App.Services",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Services",
|
||||
"Name": "App.Services.Export",
|
||||
"ParentName": "App.Services",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Services",
|
||||
"Name": "App.Services.Import",
|
||||
"ParentName": "App.Services",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
}
|
||||
],
|
||||
"Menus": [
|
||||
|
|
@ -3084,6 +3136,16 @@
|
|||
"RequiredPermissionName": "App.Demos",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Public",
|
||||
"Code": "App.Services",
|
||||
"DisplayName": "App.Services",
|
||||
"Order": 4,
|
||||
"Url": "/admin/list/list-service",
|
||||
"Icon": "FcServices",
|
||||
"RequiredPermissionName": "App.Services",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": null,
|
||||
"Code": "App.Administration",
|
||||
|
|
@ -13889,6 +13951,12 @@
|
|||
"key": "App.Demos",
|
||||
"tr": "Demolar",
|
||||
"en": "Demos"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Services",
|
||||
"tr": "Hizmetler",
|
||||
"en": "Services"
|
||||
}
|
||||
],
|
||||
"Settings": [
|
||||
|
|
|
|||
|
|
@ -374,6 +374,7 @@ public static class PlatformConsts
|
|||
public const string PurchaseOrder = "list-purchaseorder";
|
||||
public const string ReportCategory = "list-reportcategory";
|
||||
public const string Demo = "list-demo";
|
||||
public const string Service = "list-service";
|
||||
}
|
||||
|
||||
public static class Forms
|
||||
|
|
|
|||
|
|
@ -325,6 +325,7 @@ public static class SeedConsts
|
|||
public const string Language = Default + ".Language";
|
||||
public const string LanguageText = Default + ".LanguageText";
|
||||
}
|
||||
public const string Routes = Prefix.App + ".Routes";
|
||||
public static class Menus
|
||||
{
|
||||
public const string Default = Prefix.App + ".Menus";
|
||||
|
|
@ -350,7 +351,15 @@ public static class SeedConsts
|
|||
}
|
||||
public const string BackgroundWorkers = Prefix.App + ".BackgroundWorkers";
|
||||
public const string CustomEndpoints = Prefix.App + ".CustomEndpoints";
|
||||
public const string Forum = Prefix.App + ".Forum";
|
||||
public static class Reports
|
||||
{
|
||||
public const string Default = Prefix.App + ".Reports";
|
||||
public const string Categories = Default + ".Categories";
|
||||
}
|
||||
|
||||
//Web Site
|
||||
public const string Services = Prefix.App + ".Services";
|
||||
public static class BlogManagement
|
||||
{
|
||||
public const string Default = Prefix.App + ".BlogManagement";
|
||||
|
|
@ -358,8 +367,15 @@ public static class SeedConsts
|
|||
public const string BlogPosts = Default + ".Posts";
|
||||
public const string BlogCategory = Default + ".Category";
|
||||
}
|
||||
|
||||
public const string Forum = Prefix.App + ".Forum";
|
||||
public static class Orders
|
||||
{
|
||||
public const string Default = Prefix.App + ".Orders";
|
||||
public const string Products = Default + ".Products";
|
||||
public const string PaymentMethods = Default + ".PaymentMethods";
|
||||
public const string InstallmentOptions = Default + ".InstallmentOptions";
|
||||
public const string PurchaseOrders = Default + ".PurchaseOrders";
|
||||
}
|
||||
public const string Demos = Prefix.App + ".Demos";
|
||||
|
||||
//Administration
|
||||
public const string Administration = Prefix.App + ".Administration";
|
||||
|
|
@ -388,24 +404,6 @@ public static class SeedConsts
|
|||
public const string Uom = Default + ".Uom";
|
||||
}
|
||||
|
||||
public const string Routes = Prefix.App + ".Routes";
|
||||
|
||||
public static class Orders
|
||||
{
|
||||
public const string Default = Prefix.App + ".Orders";
|
||||
public const string Products = Default + ".Products";
|
||||
public const string PaymentMethods = Default + ".PaymentMethods";
|
||||
public const string InstallmentOptions = Default + ".InstallmentOptions";
|
||||
public const string PurchaseOrders = Default + ".PurchaseOrders";
|
||||
}
|
||||
|
||||
public static class Reports
|
||||
{
|
||||
public const string Default = Prefix.App + ".Reports";
|
||||
public const string Categories = Default + ".Categories";
|
||||
}
|
||||
|
||||
public const string Demos = Prefix.App + ".Demos";
|
||||
}
|
||||
|
||||
public static class DataSources
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
|||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.bmupql65hho"
|
||||
"revision": "0.nl4q9o5kpbo"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
|
|
|||
Loading…
Reference in a new issue