From 10404ab63a278a8d14d59fb5752f60246f9f7788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Wed, 6 May 2026 11:53:11 +0300 Subject: [PATCH] =?UTF-8?q?Survey=20ListForm=20tan=C4=B1mlamalar=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LookUpQueryValues.cs | 10 +- .../Seeds/LanguagesData.json | 18 + .../Seeds/ListFormSeeder_Administration.cs | 310 +++++++++++++++++- .../Seeds/PermissionsData.json | 131 +++++++- .../Data/SeedConsts.cs | 2 + ui/src/views/list/useListFormColumns.ts | 7 +- 6 files changed, 456 insertions(+), 22 deletions(-) diff --git a/api/src/Sozsoft.Platform.Application.Contracts/LookUpQueryValues.cs b/api/src/Sozsoft.Platform.Application.Contracts/LookUpQueryValues.cs index 4a179d6..3836d8e 100644 --- a/api/src/Sozsoft.Platform.Application.Contracts/LookUpQueryValues.cs +++ b/api/src/Sozsoft.Platform.Application.Contracts/LookUpQueryValues.cs @@ -222,5 +222,13 @@ public static class LookupQueryValues $"WHERE " + $"(\"DepartmentId\" = @param0 OR @param0 IS NULL) " + $"AND \"IsDeleted\" = 'false' " + - $"ORDER BY \"Name\";"; + $"ORDER BY \"Name\";"; + + public static string SurveyQuestionValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"QuestionText\" AS \"Name\" " + + $"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.SurveyQuestion))}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"ORDER BY \"QuestionText\";"; } diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json index 3b13a00..8f13083 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json @@ -6102,12 +6102,24 @@ "tr": "Anket Soruları", "en": "Survey Questions" }, + { + "resourceName": "Platform", + "key": "App.Intranet.SurveyQuestionOption", + "tr": "Anket Soruları Seçenekleri", + "en": "Survey Question Options" + }, { "resourceName": "Platform", "key": "App.Intranet.SurveyResponse", "tr": "Anket Yanıtları", "en": "Survey Responses" }, + { + "resourceName": "Platform", + "key": "App.Intranet.SurveyAnswer", + "tr": "Anket Yanıtları Cevapları", + "en": "Survey Response Answers" + }, { "resourceName": "Platform", "key": "App.Intranet.Survey", @@ -15206,6 +15218,12 @@ "en": "Question Text", "tr": "Soru Metni" }, + { + "resourceName": "Platform", + "key": "App.Listform.ListformField.Text", + "en": "Text", + "tr": "Metin" + }, { "resourceName": "Platform", "key": "App.Listform.ListformField.QuestionType", diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index dff8d69..332fc10 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -2668,21 +2668,20 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Announcement)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 750, 600, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Excerpt", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Content", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions }, - new EditingFormItemDto { Order = 4, DataField = "ImageUrl", ColSpan=1, EditorType2 = EditorTypes.dxTagBox }, - new EditingFormItemDto { Order = 5, DataField = "Category", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 6, DataField = "UserId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 7, DataField = "PublishDate", ColSpan=1, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 8, DataField = "ExpiryDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 9, DataField = "IsPinned", ColSpan=1, EditorType2 = EditorTypes.dxCheckBox }, + Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Excerpt", ColSpan=2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Content", ColSpan=2, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions }, + new EditingFormItemDto { Order = 4, DataField = "Category", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "UserId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 6, DataField = "PublishDate", ColSpan=1, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 7, DataField = "ExpiryDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 8, DataField = "IsPinned", ColSpan=1, EditorType2 = EditorTypes.dxCheckBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -3108,15 +3107,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = + Order=1, ColCount=3, ColSpan=1, ItemType="group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Order", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 2, DataField = "QuestionText", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "QuestionText", ColSpan=3, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Order", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 3, DataField = "Type", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "IsRequired", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxCheckBox } ]} @@ -3125,6 +3124,20 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep { new() { FieldName = "IsRequired", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Intranet.SurveyQuestionOption, + Code = AppCodes.Intranet.SurveyQuestionOption, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "QuestionId" + } + } + } + }) }, autoSave: true ); @@ -3241,6 +3254,128 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep } #endregion + #region Survey Question Option + listFormName = AppCodes.Intranet.SurveyQuestionOption; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + PageSize = 10, + ExportJson = DefaultExportJson, + IsSubForm = true, + ShowNote = true, + LayoutJson = DefaultLayoutJson(), + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SurveyQuestionOption)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson(), + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestionOption)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + PagerOptionJson = DefaultPagerOptionJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, false), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), + EditingFormJson = JsonSerializer.Serialize(new List() + { + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "Order", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 2, DataField = "Text", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + ]} + }), + }, autoSave: true + ); + + #region Survey Question Option Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + CaptionName = "App.Listform.ListformField.Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + SortIndex = 0, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "Order", + CaptionName = "App.Listform.ListformField.Order", + Width = 100, + ListOrderNo = 2, + Visible = true, + IsActive = true, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Text", + CaptionName = "App.Listform.ListformField.Text", + Width = 300, + ListOrderNo = 3, + Visible = true, + IsActive = true, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "QuestionId", + CaptionName = "App.Listform.ListformField.QuestionId", + Width = 0, + ListOrderNo = 4, + Visible = false, + IsActive = true, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ], autoSave: true); + #endregion + } + #endregion + #region Survey Response listFormName = AppCodes.Intranet.SurveyResponse; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -3279,7 +3414,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyResponse)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -3290,6 +3425,20 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 3, DataField = "CreationTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox } ]} }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Intranet.SurveyAnswer, + Code = AppCodes.Intranet.SurveyAnswer, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "ResponseId" + } + } + } + }) }, autoSave: true ); @@ -3385,6 +3534,134 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep #endregion + #region Survey Answer + listFormName = AppCodes.Intranet.SurveyAnswer; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + PageSize = 10, + ExportJson = DefaultExportJson, + IsSubForm = true, + ShowNote = true, + LayoutJson = DefaultLayoutJson(), + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SurveyAnswer)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson(), + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyAnswer)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + PagerOptionJson = DefaultPagerOptionJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, false), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), + EditingFormJson = JsonSerializer.Serialize(new List() + { + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "QuestionId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "Value", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + ]} + }), + }, autoSave: true + ); + + #region Survey Answer Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + CaptionName = "App.Listform.ListformField.Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + SortIndex = 0, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "QuestionId", + CaptionName = "App.Listform.ListformField.QuestionId", + Width = 100, + ListOrderNo = 2, + Visible = true, + IsActive = true, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.SurveyQuestionValues + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Value", + CaptionName = "App.Listform.ListformField.Value", + Width = 300, + ListOrderNo = 3, + Visible = true, + IsActive = true, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "ResponseId", + CaptionName = "App.Listform.ListformField.ResponseId", + Width = 0, + ListOrderNo = 4, + Visible = false, + IsActive = true, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ], autoSave: true); + #endregion + } + #endregion + #region Social Post listFormName = AppCodes.Intranet.SocialPost; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -4102,6 +4379,5 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep // #endregion // } // #endregion - } } diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/PermissionsData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/PermissionsData.json index 60c5166..fecaa8b 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/PermissionsData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/PermissionsData.json @@ -3880,6 +3880,71 @@ "MultiTenancySide": 3, "MenuGroup": "Erp" }, + + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyQuestionOption", + "ParentName": "App.Intranet", + "DisplayName": "App.Intranet.SurveyQuestionOption", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyQuestionOption.Create", + "ParentName": "App.Intranet.SurveyQuestionOption", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyQuestionOption.Update", + "ParentName": "App.Intranet.SurveyQuestionOption", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyQuestionOption.Delete", + "ParentName": "App.Intranet.SurveyQuestionOption", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyQuestionOption.Export", + "ParentName": "App.Intranet.SurveyQuestionOption", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyQuestionOption.Import", + "ParentName": "App.Intranet.SurveyQuestionOption", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyQuestionOption.Note", + "ParentName": "App.Intranet.SurveyQuestionOption", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { "GroupName": "App.Administration", "Name": "App.Intranet.SurveyResponse", @@ -3942,6 +4007,70 @@ "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" + }, + + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyAnswer", + "ParentName": "App.Intranet", + "DisplayName": "App.Intranet.SurveyAnswer", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyAnswer.Create", + "ParentName": "App.Intranet.SurveyAnswer", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyAnswer.Update", + "ParentName": "App.Intranet.SurveyAnswer", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyAnswer.Delete", + "ParentName": "App.Intranet.SurveyAnswer", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyAnswer.Export", + "ParentName": "App.Intranet.SurveyAnswer", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyAnswer.Import", + "ParentName": "App.Intranet.SurveyAnswer", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Administration", + "Name": "App.Intranet.SurveyAnswer.Note", + "ParentName": "App.Intranet.SurveyAnswer", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" } ] -} \ No newline at end of file +} diff --git a/api/src/Sozsoft.Platform.Domain/Data/SeedConsts.cs b/api/src/Sozsoft.Platform.Domain/Data/SeedConsts.cs index 9bfc93e..f2d642f 100644 --- a/api/src/Sozsoft.Platform.Domain/Data/SeedConsts.cs +++ b/api/src/Sozsoft.Platform.Domain/Data/SeedConsts.cs @@ -330,7 +330,9 @@ public static class SeedConsts public const string Survey = Default + ".Survey"; public const string SurveyQuestion = Default + ".SurveyQuestion"; + public const string SurveyQuestionOption = Default + ".SurveyQuestionOption"; public const string SurveyResponse = Default + ".SurveyResponse"; + public const string SurveyAnswer = Default + ".SurveyAnswer"; public const string SocialPost = Default + ".SocialPost"; public const string SocialComment = Default + ".SocialComment"; diff --git a/ui/src/views/list/useListFormColumns.ts b/ui/src/views/list/useListFormColumns.ts index 69dc86f..6d9f9ba 100644 --- a/ui/src/views/list/useListFormColumns.ts +++ b/ui/src/views/list/useListFormColumns.ts @@ -371,9 +371,10 @@ const useListFormColumns = ({ if (!gridDto.gridOptions.keyFieldName) return - const url = - location.pathname?.replace('/list/', '/form/') + - `/${e.row.data[gridDto.gridOptions.keyFieldName]}` + const detailFormName = gridDto.gridOptions.listFormCode + const id = e.row.data[gridDto.gridOptions.keyFieldName] + + const url = `/admin/form/${detailFormName}/${id}` window.open(url, isPwaMode ? '_self' : '_blank') },