This commit is contained in:
paoloar77
2024-05-20 23:20:37 +02:00
parent 8afbfff154
commit 0b788c21b5
2 changed files with 27 additions and 6 deletions

View File

@@ -7,8 +7,14 @@
</head>
<body>
<h1>Links</h1>
<a href="{{ route('qtanegativa', ['id' => 1]) }}">Mostra i Libri con Quantità negativa</a>
<br>
<a href="{{ route('checkPreOrder', ['id' => 1]) }}">Verifica Prevendita Articolo 1</a>
<form method="GET" action="{{ route('handleArticleActionPao') }}">
<label for="article_id">Inserisci l'ID dell'articolo:</label>
<input type="text" id="article_id" name="id" />
<select name="action">
<option value="search">Cerca Articolo</option>
<option value="checkPreOrder">Verifica Preordine</option>
</select>
<button type="submit">Esegui Azione</button>
</form>
</body>
</html>
</html>

View File

@@ -6211,8 +6211,23 @@ Route::get('/qtanegativa', function () {
$ind++;
}
});
})->name('qtanegativa');
Route::get('/mylinkspao', function () {
return view('mylinkspao');
});
});
Route::get('/handle-article-action', function (Request $request) {
$id = $request->id;
$action = $request->action;
if ($action == 'search') {
// Logica di ricerca dell'articolo
return "Ricerca articolo con ID: " . $id;
} elseif ($action == 'checkPreOrder') {
// Logica per verificare se l'articolo è in preordine
return "Verifica preordine per l'articolo con ID: " . $id;
} else {
return "Azione non supportata";
}
})->name('handleArticleActionPao');