Skip to content

Commit

Permalink
updated impressum
Browse files Browse the repository at this point in the history
  • Loading branch information
jzakotnik committed Aug 5, 2021
1 parent d4d8756 commit 65ddd0f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
24 changes: 16 additions & 8 deletions nextjs/mwe/pages/impressum.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@ import Link from "@material-ui/core/Link";

export default function Impressum() {
return (
<Typography variant="body2" color="text.secondary" align="center">
{"Impressum "}
<Link color="inherit" href="https://github.com/jzakotnik">
jzakotnik github
</Link>{" "}
{new Date().getFullYear()}
{"."}
</Typography>
<div>
<Typography variant="body2" color="text.secondary" align="center">
Auch ein Lunch Profil speichern:
<Link color="inherit" href={process.env.NEXT_PUBLIC_API_ENDPOINT + "/"}>
Hier entlang
</Link>
</Typography>
<Typography variant="body2" color="text.secondary" align="center">
{"Impressum "}
<Link color="inherit" href="https://github.com/jzakotnik">
jzakotnik github
</Link>{" "}
{new Date().getFullYear()}
{"."}
</Typography>
</div>
);
}
15 changes: 13 additions & 2 deletions nextjs/mwe/pages/lunchprofileadmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function LunchProfileAdmin(props) {
thu: true,
fri: true,
});
const [saving, setSaving] = useState(false);

const authid = props.authid;
const readerid = props.reader;
Expand All @@ -37,6 +38,7 @@ export default function LunchProfileAdmin(props) {

const handleSubmit = (event) => {
event.preventDefault();
//setSaving(true);
console.log(event);

const data = { dayselection, authid: { admin: authid } };
Expand All @@ -50,7 +52,10 @@ export default function LunchProfileAdmin(props) {
"Content-Type": "application/json",
},
})
.then((response) => console.log("Success:", JSON.stringify(response)))
.then((response) => {
//setSaving(true);
console.log("Success:", JSON.stringify(response));
})
.catch((error) => console.error("Error:", error));
};

Expand All @@ -61,7 +66,13 @@ export default function LunchProfileAdmin(props) {

function SaveButton(props) {
return (
<Button type="submit" fullWidth variant="contained" sx={{ mt: 3, mb: 2 }}>
<Button
type="submit"
disabled={saving}
fullWidth
variant="contained"
sx={{ mt: 3, mb: 2 }}
>
Speichern
</Button>
);
Expand Down

0 comments on commit 65ddd0f

Please sign in to comment.