Merge pull request #1855 from RafaelTaranto/fix/ui-migration-fixes

LAM-1421 fix: UI migration fixes
This commit is contained in:
Rafael Taranto 2025-05-23 16:04:24 +01:00 committed by GitHub
commit b290f9e34c
5 changed files with 13 additions and 13 deletions

View file

@ -14,6 +14,7 @@ const ToggleButtonGroup = ({
}) => { }) => {
return ( return (
<MUIToggleButtonGroup <MUIToggleButtonGroup
className="flex flex-col gap-4"
size={size} size={size}
name={name} name={name}
orientation={orientation} orientation={orientation}

View file

@ -27,8 +27,9 @@
margin-top: 8px; margin-top: 8px;
} }
/*TODO important because of tailwind integration with MUI*/
.fullPartP { .fullPartP {
color: white; color: white !important;
display: inline; display: inline;
} }

View file

@ -4,7 +4,8 @@ import React, { memo } from 'react'
const TableRow = memo( const TableRow = memo(
({ className, children, header, error, success, size = 'sm', ...props }) => { ({ className, children, header, error, success, size = 'sm', ...props }) => {
const classnamesObj = { const classnamesObj = {
'p-1 h-12 bg-white': !header, 'p-1 bg-white': !header,
'h-12': !header && size !== 'sm' && size !== 'lg',
'h-8': !header && size === 'sm', 'h-8': !header && size === 'sm',
'h-9 font-bold text-base ': !header && size === 'lg', 'h-9 font-bold text-base ': !header && size === 'lg',
'bg-misty-rose': error, 'bg-misty-rose': error,

View file

@ -1,6 +1,5 @@
import { useQuery, gql } from '@apollo/client' import { useQuery, gql } from '@apollo/client'
import Button from '@mui/material/Button' import Button from '@mui/material/Button'
import Grid from '@mui/material/Grid'
import classnames from 'classnames' import classnames from 'classnames'
import * as R from 'ramda' import * as R from 'ramda'
import React from 'react' import React from 'react'
@ -56,11 +55,9 @@ const Alerts = ({ onReset, onExpand, size }) => {
</Label1> </Label1>
)} )}
</div> </div>
<Grid <div
className={classnames({ 'm-0': true, 'max-h-115': showAllItems })} className={classnames({ 'm-0 mt-2': true, 'max-h-115': showAllItems })}>
container <div className="w-full flex-1">
spacing={1}>
<Grid item xs={12}>
{!alerts.length && ( {!alerts.length && (
<Label1 className="text-comet -ml-1 h-30"> <Label1 className="text-comet -ml-1 h-30">
No new alerts. Your system is running smoothly. No new alerts. Your system is running smoothly.
@ -71,10 +68,10 @@ const Alerts = ({ onReset, onExpand, size }) => {
alerts={alerts} alerts={alerts}
machines={machines} machines={machines}
/> />
</Grid> </div>
</Grid> </div>
{!showAllItems && alertsLength > NUM_TO_RENDER && ( {!showAllItems && alertsLength > NUM_TO_RENDER && (
<Grid item xs={12}> <div>
<Label1 className="text-center mb-0"> <Label1 className="text-center mb-0">
<Button <Button
onClick={() => onExpand('alerts')} onClick={() => onExpand('alerts')}
@ -85,7 +82,7 @@ const Alerts = ({ onReset, onExpand, size }) => {
{`Show all (${alerts.length})`} {`Show all (${alerts.length})`}
</Button> </Button>
</Label1> </Label1>
</Grid> </div>
)} )}
</> </>
) )

View file

@ -100,7 +100,7 @@ const Machines = ({ data, refetch, reload }) => {
const machineID = R.path(['deviceId'])(machine) ?? null const machineID = R.path(['deviceId'])(machine) ?? null
return ( return (
<div className="flex flex-1 h-full gap-12"> <div className="flex flex-1 h-full gap-12 mb-12">
<div className="basis-1/4 min-w-1/4 pt-8"> <div className="basis-1/4 min-w-1/4 pt-8">
<Breadcrumbs separator={<NavigateNextIcon fontSize="small" />}> <Breadcrumbs separator={<NavigateNextIcon fontSize="small" />}>
<Link to="/dashboard" className="no-underline"> <Link to="/dashboard" className="no-underline">