Skip to content

Commit f9cf6e6

Browse files
authored
Merge pull request #101 from pjuaristi-ikerlan/main
2 parents bc506a4 + 6874538 commit f9cf6e6

File tree

7 files changed

+62
-82
lines changed

7 files changed

+62
-82
lines changed

ichub-frontend/src/App.css

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
.sidebarArea {
178178
width: 250px;
179179
padding: 20px;
180-
background: rgb(1,32,96);
181180
background: linear-gradient(180deg, rgba(1,32,96,0.8323704481792717) 0%, rgba(5,107,153,0.5690651260504201) 100%);
182181
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
183182
}
@@ -260,8 +259,6 @@
260259
width: 100%;
261260
margin-top: 20px;
262261
margin-bottom: 30px;
263-
/*margin-left: auto;*/
264-
/*margin-right: auto;*/
265262
}
266263

267264
.cx-card__decision--item {
@@ -285,24 +282,19 @@
285282
color: white!important;
286283
background: black!important;
287284
border-radius: 0!important;
288-
border: none!important;
285+
box-shadow: 0 0 10px rgb(1,32,96);
286+
border: 2px solid #5fb9ff42!important;
289287
}
290288
.cx-table .cx-typography{
291289
color: white!important;
292290
}
293291

294-
.product-table{
295-
box-shadow: 0 0 10px rgb(1,32,96);
296-
border: 2px solid #5fb9ff42!important;
297-
}
298-
299292
.product-cards .product-card:hover {
300293
border: 2px solid rgba(1, 86, 255, 0.829)!important;
301294
}
302295
.productDetail .product-card{
303296
background: black !important;
304297
border-radius: 8px!important;
305-
border: none!important;
306298
box-shadow: 0 0 12px rgb(1, 40, 119);
307299
border: 1px solid #5fb9ff42!important;
308300
padding: 20px;
@@ -311,7 +303,6 @@
311303
.product-cards .product-card{
312304
background: black !important;
313305
border-radius: 8px!important;
314-
border: none!important;
315306
box-shadow: 0 0 12px rgb(1, 40, 119);
316307
border: 1px solid #5fb9ff42!important;
317308
}
@@ -321,7 +312,6 @@
321312
.productDetail, .cx-card__decision--item .cx-card__decision--button {
322313
background: black !important;
323314
border-radius: 8px!important;
324-
border: none!important;
325315
box-shadow: 0 0 10px rgb(1,32,96);
326316
border: 2px solid #5fb9ff42!important;
327317
}
@@ -371,13 +361,6 @@ div[role="presentation"] > div.MuiPaper-root.MuiPopover-paper.MuiMenu-paper butt
371361
.cx-card__decision--button:hover {
372362
border: 2px solid rgba(1, 86, 255, 0.829)!important;
373363
}
374-
/*
375-
.grid-70-30{
376-
display: grid;
377-
grid-template-columns: 70% 30%;
378-
gap: 10px;
379-
}
380-
*/
381364

382365
.product-image{
383366
max-height: 250px;
@@ -404,7 +387,6 @@ div[role="presentation"] > div.MuiPaper-root.MuiPopover-paper.MuiMenu-paper butt
404387

405388
.share-dropdown-btn:hover{
406389
background-color: #7cb0ff91!important;
407-
background: rgb(1,32,96);
408390
background: linear-gradient(180deg, rgba(1,32,96,0.8323704481792717) 0%, rgba(5,107,153,0.5690651260504201) 100%);
409391
}
410392

@@ -413,7 +395,10 @@ div[role="presentation"] > div.MuiPaper-root.MuiPopover-paper.MuiMenu-paper butt
413395
background: rgb(1,32,96);
414396
background: linear-gradient(206deg, rgba(1, 32, 96, 0.8323704481792717), rgba(0, 165, 255, 0.57))!important;
415397
box-shadow: 0 2px 1px 3px rgba(71, 172, 255, 0.809);
416-
}
398+
border-bottom: 0;
399+
padding: 0!important;
400+
position: sticky!important;
401+
}
417402

