From f1fd2e51fe0724132b7e64ffcb596c365f5562d4 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Tue, 21 May 2024 00:42:31 +0200 Subject: [PATCH] aa --- resources/views/mylinkspao.blade.php | 3 ++- routes/web.php | 24 ++++++------------------ 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/resources/views/mylinkspao.blade.php b/resources/views/mylinkspao.blade.php index a11ba7de..c708a5d6 100644 --- a/resources/views/mylinkspao.blade.php +++ b/resources/views/mylinkspao.blade.php @@ -12,7 +12,8 @@
- +
+
diff --git a/routes/web.php b/routes/web.php index 38989bcd..4ecff55d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6120,12 +6120,8 @@ Route::get('/paolibri', function () { //->where(function($query){ //->where('DescrizioneStatoProdotto','Usato') ->where(function ($query) { - $query->where('DescrizioneStatoProdotto', 'In commercio') - ->orWhere('DescrizioneStatoProdotto', 'In prevendita') - ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); + $query->where('DescrizioneStatoProdotto', 'In prevendita'); }) - //->orWhere('DescrizioneStatoProdotto','Remainder'); - //}) ->where(DB::raw('CONVERT(INT, QtaDisponibile)'), '>', 0) ->where('DescrizioneFormato', 'brossura') ->where('DescrizioneTipologia', 'Libri') @@ -6146,7 +6142,7 @@ Route::get('/paolibri', function () { } }); -Route::get('/qtanegativa', function () { +Route::get('/inprevendita', function () { set_time_limit(0); $articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) { @@ -6167,21 +6163,11 @@ Route::get('/qtanegativa', function () { $join->on('T_WEB_Articoli.IdArticolo', '=', 'q.Codice'); }) - // ->where('DescrizioneStatoProdotto', 'usato') - //->where(function($query){ - //->where('DescrizioneStatoProdotto','Usato') - ->where(function ($query) { - $query->where('DescrizioneStatoProdotto', 'In commercio') - ->orWhere('DescrizioneStatoProdotto', 'In prevendita') - ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); - }) - //->orWhere('DescrizioneStatoProdotto','Remainder'); - //}) + ->where('DescrizioneStatoProdotto', 'In prevendita') ->where(DB::raw('CONVERT(INT, QtaDisponibile)'), '<', 0) ->where('DescrizioneFormato', 'brossura') ->where('DescrizioneTipologia', 'Libri') ->orderBy('DataPubblicazione', 'desc') - ->limit(20) ->get(); $sep = ' | '; @@ -6211,7 +6197,7 @@ Route::get('/qtanegativa', function () { $ind++; } -})->name('qtanegativa'); +})->name('inprevendita'); Route::get('/mylinkspao', function () { return view('mylinkspao'); @@ -6222,6 +6208,8 @@ Route::get('/handle-article-action-pao/{id}/{action}', function ($id, $action) { if ($action == 'search') { // Logica di ricerca dell'articolo return loadArticleByIdArticle($id); + } elseif ($action == 'inprevendita') { + return route('inprevendita'); } elseif ($action == 'checkPrevendita') { // Logica per verificare se l'articolo รจ in preordine $inprevendita = isArticleInPrevendita($id);