Skip to content

Commit 16a2f22

Browse files
Publishing changes to shop (#1991)
2 parents 149bdab + 5194875 commit 16a2f22

File tree

5 files changed

+25
-17
lines changed

5 files changed

+25
-17
lines changed

frontend/src/components/pages/Janus/JanusSidebar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const JanusSidebar: React.FC = () => {
2424
noLinkStyle
2525
label="Indøk kalender"
2626
/>
27+
<Tab component={Link} href="/janus/shop" value="/janus/shop" noLinkStyle label="Butikk" />
2728
<Tab component={Link} href="/janus" value="/janus" noLinkStyle label="Kontakt oss" />
2829
</Tabs>
2930
</Box>

frontend/src/components/pages/Janus/Shop/PurchaseButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ type Props = {
99
export const PurchaseButton: React.FC<Props> = ({ productId }) => {
1010
return (
1111
<Button
12-
disabled={true}
12+
disabled={false}
1313
component={NextLinkComposed}
1414
to={{
1515
pathname: "/ecommerce/checkout",
1616
query: { productId, quantity: 1 },
1717
}}
1818
color="inherit"
19-
size="large"
19+
fullWidth
2020
>
2121
Kjøp nå!
2222
</Button>

frontend/src/components/pages/Janus/Shop/ShopItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const ShopItem: React.VFC<Props> = ({ product }) => {
2222
{product.name}
2323
</Typography>
2424
<Typography variant="body2" textAlign="left" color="text.secondary">
25-
-, {product.price}
25+
{product.price} kr
2626
</Typography>
2727
</CardContent>
2828
</CardActionArea>

frontend/src/components/pages/ecommerce/SalesTermsDialog.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ export const SalesTermsDialog: React.FC<Props> = ({ onClose, open }) => {
125125
uten unødig opphold og senest 30 dager etter bestillingen fra kunden. Varen skal leveres hos kjøperen
126126
med mindre annet er særskilt avtalt mellom partene.
127127
</p>
128+
<p>
129+
Ved kjøp fra indokntnu.no/janus/shop skal produkter hentes på Januskontoret med mindre annet er
130+
avtalt.
131+
</p>
128132
</div>
129133
</section>
130134
<section id="chapter-7">

frontend/src/pages/janus/[id]/index.tsx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { useQuery } from "@apollo/client";
2-
import { Box, Stack } from "@mui/material";
2+
import { Alert, Box, Link, Stack, Typography } from "@mui/material";
33
import { GetServerSideProps, InferGetServerSidePropsType } from "next";
44

5-
import { ProductInfo } from "@/components/pages/Janus/Shop/ProductInfo";
65
import { PurchaseButton } from "@/components/pages/Janus/Shop/PurchaseButton";
76
import { Template } from "@/components/pages/Janus/Template";
87
import { ProductDocument, ProductFragment } from "@/generated/graphql";
@@ -17,22 +16,26 @@ const ProductPage: NextPageWithLayout<InferGetServerSidePropsType<typeof getServ
1716
return (
1817
<Template title={data?.product?.name?.toString() ?? ""} description="">
1918
<Stack spacing={2}>
20-
<Box
21-
sx={{
22-
width: 750,
23-
height: 250,
24-
borderRadius: 1,
25-
bgcolor: "primary.main",
26-
}}
27-
>
28-
{/*<Image src={cabin} style={{ objectFit: "contain", width: "100%", height: "100%" }} alt={""} />*/}
29-
</Box>
19+
<Alert variant="filled" severity="info">
20+
Produktet hentes på Januskontoret. Ved spørsmål kontakt{" "}
21+
<Link href="mailto:web@janus.org.ntnu.no">web@janus.org.ntnu.no</Link>
22+
</Alert>
23+
24+
{/*<Image src={cabin} style={{ objectFit: "contain", width: "100%", height: "100%" }} alt={""} />*/}
3025
<Stack direction={{ xs: "column", sm: "row" }} spacing={{ xs: 12, sm: 2, md: 8 }}>
3126
<Box style={{ width: "75%" }}>{data?.product?.description}</Box>
32-
<ProductInfo price={0} sizes={["S", "M", "L"]} types={["Blue", "Red", "Gray"]} />
27+
{/* <ProductInfo price={0} sizes={["S", "M", "L"]} types={["Blue", "Red", "Gray"]} /> */}
28+
<Box style={{ width: "25%", borderRadius: "3px" }}>
29+
{" "}
30+
<Typography variant="h6" textAlign="left" padding={1}>
31+
Pris: {data?.product?.price} kr
32+
</Typography>{" "}
33+
<Box color="white" bgcolor="primary.main" borderRadius={"3px"}>
34+
<PurchaseButton productId={data?.product?.id ?? ""} />
35+
</Box>
36+
</Box>
3337
</Stack>
3438
</Stack>
35-
<PurchaseButton productId={data?.product?.id ?? ""} />
3639
</Template>
3740
);
3841
};

0 commit comments

Comments
 (0)