Commit
This commit is contained in:
parent
33d78385ce
commit
653bfd912f
@ -53,8 +53,8 @@ async function updateTable()
|
|||||||
|
|
||||||
data.forEach(element => {
|
data.forEach(element => {
|
||||||
table_html += "<tr>";
|
table_html += "<tr>";
|
||||||
table_html += "<td>" + element.name + "</td>";
|
table_html += "<td>" + element.n + "</td>";
|
||||||
table_html += "<td>" + element.date.date + "</td>";
|
table_html += "<td>" + element.d + "</td>";
|
||||||
table_html += "</tr>";
|
table_html += "</tr>";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -31,7 +31,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST')
|
|||||||
$phone = filter_input(INPUT_POST, 'phone', FILTER_VALIDATE_INT);
|
$phone = filter_input(INPUT_POST, 'phone', FILTER_VALIDATE_INT);
|
||||||
$participants = filter_input(INPUT_POST, 'participants', FILTER_VALIDATE_INT);
|
$participants = filter_input(INPUT_POST, 'participants', FILTER_VALIDATE_INT);
|
||||||
|
|
||||||
$team = new Team;
|
if (!isset($team))
|
||||||
|
{
|
||||||
|
$team = new Team();
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
$team->setName($name);
|
$team->setName($name);
|
||||||
$team->setCompany($company);
|
$team->setCompany($company);
|
||||||
|
@ -11,7 +11,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
|
|||||||
$cardnumber = (string)$_POST['cardnumber'];
|
$cardnumber = (string)$_POST['cardnumber'];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$code = $batonReader->receive($cardnumber, 5);
|
$code = $batonReader->receive($cardnumber, 0);
|
||||||
switch ($code) {
|
switch ($code) {
|
||||||
case 0:
|
case 0:
|
||||||
$app->session->flash('Opprettet nytt lag', 'success');
|
$app->session->flash('Opprettet nytt lag', 'success');
|
||||||
|
@ -25,8 +25,8 @@ foreach ($times as $time)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$row = [
|
$row = [
|
||||||
"name" => $team->name,
|
"n" => $team->name,
|
||||||
"date" => $time->date
|
"d" => $time->date->getTimestamp()
|
||||||
];
|
];
|
||||||
|
|
||||||
array_push($data, $row);
|
array_push($data, $row);
|
||||||
|
Reference in New Issue
Block a user