@php $products = \App\Module\Db\Product::getInstance()->getProductsByActive(); $countProduct = (isset($products) && is_array($products)) ? count($products) : 0; $nameMin = config('constant.name.min'); $nameMax = config('constant.name.max'); $addUrl = route('promotion.v2.add'); $refreshUrl = route('promotion.v2.index'); $advanceUrl = route('promotion.v2.search'); $headers = [ (object)['name'=>trans('admin::promotion.title.header'),'url'=>route('promotion.v2.index')], (object)['name'=>trans('admin::action.adv_search')], ]; @endphp @extends('shared.admin') @section('breadcrumb') @include('admin.components.elements.breadcrumb',[ 'header' => $headers, 'action' => 'list', 'perms' => [ 'rAdd' => true, ], ]) @endsection @section('content') @include('components.forms.search-status') {{trans('admin::promotion.name.label')}}: {{trans('admin::promotion.rule.product.label')}} {{trans('admin::message.select')}} @if(($countProduct ?? 0) > 0) @foreach($products as $elem) product_id ?? 0) == $elem->id){{'selected'}}@endif>{{$elem->title}} @endforeach @endif {{trans('admin::promotion.rule.gift.voucher')}} {{trans('admin::message.select')}} @if(($countVoucher ?? 0) > 0) @foreach($vouchers as $elem) id == ($args->voucher_id ?? 0)){{'selected'}}@endif>{{$elem->name}} @endforeach @endif @include('components.forms.search-rangedate',[ 'rangeDateLabel' => trans('admin::message.date.range.promotion_at') ]) @if($isResult) @include('promotions.components.promotions') @endif @endsection @section('style') @endsection @section('script') @endsection