Permission Tanımlamaları, Filtreleme, hatalar
This commit is contained in:
parent
57796d1177
commit
7f089c3de1
5 changed files with 3633 additions and 142 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -82,7 +82,7 @@ define(['./workbox-a959eb95'], (function (workbox) { 'use strict';
|
||||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||||
}, {
|
}, {
|
||||||
"url": "/index.html",
|
"url": "/index.html",
|
||||||
"revision": "0.hml46tc2c78"
|
"revision": "0.bkv2hic80pg"
|
||||||
}], {});
|
}], {});
|
||||||
workbox.cleanupOutdatedCaches();
|
workbox.cleanupOutdatedCaches();
|
||||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("/index.html"), {
|
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("/index.html"), {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import AdaptableCard from '@/components/shared/AdaptableCard'
|
import AdaptableCard from '@/components/shared/AdaptableCard'
|
||||||
import Container from '@/components/shared/Container'
|
import Container from '@/components/shared/Container'
|
||||||
import { Button, Checkbox, Dialog, Menu, toast } from '@/components/ui'
|
import { Button, Checkbox, Dialog, Input, Menu, toast } from '@/components/ui'
|
||||||
import { useConfig } from '@/components/ui/ConfigProvider'
|
import { useConfig } from '@/components/ui/ConfigProvider'
|
||||||
import Notification from '@/components/ui/Notification'
|
import Notification from '@/components/ui/Notification'
|
||||||
import {
|
import {
|
||||||
|
|
@ -35,6 +35,7 @@ function RolesPermission({
|
||||||
const [selectedGroupPermissions, setSelectedGroupPermissions] = useState<PermissionWithStyle[]>(
|
const [selectedGroupPermissions, setSelectedGroupPermissions] = useState<PermissionWithStyle[]>(
|
||||||
[],
|
[],
|
||||||
)
|
)
|
||||||
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
||||||
const mode = useStoreState((state) => state.theme.mode)
|
const mode = useStoreState((state) => state.theme.mode)
|
||||||
|
|
||||||
|
|
@ -143,6 +144,17 @@ function RolesPermission({
|
||||||
[selectedGroupPermissions],
|
[selectedGroupPermissions],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const filteredPermissions = useMemo(() => {
|
||||||
|
if (!searchTerm) {
|
||||||
|
return selectedGroupPermissions
|
||||||
|
}
|
||||||
|
return selectedGroupPermissions.filter((p) =>
|
||||||
|
translate('::' + p.displayName)
|
||||||
|
.toLowerCase()
|
||||||
|
.includes(searchTerm.toLowerCase()),
|
||||||
|
)
|
||||||
|
}, [selectedGroupPermissions, searchTerm, translate])
|
||||||
|
|
||||||
const onSelectAll = (value: boolean, e: ChangeEvent<HTMLInputElement>) => {
|
const onSelectAll = (value: boolean, e: ChangeEvent<HTMLInputElement>) => {
|
||||||
if (!permissionList) {
|
if (!permissionList) {
|
||||||
return
|
return
|
||||||
|
|
@ -250,8 +262,15 @@ function RolesPermission({
|
||||||
</div>
|
</div>
|
||||||
<div style={{ width: '70%' }} className="max-h-[470px] overflow-y-auto">
|
<div style={{ width: '70%' }} className="max-h-[470px] overflow-y-auto">
|
||||||
<hr className="mb-2"></hr>
|
<hr className="mb-2"></hr>
|
||||||
<div className="card-body">
|
<Input
|
||||||
{selectedGroupPermissions.map((permission) => (
|
size="sm"
|
||||||
|
className="mb-2"
|
||||||
|
placeholder="Yetkiler içinde ara..."
|
||||||
|
value={searchTerm}
|
||||||
|
onChange={(e) => setSearchTerm(e.target.value)}
|
||||||
|
/>
|
||||||
|
<div className="my-1">
|
||||||
|
{filteredPermissions.map((permission) => (
|
||||||
<div key={permission.name}>
|
<div key={permission.name}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
name={permission.name}
|
name={permission.name}
|
||||||
|
|
|
||||||
|
|
@ -520,7 +520,7 @@ const CustomerView: React.FC = () => {
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-2xl font-bold text-gray-900">
|
<h2 className="text-2xl font-bold text-gray-900">
|
||||||
{customer.primaryContact?.fullName}
|
{customer.primaryContact?.fullName}
|
||||||
</h4>
|
</h2>
|
||||||
<p className="text-gray-600">
|
<p className="text-gray-600">
|
||||||
{customer.primaryContact?.title || 'Pozisyon belirtilmemiş'}
|
{customer.primaryContact?.title || 'Pozisyon belirtilmemiş'}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ const InventoryTracking: React.FC = () => {
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-2xl font-bold text-gray-900">Envanter Takibi</h2>
|
<h2 className="text-2xl font-bold text-gray-900">Lot ve Seri No Takibi</h2>
|
||||||
<p className="text-gray-600">Lot ve seri numarası takiplerini yönetin</p>
|
<p className="text-gray-600">Lot ve seri numarası takiplerini yönetin</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue