fix(f6): separate technical and finding permissions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { Link } from 'react-router';
|
||||
import { useAuth } from '../../auth/AuthContext';
|
||||
import { Alert, LoadingBlock, errorMessage } from '../../components/Feedback';
|
||||
import { Icon } from '../../components/Icon';
|
||||
import {
|
||||
@@ -13,6 +14,8 @@ import type {
|
||||
import { AssetTechnicalDataPanel } from './AssetTechnicalDataPanel';
|
||||
|
||||
export function AssetFindingCatalogPanel({ assetId, canManage }: { assetId: string; canManage: boolean }) {
|
||||
const { hasPermission } = useAuth();
|
||||
const canEditTechnical = hasPermission('assets.update');
|
||||
const [technical, setTechnical] = useState<InventoryTechnicalValues | null>(null);
|
||||
const [items, setItems] = useState<InventoryFamilyFinding[]>([]);
|
||||
const [search, setSearch] = useState('');
|
||||
@@ -56,7 +59,7 @@ export function AssetFindingCatalogPanel({ assetId, canManage }: { assetId: stri
|
||||
</section>;
|
||||
|
||||
return <div className="asset-tab-stack">
|
||||
<AssetTechnicalDataPanel assetId={assetId} canEdit={canManage} />
|
||||
<AssetTechnicalDataPanel assetId={assetId} canEdit={canEditTechnical} />
|
||||
<section className="panel asset-finding-catalog-panel">
|
||||
<div className="panel-heading">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user