Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix check build workflow and set timezon UTC+02:00 #112

Merged
merged 11 commits into from
Aug 5, 2024
13 changes: 6 additions & 7 deletions .github/workflows/Build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ jobs:
run: docker compose -f docker-compose.prod.yml up -d --remove-orphans --build

- name: test login with admin return token
# testing the login make sure that the database, the php, nginx, postgrest and the migration works
run: |
export TOKEN=$(curl -X POST -H "Content-Type: application/json" -d '{"username": "admin", "password": "admin"}' http://localhost/php/login | jq ".token")
if [ "$TOKEN" == "null" ] || [ -z "$TOKEN" ]; then
echo "token is empty"
exit 1
fi
sleep 10
export TOKEN=$(curl -X POST -H "Content-Type: application/json" -d '{"username": "admin", "password": "admin"}' http://localhost/php/login | jq ".token")
if [ "$TOKEN" == "null" ] || [ -z "$TOKEN" ]; then
echo "token is empty"
exit 1
fi
9 changes: 6 additions & 3 deletions nextjs-interface/src/app/ui/dashboard/ChartElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export function ChartElement({ data }: { data: avgData[] }) {
const dateChanges = data.reduce((acc: any[], curr, index, src) => {
if (
index > 0 &&
curr?.date &&
src[index - 1]?.date &&
new Date(curr.date).getDate() !== new Date(src[index - 1].date).getDate()
) {
acc.push(curr.date);
Expand Down Expand Up @@ -73,9 +75,10 @@ export function ChartElement({ data }: { data: avgData[] }) {
payload[0].payload.date,
).toLocaleDateString() +
" " +
new Date(
payload[0].payload.date,
).toLocaleTimeString()}
new Date(payload[0].payload.date).toLocaleTimeString(
"fr-FR",
{ hour: "2-digit", minute: "2-digit" },
)}
</h1>
<p className="text-black dark:text-zinc-50">
Temperature :{" "}
Expand Down