Css düzenleme
This commit is contained in:
parent
10d6e22cec
commit
bac78eec46
12 changed files with 1165 additions and 1150 deletions
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
||||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||||
}, {
|
}, {
|
||||||
"url": "index.html",
|
"url": "index.html",
|
||||||
"revision": "0.rs1dfl4jqho"
|
"revision": "0.u7hl29mc92g"
|
||||||
}], {});
|
}], {});
|
||||||
workbox.cleanupOutdatedCaches();
|
workbox.cleanupOutdatedCaches();
|
||||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,9 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {
|
import { LayoutDashboard, Database, Zap, Server, Puzzle } from 'lucide-react'
|
||||||
LayoutDashboard,
|
|
||||||
Database,
|
|
||||||
Zap,
|
|
||||||
Server,
|
|
||||||
Puzzle,
|
|
||||||
} from 'lucide-react'
|
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { useLocation, useNavigate } from 'react-router-dom'
|
import { useLocation, useNavigate } from 'react-router-dom'
|
||||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
import { Container } from '../shared'
|
||||||
|
|
||||||
interface DeveloperLayoutProps {
|
interface DeveloperLayoutProps {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
|
|
@ -53,11 +48,11 @@ const DeveloperLayout: React.FC<DeveloperLayoutProps> = ({ children }) => {
|
||||||
]
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50">
|
<Container>
|
||||||
<div className="mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
<div className="mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||||
<div className="flex flex-col lg:flex-row gap-8">
|
<div className="flex flex-col lg:flex-row gap-8">
|
||||||
{/* Sidebar */}
|
{/* Sidebar */}
|
||||||
<div className="lg:w-64 flex-shrink-0">
|
<div className="lg:w-64 flex-shrink-0 p-4 bg-gray-50">
|
||||||
<nav className="space-y-2">
|
<nav className="space-y-2">
|
||||||
{navigation.map((item) => {
|
{navigation.map((item) => {
|
||||||
const Icon = item.icon
|
const Icon = item.icon
|
||||||
|
|
@ -84,7 +79,7 @@ const DeveloperLayout: React.FC<DeveloperLayoutProps> = ({ children }) => {
|
||||||
<div className="flex-1">{children}</div>
|
<div className="flex-1">{children}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,10 @@ const DefaultItem = ({ nav, onLinkClick }: DefaultItemProps) => {
|
||||||
}
|
}
|
||||||
target={subNav.isExternalLink ? '_blank' : ''}
|
target={subNav.isExternalLink ? '_blank' : ''}
|
||||||
>
|
>
|
||||||
<span>{nav.title}</span>
|
<span>{subNav.title}</span>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<span>{nav.title}</span>
|
<span>{subNav.title}</span>
|
||||||
)}
|
)}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</PermissionCheck>
|
</PermissionCheck>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { MenuItem } from '@/@types/menu'
|
import { MenuItem } from '@/@types/menu'
|
||||||
|
import isDisabled from '@/components/ui/DatePicker/tables/components/props/isDisabled'
|
||||||
import { getMenus, MenuService } from '@/services/menu.service'
|
import { getMenus, MenuService } from '@/services/menu.service'
|
||||||
import { useStoreActions } from '@/store/store'
|
import { useStoreActions } from '@/store/store'
|
||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
|
|
@ -57,7 +58,7 @@ export const useMenuData = () => {
|
||||||
const response = await getMenus()
|
const response = await getMenus()
|
||||||
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
const hierarchicalMenu = buildHierarchy(response.data.items)
|
const hierarchicalMenu = buildHierarchy(response.data.items || [])
|
||||||
setMenuItems(hierarchicalMenu)
|
setMenuItems(hierarchicalMenu)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
|
|
@ -129,90 +129,124 @@ const Wizard = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Container>
|
||||||
<div className="grid lg:grid-cols-2 xl:grid-cols-3">
|
<Helmet
|
||||||
<Container>
|
titleTemplate="%s | Kurs Platform"
|
||||||
<Helmet
|
title={translate('::' + 'Wizard')}
|
||||||
titleTemplate="%s | Kurs Platform"
|
defaultTitle="Kurs Platform"
|
||||||
title={translate('::' + 'Wizard')}
|
></Helmet>
|
||||||
defaultTitle="Kurs Platform"
|
|
||||||
></Helmet>
|
|
||||||
|
|
||||||
<Formik
|
<div className="grid lg:grid-cols-2 xl:grid-cols-3">
|
||||||
initialValues={{ ...initialValues }}
|
<Formik
|
||||||
validationSchema={listFormValidationSchema}
|
initialValues={{ ...initialValues }}
|
||||||
onSubmit={async (values, { setSubmitting }) => {
|
validationSchema={listFormValidationSchema}
|
||||||
setSubmitting(true)
|
onSubmit={async (values, { setSubmitting }) => {
|
||||||
try {
|
setSubmitting(true)
|
||||||
await postListFormWizard({ ...values })
|
try {
|
||||||
toast.push(
|
await postListFormWizard({ ...values })
|
||||||
<Notification type="success" duration={2000}>
|
toast.push(
|
||||||
{translate('::ListForms.FormBilgileriKaydedildi')}
|
<Notification type="success" duration={2000}>
|
||||||
</Notification>,
|
{translate('::ListForms.FormBilgileriKaydedildi')}
|
||||||
{
|
</Notification>,
|
||||||
placement: 'top-center',
|
{
|
||||||
},
|
|
||||||
)
|
|
||||||
setSubmitting(false)
|
|
||||||
setTimeout(() => {
|
|
||||||
navigate(
|
|
||||||
ROUTES_ENUM.protected.saas.listFormManagement.edit.replace(
|
|
||||||
':listFormCode',
|
|
||||||
values.listFormCode,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
}, 500)
|
|
||||||
} catch (error: any) {
|
|
||||||
toast.push(<Notification title={error.message} type="danger" />, {
|
|
||||||
placement: 'top-center',
|
placement: 'top-center',
|
||||||
})
|
},
|
||||||
}
|
)
|
||||||
}}
|
setSubmitting(false)
|
||||||
>
|
setTimeout(() => {
|
||||||
{({ touched, errors, isSubmitting, values }) => (
|
navigate(
|
||||||
<Form>
|
ROUTES_ENUM.protected.saas.listFormManagement.edit.replace(
|
||||||
<FormContainer size="sm">
|
':listFormCode',
|
||||||
|
values.listFormCode,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}, 500)
|
||||||
|
} catch (error: any) {
|
||||||
|
toast.push(<Notification title={error.message} type="danger" />, {
|
||||||
|
placement: 'top-center',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{({ touched, errors, isSubmitting, values }) => (
|
||||||
|
<Form>
|
||||||
|
<FormContainer size="sm">
|
||||||
|
<FormItem
|
||||||
|
label="ListForm Code"
|
||||||
|
invalid={errors.listFormCode && touched.listFormCode}
|
||||||
|
errorMessage={errors.listFormCode}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="listFormCode"
|
||||||
|
placeholder="ListForm Code"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label="Permission Group Name"
|
||||||
|
invalid={errors.permissionGroupName && touched.permissionGroupName}
|
||||||
|
errorMessage={errors.permissionGroupName}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field type="text" autoComplete="off" name="permissionGroupName">
|
||||||
|
{({ field, form }: FieldProps<string>) => (
|
||||||
|
<Select
|
||||||
|
componentAs={CreatableSelect}
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
placeholder="Permission Group Name"
|
||||||
|
isClearable={true}
|
||||||
|
isLoading={isLoadingPermissionGroup}
|
||||||
|
options={permissionGroupList}
|
||||||
|
value={
|
||||||
|
values.permissionGroupName
|
||||||
|
? (menuList?.find((o) => o.value === values.permissionGroupName) ?? {
|
||||||
|
label: values.permissionGroupName,
|
||||||
|
value: values.permissionGroupName,
|
||||||
|
})
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
onChange={(option) => {
|
||||||
|
form.setFieldValue(field.name, option?.value)
|
||||||
|
setIsPermissionGroupNew(
|
||||||
|
!!option?.value && !menuList.some((a) => a.value === option?.value),
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
<div className="grid grid-cols-2 gap-1">
|
||||||
<FormItem
|
<FormItem
|
||||||
label="ListForm Code"
|
label="Menu Parent Code"
|
||||||
invalid={errors.listFormCode && touched.listFormCode}
|
invalid={errors.menuParentCode && touched.menuParentCode}
|
||||||
errorMessage={errors.listFormCode}
|
errorMessage={errors.menuParentCode}
|
||||||
asterisk={true}
|
asterisk={true}
|
||||||
>
|
>
|
||||||
<Field
|
<Field type="text" autoComplete="off" name="menuParentCode">
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="listFormCode"
|
|
||||||
placeholder="ListForm Code"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label="Permission Group Name"
|
|
||||||
invalid={errors.permissionGroupName && touched.permissionGroupName}
|
|
||||||
errorMessage={errors.permissionGroupName}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field type="text" autoComplete="off" name="permissionGroupName">
|
|
||||||
{({ field, form }: FieldProps<string>) => (
|
{({ field, form }: FieldProps<string>) => (
|
||||||
<Select
|
<Select
|
||||||
componentAs={CreatableSelect}
|
componentAs={CreatableSelect}
|
||||||
field={field}
|
field={field}
|
||||||
form={form}
|
form={form}
|
||||||
placeholder="Permission Group Name"
|
placeholder="Menu Parent Code"
|
||||||
isClearable={true}
|
isClearable={true}
|
||||||
isLoading={isLoadingPermissionGroup}
|
isLoading={isLoadingMenu}
|
||||||
options={permissionGroupList}
|
options={menuList}
|
||||||
value={
|
value={
|
||||||
values.permissionGroupName
|
values.menuParentCode
|
||||||
? (menuList?.find((o) => o.value === values.permissionGroupName) ?? {
|
? (menuList?.find((o) => o.value === values.menuParentCode) ?? {
|
||||||
label: values.permissionGroupName,
|
label: values.menuParentCode,
|
||||||
value: values.permissionGroupName,
|
value: values.menuParentCode,
|
||||||
})
|
})
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
onChange={(option) => {
|
onChange={(option) => {
|
||||||
form.setFieldValue(field.name, option?.value)
|
form.setFieldValue(field.name, option?.value)
|
||||||
setIsPermissionGroupNew(
|
setIsMenuNew(
|
||||||
!!option?.value && !menuList.some((a) => a.value === option?.value),
|
!!option?.value && !menuList.some((a) => a.value === option?.value),
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
@ -220,342 +254,292 @@ const Wizard = () => {
|
||||||
)}
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<div className="grid grid-cols-2 gap-1">
|
<FormItem
|
||||||
<FormItem
|
label="Menu Icon"
|
||||||
label="Menu Parent Code"
|
invalid={errors.menuIcon && touched.menuIcon}
|
||||||
invalid={errors.menuParentCode && touched.menuParentCode}
|
errorMessage={errors.menuIcon}
|
||||||
errorMessage={errors.menuParentCode}
|
asterisk={true}
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field type="text" autoComplete="off" name="menuParentCode">
|
|
||||||
{({ field, form }: FieldProps<string>) => (
|
|
||||||
<Select
|
|
||||||
componentAs={CreatableSelect}
|
|
||||||
field={field}
|
|
||||||
form={form}
|
|
||||||
placeholder="Menu Parent Code"
|
|
||||||
isClearable={true}
|
|
||||||
isLoading={isLoadingMenu}
|
|
||||||
options={menuList}
|
|
||||||
value={
|
|
||||||
values.menuParentCode
|
|
||||||
? (menuList?.find((o) => o.value === values.menuParentCode) ?? {
|
|
||||||
label: values.menuParentCode,
|
|
||||||
value: values.menuParentCode,
|
|
||||||
})
|
|
||||||
: null
|
|
||||||
}
|
|
||||||
onChange={(option) => {
|
|
||||||
form.setFieldValue(field.name, option?.value)
|
|
||||||
setIsMenuNew(
|
|
||||||
!!option?.value && !menuList.some((a) => a.value === option?.value),
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Field>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label="Menu Icon"
|
|
||||||
invalid={errors.menuIcon && touched.menuIcon}
|
|
||||||
errorMessage={errors.menuIcon}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="menuIcon"
|
|
||||||
placeholder="Menu Icon"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
{isMenuNew && (
|
|
||||||
<div className="grid grid-cols-2 gap-1">
|
|
||||||
<FormItem
|
|
||||||
label="Parent Menu Code (En)"
|
|
||||||
invalid={
|
|
||||||
errors.languageTextMenuParentEn && touched.languageTextMenuParentEn
|
|
||||||
}
|
|
||||||
errorMessage={errors.languageTextMenuParentEn}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="languageTextMenuParentEn"
|
|
||||||
placeholder="Parent Menu Code (En)"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label="Parent Menu Code (Tr)"
|
|
||||||
invalid={
|
|
||||||
errors.languageTextMenuParentTr && touched.languageTextMenuParentTr
|
|
||||||
}
|
|
||||||
errorMessage={errors.languageTextMenuParentTr}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="languageTextMenuParentTr"
|
|
||||||
placeholder="Parent Menu Code (Tr)"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className="grid grid-cols-2 gap-1">
|
|
||||||
<FormItem
|
|
||||||
label="Data Source Code"
|
|
||||||
invalid={errors.dataSourceCode && touched.dataSourceCode}
|
|
||||||
errorMessage={errors.dataSourceCode}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="dataSourceCode"
|
|
||||||
placeholder="Data Source Code"
|
|
||||||
>
|
|
||||||
{({ field, form }: FieldProps<string>) => (
|
|
||||||
<Select
|
|
||||||
componentAs={CreatableSelect}
|
|
||||||
field={field}
|
|
||||||
form={form}
|
|
||||||
placeholder="Data Source Code"
|
|
||||||
isClearable={true}
|
|
||||||
isLoading={isLoadingDataSource}
|
|
||||||
options={dataSourceList}
|
|
||||||
value={
|
|
||||||
values.dataSourceCode
|
|
||||||
? (dataSourceList?.find(
|
|
||||||
(o) => o.value === values.dataSourceCode,
|
|
||||||
) ?? {
|
|
||||||
label: values.dataSourceCode,
|
|
||||||
value: values.dataSourceCode,
|
|
||||||
})
|
|
||||||
: null
|
|
||||||
}
|
|
||||||
onChange={(option) => {
|
|
||||||
form.setFieldValue(field.name, option?.value)
|
|
||||||
setIsDataSourceNew(
|
|
||||||
!!option?.value &&
|
|
||||||
!dataSourceList.some((a) => a.value === option?.value),
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Field>
|
|
||||||
</FormItem>
|
|
||||||
{isDataSourceNew && (
|
|
||||||
<FormItem
|
|
||||||
label="Connection String"
|
|
||||||
invalid={
|
|
||||||
errors.dataSourceConnectionString && touched.dataSourceConnectionString
|
|
||||||
}
|
|
||||||
errorMessage={errors.dataSourceConnectionString}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="dataSourceConnectionString"
|
|
||||||
placeholder="Connection String"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-2 gap-1">
|
|
||||||
<FormItem
|
|
||||||
label="Select Command Type"
|
|
||||||
invalid={errors.selectCommandType && touched.selectCommandType}
|
|
||||||
errorMessage={errors.selectCommandType}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="selectCommandType"
|
|
||||||
placeholder="Select Command Type"
|
|
||||||
component={Input}
|
|
||||||
>
|
|
||||||
{({ field, form }: FieldProps<SelectCommandTypeEnum>) => (
|
|
||||||
<Select
|
|
||||||
field={field}
|
|
||||||
form={form}
|
|
||||||
options={selectCommandTypeOptions}
|
|
||||||
value={selectCommandTypeOptions.find(
|
|
||||||
(o: any) => o.value === field.value,
|
|
||||||
)}
|
|
||||||
onChange={(o) => form.setFieldValue(field.name, o?.value)}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Field>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label="Select Command"
|
|
||||||
invalid={errors.selectCommand && touched.selectCommand}
|
|
||||||
errorMessage={errors.selectCommand}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="selectCommand"
|
|
||||||
placeholder="Select Command"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-2 gap-1">
|
|
||||||
<FormItem
|
|
||||||
label="Key Field Name"
|
|
||||||
invalid={errors.keyFieldName && touched.keyFieldName}
|
|
||||||
errorMessage={errors.keyFieldName}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="keyFieldName"
|
|
||||||
placeholder="Key Field Name"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label="Key Field Db Source Type"
|
|
||||||
invalid={errors.keyFieldDbSourceType && touched.keyFieldDbSourceType}
|
|
||||||
errorMessage={errors.keyFieldDbSourceType}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="keyFieldDbSourceType"
|
|
||||||
placeholder="Key Field Db Source Type"
|
|
||||||
component={Input}
|
|
||||||
>
|
|
||||||
{({ field, form }: FieldProps<DbTypeEnum>) => (
|
|
||||||
<Select
|
|
||||||
field={field}
|
|
||||||
form={form}
|
|
||||||
options={dbSourceTypeOptions}
|
|
||||||
value={dbSourceTypeOptions?.filter(
|
|
||||||
(o: any) => o.value === values.keyFieldDbSourceType,
|
|
||||||
)}
|
|
||||||
onChange={(o) => form.setFieldValue(field.name, o?.value)}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Field>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-2 gap-1">
|
|
||||||
<FormItem
|
|
||||||
label="Menu Text (En)"
|
|
||||||
invalid={errors.languageTextMenuEn && touched.languageTextMenuEn}
|
|
||||||
errorMessage={errors.languageTextMenuEn}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="languageTextMenuEn"
|
|
||||||
placeholder="Menu Text (En)"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label="Menu Text (Tr)"
|
|
||||||
invalid={errors.languageTextMenuTr && touched.languageTextMenuTr}
|
|
||||||
errorMessage={errors.languageTextMenuTr}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="languageTextMenuTr"
|
|
||||||
placeholder="Menu Text (Tr)"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-2 gap-1">
|
|
||||||
<FormItem
|
|
||||||
label="Title (En)"
|
|
||||||
invalid={errors.languageTextTitleEn && touched.languageTextTitleEn}
|
|
||||||
errorMessage={errors.languageTextTitleEn}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="languageTextTitleEn"
|
|
||||||
placeholder="Title (En)"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label="Title (Tr)"
|
|
||||||
invalid={errors.languageTextTitleTr && touched.languageTextTitleTr}
|
|
||||||
errorMessage={errors.languageTextTitleTr}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="languageTextTitleTr"
|
|
||||||
placeholder="Title (Tr)"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-2 gap-1">
|
|
||||||
<FormItem
|
|
||||||
label="Description (En)"
|
|
||||||
invalid={errors.languageTextDescEn && touched.languageTextDescEn}
|
|
||||||
errorMessage={errors.languageTextDescEn}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="languageTextDescEn"
|
|
||||||
placeholder="Description (En)"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
label="Description (Tr)"
|
|
||||||
invalid={errors.languageTextDescTr && touched.languageTextDescTr}
|
|
||||||
errorMessage={errors.languageTextDescTr}
|
|
||||||
asterisk={true}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="text"
|
|
||||||
autoComplete="off"
|
|
||||||
name="languageTextDescTr"
|
|
||||||
placeholder="Description (Tr)"
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
block
|
|
||||||
className="mt-4"
|
|
||||||
variant="solid"
|
|
||||||
loading={isSubmitting}
|
|
||||||
type="submit"
|
|
||||||
>
|
>
|
||||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
<Field
|
||||||
</Button>
|
type="text"
|
||||||
</FormContainer>
|
autoComplete="off"
|
||||||
</Form>
|
name="menuIcon"
|
||||||
)}
|
placeholder="Menu Icon"
|
||||||
</Formik>
|
component={Input}
|
||||||
</Container>
|
/>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
{isMenuNew && (
|
||||||
|
<div className="grid grid-cols-2 gap-1">
|
||||||
|
<FormItem
|
||||||
|
label="Parent Menu Code (En)"
|
||||||
|
invalid={errors.languageTextMenuParentEn && touched.languageTextMenuParentEn}
|
||||||
|
errorMessage={errors.languageTextMenuParentEn}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="languageTextMenuParentEn"
|
||||||
|
placeholder="Parent Menu Code (En)"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label="Parent Menu Code (Tr)"
|
||||||
|
invalid={errors.languageTextMenuParentTr && touched.languageTextMenuParentTr}
|
||||||
|
errorMessage={errors.languageTextMenuParentTr}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="languageTextMenuParentTr"
|
||||||
|
placeholder="Parent Menu Code (Tr)"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="grid grid-cols-2 gap-1">
|
||||||
|
<FormItem
|
||||||
|
label="Data Source Code"
|
||||||
|
invalid={errors.dataSourceCode && touched.dataSourceCode}
|
||||||
|
errorMessage={errors.dataSourceCode}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="dataSourceCode"
|
||||||
|
placeholder="Data Source Code"
|
||||||
|
>
|
||||||
|
{({ field, form }: FieldProps<string>) => (
|
||||||
|
<Select
|
||||||
|
componentAs={CreatableSelect}
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
placeholder="Data Source Code"
|
||||||
|
isClearable={true}
|
||||||
|
isLoading={isLoadingDataSource}
|
||||||
|
options={dataSourceList}
|
||||||
|
value={
|
||||||
|
values.dataSourceCode
|
||||||
|
? (dataSourceList?.find((o) => o.value === values.dataSourceCode) ?? {
|
||||||
|
label: values.dataSourceCode,
|
||||||
|
value: values.dataSourceCode,
|
||||||
|
})
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
onChange={(option) => {
|
||||||
|
form.setFieldValue(field.name, option?.value)
|
||||||
|
setIsDataSourceNew(
|
||||||
|
!!option?.value &&
|
||||||
|
!dataSourceList.some((a) => a.value === option?.value),
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
{isDataSourceNew && (
|
||||||
|
<FormItem
|
||||||
|
label="Connection String"
|
||||||
|
invalid={
|
||||||
|
errors.dataSourceConnectionString && touched.dataSourceConnectionString
|
||||||
|
}
|
||||||
|
errorMessage={errors.dataSourceConnectionString}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="dataSourceConnectionString"
|
||||||
|
placeholder="Connection String"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-2 gap-1">
|
||||||
|
<FormItem
|
||||||
|
label="Select Command Type"
|
||||||
|
invalid={errors.selectCommandType && touched.selectCommandType}
|
||||||
|
errorMessage={errors.selectCommandType}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="selectCommandType"
|
||||||
|
placeholder="Select Command Type"
|
||||||
|
component={Input}
|
||||||
|
>
|
||||||
|
{({ field, form }: FieldProps<SelectCommandTypeEnum>) => (
|
||||||
|
<Select
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
options={selectCommandTypeOptions}
|
||||||
|
value={selectCommandTypeOptions.find((o: any) => o.value === field.value)}
|
||||||
|
onChange={(o) => form.setFieldValue(field.name, o?.value)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label="Select Command"
|
||||||
|
invalid={errors.selectCommand && touched.selectCommand}
|
||||||
|
errorMessage={errors.selectCommand}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="selectCommand"
|
||||||
|
placeholder="Select Command"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-2 gap-1">
|
||||||
|
<FormItem
|
||||||
|
label="Key Field Name"
|
||||||
|
invalid={errors.keyFieldName && touched.keyFieldName}
|
||||||
|
errorMessage={errors.keyFieldName}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="keyFieldName"
|
||||||
|
placeholder="Key Field Name"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label="Key Field Db Source Type"
|
||||||
|
invalid={errors.keyFieldDbSourceType && touched.keyFieldDbSourceType}
|
||||||
|
errorMessage={errors.keyFieldDbSourceType}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="keyFieldDbSourceType"
|
||||||
|
placeholder="Key Field Db Source Type"
|
||||||
|
component={Input}
|
||||||
|
>
|
||||||
|
{({ field, form }: FieldProps<DbTypeEnum>) => (
|
||||||
|
<Select
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
options={dbSourceTypeOptions}
|
||||||
|
value={dbSourceTypeOptions?.filter(
|
||||||
|
(o: any) => o.value === values.keyFieldDbSourceType,
|
||||||
|
)}
|
||||||
|
onChange={(o) => form.setFieldValue(field.name, o?.value)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-2 gap-1">
|
||||||
|
<FormItem
|
||||||
|
label="Menu Text (En)"
|
||||||
|
invalid={errors.languageTextMenuEn && touched.languageTextMenuEn}
|
||||||
|
errorMessage={errors.languageTextMenuEn}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="languageTextMenuEn"
|
||||||
|
placeholder="Menu Text (En)"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label="Menu Text (Tr)"
|
||||||
|
invalid={errors.languageTextMenuTr && touched.languageTextMenuTr}
|
||||||
|
errorMessage={errors.languageTextMenuTr}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="languageTextMenuTr"
|
||||||
|
placeholder="Menu Text (Tr)"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-2 gap-1">
|
||||||
|
<FormItem
|
||||||
|
label="Title (En)"
|
||||||
|
invalid={errors.languageTextTitleEn && touched.languageTextTitleEn}
|
||||||
|
errorMessage={errors.languageTextTitleEn}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="languageTextTitleEn"
|
||||||
|
placeholder="Title (En)"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label="Title (Tr)"
|
||||||
|
invalid={errors.languageTextTitleTr && touched.languageTextTitleTr}
|
||||||
|
errorMessage={errors.languageTextTitleTr}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="languageTextTitleTr"
|
||||||
|
placeholder="Title (Tr)"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-2 gap-1">
|
||||||
|
<FormItem
|
||||||
|
label="Description (En)"
|
||||||
|
invalid={errors.languageTextDescEn && touched.languageTextDescEn}
|
||||||
|
errorMessage={errors.languageTextDescEn}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="languageTextDescEn"
|
||||||
|
placeholder="Description (En)"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label="Description (Tr)"
|
||||||
|
invalid={errors.languageTextDescTr && touched.languageTextDescTr}
|
||||||
|
errorMessage={errors.languageTextDescTr}
|
||||||
|
asterisk={true}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="languageTextDescTr"
|
||||||
|
placeholder="Description (Tr)"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
|
<Button block className="mt-4" variant="solid" loading={isSubmitting} type="submit">
|
||||||
|
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||||
|
</Button>
|
||||||
|
</FormContainer>
|
||||||
|
</Form>
|
||||||
|
)}
|
||||||
|
</Formik>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -457,216 +457,214 @@ const OrganizationUnits = () => {
|
||||||
></Helmet>
|
></Helmet>
|
||||||
<Loading type="cover" loading={loading}>
|
<Loading type="cover" loading={loading}>
|
||||||
<Container>
|
<Container>
|
||||||
<AdaptableCard>
|
<div className="flex flex-col lg:flex-row gap-4">
|
||||||
<div className="flex flex-col lg:flex-row gap-4">
|
<Card
|
||||||
<Card
|
className="md:w-2/12 min-w-fit"
|
||||||
className="md:w-2/12 min-w-fit"
|
header={translate('::Abp.Identity.OrganizationUnits')}
|
||||||
header={translate('::Abp.Identity.OrganizationUnits')}
|
headerExtra={
|
||||||
headerExtra={
|
<div className="flex gap-1">
|
||||||
<div className="flex gap-1">
|
<Button
|
||||||
<Button
|
variant="solid"
|
||||||
variant="solid"
|
size="xs"
|
||||||
size="xs"
|
title={translate('::Abp.Identity.OrganizationUnit.AddUnit')}
|
||||||
title={translate('::Abp.Identity.OrganizationUnit.AddUnit')}
|
onClick={(e) => {
|
||||||
onClick={(e) => {
|
e.preventDefault()
|
||||||
e.preventDefault()
|
setDialogItem({
|
||||||
setDialogItem({
|
parentId: activeOu,
|
||||||
parentId: activeOu,
|
displayName: '',
|
||||||
displayName: '',
|
})
|
||||||
})
|
}}
|
||||||
}}
|
>
|
||||||
>
|
{activeOu ? <MdAccountTree /> : <MdRadioButtonUnchecked />}
|
||||||
{activeOu ? <MdAccountTree /> : <MdRadioButtonUnchecked />}
|
</Button>
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
size="xs"
|
size="xs"
|
||||||
title={translate('::Abp.Identity.OrganizationUnit.MoveAllUsers')}
|
title={translate('::Abp.Identity.OrganizationUnit.MoveAllUsers')}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
setIsMoveAllUsersOpen(true)
|
setIsMoveAllUsersOpen(true)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MdGroup />
|
<MdGroup />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
className="h-8"
|
className="h-8"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder={translate('::App.Search')}
|
placeholder={translate('::App.Search')}
|
||||||
value={treeSearch}
|
value={treeSearch}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setTreeSearch(e.target.value)
|
setTreeSearch(e.target.value)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Tree
|
<Tree
|
||||||
openByDefault={false}
|
openByDefault={false}
|
||||||
data={list}
|
data={list}
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
onMove={({ dragIds, parentId }) => {
|
onMove={({ dragIds, parentId }) => {
|
||||||
if (dragIds.length > 0) {
|
if (dragIds.length > 0) {
|
||||||
handleMove(dragIds[0], parentId ?? '')
|
handleMove(dragIds[0], parentId ?? '')
|
||||||
}
|
|
||||||
}}
|
|
||||||
onRename={({ id, name }) => {
|
|
||||||
handleEdit(id, name)
|
|
||||||
}}
|
|
||||||
className="mt-2 cursor-pointer"
|
|
||||||
searchTerm={treeSearch}
|
|
||||||
indent={10}
|
|
||||||
searchMatch={(node, term) =>
|
|
||||||
node.data.name.toLowerCase().includes(term.toLowerCase())
|
|
||||||
}
|
}
|
||||||
width={'100%'}
|
}}
|
||||||
>
|
onRename={({ id, name }) => {
|
||||||
{Node}
|
handleEdit(id, name)
|
||||||
</Tree>
|
}}
|
||||||
</Card>
|
className="mt-2 cursor-pointer"
|
||||||
<Card className="md:w-10/12 w-full">
|
searchTerm={treeSearch}
|
||||||
<Tabs defaultValue="users">
|
indent={10}
|
||||||
<TabList>
|
searchMatch={(node, term) =>
|
||||||
<TabNav value="users" icon={<HiUser />}>
|
node.data.name.toLowerCase().includes(term.toLowerCase())
|
||||||
{translate('::AbpIdentity.Users')}
|
}
|
||||||
</TabNav>
|
width={'100%'}
|
||||||
<TabNav value="roles" icon={<HiBadgeCheck />}>
|
>
|
||||||
{translate('::AbpIdentity.Roles')}
|
{Node}
|
||||||
</TabNav>
|
</Tree>
|
||||||
</TabList>
|
</Card>
|
||||||
<TabContent value="users">
|
<Card className="md:w-10/12 w-full">
|
||||||
{activeOu ? (
|
<Tabs defaultValue="users">
|
||||||
<AdaptableCard
|
<TabList>
|
||||||
headerClass="text-right"
|
<TabNav value="users" icon={<HiUser />}>
|
||||||
header={
|
{translate('::AbpIdentity.Users')}
|
||||||
<Button
|
</TabNav>
|
||||||
variant="solid"
|
<TabNav value="roles" icon={<HiBadgeCheck />}>
|
||||||
size="sm"
|
{translate('::AbpIdentity.Roles')}
|
||||||
onClick={async (e) => {
|
</TabNav>
|
||||||
e.preventDefault()
|
</TabList>
|
||||||
const response = await getUsers(0, 1000)
|
<TabContent value="users">
|
||||||
setUserSelectionList(response.data?.items ?? [])
|
{activeOu ? (
|
||||||
}}
|
<AdaptableCard
|
||||||
>
|
headerClass="text-right"
|
||||||
<MdPersonAdd />
|
header={
|
||||||
</Button>
|
<Button
|
||||||
}
|
variant="solid"
|
||||||
>
|
size="sm"
|
||||||
<Table compact>
|
onClick={async (e) => {
|
||||||
{!!ouMembers.length && (
|
e.preventDefault()
|
||||||
<THead>
|
const response = await getUsers(0, 1000)
|
||||||
<Tr>
|
setUserSelectionList(response.data?.items ?? [])
|
||||||
<Th></Th>
|
}}
|
||||||
<Th>Adı Soyadı</Th>
|
>
|
||||||
<Th>E-Posta</Th>
|
<MdPersonAdd />
|
||||||
<Th>Durum</Th>
|
</Button>
|
||||||
</Tr>
|
}
|
||||||
</THead>
|
>
|
||||||
)}
|
<Table compact>
|
||||||
<TBody>
|
{!!ouMembers.length && (
|
||||||
{ouMembers.map((user) => (
|
<THead>
|
||||||
<Tr key={user.id}>
|
<Tr>
|
||||||
<Td>
|
<Th></Th>
|
||||||
<Button
|
<Th>Adı Soyadı</Th>
|
||||||
className="mr-auto"
|
<Th>E-Posta</Th>
|
||||||
type="button"
|
<Th>Durum</Th>
|
||||||
size="xs"
|
</Tr>
|
||||||
onClick={() => {
|
</THead>
|
||||||
setDeleteRow({
|
)}
|
||||||
id: user.id ?? '',
|
<TBody>
|
||||||
name: 'User',
|
{ouMembers.map((user) => (
|
||||||
})
|
<Tr key={user.id}>
|
||||||
}}
|
<Td>
|
||||||
>
|
<Button
|
||||||
<FaTrash />
|
className="mr-auto"
|
||||||
</Button>
|
type="button"
|
||||||
</Td>
|
size="xs"
|
||||||
<Td>
|
onClick={() => {
|
||||||
<ActionLink
|
setDeleteRow({
|
||||||
href={`/admin/identity/users/${user.id}/details`}
|
id: user.id ?? '',
|
||||||
className="font-bold"
|
name: 'User',
|
||||||
target="_blank"
|
})
|
||||||
>
|
}}
|
||||||
{user.name} {user.surname}
|
>
|
||||||
</ActionLink>
|
<FaTrash />
|
||||||
</Td>
|
</Button>
|
||||||
<Td>{user.email}</Td>
|
</Td>
|
||||||
<Td>{user.isActive ? 'Aktif' : 'Pasif'}</Td>
|
<Td>
|
||||||
</Tr>
|
<ActionLink
|
||||||
))}
|
href={`/admin/identity/users/${user.id}/details`}
|
||||||
<TableNoRecords show={!ouMembers.length} />
|
className="font-bold"
|
||||||
</TBody>
|
target="_blank"
|
||||||
</Table>
|
>
|
||||||
</AdaptableCard>
|
{user.name} {user.surname}
|
||||||
) : (
|
</ActionLink>
|
||||||
<div className="p-3">
|
</Td>
|
||||||
{translate('::Abp.Identity.OrganizationUnit.Users.Description')}
|
<Td>{user.email}</Td>
|
||||||
</div>
|
<Td>{user.isActive ? 'Aktif' : 'Pasif'}</Td>
|
||||||
)}
|
</Tr>
|
||||||
</TabContent>
|
))}
|
||||||
<TabContent value="roles">
|
<TableNoRecords show={!ouMembers.length} />
|
||||||
{activeOu ? (
|
</TBody>
|
||||||
<AdaptableCard
|
</Table>
|
||||||
headerClass="text-right"
|
</AdaptableCard>
|
||||||
header={
|
) : (
|
||||||
<Button
|
<div className="p-3">
|
||||||
variant="solid"
|
{translate('::Abp.Identity.OrganizationUnit.Users.Description')}
|
||||||
size="sm"
|
</div>
|
||||||
onClick={async (e) => {
|
)}
|
||||||
e.preventDefault()
|
</TabContent>
|
||||||
const response = await getRoles(0, 1000)
|
<TabContent value="roles">
|
||||||
setRoleSelectionList(response.data?.items ?? [])
|
{activeOu ? (
|
||||||
}}
|
<AdaptableCard
|
||||||
>
|
headerClass="text-right"
|
||||||
<MdPersonAdd />
|
header={
|
||||||
</Button>
|
<Button
|
||||||
}
|
variant="solid"
|
||||||
>
|
size="sm"
|
||||||
<Table compact>
|
onClick={async (e) => {
|
||||||
{!!ouRoles.length && (
|
e.preventDefault()
|
||||||
<THead>
|
const response = await getRoles(0, 1000)
|
||||||
<Tr>
|
setRoleSelectionList(response.data?.items ?? [])
|
||||||
<Th></Th>
|
}}
|
||||||
<Th>Rol</Th>
|
>
|
||||||
</Tr>
|
<MdPersonAdd />
|
||||||
</THead>
|
</Button>
|
||||||
)}
|
}
|
||||||
<TBody>
|
>
|
||||||
{ouRoles.map((role) => (
|
<Table compact>
|
||||||
<Tr key={role.id}>
|
{!!ouRoles.length && (
|
||||||
<Td>
|
<THead>
|
||||||
<Button
|
<Tr>
|
||||||
className="mr-auto"
|
<Th></Th>
|
||||||
type="button"
|
<Th>Rol</Th>
|
||||||
size="xs"
|
</Tr>
|
||||||
onClick={() => {
|
</THead>
|
||||||
setDeleteRow({
|
)}
|
||||||
id: role.id ?? '',
|
<TBody>
|
||||||
name: 'Role',
|
{ouRoles.map((role) => (
|
||||||
})
|
<Tr key={role.id}>
|
||||||
}}
|
<Td>
|
||||||
>
|
<Button
|
||||||
<FaTrash />
|
className="mr-auto"
|
||||||
</Button>
|
type="button"
|
||||||
</Td>
|
size="xs"
|
||||||
<Td>{role.name}</Td>
|
onClick={() => {
|
||||||
</Tr>
|
setDeleteRow({
|
||||||
))}
|
id: role.id ?? '',
|
||||||
<TableNoRecords show={!ouRoles.length} />
|
name: 'Role',
|
||||||
</TBody>
|
})
|
||||||
</Table>
|
}}
|
||||||
</AdaptableCard>
|
>
|
||||||
) : (
|
<FaTrash />
|
||||||
<div className="p-3">
|
</Button>
|
||||||
{translate('::Abp.Identity.OrganizationUnit.Roles.Description')}
|
</Td>
|
||||||
</div>
|
<Td>{role.name}</Td>
|
||||||
)}
|
</Tr>
|
||||||
</TabContent>
|
))}
|
||||||
</Tabs>
|
<TableNoRecords show={!ouRoles.length} />
|
||||||
</Card>
|
</TBody>
|
||||||
</div>
|
</Table>
|
||||||
</AdaptableCard>
|
</AdaptableCard>
|
||||||
|
) : (
|
||||||
|
<div className="p-3">
|
||||||
|
{translate('::Abp.Identity.OrganizationUnit.Roles.Description')}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</TabContent>
|
||||||
|
</Tabs>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</Loading>
|
</Loading>
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -6,6 +6,7 @@ import LoadAiPostsFromLocalStorage from './LoadAiPostsFromLocalStorage'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { getAi } from '@/services/ai.service'
|
import { getAi } from '@/services/ai.service'
|
||||||
import { AiDto } from '@/proxy/ai/models'
|
import { AiDto } from '@/proxy/ai/models'
|
||||||
|
import { Container } from '@/components/shared'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
type ChatType = 'chat' | 'query' | 'analyze'
|
type ChatType = 'chat' | 'query' | 'analyze'
|
||||||
|
|
@ -262,9 +263,8 @@ const Assistant = () => {
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return (
|
return (
|
||||||
<>
|
<Container>
|
||||||
<LoadAiPostsFromLocalStorage />
|
<LoadAiPostsFromLocalStorage />
|
||||||
|
|
||||||
<div className="h-[calc(100vh-140px)] flex flex-col">
|
<div className="h-[calc(100vh-140px)] flex flex-col">
|
||||||
<div className="flex-1 overflow-y-auto p-4 space-y-4">
|
<div className="flex-1 overflow-y-auto p-4 space-y-4">
|
||||||
{messages.length === 0 && (
|
{messages.length === 0 && (
|
||||||
|
|
@ -359,7 +359,7 @@ const Assistant = () => {
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { useStoreState } from '@/store/store'
|
||||||
import React, { useState, useEffect } from 'react'
|
import React, { useState, useEffect } from 'react'
|
||||||
import { useForumData } from './useForumData'
|
import { useForumData } from './useForumData'
|
||||||
import { ForumView } from './forum/ForumView'
|
import { ForumView } from './forum/ForumView'
|
||||||
|
import { Container } from '@/components/shared'
|
||||||
|
|
||||||
export function Forum() {
|
export function Forum() {
|
||||||
const { user, tenant } = useStoreState((state) => state.auth)
|
const { user, tenant } = useStoreState((state) => state.auth)
|
||||||
|
|
@ -45,7 +46,7 @@ export function Forum() {
|
||||||
}, [error, clearError])
|
}, [error, clearError])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50">
|
<Container>
|
||||||
{error && (
|
{error && (
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
|
||||||
<div className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative">
|
<div className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative">
|
||||||
|
|
@ -76,7 +77,7 @@ export function Forum() {
|
||||||
onTopicSelect={setSelectedTopic}
|
onTopicSelect={setSelectedTopic}
|
||||||
onViewStateChange={setForumViewState}
|
onViewStateChange={setForumViewState}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { useEffect } from 'react'
|
import { useEffect } from 'react'
|
||||||
import { useForumData } from './useForumData'
|
import { useForumData } from './useForumData'
|
||||||
import { AdminView } from './admin/AdminView'
|
import { AdminView } from './admin/AdminView'
|
||||||
|
import { Container } from '@/components/shared'
|
||||||
|
|
||||||
export function Management() {
|
export function Management() {
|
||||||
const {
|
const {
|
||||||
|
|
@ -52,7 +53,7 @@ export function Management() {
|
||||||
}, [error, clearError])
|
}, [error, clearError])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50">
|
<Container>
|
||||||
{error && (
|
{error && (
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
|
||||||
<div className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative">
|
<div className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative">
|
||||||
|
|
@ -90,7 +91,7 @@ export function Management() {
|
||||||
onMarkPostAsAcceptedAnswer={(id) => markPostAsAcceptedAnswer(id).then(() => {})}
|
onMarkPostAsAcceptedAnswer={(id) => markPostAsAcceptedAnswer(id).then(() => {})}
|
||||||
onUnmarkPostAsAcceptedAnswer={(id) => unmarkPostAsAcceptedAnswer(id).then(() => {})}
|
onUnmarkPostAsAcceptedAnswer={(id) => unmarkPostAsAcceptedAnswer(id).then(() => {})}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,20 +75,36 @@ export function AdminView({
|
||||||
onUnmarkPostAsAcceptedAnswer,
|
onUnmarkPostAsAcceptedAnswer,
|
||||||
}: AdminViewProps) {
|
}: AdminViewProps) {
|
||||||
const [activeSection, setActiveSection] = useState<AdminSection>('stats')
|
const [activeSection, setActiveSection] = useState<AdminSection>('stats')
|
||||||
const { translate } = useLocalization();
|
const { translate } = useLocalization()
|
||||||
|
|
||||||
const navigationItems = [
|
const navigationItems = [
|
||||||
{ id: 'stats' as AdminSection, label: translate('::App.Forum.Dashboard.Dashboard'), icon: BarChart3 },
|
{
|
||||||
{ id: 'categories' as AdminSection, label: translate('::App.Forum.Dashboard.Categories'), icon: Folder },
|
id: 'stats' as AdminSection,
|
||||||
{ id: 'topics' as AdminSection, label: translate('::App.Forum.Dashboard.Topics'), icon: MessageSquare },
|
label: translate('::App.Forum.Dashboard.Dashboard'),
|
||||||
{ id: 'posts' as AdminSection, label: translate('::App.Forum.Dashboard.Posts'), icon: FileText },
|
icon: BarChart3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'categories' as AdminSection,
|
||||||
|
label: translate('::App.Forum.Dashboard.Categories'),
|
||||||
|
icon: Folder,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'topics' as AdminSection,
|
||||||
|
label: translate('::App.Forum.Dashboard.Topics'),
|
||||||
|
icon: MessageSquare,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'posts' as AdminSection,
|
||||||
|
label: translate('::App.Forum.Dashboard.Posts'),
|
||||||
|
icon: FileText,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
<div className="mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||||
<div className="flex flex-col lg:flex-row gap-8">
|
<div className="flex flex-col lg:flex-row gap-8">
|
||||||
{/* Sidebar Navigation */}
|
{/* Sidebar Navigation */}
|
||||||
<div className="lg:w-64 flex-shrink-0">
|
<div className="lg:w-64 flex-shrink-0 p-4 bg-gray-50">
|
||||||
<nav className="space-y-2">
|
<nav className="space-y-2">
|
||||||
{navigationItems.map((item) => {
|
{navigationItems.map((item) => {
|
||||||
const Icon = item.icon
|
const Icon = item.icon
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { SortableMenuTree } from './SortableMenuTree'
|
||||||
import { MenuItem } from '@/@types/menu'
|
import { MenuItem } from '@/@types/menu'
|
||||||
import { useMenuData } from '@/utils/hooks/useMenuData'
|
import { useMenuData } from '@/utils/hooks/useMenuData'
|
||||||
import { AlertCircle, Loader2, Menu, Save } from 'lucide-react'
|
import { AlertCircle, Loader2, Menu, Save } from 'lucide-react'
|
||||||
|
import { Container } from '@/components/shared'
|
||||||
|
|
||||||
export const MenuManager = () => {
|
export const MenuManager = () => {
|
||||||
const { menuItems, setMenuItems, loading, error, refetch, saveMenuData } = useMenuData()
|
const { menuItems, setMenuItems, loading, error, refetch, saveMenuData } = useMenuData()
|
||||||
|
|
@ -76,9 +77,8 @@ export const MenuManager = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full h-full">
|
<Container>
|
||||||
{/* Menu Tree */}
|
<div className="bg-white rounded px-4 sm:px-4 lg:px-6 py-6">
|
||||||
<div className="bg-white rounded-lg shadow-md p-6">
|
|
||||||
<div className="flex items-center justify-between mb-6 flex-wrap gap-4">
|
<div className="flex items-center justify-between mb-6 flex-wrap gap-4">
|
||||||
{/* Sol kısım: Başlık */}
|
{/* Sol kısım: Başlık */}
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|
@ -152,7 +152,7 @@ export const MenuManager = () => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue