You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.4 KiB
66 lines
2.4 KiB
<form hx-post="/item/{{item_id}}/adjustment/negative"
|
|
hx-target="this" hx-swap="outerHTML"
|
|
x-ref="formNegativeAdjustment"
|
|
x-data="{ reason: 'Sale' }">
|
|
<input id="reason" name="reason" type="hidden" x-model="reason"/>
|
|
<div class="row">
|
|
<div class="col">
|
|
<!--<label for="amount" class="form-label">Amount</label>-->
|
|
<input type="number"
|
|
id="amount"
|
|
name="amount"
|
|
step="0.01"
|
|
class="form-control"
|
|
placeholder="Amount"
|
|
aria-label="amount"
|
|
required
|
|
{% if !amount_error.is_empty() -%}
|
|
aria-invalid="true"
|
|
aria-describedby="invalid-amount"
|
|
{% endif -%}
|
|
/>
|
|
{% if !amount_error.is_empty() -%}
|
|
<small id="invalid-amount" class="invalid-feedback">{{ amount_error }}</small>
|
|
{% endif -%}
|
|
</div>
|
|
<div class="col">
|
|
<button class="btn btn-primary" x-text="reason">Sale</button>
|
|
|
|
</div>
|
|
<div class="col">
|
|
<div class="dropdown">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown"
|
|
aria-expanded="false">
|
|
<span class="visually-hidden">Other</span>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<a class="dropdown-item"
|
|
@click="reason = 'Sale'">
|
|
Sale
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item"
|
|
@click="reason = 'Destruction'">
|
|
Destruction
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item"
|
|
@click="reason = 'Expiration'">
|
|
Expiration
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item"
|
|
@click="reason = 'Theft'">
|
|
Theft
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|