Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add power BI iframe #311

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/client/src/components/HomePage/homePage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
padding: $spacing-4 !important;
}
}
&__section-iframe {
padding: $spacing-4;
@media (max-width: 600px) {
padding: $spacing-4 !important;
margin: auto !important;
}
}

&__summary {
color: $dark-blue;
Expand Down
71 changes: 20 additions & 51 deletions src/client/src/components/HomePage/sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import PropTypes from "prop-types";
import React from "react";
import { Link } from "react-router-dom";

import { NounExcelIcon, NounPeopleIcon, NounPlatformIcon } from "./Icons";

const LoginLink = () => (
<div
className="home-page__link"
Expand All @@ -24,56 +22,27 @@ const RequestAccessLink = () => (
</div>
);

export const IconItems = ({ users, isLoading = false }) => {
// I can't use anonymous function without a display name for icon.
// That's make a lint error
const items = [
{
firstParagraph: "22 millions d’entreprises",
icon: function renderIcon(height) {
return <NounExcelIcon height={height} />;
},
secondParagraph: "37 millions d’établissements",
},
{
firstParagraph: "59 millions de fiches​",
icon: function renderIcon(height) {
return <NounPlatformIcon height={height} />;
},
secondParagraph: "200 Go de données​",
},
{
firstParagraph: `+ ${users} utilisateurs`,
icon: function renderIcon(height) {
return <NounPeopleIcon height={height} />;
},
secondParagraph: "dans les Dreets et Ddets(PP)",
},
];

export const IconItems = () => {
return (
<div className="home-page__section ">
<h2 className="home-page__blue-title">FCE en chiffres</h2>
<div className="columns icons">
{items.map((item, index) => {
return (
<div className="column is-3 icons__item" key={item.firstParagraph}>
<div>
<div className="icons__image-container">{item.icon(40)}</div>
{isLoading && index === 2 ? (
<div className="dots">
<div />
<div />
<div />
</div>
) : (
<p className="first-text">{item.firstParagraph}</p>
)}
<p>{item.secondParagraph}</p>
</div>
</div>
);
})}
{/* <h2 className="home-page__blue-title">FCE en chiffres</h2> */}
<div
className="columns icons "
style={{ height: "28VW", margin: "auto" }}
>
<iframe
title="Report Section"
width="100%"
// height="90%"
src="https://app.powerbi.com/view?r=eyJrIjoiNzdiNjg5YzgtNzk2OC00ZTkwLWEwOWYtNTBlOGM1ODc2ZjFlIiwidCI6IjAzNWU1MjkyLTVhMjUtNDUwOS1iYjA4LWE1NTVmN2QzMWE4YiJ9"
allowFullScreen="true"
style={{
backgroundColor: "#ffffff !important",
filter: "drop-shadow(0 1px 3px rgba(0, 0, 18, 0.16))",
overflow: "hidden",
padding: 0,
}}
/>
</div>
</div>
);
Expand Down Expand Up @@ -212,7 +181,7 @@ export const DailyUse = () => {
];

return (
<div className="home-page__daily-use home-page__section ">
<div className="home-page__daily-use home-page__section-iframe ">
<h2 className="home-page__blue-title">Quels usages au quotidien ?</h2>
<div className="columns home-page__daily-use__items">
{items.map((item) => (
Expand Down
Loading