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 int Product { get; set; } = 0;
public int Device { get; set; } = 0;
[Ignore]
public String OrderNumbers { get; set; }
public String VrmLink { get; set; } = "";
}

View File

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

View File

@ -108,10 +108,12 @@ const FlatInstallationView = (props: FlatInstallationViewProps) => {
<TableCell>
<FormattedMessage id="country" defaultMessage="Country" />
</TableCell>
<TableCell>
<FormattedMessage id="VRM Link" defaultMessage="VRM Link" />
</TableCell>
<TableCell>
<FormattedMessage id="Device" defaultMessage="Device" />
</TableCell>
<TableCell>
<FormattedMessage id="status" defaultMessage="Status" />
</TableCell>
@ -225,6 +227,51 @@ const FlatInstallationView = (props: FlatInstallationViewProps) => {
</Typography>
</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>
<div
style={{

View File

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