fixes on merchandise

This commit is contained in:
Ludovic CANDELLIER
2022-05-02 08:34:40 +02:00
parent fedf463f15
commit 8c898bf63b
13 changed files with 230 additions and 18 deletions

View File

@@ -76,7 +76,7 @@ class ArticlesDataTable extends DataTable
->editColumn('tags2', function (Article $article) {
$html = '';
foreach ($article->tags as $tag) {
$html .= '<span class="btn btn-xs btn-success pb-2 mb-1" style="font-size: 0.8em;">' . Tags::getFullnameByTag($tag) . '</span> ';
$html .= Tags::getTagHtml($tag);
}
return $html;
})

View File

@@ -6,6 +6,7 @@ use Yajra\DataTables\Html\Column;
use App\Datatables\ParentDataTable as DataTable;
use App\Models\Shop\Merchandise;
use App\Repositories\Shop\Merchandises;
use App\Repositories\Shop\Tags;
class MerchandisesDataTable extends DataTable
{
@@ -27,7 +28,7 @@ class MerchandisesDataTable extends DataTable
->editColumn('tags2', function (Merchandise $merchandise) {
$html = '';
foreach ($merchandise->tags as $tag) {
$html .= '<span class="btn btn-xs btn-secondary pb-2">' . $tag->slug . '</span> ';
$html .= Tags::getTagHtml($tag);
}
return $html;
})

View File

@@ -6,6 +6,7 @@ use Yajra\DataTables\Html\Column;
use App\Datatables\ParentDataTable as DataTable;
use App\Models\Shop\Producer;
use App\Repositories\Shop\Producers;
use App\Repositories\Shop\Tags;
class ProducersDataTable extends DataTable
{
@@ -27,7 +28,7 @@ class ProducersDataTable extends DataTable
->editColumn('tags2', function (Producer $producer) {
$html = '';
foreach ($producer->tags as $tag) {
$html .= '<span class="btn btn-xs btn-secondary pb-2">' . $tag->slug . '</span> ';
$html .= Tags::getTagHtml($tag);
}
return $html;
})