537a4f8ab6
- Added adminCreateUser endpoint and corresponding DTO for creating users. - Implemented deleteUser and resetPassword functionalities for admin users. - Introduced updateEmail functionality for admin users. - Updated UsersService to handle user creation, deletion, password reset, and email updates. - Modified UsersController to include new admin routes with appropriate role checks. - Refactored frontend navigation to link to user management under profile. - Created new profile tabs for user management and database management. - Developed AnvandareClient component for user management, including user creation, deletion, role changes, and password resets. - Added DatabsTab for managing product listings and merging duplicates. - Enhanced MinProfilTab for user profile management with form handling.
23 lines
925 B
TypeScript
23 lines
925 B
TypeScript
import { fetchJson } from '../../../lib/api';
|
|
import type { Product } from '../../../features/inventory/types';
|
|
import MergePreviewForm from '../../admin/products/MergePreviewForm';
|
|
import AdminProductList from '../../admin/products/AdminProductList';
|
|
import ExpandableCreateProductSection from '../../admin/products/ExpandableCreateProductSection';
|
|
import ResetProductsButton from '../../admin/products/ResetProductsButton';
|
|
|
|
export default async function DatabsTab() {
|
|
const products = await fetchJson<Product[]>('/api/products');
|
|
|
|
return (
|
|
<div>
|
|
<p style={{ color: '#555', marginBottom: '1.5rem' }}>
|
|
Granska och standardisera produktnamn, slå ihop dubbletter och hantera kategorier.
|
|
</p>
|
|
<ExpandableCreateProductSection />
|
|
<ResetProductsButton />
|
|
<MergePreviewForm products={products} />
|
|
<AdminProductList products={products} />
|
|
</div>
|
|
);
|
|
}
|