Skip to content

Commit

Permalink
Merge branch 'extension/dynamic-limits' of https://github.com/Ne-wt/l…
Browse files Browse the repository at this point in the history
…orekeeper into extension/shop-features
  • Loading branch information
ScuffedNewt committed Sep 4, 2024
2 parents 9e8e4a5 + 31484af commit 8cf87d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 5 additions & 2 deletions resources/views/prompts/_prompt_entry.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="world-entry-text">
<p>{{ $prompt->summary }}</p>
<h3 class="mb-3"><a data-toggle="collapse" href="#prompt-{{ $prompt->id }}" @if (isset($isPage)) aria-expanded="true" @endif>Details <i class="fas fa-angle-down"></i></a></h3>
<div class="collapse @if (isset($isPage)) show @endif mb-5" id="prompt-{{ $prompt->id }}">
<div class="collapse @if (isset($isPage)) show @endif" id="prompt-{{ $prompt->id }}">
@if ($prompt->parsed_description)
{!! $prompt->parsed_description !!}
@else
Expand Down Expand Up @@ -56,7 +56,10 @@
</tbody>
</table>
@endif
@include('widgets._limits', ['object' => $prompt])
@if (count(getLimits($prompt)))
<hr />
@include('widgets._limits', ['object' => $prompt])
@endif
</div>
<div class="text-right">
@if ($prompt->end_at && $prompt->end_at->isPast())
Expand Down
10 changes: 4 additions & 6 deletions resources/views/widgets/_add_limits.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@
{!! Form::label('Quantity') !!}
{!! Form::number('quantity[]', $limit->quantity, ['class' => 'form-control', 'placeholder' => 'Enter Quantity', 'min' => 0, 'step' => 1]) !!}
</div>
@if ($limit->limit_type == 'currency' || $limit->limit_type == 'item')
<div class="form-group debit">
{!! Form::label('Debit') !!}
{!! Form::select('debit[]', ['yes' => 'Debit', 'no' => 'Don\'t Debit'], $limit->debit ? 'yes' : 'no', ['class' => 'form-control']) !!}
</div>
@endif
<div class="form-group debit {{ $limit->limit_type == 'currency' || $limit->limit_type == 'item' ? '' : 'hide' }}">
{!! Form::label('Debit') !!}
{!! Form::select('debit[]', ['yes' => 'Debit', 'no' => 'Don\'t Debit'], $limit->debit ? 'yes' : 'no', ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-1 d-flex align-items-center">
<div class="btn btn-danger remove-limit mx-auto">X</div>
Expand Down

0 comments on commit 8cf87d1

Please sign in to comment.