From 66037bf00149f7f171259c2d82041b379ebeb954 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, 13 May 2026 14:31:15 +0300 Subject: [PATCH] =?UTF-8?q?Dialog=20Maximize=20=C3=B6zelli=C4=9Fi=20eklend?= =?UTF-8?q?i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/LanguagesData.json | 6 + ui/src/assets/styles/components/_dialog.css | 4 +- .../importManager/ImportDashboard.tsx | 754 +++++++++--------- ui/src/components/ui/Dialog/Dialog.tsx | 71 +- .../admin/role-management/RolesPermission.tsx | 306 ++++--- .../admin/user-management/UsersPermission.tsx | 308 ++++--- ui/src/views/branch/BranchSeed.tsx | 182 +++-- .../developerKit/SqlTableDesignerDialog.tsx | 96 ++- ui/src/views/form/notes/NoteModal.tsx | 427 +++++----- ui/src/views/forum/admin/AdminView.tsx | 2 +- .../views/forum/admin/CategoryManagement.tsx | 58 +- ui/src/views/forum/admin/PostManagement.tsx | 40 +- ui/src/views/forum/admin/TopicManagement.tsx | 72 +- ui/src/views/list/Grid.tsx | 4 +- ui/src/views/list/SchedulerView.tsx | 29 +- ui/src/views/list/Tree.tsx | 6 +- 16 files changed, 1336 insertions(+), 1029 deletions(-) diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json index 92bae80..b24f430 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json @@ -648,6 +648,12 @@ "en": "Forum", "tr": "Forum" }, + { + "resourceName": "Platform", + "key": "App.Forum.Dashboard", + "en": "Dashboard", + "tr": "Gösterge Paneli" + }, { "resourceName": "Platform", "key": "App.Forum.Dashboard.Categories", diff --git a/ui/src/assets/styles/components/_dialog.css b/ui/src/assets/styles/components/_dialog.css index 009c452..a57e9b2 100644 --- a/ui/src/assets/styles/components/_dialog.css +++ b/ui/src/assets/styles/components/_dialog.css @@ -52,9 +52,11 @@ .dialog-content.maximized { border-radius: 0 !important; - max-height: 100vh !important; height: 100vh !important; margin: 0 !important; + overflow: hidden; + display: flex; + flex-direction: column; @apply my-0; } diff --git a/ui/src/components/importManager/ImportDashboard.tsx b/ui/src/components/importManager/ImportDashboard.tsx index da0328f..813e723 100644 --- a/ui/src/components/importManager/ImportDashboard.tsx +++ b/ui/src/components/importManager/ImportDashboard.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useMemo } from 'react' +import classNames from 'classnames' import { FaUpload, FaCheckCircle, @@ -18,6 +19,7 @@ import { ListFormImportDto, ListFormImportExecuteDto } from '@/proxy/imports/mod import { ImportService } from '@/services/import.service' import { GridDto } from '@/proxy/form/models' import { useLocalization } from '@/utils/hooks/useLocalization' +import { useDialogContext } from '@/components/ui/Dialog/Dialog' interface ImportDashboardProps { gridDto: GridDto @@ -214,16 +216,17 @@ export const ImportDashboard: React.FC = ({ gridDto }) => } const editableColumns = getEditableColumns() + const { isMaximized } = useDialogContext() return ( -
+
{/* Navigation Tabs */} -
+
{['import', 'preview', 'history'].map((tab) => (
{/* Content */} - {activeTab === 'import' && ( -
- {/* Template Generator & File Upload - Side by Side */} -
- {/* Template Generator - 2/3 width on large screens, full width on mobile */} -
-
-
-

- - {translate('::App.Listforms.ImportManager.TemplateColumns')} ( - {editableColumns.length}) -

+
+ {activeTab === 'import' && ( +
+ {/* Template Generator & File Upload - Side by Side */} +
+ {/* Template Generator - 2/3 width on large screens, full width on mobile */} +
+
+
+

+ + {translate('::App.Listforms.ImportManager.TemplateColumns')} ( + {editableColumns.length}) +

- {/* Template Options */} -
- + {/* Template Options */} +
+ - + +
-
-
- - - - - - - - - - - {editableColumns.map((column: any) => ( - - - - - +
+
- {translate('::App.Listform.ListformField.Column')} - - {translate('::ListForms.ListFormEdit.Type')} - - {translate('::App.Required')} - - {translate('::Abp.Mailing.Default')} -
- {column.captionName || column.fieldName} - - - {column.dataType} - - - {column.validationRuleDto.some( - (rule: any) => rule.type === 'required', - ) ? ( - - {translate('::App.Listforms.ImportManager.Yes')} - - ) : ( - - {translate('::App.Listforms.ImportManager.No')} - - )} - - {typeof column.defaultValue === 'object' - ? JSON.stringify(column.defaultValue) - : column.defaultValue} -
+ + + + + + - ))} - -
+ {translate('::App.Listform.ListformField.Column')} + + {translate('::ListForms.ListFormEdit.Type')} + + {translate('::App.Required')} + + {translate('::Abp.Mailing.Default')} +
-
- - {generating && ( -
-
- - {translate('::App.Listforms.ImportManager.GeneratingTemplate')} - + + + {editableColumns.map((column: any) => ( + + + {translate('::' + column.captionName)} + + + + {column.dataType} + + + + {column.validationRuleDto.some( + (rule: any) => rule.type === 'required', + ) ? ( + + {translate('::App.Listforms.ImportManager.Yes')} + + ) : ( + + {translate('::App.Listforms.ImportManager.No')} + + )} + + + {typeof column.defaultValue === 'object' + ? JSON.stringify(column.defaultValue) + : column.defaultValue} + + + ))} + +
- )} -
-
- {/* File Upload - 1/3 width on large screens, full width on mobile */} -
-
-

- - {translate('::App.Listforms.ImportManager.UploadData')} -

- + {generating && ( +
+
+ + {translate('::App.Listforms.ImportManager.GeneratingTemplate')} + +
+ )} +
-
-
-
- )} - {activeTab === 'preview' && ( -
- {currentSession ? ( -
- {currentSession.status === 'validating' || - currentSession.status === 'uploading' || - currentSession.status === 'processing' ? ( - - ) : ( -
- +
+

+ + {translate('::App.Listforms.ImportManager.UploadData')} +

+
- )} -
- ) : ( -
-
- -
- {translate('::App.Listforms.ImportManager.NoDataToPreview')} -
-
{translate('::App.Listforms.ImportManager.UploadFileToPreview')}
- )} -
- )} - - {activeTab === 'history' && ( -
-
-

- - {translate('::App.Listforms.ImportManager.ImportHistory')} -

+ )} -
- {importHistory.map((session) => ( -
-
-
- {getStatusIcon(session.status)} -
-
-
{session.blobName}
-
- {new Date(session.creationTime).toLocaleString()} -
-
- {currentSession?.id === session.id && ( - - {translate('::App.Status.Active')} - - )} -
-
- -
-
-
- {session.totalRows} {translate('::App.Listforms.ImportManager.TotalRows')} -
-
- - - {session.status.charAt(0).toUpperCase() + session.status.slice(1)} - - -
- - - -
-
-
- - {/* Execute Details Section */} - {expandedSessions.has(session.id) && ( -
-
- {loadingExecutes.has(session.id) ? ( -
- - - {translate('::App.Listforms.ImportManager.LoadingExecutionDetails')} - -
- ) : sessionExecutes[session.id] && sessionExecutes[session.id].length > 0 ? ( -
- {sessionExecutes[session.id].map((execute) => ( -
-
- {/* Sol: Tarih */} -
-
- {new Date(execute.creationTime).toLocaleString()} -
-
- - {/* Orta: Executed, Valid, Errors */} -
-
-
- {execute.execRows} -
-
- {translate('::App.Listforms.ImportManager.Executed')} -
-
-
-
- {execute.validRows} -
-
- {translate('::App.Listforms.ImportManager.Valid')} -
-
-
-
- {execute.errorRows} -
-
- {translate('::App.Listforms.ImportManager.Errors')} -
-
-
- - {/* Sağ: Status */} -
- {execute.status === 'completed' && ( - - )} - {execute.status === 'processing' && ( - - )} - {execute.status === 'validating' && ( - - )} - {execute.status === 'failed' && ( - - )} -
- {execute.status.charAt(0).toUpperCase() + - execute.status.slice(1)} - {execute.status === 'processing' && ` (${execute.progress}%)`} -
-
-
-
- ))} -
- ) : ( -
- {translate('::App.Listforms.ImportManager.NoExecutionRecords')} -
- )} -
+ {activeTab === 'preview' && ( +
+ {currentSession ? ( +
+ {currentSession.status === 'validating' || + currentSession.status === 'uploading' || + currentSession.status === 'processing' ? ( + + ) : ( +
+
)}
- ))} - - {importHistory.length === 0 && ( -
- -
- {translate('::App.Listforms.ImportManager.NoImportHistory')} + ) : ( +
+
+ +
+ {translate('::App.Listforms.ImportManager.NoDataToPreview')} +
+
{translate('::App.Listforms.ImportManager.UploadFileToPreview')}
-
{translate('::App.Listforms.ImportManager.ImportHistoryHint')}
)}
-
- )} + )} + + {activeTab === 'history' && ( +
+
+

+ + {translate('::App.Listforms.ImportManager.ImportHistory')} +

+
+ +
+ {importHistory.map((session) => ( +
+
+
+ {getStatusIcon(session.status)} +
+
+
{session.blobName}
+
+ {new Date(session.creationTime).toLocaleString()} +
+
+ {currentSession?.id === session.id && ( + + {translate('::App.Status.Active')} + + )} +
+
+ +
+
+
+ {session.totalRows} {translate('::App.Listforms.ImportManager.TotalRows')} +
+
+ + + {session.status.charAt(0).toUpperCase() + session.status.slice(1)} + + +
+ + + +
+
+
+ + {/* Execute Details Section */} + {expandedSessions.has(session.id) && ( +
+
+ {loadingExecutes.has(session.id) ? ( +
+ + + {translate('::App.Listforms.ImportManager.LoadingExecutionDetails')} + +
+ ) : sessionExecutes[session.id] && + sessionExecutes[session.id].length > 0 ? ( +
+ {sessionExecutes[session.id].map((execute) => ( +
+
+ {/* Sol: Tarih */} +
+
+ {new Date(execute.creationTime).toLocaleString()} +
+
+ + {/* Orta: Executed, Valid, Errors */} +
+
+
+ {execute.execRows} +
+
+ {translate('::App.Listforms.ImportManager.Executed')} +
+
+
+
+ {execute.validRows} +
+
+ {translate('::App.Listforms.ImportManager.Valid')} +
+
+
+
+ {execute.errorRows} +
+
+ {translate('::App.Listforms.ImportManager.Errors')} +
+
+
+ + {/* Sağ: Status */} +
+ {execute.status === 'completed' && ( + + )} + {execute.status === 'processing' && ( + + )} + {execute.status === 'validating' && ( + + )} + {execute.status === 'failed' && ( + + )} +
+ {execute.status.charAt(0).toUpperCase() + + execute.status.slice(1)} + {execute.status === 'processing' && ` (${execute.progress}%)`} +
+
+
+
+ ))} +
+ ) : ( +
+ {translate('::App.Listforms.ImportManager.NoExecutionRecords')} +
+ )} +
+
+ )} +
+ ))} + + {importHistory.length === 0 && ( +
+ +
+ {translate('::App.Listforms.ImportManager.NoImportHistory')} +
+
{translate('::App.Listforms.ImportManager.ImportHistoryHint')}
+
+ )} +
+
+ )} +
) } diff --git a/ui/src/components/ui/Dialog/Dialog.tsx b/ui/src/components/ui/Dialog/Dialog.tsx index d0b7f21..68cb731 100644 --- a/ui/src/components/ui/Dialog/Dialog.tsx +++ b/ui/src/components/ui/Dialog/Dialog.tsx @@ -5,10 +5,54 @@ import WindowControls from '../WindowControls' import { motion } from 'framer-motion' import { SCREENS } from '@/utils/tailwind' import useWindowSize from '../hooks/useWindowSize' -import { useState, useCallback } from 'react' +import { useState, useCallback, createContext, useContext } from 'react' import type ReactModal from 'react-modal' -import type { MouseEvent } from 'react' -import { Container } from '@/components/shared' +import type { MouseEvent, ReactNode } from 'react' + +interface DialogContextValue { + isMaximized: boolean +} + +const DialogContext = createContext({ isMaximized: false }) + +export const useDialogContext = () => useContext(DialogContext) + +const DialogBody = ({ + children, + className, +}: { + children?: ReactNode + className?: string +}) => { + const { isMaximized } = useContext(DialogContext) + return ( +
+ {children} +
+ ) +} +DialogBody.displayName = 'Dialog.Body' + +const DialogFooter = ({ + children, + className, +}: { + children?: ReactNode + className?: string +}) => { + const { isMaximized } = useContext(DialogContext) + return ( +
+ {children} +
+ ) +} +DialogFooter.displayName = 'Dialog.Footer' export interface DialogProps extends ReactModal.Props { closable?: boolean @@ -186,7 +230,15 @@ const Dialog = (props: DialogProps) => { > {closable && !showWindowControls && renderCloseButton} {closable && showWindowControls && renderWindowControls} - {children} + + {isMaximized ? ( +
+ {children} +
+ ) : ( + children + )} +
) @@ -194,4 +246,13 @@ const Dialog = (props: DialogProps) => { Dialog.displayName = 'Dialog' -export default Dialog +type DialogType = typeof Dialog & { + Body: typeof DialogBody + Footer: typeof DialogFooter +} + +const DialogWithSubComponents = Dialog as DialogType +DialogWithSubComponents.Body = DialogBody +DialogWithSubComponents.Footer = DialogFooter + +export default DialogWithSubComponents diff --git a/ui/src/views/admin/role-management/RolesPermission.tsx b/ui/src/views/admin/role-management/RolesPermission.tsx index c0b36c6..602a88d 100644 --- a/ui/src/views/admin/role-management/RolesPermission.tsx +++ b/ui/src/views/admin/role-management/RolesPermission.tsx @@ -1,7 +1,9 @@ +import classNames from 'classnames' import { FaChevronRight, FaChevronDown } from 'react-icons/fa' import Container from '@/components/shared/Container' import { Button, Checkbox, Dialog, Input, Menu, toast } from '@/components/ui' import { useConfig } from '@/components/ui/ConfigProvider' +import { useDialogContext } from '@/components/ui/Dialog/Dialog' import Notification from '@/components/ui/Notification' import { GetPermissionListResultDto, @@ -17,6 +19,166 @@ import { ChangeEvent, useEffect, useMemo, useState } from 'react' type OpenState = Record +function PermissionDialogContent({ + name, + translate, + permissionList, + selectedGroup, + selectedGroupPermissions, + filteredPermissions, + isAllSelected, + isAllSelectedForGroup, + isLoading, + searchTerm, + openPermissions, + mode, + onSelectAll, + onDialogClose, + onDialogOk, + handleExpandAll, + handleCollapseAll, + changeGroup, + togglePermission, + isParent, + getChildren, + onClickCheckbox, + setSearchTerm, + setCopyDialogOpen, +}: any) { + const { isMaximized } = useDialogContext() + + return ( + <> +
+ {translate('::Permission')} - {name} +
+
+ +
+
+ + {translate('AbpPermissionManagement::SelectAllInAllTabs')} + +
+
+ + {translate('AbpPermissionManagement::SelectAllInThisTab')} + + + +
+
+ +
+
+
+ + {permissionList?.groups.map((group: any) => ( + + {translate('::' + group.displayName)} ( + {group.permissions.filter((a: any) => a.isGranted).length}) + + ))} + +
+
+
+
+ setSearchTerm(e.target.value)} + /> +
+
+ {filteredPermissions.map((permission: any) => { + const isParentPerm = isParent(permission) + const permKey = permission.name || '' + return ( +
+
+ {isParentPerm ? ( + + ) : ( +
+ )} + onClickCheckbox(permission)} + > + + {translate('::' + permission.displayName)} + + +
+
+ ) + })} +
+
+
+ + +
+ +
+
+ + +
+
+ + ) +} + function RolesPermission({ open, onDialogClose, @@ -368,122 +530,34 @@ function RolesPermission({ onClose={onDialogClose} onRequestClose={onDialogClose} > -
- {translate('::Permission')} - {name} -
-
- -
-
- - {translate('AbpPermissionManagement::SelectAllInAllTabs')} - -
-
- - {translate('AbpPermissionManagement::SelectAllInThisTab')} - - - - -
-
- -
-
-
- - {permissionList?.groups.map((group: any) => ( - - {translate('::' + group.displayName)} ( - {group.permissions.filter((a: any) => a.isGranted).length}) - - ))} - -
-
-
-
- setSearchTerm(e.target.value)} - /> -
-
- {filteredPermissions.map((permission) => { - const isParentPerm = isParent(permission) - const permKey = permission.name || '' - const children = getChildren(permKey) - return ( -
-
- {/* Expand Icon */} - {isParentPerm ? ( - - ) : ( -
- )} - - {/* Checkbox */} - onClickCheckbox(permission)} - > - - {translate('::' + permission.displayName)} - - -
-
- ) - })} -
-
-
-
-
- -
-
- - -
-
+ + + {/* Copy Permissions Dialog */} diff --git a/ui/src/views/admin/user-management/UsersPermission.tsx b/ui/src/views/admin/user-management/UsersPermission.tsx index 773aeb7..eec8b1a 100644 --- a/ui/src/views/admin/user-management/UsersPermission.tsx +++ b/ui/src/views/admin/user-management/UsersPermission.tsx @@ -1,7 +1,9 @@ +import classNames from 'classnames' import { FaChevronRight, FaChevronDown } from 'react-icons/fa' import { Badge, Button, Checkbox, Dialog, Input, Menu, toast } from '@/components/ui' type OpenState = Record import { useConfig } from '@/components/ui/ConfigProvider' +import { useDialogContext } from '@/components/ui/Dialog/Dialog' import Notification from '@/components/ui/Notification' import { GetPermissionListResultDto, @@ -16,6 +18,166 @@ import { useStoreActions, useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { ChangeEvent, useEffect, useMemo, useState } from 'react' +function UserPermissionDialogContent({ + name, + translate, + permissionList, + selectedGroup, + selectedGroupPermissions, + filteredPermissions, + isAllSelected, + isAllSelectedForGroup, + isLoading, + searchTerm, + openPermissions, + mode, + providerName, + onSelectAll, + onDialogClose, + onDialogOk, + handleExpandAll, + handleCollapseAll, + changeGroup, + togglePermission, + isParent, + onClickCheckbox, + setSearchTerm, +}: any) { + const { isMaximized } = useDialogContext() + + return ( + <> +
+ {translate('::Permission')} - {name} +
+
+ +
+
+ + {translate('AbpPermissionManagement::SelectAllInAllTabs')} + +
+
+ + {translate('AbpPermissionManagement::SelectAllInThisTab')} + + + +
+
+ +
+
+
+ + {permissionList?.groups.map((group: any) => ( + changeGroup(group.name)} + > + {translate('::' + group.displayName)} ( + {group.permissions.filter((a: any) => a.isGranted).length}) + + ))} + +
+
+
+
+ setSearchTerm(e.target.value)} + /> +
+
+ {filteredPermissions.map((permission: any) => { + const isParentPerm = isParent(permission) + const permKey = permission.name || '' + return ( +
+
+ {isParentPerm ? ( + + ) : ( +
+ )} + onClickCheckbox(permission)} + disabled={permission.grantedProviders.some( + (provider: any) => provider.providerName === 'R', + )} + > + + {translate('::' + permission.displayName)} + {permission.grantedProviders.map((provider: any) => { + const badgeContent = + provider.providerName !== providerName + ? `${provider.providerName}: ${provider.providerKey}` + : provider.providerName + return ( + + ) + })} + + +
+
+ ) + })} +
+
+
+ + + + + + + ) +} + function UsersPermission({ open, onDialogClose, @@ -297,125 +459,33 @@ function UsersPermission({ onClose={onDialogClose} onRequestClose={onDialogClose} > -
- {translate('::Permission')} - {name} -
-
- -
-
- - {translate('AbpPermissionManagement::SelectAllInAllTabs')} - -
-
- - {translate('AbpPermissionManagement::SelectAllInThisTab')} - - - -
-
- -
-
-
- - {permissionList?.groups.map((group) => ( - { - changeGroup(group.name) - }} - > - {translate('::' + group.displayName)} ( - {group.permissions.filter((a) => a.isGranted).length}) - - ))} - -
-
-
-
- setSearchTerm(e.target.value)} - /> -
-
- {filteredPermissions.map((permission) => { - const isParentPerm = isParent(permission) - const permKey = permission.name || '' - const children = getChildren(permKey) - return ( -
-
- {/* Expand Icon */} - {isParentPerm ? ( - - ) : ( -
- )} - - {/* Checkbox */} - onClickCheckbox(permission)} - disabled={permission.grantedProviders.some((provider) => provider.providerName === 'R')} - > - - {translate('::' + permission.displayName)} - {permission.grantedProviders.map((provider) => { - const badgeContent = provider.providerName !== providerName - ? `${provider.providerName}: ${provider.providerKey}` - : provider.providerName; - return ( - - ); - })} - - -
-
- ) - })} -
-
-
-
- - -
+ + + ) : ( <> diff --git a/ui/src/views/branch/BranchSeed.tsx b/ui/src/views/branch/BranchSeed.tsx index d5d4f1d..524ff74 100644 --- a/ui/src/views/branch/BranchSeed.tsx +++ b/ui/src/views/branch/BranchSeed.tsx @@ -1,21 +1,20 @@ +import classNames from 'classnames' import { useState } from 'react' import { Badge, Button } from '@/components/ui' import { Container } from '@/components/shared' import { Dialog, Notification, toast } from '@/components/ui' +import { useDialogContext } from '@/components/ui/Dialog/Dialog' import type { BranchSeedResultDto } from '@/proxy/branch/seed' import { runBranchSeed } from '@/services/branch.service' -function BranchSeed({ - open, - onDialogClose, +function BranchSeedContent({ id, name, }: { - open: boolean - onDialogClose: () => void id: string name: string }) { + const { isMaximized } = useDialogContext() const [isLoading, setIsLoading] = useState(false) const [result, setResult] = useState(null) @@ -51,6 +50,103 @@ function BranchSeed({ } } + return ( + <> +
Branch Seed - {name}
+
+ +
+ {/* Sonuç durumu */} + {result && ( +
+ {result.success ? ( + ✅ Seed İşlemi Başarılı + ) : ( + ❌ Seed İşlemi Başarısız + )} +
+ )} + + {/* Sonuç Detayları */} + {result && ( + <> +

{result.message}

+ +

+ Toplam eklenen kayıt:{' '} + {result.totalInsertedCount} +

+ + {/* Detay Tablosu */} + {result.details.length > 0 && ( +
+ + + + + + + + + + + {result.details.map((d) => ( + + + + + + + ))} + +
EntityEklenenUyarılarHatalar
+
+ {d.entityName} + +
+
{d.insertedItems.join(', ')} + {d.warnings.join(', ')} + {d.errors.join(', ')}
+
+ )} + + {!result.details.length && ( +

Hiç detay bilgisi bulunamadı.

+ )} + + )} +
+ + + + + + ) +} + +function BranchSeed({ + open, + onDialogClose, + id, + name, +}: { + open: boolean + onDialogClose: () => void + id: string + name: string +}) { return ( -
Branch Seed - {name}
-
- -
- {/* Başlık ve buton aynı satırda */} -
-
- {result && - (result.success ? ( - ✅ Seed İşlemi Başarılı - ) : ( - ❌ Seed İşlemi Başarısız - ))} -
-
- -
-
- - {/* Sonuç Detayları */} - {result && ( - <> -

{result.message}

- -

- Toplam eklenen kayıt:{' '} - {result.totalInsertedCount} -

- - {/* Detay Tablosu */} - {result.details.length > 0 && ( -
- - - - - - - - - - - {result.details.map((d) => ( - - - {/* Eklenen kolonunu tek satır formatında göster */} - - - - - - - ))} - -
EntityEklenenUyarılarHatalar
-
- {d.entityName} - -
-
{d.insertedItems.join(', ')} - {d.warnings.join(', ')} - {d.errors.join(', ')}
-
- )} - - {!result.details.length && ( -

Hiç detay bilgisi bulunamadı.

- )} - - )} -
+ + +
) diff --git a/ui/src/views/developerKit/SqlTableDesignerDialog.tsx b/ui/src/views/developerKit/SqlTableDesignerDialog.tsx index d37d1f9..95f7a8d 100644 --- a/ui/src/views/developerKit/SqlTableDesignerDialog.tsx +++ b/ui/src/views/developerKit/SqlTableDesignerDialog.tsx @@ -1,6 +1,8 @@ import { useState, useCallback, useMemo, useEffect } from 'react' +import classNames from 'classnames' import { createPortal } from 'react-dom' import { Button, Dialog, Notification, toast, Checkbox } from '@/components/ui' +import { useDialogContext } from '@/components/ui/Dialog/Dialog' import { FaPlus, FaTrash, @@ -761,6 +763,15 @@ function generateAlterTableSql( const STEPS = ['Sütun Tasarımı', 'Entity Ayarları', 'Index / Key', 'İlişkiler', 'T-SQL Önizleme'] as const type Step = 0 | 1 | 2 | 3 | 4 +function StepContentWrapper({ children }: { children: React.ReactNode }) { + const { isMaximized } = useDialogContext() + return ( +
+ {children} +
+ ) +} + // ─── Simple Menu Tree (read-only selection) ─────────────────────────────────── interface SimpleMenuTreeNodeProps { @@ -1646,14 +1657,14 @@ const SqlTableDesignerDialog = ({ <>
- - -
- {step > 0 && ( - - )} - {step < 4 ? ( - - ) : ( - - )} -
+ + +
+ {step > 0 && ( + + )} + {step < 4 ? ( + + ) : ( + + )}
-
+ ) } diff --git a/ui/src/views/form/notes/NoteModal.tsx b/ui/src/views/form/notes/NoteModal.tsx index 2a62df8..dba2f1f 100644 --- a/ui/src/views/form/notes/NoteModal.tsx +++ b/ui/src/views/form/notes/NoteModal.tsx @@ -1,5 +1,7 @@ import React, { useState } from 'react' +import classNames from 'classnames' import { Button, Input, Dialog, FormContainer, FormItem, Upload, Radio } from '@/components/ui' +import { useDialogContext } from '@/components/ui/Dialog/Dialog' import { FaFileAlt, FaFileUpload, FaPlus, FaTrash } from 'react-icons/fa' import { Field, FieldProps, Form, Formik } from 'formik' import * as Yup from 'yup' @@ -29,13 +31,18 @@ interface NoteModalProps { onNoteAdded?: (note: any) => void } -export const NoteModal: React.FC = ({ +function NoteModalContent({ entityName, entityId, - isOpen, onClose, - onNoteAdded: onActivityAdded, -}) => { + onNoteAdded, +}: { + entityName: string + entityId: string + onClose: () => void + onNoteAdded?: (note: any) => void +}) { + const { isMaximized } = useDialogContext() const [uploading, setUploading] = useState(false) const [fileList, setFileList] = useState([]) const { translate } = useLocalization() @@ -57,7 +64,7 @@ export const NoteModal: React.FC = ({ fileList.forEach((file) => formData.append('Files', file)) const createdActivity = await noteService.create(formData) - if (onActivityAdded) onActivityAdded(createdActivity) + if (onNoteAdded) onNoteAdded(createdActivity) setFileList([]) onClose() } catch (err) { @@ -81,201 +88,223 @@ export const NoteModal: React.FC = ({ } return ( - -
- {/* Başlık */} -
-

-
- -
- {translate('::ListForms.ListForm.AddNote')} -

-
- - - {({ values, touched, errors, setFieldValue, isSubmitting }) => ( -
- - {/* NOT TİPİ */} - -
- {types.map((t) => ( - - ))} -
-
- - {/* KONUSU */} - - - - - {/* İÇERİK */} - - - {({ field }: FieldProps) => ( - setFieldValue('content', e.value)} - height={220} - placeholder={translate('::ListForms.ListForm.NoteModal.Content')} - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - )} - - - - {/* DOSYA YÜKLEME */} - -
- { - setFileList((prev) => [ - ...prev, - ...files.filter( - (f) => !prev.some((p) => p.name === f.name && p.size === f.size), - ), - ]) - }} - > - - - - {fileList.length > 0 && ( -
- {fileList.map((file, index) => ( -
-
- - {file.name} - - ({(file.size / 1024).toFixed(1)} KB) - -
- -
- ))} -
- )} -
-
-
- - {/* ALT BUTONLAR */} -
- - -
-
- )} -
+ <> + {/* Başlık */} +
+

+
+ +
+ {translate('::ListForms.ListForm.AddNote')} +

+ + + {({ values, touched, errors, setFieldValue, isSubmitting }) => ( +
+ + {/* NOT TİPİ */} + +
+ {types.map((t) => ( + + ))} +
+
+ + {/* KONUSU */} + + + + + {/* İÇERİK */} + + + {({ field }: FieldProps) => ( + setFieldValue('content', e.value)} + height={isMaximized ? '50vh' : 220} + placeholder={translate('::ListForms.ListForm.NoteModal.Content')} + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )} + + + + {/* DOSYA YÜKLEME */} + +
+ { + setFileList((prev) => [ + ...prev, + ...files.filter( + (f) => !prev.some((p) => p.name === f.name && p.size === f.size), + ), + ]) + }} + > + + + + {fileList.length > 0 && ( +
+ {fileList.map((file, index) => ( +
+
+ + {file.name} + + ({(file.size / 1024).toFixed(1)} KB) + +
+ +
+ ))} +
+ )} +
+
+
+ + {/* ALT BUTONLAR */} + + + + +
+ )} +
+ + ) +} + +export const NoteModal: React.FC = ({ + entityName, + entityId, + isOpen, + onClose, + onNoteAdded, +}) => { + return ( + + + + ) } diff --git a/ui/src/views/forum/admin/AdminView.tsx b/ui/src/views/forum/admin/AdminView.tsx index 00f3834..49454d2 100644 --- a/ui/src/views/forum/admin/AdminView.tsx +++ b/ui/src/views/forum/admin/AdminView.tsx @@ -81,7 +81,7 @@ export function AdminView({ const navigationItems = [ { id: 'stats' as AdminSection, - label: translate('::App.Videoroom.Dashboard'), + label: translate('::App.Forum.Dashboard'), icon: FaChartBar, }, { diff --git a/ui/src/views/forum/admin/CategoryManagement.tsx b/ui/src/views/forum/admin/CategoryManagement.tsx index 02b6c03..74d9a2a 100644 --- a/ui/src/views/forum/admin/CategoryManagement.tsx +++ b/ui/src/views/forum/admin/CategoryManagement.tsx @@ -167,11 +167,11 @@ export function CategoryManagement({
@@ -369,56 +369,56 @@ export function CategoryManagement({
+ > + {category.isActive ? ( + + ) : ( + + )} + + > + {category.isLocked ? ( + + ) : ( + + )} + + > + + + > + +
diff --git a/ui/src/views/forum/admin/PostManagement.tsx b/ui/src/views/forum/admin/PostManagement.tsx index 1b77234..76f5c2f 100644 --- a/ui/src/views/forum/admin/PostManagement.tsx +++ b/ui/src/views/forum/admin/PostManagement.tsx @@ -165,12 +165,12 @@ export function PostManagement({ {translate('::App.Forum.PostManagement.Title')}
@@ -399,15 +399,9 @@ export function PostManagement({
- - + +
diff --git a/ui/src/views/forum/admin/TopicManagement.tsx b/ui/src/views/forum/admin/TopicManagement.tsx index de41056..3bc23c3 100644 --- a/ui/src/views/forum/admin/TopicManagement.tsx +++ b/ui/src/views/forum/admin/TopicManagement.tsx @@ -208,11 +208,11 @@ export function TopicManagement({
@@ -400,69 +400,73 @@ export function TopicManagement({
+ > + {topic.isPinned ? ( + + ) : ( + + )} + + > + {topic.isLocked ? ( + + ) : ( + + )} + + > + {topic.isSolved ? ( + + ) : ( + + )} + + > + + + > + +
diff --git a/ui/src/views/list/Grid.tsx b/ui/src/views/list/Grid.tsx index 0e2160e..527e760 100644 --- a/ui/src/views/list/Grid.tsx +++ b/ui/src/views/list/Grid.tsx @@ -1476,7 +1476,9 @@ const Grid = (props: GridProps) => { onClose={() => filterData.setIsImportModalOpen(false)} onRequestClose={() => filterData.setIsImportModalOpen(false)} > - + + +
diff --git a/ui/src/views/list/SchedulerView.tsx b/ui/src/views/list/SchedulerView.tsx index 79c04b9..6f6ae49 100644 --- a/ui/src/views/list/SchedulerView.tsx +++ b/ui/src/views/list/SchedulerView.tsx @@ -404,11 +404,17 @@ const SchedulerView = (props: SchedulerViewProps) => { canUpdate: listFormField?.canUpdate ?? false, canCreate: listFormField?.canCreate ?? false, canExport: listFormField?.canExport ?? false, + allowEditing: listFormField?.allowEditing ?? true, + allowAdding: listFormField?.allowAdding ?? true, dataField: i.dataField, name: i.dataField, editorType2: i.editorType2, editorType: - i.editorType2 == PlatformEditorTypes.dxGridBox ? 'dxDropDownBox' : i.editorType2, + i.editorType2 == PlatformEditorTypes.dxGridBox + ? 'dxDropDownBox' + : i.editorType2 == PlatformEditorTypes.dxImageUpload + ? undefined + : i.editorType2, colSpan: i.colSpan, isRequired: i.isRequired, editorOptions, @@ -419,7 +425,10 @@ const SchedulerView = (props: SchedulerViewProps) => { item.label = { text: captionize(i.dataField.split(':')[1]) } } - if ((currentMode == 'edit' && !item.canUpdate) || (currentMode == 'new' && !item.canCreate)) { + if ( + (currentMode == 'edit' && !item.canUpdate) || + (currentMode == 'new' && !item.canCreate) + ) { item.editorOptions = { ...item.editorOptions, readOnly: true, @@ -492,18 +501,22 @@ const SchedulerView = (props: SchedulerViewProps) => { // Tabbed varsa belirli class'lara sahip elementi bul ve flex-direction'ı değiştir if (hasTabbedItems) { setTimeout(() => { - const targetElement = document.querySelector('.dx-item-content.dx-box-item-content.dx-box-flex.dx-box.dx-widget.dx-collection') + const targetElement = document.querySelector( + '.dx-item-content.dx-box-item-content.dx-box-flex.dx-box.dx-widget.dx-collection', + ) if (targetElement) { const htmlElement = targetElement as HTMLElement - + // Mevcut style'ı al ve flex-direction: row'u column'a çevir const currentStyle = htmlElement.getAttribute('style') || '' - const updatedStyle = currentStyle.replace(/flex-direction:\s*row/gi, 'flex-direction: column') + const updatedStyle = currentStyle.replace( + /flex-direction:\s*row/gi, + 'flex-direction: column', + ) htmlElement.setAttribute('style', updatedStyle) - } + } }, 100) } - }, [gridDto, translate, isPopupFullScreen, listFormCode], ) @@ -540,7 +553,7 @@ const SchedulerView = (props: SchedulerViewProps) => { key={`Scheduler-${listFormCode}-${schedulerDataSource ? 'loaded' : 'loading'}`} id={'Scheduler-' + listFormCode} dataSource={schedulerDataSource} - dateSerializationFormat='yyyy-MM-ddTHH:mm:ss' + dateSerializationFormat="yyyy-MM-ddTHH:mm:ss" textExpr={gridDto.gridOptions.schedulerOptionDto?.textExpr || 'text'} startDateExpr={gridDto.gridOptions.schedulerOptionDto?.startDateExpr || 'startDate'} endDateExpr={gridDto.gridOptions.schedulerOptionDto?.endDateExpr || 'endDate'} diff --git a/ui/src/views/list/Tree.tsx b/ui/src/views/list/Tree.tsx index ace457d..a3f6ebf 100644 --- a/ui/src/views/list/Tree.tsx +++ b/ui/src/views/list/Tree.tsx @@ -1068,13 +1068,17 @@ const Tree = (props: TreeProps) => { canUpdate: listFormField?.canUpdate ?? false, canCreate: listFormField?.canCreate ?? false, canExport: listFormField?.canExport ?? false, + allowEditing: listFormField?.allowEditing ?? true, + allowAdding: listFormField?.allowAdding ?? true, dataField: i.dataField, name: i.dataField, editorType2: i.editorType2, editorType: i.editorType2 == PlatformEditorTypes.dxGridBox ? 'dxDropDownBox' - : i.editorType2, + : i.editorType2 == PlatformEditorTypes.dxImageUpload + ? undefined + : i.editorType2, colSpan: i.colSpan, isRequired: i.isRequired, editorOptions,