Ready to implement next feature
This commit is contained in:
		| @@ -1,4 +1,5 @@ | |||||||
| import DeleteIcon from "@mui/icons-material/DeleteOutlined"; | import DeleteIcon from "@mui/icons-material/DeleteOutlined"; | ||||||
|  | import DriveFileMoveOutlineIcon from "@mui/icons-material/DriveFileMoveOutline"; | ||||||
| import { Tooltip, Typography } from "@mui/material"; | import { Tooltip, Typography } from "@mui/material"; | ||||||
| import { DataGrid, GridActionsCellItem, GridColDef } from "@mui/x-data-grid"; | import { DataGrid, GridActionsCellItem, GridColDef } from "@mui/x-data-grid"; | ||||||
| import React from "react"; | import React from "react"; | ||||||
| @@ -89,6 +90,12 @@ function MovementsTable(p: { | |||||||
|   const alert = useAlert(); |   const alert = useAlert(); | ||||||
|   const confirm = useConfirm(); |   const confirm = useConfirm(); | ||||||
|  |  | ||||||
|  |   // Change account of movement | ||||||
|  |   const handleMoveClick = async (movement: Movement) => { | ||||||
|  |     // TODO | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   // Delete movement | ||||||
|   const handleDeleteClick = async (movement: Movement) => { |   const handleDeleteClick = async (movement: Movement) => { | ||||||
|     try { |     try { | ||||||
|       if ( |       if ( | ||||||
| @@ -168,6 +175,14 @@ function MovementsTable(p: { | |||||||
|       editable: false, |       editable: false, | ||||||
|       getActions: (params) => { |       getActions: (params) => { | ||||||
|         return [ |         return [ | ||||||
|  |           <Tooltip title="Move to another account"> | ||||||
|  |             <GridActionsCellItem | ||||||
|  |               icon={<DriveFileMoveOutlineIcon />} | ||||||
|  |               label="Move to another account" | ||||||
|  |               onClick={() => handleMoveClick(params.row)} | ||||||
|  |               color="inherit" | ||||||
|  |             /> | ||||||
|  |           </Tooltip>, | ||||||
|           <Tooltip title="Delete the movement"> |           <Tooltip title="Delete the movement"> | ||||||
|             <GridActionsCellItem |             <GridActionsCellItem | ||||||
|               icon={<DeleteIcon color="error" />} |               icon={<DeleteIcon color="error" />} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user