Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
am9zZWY committed Jun 27, 2024
2 parents 72ed350 + d96342e commit f9a6c40
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI/CD
on:
push:
branches:
- master
- main
jobs:
main:
name: Update FSE repository and build Docker image on trinity after push to master
Expand All @@ -18,5 +18,4 @@ jobs:
# i.e. when switching from RSA host key to ED25519
fingerprint: ${{ secrets.SSH_FINGERPRINT }}
script: |
sudo -u root /usr/bin/git -C /srv/data/fachschaftsempfaenger/git pull origin master
sudo -u root /bin/bash /srv/data/fachschaftsempfaenger/git/.github/scripts/deploy.sh
sudo -u root /bin/bash /srv/docker/pizzasystem/update.sh
Binary file modified public/favicon.ico
Binary file not shown.
Binary file modified public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/app/admin/preparing/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ const Page = () => {


useEffect(() => {
setHistory(getFromLocalStorage('baking.orderhistory', []));
if (history.length === 0) actions.forward();
const _history = getFromLocalStorage('baking.orderhistory', []) || [];
setHistory(_history);
if (_history.length === 0) actions.forward();
});


Expand Down
12 changes: 6 additions & 6 deletions src/app/api/manage/db/prepare/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export async function POST() {

// Add pizzas
const pizzas = [
{ name: 'Pepperoni half', price: 3, dietary: 'halal', type: 'pizza', size: 0.5 },
{ name: 'Pepperoni whole', price: 6, dietary: 'halal', type: 'pizza', size: 1 },
{ name: 'Meat half', price: 4, dietary: 'halal', type: 'pizza', size: 0.5 },
{ name: 'Meat whole', price: 8, dietary: 'halal', type: 'pizza', size: 1 },
{ name: 'Capriccosa half', price: 4, dietary: 'halal', type: 'pizza', size: 0.5 },
{ name: 'Capriccosa whole', price: 8, dietary: 'halal', type: 'pizza', size: 1 },
{ name: 'Salami/Pepperoni+Ham half', price: 3, type: 'pizza', size: 0.5 },
{ name: 'Salami/Pepperoni+Ham whole', price: 6, type: 'pizza', size: 1 },
{ name: 'Salami/Pepperoni+Ham half', price: 4, type: 'pizza', size: 0.5 },
{ name: 'Salami/Pepperoni+Ham whole', price: 8, type: 'pizza', size: 1 },
{ name: 'Capriccosa half', price: 4, type: 'pizza', size: 0.5 },
{ name: 'Capriccosa whole', price: 8, type: 'pizza', size: 1 },
{ name: 'Margherita half', price: 3, dietary: 'vegetarian', type: 'pizza', size: 0.5 },
{ name: 'Margherita whole', price: 6, dietary: 'vegetarian', type: 'pizza', size: 1 },
{ name: 'Capriccosa half', price: 3, dietary: 'vegetarian', type: 'pizza', size: 0.5 },
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/layout/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Header = () => {
}, []);

const adminLinks = [
{to: "/admin/preparing", text: "Prepare Foods"},
// {to: "/admin/preparing", text: "Prepare Foods"}, //does not work yet
{to: "/admin/manage", text: "ManageDB"},
{to: "/admin/manage/order", text: "Manage Orders"},
{to: "/admin/manage/pizza", text: "Manage Foods"},
Expand Down
2 changes: 1 addition & 1 deletion src/app/login/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Page = () => {
<div>
<form onSubmit={handleSubmit}>
<label htmlFor="token">FSI/K Token</label>
<input type="password" id="token" name="token" autocomplete="current-password" required/>
<input type="password" id="token" name="token" autoComplete="current-password" required/>
<button type="submit">Login</button>
{errorMessage && <p>{errorMessage}</p>}
</form>
Expand Down
9 changes: 5 additions & 4 deletions src/app/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Food = ({food, className, onClick}) => {
<span className="text-base font-semibold text-gray-900">{food.price}{food.name}</span>
</div>
<div className="flex space-x-2">
<span className="px-3 py-1 text-xs font-semibold text-blue-600 bg-blue-100 rounded-full">{food.dietary}</span>
{food.dietary && <span className="px-3 py-1 text-xs font-semibold text-blue-600 bg-blue-100 rounded-full">{food.dietary}</span>}
<span className="px-3 py-1 text-xs font-semibold text-green-600 bg-green-100 rounded-full">{food.type}</span>
</div>
</li>
Expand All @@ -28,6 +28,7 @@ const Food = ({food, className, onClick}) => {

// Order component
const Page = () => {
// State to hold the order
const [error, setError] = useState('');
const [foods, setFoods] = useState([]);
const [order, setOrder] = useState({name: '', items: [], comment: '', timeslot: 'Select a timeslot'});
Expand Down Expand Up @@ -56,15 +57,15 @@ const Page = () => {
* @param updatedOrder
*/
const updateOrder = (updatedOrder) => {
setOrder({...order, ...updatedOrder,});
};
setOrder({ ...order, ...updatedOrder });
};

/**
* Set the name of the order
* @param e
*/
const setName = (e) => {
updateOrder({name: e.target.value});
updateOrder({ name: e.target.value });
};

/**
Expand Down

0 comments on commit f9a6c40

Please sign in to comment.