Skip to content

Commit

Permalink
Merge edits made directly in main to acceptance (#91)
Browse files Browse the repository at this point in the history
* Fix stallingdetails not showing, add text message when there are no subscriptions available

* remove border from no subscription text

* Add "Opwaarderen stallingstegoed" link to Login screen

* Remove message 'Openingstijden edit not working'

---------

Co-authored-by: bartwr <[email protected]>
  • Loading branch information
mosbuma and bartwr authored Jun 19, 2024
1 parent a501f58 commit 69904a8
Show file tree
Hide file tree
Showing 6 changed files with 337 additions and 213 deletions.
195 changes: 147 additions & 48 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions src/components/parking/ParkingEditOpening.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ const ParkingEditOpening = ({ parkingdata, openingChanged }: { parkingdata: any,
<SectionBlock
heading="Openingstijden"
>
<p className="py-2 text-red">
{/* <p className="py-2 text-red">
Het veranderen van de openingstijden (specifiek uren) werkt tijdelijk niet. We werken hieraan; kom binnenkort terug als je de uren wilt aanpassen.
</p>
</p> */}
<table className="w-full">
<tbody>
{formatOpeningTimesForEdit(data, "ma", "Maandag", handleChange, handleChangeChecks)}
Expand Down
28 changes: 16 additions & 12 deletions src/components/parking/ParkingViewAbonnementen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ const ParkingViewAbonnementen = ({ parkingdata }: { parkingdata: ParkingDetailsT
(state: any) => state.map.activeMunicipalityInfo
);

// Don't render HTML if no subscriptions are available
if (!parkingdata.abonnementsvorm_fietsenstalling || parkingdata.abonnementsvorm_fietsenstalling.length <= 0) {
return <></>
}
// console.log('activeMunicipalityInfo', activeMunicipalityInfo);
// parkingdata.abonnementsvorm_fietsenstalling.map(x => console.log('abonnement', x));
// console.log("abonnementsvormen", JSON.stringify(parkingdata.abonnementsvorm_fietsenstalling, null, 2));

return (
<>
Expand All @@ -32,15 +31,20 @@ const ParkingViewAbonnementen = ({ parkingdata }: { parkingdata: ParkingDetailsT
<div className="text-right sm:text-center">&euro;{x.abonnementsvormen.prijs?.toLocaleString('nl-NL') || "---"}</div>
</Fragment>
}) : <></>}
<div className="text-right sm:text-center">
<Button className="mt-4" onClick={() => {
window.open(`https://veiligstallen.nl/${activeMunicipalityInfo ? activeMunicipalityInfo.UrlName : 'utrecht'}/abonnement`, '_blank');
}}>
Koop abonnement
</Button>
</div>
{((parkingdata.abonnementsvorm_fietsenstalling && parkingdata.abonnementsvorm_fietsenstalling.length > 0)) ?
<div className="text-right sm:text-center">
<Button className="mt-4" onClick={() => {
window.open(`https://veiligstallen.nl/${activeMunicipalityInfo ? activeMunicipalityInfo.UrlName : 'utrecht'}/abonnement`, '_blank');
}}>
Koop abonnement
</Button>
</div >
:
<div className="text-start col-span-3">
Geen abonnementen beschikbaar
</div>}
</div>
</SectionBlock>
</SectionBlock >

<HorizontalDivider className="my-4" />
</>
Expand Down
8 changes: 4 additions & 4 deletions src/components/parking/ParkingViewCapaciteit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const ParkingViewCapaciteit = ({ parkingdata }: { parkingdata: ParkingDetailsTyp
if (capacitydata.detailed === null || Object.keys(capacitydata.detailed).length === 0) {
content = (
<>
<div className="">{parkingdata.Capacity}</div>
<div className="text-right"></div>
<div key={"c-1"} className="">{parkingdata.Capacity}</div>
<div key={"c-2"} className="text-right"></div>
</>
);
}
Expand All @@ -86,14 +86,14 @@ const ParkingViewCapaciteit = ({ parkingdata }: { parkingdata: ParkingDetailsTyp
} else if (detail.Toegestaan === false) {
return (
<>
<div className="">{key}</div>
<div key={key + "-1"} className="">{key}</div>
<div className="text-right">Niet toegestaan</div>
</>
);
} else if ((detail.Capaciteit || 0) > 0) {
return (
<>
<div className="">{key}</div>
<div key={key + "-2"} className="">{key}</div>
<div className="text-right">{detail.Capaciteit}</div>
</>
);
Expand Down
Loading

0 comments on commit 69904a8

Please sign in to comment.