feat: enhance CSV upload handling with chunked requests and token support; improve form input limits
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Sheet, WholeWord } from "lucide-react";
|
||||
import { Sheet, WholeWord, Search } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import ImportGUI from "./ImportGUI";
|
||||
import { removeSelection } from "../utils/tableActions";
|
||||
@@ -7,10 +7,17 @@ import { removeSelection } from "../utils/tableActions";
|
||||
type SubHeaderAdminProps = {
|
||||
setFiles: (files: File[]) => void;
|
||||
files?: File[];
|
||||
search: string;
|
||||
setSearch: (value: string) => void;
|
||||
};
|
||||
|
||||
// Sub navigation bar for admin views: provides import + clear selection actions
|
||||
const SubHeaderAdmin: React.FC<SubHeaderAdminProps> = ({ setFiles, files }) => {
|
||||
const SubHeaderAdmin: React.FC<SubHeaderAdminProps> = ({
|
||||
setFiles,
|
||||
files,
|
||||
search,
|
||||
setSearch,
|
||||
}) => {
|
||||
const [showImport, setShowImport] = useState(false);
|
||||
|
||||
return (
|
||||
@@ -30,6 +37,17 @@ const SubHeaderAdmin: React.FC<SubHeaderAdminProps> = ({ setFiles, files }) => {
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{/* Search */}
|
||||
<div className="relative hidden sm:block">
|
||||
<Search className="pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" />
|
||||
<input
|
||||
type="text"
|
||||
value={search}
|
||||
onChange={(e) => setSearch(e.target.value)}
|
||||
placeholder="Suchen… (Losnummer, Name, Adresse, PLZ, Email)"
|
||||
className="w-72 rounded-md border border-gray-300 bg-white pl-9 pr-3 py-2 text-sm text-gray-900 placeholder-gray-400 shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => setShowImport(true)}
|
||||
type="button"
|
||||
|
Reference in New Issue
Block a user