Files
Web-Frontend/client/src/components/Canvas/views/AdminTabs/MEDataEntry.jsx
T

54 lines
1.3 KiB
React
Raw Normal View History

2025-08-20 17:44:21 -07:00
import { HStack, createListCollection } from "@chakra-ui/react"
import DropDownMenu from "../../CanvasComponents/DropDownMenu"
const startYear = 1970;
const currentYear = new Date().getFullYear();
const yearItems = Array.from(
{ length: currentYear - startYear + 1 },
(_, i) => {
const year = startYear + i;
return { label: String(year), value: String(year) };
}
);
const years = createListCollection({
items: yearItems.reverse(),
});
const quarters = createListCollection({
items: [
{ label: "Q1", value: "quarter_1" },
{ label: "Q2", value: "quarter_2" },
{ label: "Q3", value: "quarter_3" },
{ label: "Q4", value: "quarter_4" },
],
})
const sections = createListCollection({
items: [
{ label: "All", value: "all" },
{ label: "Com", value: "com" },
{ label: "Eng", value: "eng" },
{ label: "Gas", value: "gas" },
{ label: "Geophys", value: "geophys" },
{ label: "GRSP", value: "grsp" },
{ label: "IT", value: "it" },
],
})
export function MEDataEntry() {
return(
2025-08-20 17:44:21 -07:00
<HStack spacing={4} m={4}>
<DropDownMenu collection={quarters} placeholder="Quarter" width="130px" />
<DropDownMenu collection={years} placeholder="Year" width="130px" />
<DropDownMenu collection={sections} placeholder="Section" width="130px" />
</HStack>
);
2025-08-20 17:44:21 -07:00
}