diff --git a/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Application/NotificationAppService.cs b/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Application/NotificationAppService.cs index cd62018..caf0a4a 100644 --- a/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Application/NotificationAppService.cs +++ b/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Application/NotificationAppService.cs @@ -72,6 +72,7 @@ public class NotificationAppService : ReadOnlyAppService< var now = Clock.Now.AddDays(-1); query = query .AsNoTracking() + .Include(a => a.NotificationType) .Where(a => a.UserId == CurrentUser.Id) .Where(a => input.Channels.Contains(a.NotificationChannel)) .WhereIf(input.IsRead.HasValue, a => a.IsRead == input.IsRead) @@ -105,9 +106,11 @@ public class NotificationAppService : ReadOnlyAppService< { var query = await repository.GetQueryableAsync(); - var item = await query.FirstOrDefaultAsync(a => - a.UserId == CurrentUser.Id && - a.Id == notificationId); + var item = await query + .Include(a => a.NotificationType) + .FirstOrDefaultAsync(a => + a.UserId == CurrentUser.Id && + a.Id == notificationId); if (item == null) { throw new EntityNotFoundException(L["RecordNotFound"]); @@ -134,9 +137,11 @@ public class NotificationAppService : ReadOnlyAppService< { var query = await repository.GetQueryableAsync(); - var item = await query.FirstOrDefaultAsync(a => - a.UserId == CurrentUser.Id && - a.Id == notificationId); + var item = await query + .Include(a => a.NotificationType) + .FirstOrDefaultAsync(a => + a.UserId == CurrentUser.Id && + a.Id == notificationId); if (item == null) { throw new EntityNotFoundException(L["RecordNotFound"]); diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index 631cee3..f0f4094 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -84,7 +84,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson(), PermissionJson = DefaultPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, AbpIdentity.PermissionGroups.Delete, AbpIdentity.PermissionGroups.Export, AbpIdentity.PermissionGroups.Import, AbpIdentity.PermissionGroups.Note), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } + }), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -216,7 +218,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultPermissionJson(AbpIdentity.Permissions.Create, listFormName, AbpIdentity.Permissions.Update, AbpIdentity.Permissions.Delete, AbpIdentity.Permissions.Export, AbpIdentity.Permissions.Import, AbpIdentity.Permissions.Note), PagerOptionJson = DefaultPagerOptionJson, TreeOptionJson = DefaultTreeOptionJson("Name", "ParentName", true), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } + }), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -2711,8 +2715,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Excerpt", ColSpan=2, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Excerpt", ColSpan=1, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Content", ColSpan=2, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions }, new EditingFormItemDto { Order = 4, DataField = "Category", ColSpan=1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField = "UserId", ColSpan=1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index 2e72dac..defe6b6 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -1064,7 +1064,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson(), PermissionJson = DefaultPermissionJson(listFormName), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } + }), DeleteCommand = $"DELETE FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.GlobalSearch))}\" WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Id", FieldDbType = DbType.Int32, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } diff --git a/ui/src/components/template/MobileNav.tsx b/ui/src/components/template/MobileNav.tsx index e92a079..c5a6e18 100644 --- a/ui/src/components/template/MobileNav.tsx +++ b/ui/src/components/template/MobileNav.tsx @@ -1,16 +1,13 @@ import { useState, Suspense, lazy } from 'react' import classNames from 'classnames' import Drawer from '@/components/ui/Drawer' -import { - DIR_RTL, - MODE_DARK, - NAV_MODE_DARK, - NAV_MODE_THEMED, -} from '@/constants/theme.constant' +import { DIR_RTL, MODE_DARK, NAV_MODE_DARK, NAV_MODE_THEMED } from '@/constants/theme.constant' import withHeaderItem, { WithHeaderItemProps } from '@/utils/hoc/withHeaderItem' import NavToggle from '@/components/shared/NavToggle' import useResponsive from '@/utils/hooks/useResponsive' import { useStoreState } from '@/store' +import { ROUTES_ENUM } from '@/routes/route.constant' +import type { NavigationTree } from '@/proxy/menus/navigation' const VerticalMenuContent = lazy(() => import('@/components/template/VerticalMenuContent')) @@ -20,6 +17,17 @@ type MobileNavToggleProps = { const MobileNavToggle = withHeaderItem(NavToggle) +const intranetDashboardNavItem: NavigationTree = { + key: ROUTES_ENUM.protected.dashboard, + path: ROUTES_ENUM.protected.dashboard, + title: 'Intranet', + translateKey: 'App.Intranet', + icon: 'FaHome', + type: 'item', + authority: [], + subMenu: [], +} + const MobileNav = () => { const [isOpen, setIsOpen] = useState(false) @@ -51,6 +59,7 @@ const MobileNav = () => { } const { mainMenu: navigationConfig } = useStoreState((state) => state.abpConfig.menu) + const mobileNavigationConfig = [intranetDashboardNavItem, ...navigationConfig] return ( <> @@ -75,7 +84,7 @@ const MobileNav = () => { { return (