This commit is contained in:
insvrgent
2025-01-29 15:39:55 +07:00
parent c5927469eb
commit b0813e1519
3 changed files with 216 additions and 189 deletions

View File

@@ -2,7 +2,7 @@
"name": "groovebrew-mockup", "name": "groovebrew-mockup",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"homepage": "https://dev.kedaimaster.com", "homepage": "https://kedaimaster.com",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.0",

View File

@@ -1,5 +1,5 @@
// src/config.js // src/config.js
const API_BASE_URL = 'https://dev.api.kedaimaster.com'; const API_BASE_URL = 'https://api.kedaimaster.com';
export default API_BASE_URL; export default API_BASE_URL;

View File

@@ -28,7 +28,7 @@ const RoundedRectangle = ({
flexDirection: "column", flexDirection: "column",
alignItems: "flex-start", alignItems: "flex-start",
justifyContent: "center", justifyContent: "center",
width: !children && !isChildren && width, width: width,
height: "auto", height: "auto",
borderRadius: "15px", borderRadius: "15px",
padding: "20px", padding: "20px",
@@ -104,7 +104,7 @@ const RoundedRectangle = ({
); );
}; };
const App = ({ forCafe = true, cafeId="", const App = ({ forCafe = true, cafeId = -1,
handleClose, otherCafes }) => { handleClose, otherCafes }) => {
const [selectedCafeId, setSelectedCafeId] = useState(cafeId); const [selectedCafeId, setSelectedCafeId] = useState(cafeId);
const [analytics, setAnalytics] = useState({}); const [analytics, setAnalytics] = useState({});
@@ -395,6 +395,7 @@ console.log(segments)
} }
</div> </div>
</div> </div>
{!forCafe && selectedCafeId != -1 &&
<div style={{ <div style={{
textAlign: "center", textAlign: "center",
marginTop: '30px' marginTop: '30px'
@@ -522,6 +523,32 @@ console.log(segments)
<PeriodCharts type={filter} aggregatedCurrentReports={analytics?.aggregatedCurrentReports} aggregatedPreviousReports={analytics?.aggregatedPreviousReports} colors={colors} /> <PeriodCharts type={filter} aggregatedCurrentReports={analytics?.aggregatedCurrentReports} aggregatedPreviousReports={analytics?.aggregatedPreviousReports} colors={colors} />
} }
</div> </div>
}
{!forCafe && selectedCafeId == -1 &&
<div style={{
textAlign: "center",
marginTop: '30px'
}}>
<div
style={{
display: "flex",
flexWrap: "wrap",
justifyContent: "center",
padding: "20px",
}}
>
<RoundedRectangle
title={"Masukkan nama kedai"}
width="calc(100% - 10px)"
><input style={{width: '70%', fontSize: '25px'}}/></RoundedRectangle>
<RoundedRectangle
title={"Buat kedai"}
width="calc(100% - 10px)"
/>
</div>
</div>
}
</div> </div>
); );
}; };