Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

77 строки
2.2 KiB

  1. // material-ui
  2. import * as React from 'react';
  3. import {
  4. useMediaQuery
  5. } from '@mui/material';
  6. import {FiDataGrid} from "components/FiDataGrid";
  7. import * as FormatUtils from "utils/FormatUtils"
  8. import * as DateUtils from "utils/DateUtils"
  9. import * as PaymentStatus from "utils/statusUtils/PaymentStatus"
  10. import {useTheme} from "@emotion/react";
  11. import { clickableLink } from 'utils/CommonFunction';
  12. // import * as StatusUtils from "./PublicNoteStatusUtils";
  13. // ==============================|| EVENT TABLE ||============================== //
  14. export default function SubmittedTab({ rows }) {
  15. const theme = useTheme();
  16. const isMdOrLg = useMediaQuery(theme.breakpoints.up('md'));
  17. const columns = [
  18. {
  19. field: 'actions',
  20. headerName: 'Trans. No.',
  21. width: isMdOrLg ? 'auto' : 160,
  22. flex: isMdOrLg ? 1 : undefined,
  23. cellClassName: 'actions',
  24. renderCell: (params) => {
  25. return clickableLink('/paymentPage/details/' + params.row.id, params.row.transNo);
  26. },
  27. },
  28. {
  29. id: 'transDateTime',
  30. field: 'transDateTime',
  31. headerName: 'Trans. Date',
  32. width: isMdOrLg ? 'auto' : 160,
  33. flex: isMdOrLg ? 1 : undefined,
  34. valueGetter: (params) => {
  35. return DateUtils.datetimeStr(params.value);
  36. }
  37. },
  38. {
  39. id: 'status',
  40. field: 'status',
  41. headerName: 'Status',
  42. width: isMdOrLg ? 'auto' : 160,
  43. flex: isMdOrLg ? 1 : undefined,
  44. renderCell: (params) => {
  45. return PaymentStatus.getStatus_Eng(params);
  46. }
  47. },
  48. {
  49. id: 'payAmount',
  50. field: 'payAmount',
  51. headerName: 'Amount',
  52. width: 150,
  53. valueGetter: (params) => {
  54. return (params?.value) ? "$ " + FormatUtils.currencyFormat(params?.value) : "";
  55. }
  56. },
  57. ];
  58. return (
  59. <>
  60. <div style={{ height:'20%', width: '98%' }}>
  61. <FiDataGrid
  62. rows={rows}
  63. columns={columns}
  64. customPageSize={5}
  65. />
  66. </div>
  67. </>
  68. );
  69. }