This commit is contained in:
insvrgent
2025-02-17 13:07:40 +07:00
parent 05c5545cbb
commit 9e7c80ddad
3 changed files with 107 additions and 58 deletions

View File

@@ -122,7 +122,6 @@ const App = ({ forCafe = true, cafeId = -1,
const [graphFilter, setGraphFilter] = useState("income");
const [itemName, setItemName] = useState('');
const fetchData = async (filter) => {
if (selectedCafeId == '-1') return;
console.log(selectedCafeId, filter)
@@ -573,12 +572,12 @@ const App = ({ forCafe = true, cafeId = -1,
loading={loading}
value={'Rp'+analytics?.currentTotals?.totalPromoSpend}
width= {`calc(${!forCafe && selectedCafeId !== 0 ? '50%' : '100%'} - 10px)`}
onClick={() => window.location.href = window.location.origin + '/' + otherCafes.find(item => item.cafeId === selectedCafeId).cafeIdentifyName}
/>
)}
{!forCafe && selectedCafeId != -1 && selectedCafeId != 0 && (
<RoundedRectangle
title={"Kunjungi bisnis"}
title={"Kunjungi"}
value={"bisnis"}
loading={loading}
width= {`calc(${selectedCafeId !== 0 ? '50%' : '100%'} - 10px)`}
onClick={() => window.location.href = window.location.origin + '/' + otherCafes.find(item => item.cafeId === selectedCafeId).cafeIdentifyName}