@php $inner_class = 'w-100 bg-gray-light shadow-none border overflow-auto'; $listboxes = $listboxes ?? []; @endphp @section('script') @endsection
@csrf @component('admin.components.card', ['header' => 'Engine', 'collapse' => true,]) @php $comp = [ 'label' => 'Engine Type', 'descr' => '', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-12', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @component('components.smart_receipt.service_type', [ 'id' => 'service_type', 'disable' => !app()->isLocal() && !auth()->user()->checkPermissionTo( \App\Skale\Entities\PermissionEntity::MANAGE_SMART_RECEIPT_ENGINE ) ]) @endcomponent @endcomponent @endcomponent @component('admin.components.card', [ 'header' => 'Hybrid Trigger & Cap', 'class' => 'd-none', 'card_attrs' => 'data-engine="hybrid"', 'collapse' => true, ])
@php $id = 'hybrid.usage_cap'; $comp = [ 'label' => 'Nums. of Usage Cap', 'descr' => 'Curr Usage: ...', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent
Label Value Logical Operator Label Value
@endcomponent @component('admin.components.card', ['header' => 'Criteria Setup', 'collapse' => true,])
@component('admin.components.card', [ 'header' => 'Receipt', 'class' => $inner_class, 'collapse' => true, 'body_row_wrapper' => true, ]) @php $id = 'receipt_similar_percent'; $comp = [ 'label' => 'Similarity of Duplication (%)', 'descr' => implode('
', ['How similar the receipt should classify as duplicate.', 'Leave it as empty to disabled the duplication validation.', 'Any number between 1 and 100.']), ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @php $id = 'confidence_decimal'; $comp = [ 'label' => 'Rounding decimal of confidence score', 'descr' => 'Any digit between 0 and 12', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Store', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'store_name.name', ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Outlet', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'outlet.merchant.name', ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Transaction Date', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @php $id = 'date_separator_as_day_month'; $comp = [ 'label' => 'Having format with DD/MM/YYYY?', 'descr' => 'Tick this if there is at least one receipt having the format', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => '', 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ])
@endcomponent @php $id = 'accepted_days'; $comp = [ 'label' => 'Minimum accepted receipt days', 'descr' => 'Leave it as empty to accept receipts within the campaign period.' ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'trans_date', 'mapping_only' => true, ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Transaction Time', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'trans_time', 'mapping_only' => true, ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Bill Reference', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'bill_number', 'mapping_only' => true, 'hideable' => true, ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Order Reference', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, ]) @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'order_number', 'mapping_only' => true, 'body_row_wrapper' => true, ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Bill Amount', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @php $id = 'min_bill_amount'; $comp = [ 'label' => 'Minimum accepted bill amount', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'payment_total', 'mapping_only' => true, ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Payment Mode', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @php $id = 'payment_modes.extracts'; $comp = [ 'label' => 'Custom Payment Name(s) Extraction', 'placeholder' => '', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-6 col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ])
@endcomponent @php $id = 'payment_modes.accepts'; $comp = [ 'label' => 'Accepted Payment Name(s)', 'placeholder' => '', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-6 col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ])
@endcomponent @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'payment_mode', ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Item Lines (Accumulation)', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @php $id = 'item_lines.min_item'; $comp = [ 'label' => 'Min of accepted line item(s)', 'descr' => 'Only product(s) found from the record are counted', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @php $id = 'item_lines.min_eligible_amount'; $comp = [ 'label' => 'Min of accepted line amount', 'descr' => 'Only product(s) found from the record are counted', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @php $id = 'item_lines.accepted_items'; $comp = [ 'label' => 'Accepted Product(s)', 'placeholder' => '', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-6 col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ])
@endcomponent @php $id = 'item_lines.is_all_must_present'; $comp = [ 'label' => 'Must buy all accepted product(s)?', 'descr' => 'Tick this if all the accepted product(s) must appear in the receipt', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => '', 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ])
@endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Product Name (Row Level)', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'product.name', ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Product Qty (Row Level)', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @php $id = 'item_lines.row.min_qty'; $comp = [ 'label' => 'Min of accepted qty', 'descr' => 'Only product(s) found from the record are validated', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'product.qty', 'mapping_only' => true, ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Product Unit Price (Row Level)', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @php $id = 'item_lines.row.min_unit_price'; $comp = [ 'label' => 'Min of accepted unit price', 'descr' => 'Only product(s) found from the record are validated', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'product.unit_price', 'mapping_only' => true, ]) @endcomponent @endcomponent
@component('admin.components.card', [ 'header' => 'Product Amount (Row Level)', 'class' => $inner_class, 'collapse' => true, 'collapse_expand' => false, 'body_row_wrapper' => true, ]) @php $id = 'item_lines.row.min_line_amount'; $comp = [ 'label' => 'Min of accepted amount', 'descr' => 'Only product(s) found from the record are validated', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @component('admin.setting.components.srr_metric_config_tbl', [ 'listboxes' => $listboxes, 'config_type' => 'product.line_amount', 'mapping_only' => true, ]) @endcomponent @endcomponent
@endcomponent @component('admin.components.card', ['header' => 'Tester Setup', 'collapse' => true,]) @php $id = 'tester.usage_cap'; $comp = [ 'label' => 'Nums. of Usage Cap', 'descr' => 'Curr Usage: ...', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6', 'label' => $comp['label'], 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ]) @endcomponent @php $id = 'tester.auth'; $comp = [ 'label' => 'Private Accessible', 'descr' => '', ]; @endphp @component('admin.components.form_field', [ 'class' => 'col-sm-6 d-flex align-items-center', 'label' => '', 'required' => data_get($comp, 'req'), 'description' => data_get($comp, 'descr'), ])
@endcomponent @endcomponent
@if (app()->isLocal() && config('app.debug')) @component('admin.components.card', [ 'header' => 'Debug', 'class' => $inner_class, 'collapse' => true, ])
{!! dump($data ?? [], $listboxes, $urls ?? [], json_encode(data_get($data, 'metrics', []))) !!}
@endcomponent @endif @section('style') @parent @endsection