Add device type to front end and backend

This commit is contained in:
Noe 2024-06-19 14:55:30 +02:00
parent dfc779a360
commit 3e1e69354c
4 changed files with 52 additions and 5 deletions

View File

@ -21,9 +21,8 @@ public class Installation : TreeNode
public String WriteRoleId { get; set; } = ""; public String WriteRoleId { get; set; } = "";
public int Product { get; set; } = 0; public int Product { get; set; } = 0;
public int Device { get; set; } = 0;
[Ignore] [Ignore]
public String OrderNumbers { get; set; } public String OrderNumbers { get; set; }
public String VrmLink { get; set; } = ""; public String VrmLink { get; set; } = "";
} }

View File

@ -235,7 +235,7 @@ function HistoryOfActions(props: HistoryProps) {
> >
<div <div
style={{ style={{
flex: 1, flex: 2,
marginTop: '15px', marginTop: '15px',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
@ -343,7 +343,7 @@ function HistoryOfActions(props: HistoryProps) {
> >
<div <div
style={{ style={{
flex: 1, flex: 2,
marginTop: '15px', marginTop: '15px',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',

View File

@ -108,10 +108,12 @@ const FlatInstallationView = (props: FlatInstallationViewProps) => {
<TableCell> <TableCell>
<FormattedMessage id="country" defaultMessage="Country" /> <FormattedMessage id="country" defaultMessage="Country" />
</TableCell> </TableCell>
<TableCell> <TableCell>
<FormattedMessage id="VRM Link" defaultMessage="VRM Link" /> <FormattedMessage id="VRM Link" defaultMessage="VRM Link" />
</TableCell> </TableCell>
<TableCell>
<FormattedMessage id="Device" defaultMessage="Device" />
</TableCell>
<TableCell> <TableCell>
<FormattedMessage id="status" defaultMessage="Status" /> <FormattedMessage id="status" defaultMessage="Status" />
</TableCell> </TableCell>
@ -225,6 +227,51 @@ const FlatInstallationView = (props: FlatInstallationViewProps) => {
</Typography> </Typography>
</TableCell> </TableCell>
<TableCell>
<div
style={{
display: 'flex',
alignItems: 'center',
marginLeft: '5px'
}}
>
{installation.device === 1 ? (
<Typography
variant="body2"
fontWeight="bold"
color="text.primary"
gutterBottom
noWrap
sx={{ marginTop: '10px', fontSize: 'small' }}
>
Cerbo
</Typography>
) : installation.device === 2 ? (
<Typography
variant="body2"
fontWeight="bold"
color="text.primary"
gutterBottom
noWrap
sx={{ marginTop: '10px', fontSize: 'small' }}
>
Venus
</Typography>
) : (
<Typography
variant="body2"
fontWeight="bold"
color="text.primary"
gutterBottom
noWrap
sx={{ marginTop: '10px', fontSize: 'small' }}
>
Device not specified
</Typography>
)}
</div>
</TableCell>
<TableCell> <TableCell>
<div <div
style={{ style={{

View File

@ -17,6 +17,7 @@ export interface I_Installation extends I_S3Credentials {
s3WriteKey: string; s3WriteKey: string;
s3WriteSecret: string; s3WriteSecret: string;
product: number; product: number;
device: number;
} }
export interface I_Folder { export interface I_Folder {