Skip to content

Commit

Permalink
fixed some bug setting query type
Browse files Browse the repository at this point in the history
  • Loading branch information
A1Gard committed Dec 22, 2024
1 parent 60efc88 commit 5edcdb1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions resources/views/components/setting-field.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class="form-control @error('status') is-invalid @enderror">
@break
@case('PRODUCT_QUERY')
<div class="row">
@php($vals = explode(',',old($setting->key,$setting->value??null)))
@php($vals = explode(',',old($setting->key,$setting->value??'0,id,DESC')))
<div class="col-md">

<span>
Expand Down Expand Up @@ -143,7 +143,7 @@ class="form-control @error('status') is-invalid @enderror">
@break
@case('POST_QUERY')
<div class="row">
@php($vals = explode(',',old($setting->key,$setting->value??null)))
@php($vals = explode(',',old($setting->key,$setting->value??'0,id,DESC')))
<div class="col-md">

<span>
Expand All @@ -169,10 +169,7 @@ class="form-control @error('status') is-invalid @enderror">
<select name="{{$setting->key}}[item]" id="{{$setting->key}}i" class="form-control">
<option value="id"> {{__("ID")}} </option>
<option value="view" @if($vals[1] == 'view') selected @endif> {{__("View")}} </option>
<option value="sell" @if($vals[1] == 'sell') selected @endif> {{__("Sell")}} </option>
<option value="average_rating" @if($vals[1] == 'average_rating') selected @endif> {{__("Rate")}} </option>
<option value="price" @if($vals[1] == 'price') selected @endif> {{__("Price")}} </option>
<option value="stock_quantity" @if($vals[1] == 'stock_quantity') selected @endif> {{__("Stock quantity")}} </option>
<option value="like" @if($vals[1] == 'like') selected @endif> {{__("Like")}} </option>
<option value="updated_at" @if($vals[1] == 'updated_at') selected @endif> {{__("Update")}} </option>
</select>
</div>
Expand Down

0 comments on commit 5edcdb1

Please sign in to comment.