418403
.cx-navigation-item a {
419404
color: var(--brand-text);
@@ -429,7 +414,6 @@ div[role="presentation"] > div.MuiPaper-root.MuiPopover-paper.MuiMenu-paper butt
429414
color: var(--brand-text);
430415
font-weight: 900;
431416
font-size: 25px!important;
432-
font-family: 'Manrope';
433417
padding: 0px!important;
434418
cursor: default;
435419
}
@@ -482,14 +466,8 @@ div[role="presentation"] > div.MuiPaper-root.MuiPopover-paper.MuiMenu-paper butt
482466
display: flex;
483467
justify-content: center;
484468
align-self: center;
485-
width: 100%;
486469
padding: 0!important;
487470
}
488-
.cx-main-navigation__wrapper {
489-
padding: 0!important;
490-
border-bottom: 0;
491-
position: sticky!important;
492-
}
493471

494472
.main-logo {
495473
height: 65px;

ichub-frontend/src/components/general/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
********************************************************************************/
2222

2323
import { useState } from 'react';
24-
import { MainNavigation, Button, IconButton } from '@catena-x/portal-shared-components';
24+
import { MainNavigation, IconButton } from '@catena-x/portal-shared-components';
2525
import PersonIcon from '@mui/icons-material/Person';
2626
import { Menu, MenuItem, Typography, Divider, ListItemIcon } from '@mui/material';
2727
import AccountCircleIcon from '@mui/icons-material/AccountCircle';

ichub-frontend/src/components/general/JsonViewerDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const JsonViewerDialog = ({ open, onClose, carJsonData }: JsonViewerDialogProps)
3131
const description = carJsonData?.Description ? `${carJsonData.Description}` : "";
3232

3333
const handleCopy = () => {
34-
var json_string = JSON.stringify(carJsonData, null, 2);
34+
const json_string = JSON.stringify(carJsonData, null, 2);
3535
navigator.clipboard.writeText(json_string)
3636
.then(() => {
3737
setCopied(true);

ichub-frontend/src/components/general/Sidebar.tsx

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -21,56 +21,18 @@
2121
********************************************************************************/
2222

2323
import { Menu } from '@catena-x/portal-shared-components';
24+
import sidebarElements from '../../tests/payloads/sidebar-elements.json'
2425

2526
const Sidebar = () => {
2627
return (
27-
<Menu
28-
items={[
29-
{
30-
children: [
31-
{ href: '/', title: 'Bosch' },
32-
{ href: '/', title: 'MagnaFlow' },
33-
{ href: '/', title: 'Brembo' },
34-
{ href: '/', title: 'Pirelli' },
35-
{ href: '/', title: 'Monroe' },
36-
{ href: '/', title: 'Valeo' }
37-
],
38-
href: '/',
39-
title: 'Brands'
40-
},
41-
{
42-
children: [
43-
{ href: '/', title: 'Turbochargers' },
44-
{ href: '/', title: 'Suspension Parts' },
45-
{ href: '/', title: 'Brake Pads' },
46-
{ href: '/', title: 'Engine Blocks' }
47-
],
48-
href: '/',
49-
title: 'Categories'
50-
},
51-
{
52-
children: [
53-
{ href: '/', title: 'BASF' },
54-
{ href: '/', title: 'BMW' },
55-
{ href: '/', title: 'BOSCH' },
56-
{ href: '/', title: 'Mercedes-Benz' },
57-
{ href: '/', title: 'Volkswagen' },
58-
],
59-
href: '/',
60-
title: 'Shared with'
61-
},
62-
{
63-
children: [
64-
{ href: '/', title: 'Draft' },
65-
{ href: '/', title: 'Pending' },
66-
{ href: '/', title: 'Registered' }
67-
],
68-
href: '/',
69-
title: 'Status'
70-
},
71-
]}
72-
/>
73-
)
74-
}
28+
<Menu
29+
items={sidebarElements.map(({ title, subitems }) => ({
30+
title,
31+
href: '#',
32+
children: subitems.map(({ name, link }) => ({ title: name, href: link }))
33+
}))}
34+
/>
35+
);
36+
};
7537

7638
export default Sidebar

ichub-frontend/src/pages/ProductsDetails.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ const ProductsDetails = () => {
146146
startIcon={<Icon fontSize="16" iconName="IosShare" />}
147147
>
148148
<div className="flex flex-column">
149-
<Button className="dropdown-button" color="secondary" size="small" onClick={handleCopy} className="share-dropdown-btn" startIcon={<Icon fontSize="16" iconName="ContentCopy" />}>
149+
<Button className="dropdown-button share-dropdown-btn" color="secondary" size="small" onClick={handleCopy} startIcon={<Icon fontSize="16" iconName="ContentCopy" />}>
150150
<span className="dropdown-button-content">{PRODUCT_OPTIONS.COPY}</span>
151151
</Button>
152-
<Button className="dropdown-button" color="secondary" size="small" onClick={handleDownload} className="share-dropdown-btn" startIcon={<Icon fontSize="16" iconName="FileDownload" />}>
152+
<Button className="dropdown-button share-dropdown-btn" color="secondary" size="small" onClick={handleDownload} startIcon={<Icon fontSize="16" iconName="FileDownload" />}>
153153
<span className="dropdown-button-content">{PRODUCT_OPTIONS.DOWNLOAD}</span>
154154
</Button>
155-
<Button className="dropdown-button" color="secondary" size="small" onClick={handleShare} className="share-dropdown-btn" startIcon={<Icon fontSize="16" iconName="IosShare" />}>
155+
<Button className="dropdown-button share-dropdown-btn" color="secondary" size="small" onClick={handleShare} startIcon={<Icon fontSize="16" iconName="IosShare" />}>
156156
<span className="dropdown-button-content">{PRODUCT_OPTIONS.SHARE}</span>
157157
</Button>
158158
</div>

ichub-frontend/src/pages/ProductsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { useNavigate } from "react-router-dom";
2525
import carPartsData from "../tests/payloads/sample-data.json";
2626
import { ProductCard } from "../components/general/ProductCard";
2727
import { PartInstance } from "../types/product";
28-
import { Grid2, Typography } from "@mui/material";
28+
import { Grid2 } from "@mui/material";
2929

3030
const ProductsList = () => {
3131
const [carParts, setCarParts] = useState<PartInstance[]>([]);
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[
2+
{
3+
"title": "Brands",
4+
"subitems": [
5+
{ "name": "Bosch", "link": "/" },
6+
{ "name": "MagnaFlow", "link": "/" },
7+
{ "name": "Brembo", "link": "/" },
8+
{ "name": "Pirelli", "link": "/" },
9+
{ "name": "Monroe", "link": "/" },
10+
{ "name": "Valeo", "link": "/" }
11+
]
12+
},
13+
{
14+
"title": "Categories",
15+
"subitems": [
16+
{ "name": "Turbochargers", "link": "/" },
17+
{ "name": "Suspension Parts", "link": "/" },
18+
{ "name": "Brake Pads", "link": "/" },
19+
{ "name": "Engine Blocks", "link": "/" }
20+
]
21+
},
22+
{
23+
"title": "Shared with",
24+
"subitems": [
25+
{ "name": "BASF", "link": "/" },
26+
{ "name": "BMW", "link": "/" },
27+
{ "name": "BOSCH", "link": "/" },
28+
{ "name": "Mercedes-Benz", "link": "/" },
29+
{ "name": "Volkswagen", "link": "/" }
30+
]
31+
},
32+
{
33+
"title": "Status",
34+
"subitems": [
35+
{ "name": "Draft", "link": "/" },
36+
{ "name": "Pending", "link": "/" },
37+
{ "name": "Registered", "link": "/" }
38+
]
39+
}
40+
]

0 commit comments

Comments
 (0)