This commit is contained in:
cracklesparkle
2024-07-10 14:37:00 +09:00
parent a65a431b09
commit f9de1124c3
36 changed files with 312 additions and 176 deletions

View File

@ -1,18 +1,15 @@
import { useEffect, useState } from "react"
import { Box, Button, Typography } from "@mui/material"
import { useState } from "react"
import { Box, Button } from "@mui/material"
import axiosInstance from "../http/axiosInstance"
import { DataGrid } from "@mui/x-data-grid"
export default function Reports() {
const [state, setState] = useState<any>(null)
const [exportData, setExportData] = useState<any>(null)
const [state, setState] = useState(null)
const fetch = async () => {
await axiosInstance.get(`/info/reports/0?to_export=true`, {
responseType: 'blob',
}).then(response => {
setExportData(response.data)
const url = window.URL.createObjectURL(response.data)
const link = document.createElement('a')
link.href = url
@ -71,7 +68,7 @@ export default function Reports() {
disableRowSelectionOnClick
processRowUpdate={(updatedRow, originalRow) => {
console.log(updatedRow)
console.log(updatedRow, originalRow)
return updatedRow
}}