Fix "tools" helper for receiving batch view, per oruga

This commit is contained in:
Lance Edgar 2024-05-07 11:53:44 -05:00
parent f0d694cfe5
commit 703d583f6f
2 changed files with 90 additions and 89 deletions

View file

@ -71,7 +71,9 @@
<nav class="panel">
<p class="panel-heading">Row Status</p>
<div class="panel-block">
${status_breakdown_grid}
<div style="width: 100%;">
${status_breakdown_grid}
</div>
</div>
</nav>
</%def>

View file

@ -38,103 +38,102 @@
<%def name="render_tools_helper()">
% if allow_confirm_all_costs or (master.has_perm('auto_receive') and master.can_auto_receive(batch)):
<nav class="panel">
<p class="panel-heading">Tools</p>
<div class="panel-block">
<div style="display: flex; flex-direction: column; gap: 0.5rem; width: 100%;">
<div class="object-helper">
<h3>Tools</h3>
<div class="object-helper-content"
style="display: flex; flex-direction: column; gap: 1rem;">
% if allow_confirm_all_costs:
<b-button type="is-primary"
icon-pack="fas"
icon-left="check"
@click="confirmAllCostsShowDialog = true">
Confirm All Costs
</b-button>
<b-modal has-modal-card
:active.sync="confirmAllCostsShowDialog">
<div class="modal-card">
% if allow_confirm_all_costs:
<b-button type="is-primary"
icon-pack="fas"
icon-left="check"
@click="confirmAllCostsShowDialog = true">
Confirm All Costs
</b-button>
<b-modal has-modal-card
:active.sync="confirmAllCostsShowDialog">
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Confirm All Costs</p>
</header>
<header class="modal-card-head">
<p class="modal-card-title">Confirm All Costs</p>
</header>
<section class="modal-card-body">
<p class="block">
You can automatically mark all catalog and invoice
cost amounts as "confirmed" if you wish.
</p>
<p class="block">
Would you like to do this?
</p>
</section>
<section class="modal-card-body">
<p class="block">
You can automatically mark all catalog and invoice
cost amounts as "confirmed" if you wish.
</p>
<p class="block">
Would you like to do this?
</p>
</section>
<footer class="modal-card-foot">
<b-button @click="confirmAllCostsShowDialog = false">
Cancel
</b-button>
${h.form(url(f'{route_prefix}.confirm_all_costs', uuid=batch.uuid), **{'@submit': 'confirmAllCostsSubmitting = true'})}
${h.csrf_token(request)}
<b-button type="is-primary"
native-type="submit"
:disabled="confirmAllCostsSubmitting"
icon-pack="fas"
icon-left="check">
{{ confirmAllCostsSubmitting ? "Working, please wait..." : "Confirm All" }}
</b-button>
${h.end_form()}
</footer>
</div>
</b-modal>
% endif
<footer class="modal-card-foot">
<b-button @click="confirmAllCostsShowDialog = false">
Cancel
</b-button>
${h.form(url(f'{route_prefix}.confirm_all_costs', uuid=batch.uuid), **{'@submit': 'confirmAllCostsSubmitting = true'})}
${h.csrf_token(request)}
<b-button type="is-primary"
native-type="submit"
:disabled="confirmAllCostsSubmitting"
icon-pack="fas"
icon-left="check">
{{ confirmAllCostsSubmitting ? "Working, please wait..." : "Confirm All" }}
</b-button>
${h.end_form()}
</footer>
</div>
</b-modal>
% endif
% if master.has_perm('auto_receive') and master.can_auto_receive(batch):
<b-button type="is-primary"
@click="autoReceiveShowDialog = true"
icon-pack="fas"
icon-left="check">
Auto-Receive All Items
</b-button>
<b-modal has-modal-card
:active.sync="autoReceiveShowDialog">
<div class="modal-card">
% if master.has_perm('auto_receive') and master.can_auto_receive(batch):
<b-button type="is-primary"
@click="autoReceiveShowDialog = true"
icon-pack="fas"
icon-left="check">
Auto-Receive All Items
</b-button>
<b-modal has-modal-card
:active.sync="autoReceiveShowDialog">
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Auto-Receive All Items</p>
</header>
<header class="modal-card-head">
<p class="modal-card-title">Auto-Receive All Items</p>
</header>
<section class="modal-card-body">
<p class="block">
You can automatically set the "received" quantity to
match the "shipped" quantity for all items, based on
the invoice.
</p>
<p class="block">
Would you like to do so?
</p>
</section>
<footer class="modal-card-foot">
<b-button @click="autoReceiveShowDialog = false">
Cancel
</b-button>
${h.form(url('{}.auto_receive'.format(route_prefix), uuid=batch.uuid), **{'@submit': 'autoReceiveSubmitting = true'})}
${h.csrf_token(request)}
<b-button type="is-primary"
native-type="submit"
:disabled="autoReceiveSubmitting"
icon-pack="fas"
icon-left="check">
{{ autoReceiveSubmitting ? "Working, please wait..." : "Auto-Receive All Items" }}
</b-button>
${h.end_form()}
</footer>
</div>
</b-modal>
% endif
<section class="modal-card-body">
<p class="block">
You can automatically set the "received" quantity to
match the "shipped" quantity for all items, based on
the invoice.
</p>
<p class="block">
Would you like to do so?
</p>
</section>
<footer class="modal-card-foot">
<b-button @click="autoReceiveShowDialog = false">
Cancel
</b-button>
${h.form(url('{}.auto_receive'.format(route_prefix), uuid=batch.uuid), **{'@submit': 'autoReceiveSubmitting = true'})}
${h.csrf_token(request)}
<b-button type="is-primary"
native-type="submit"
:disabled="autoReceiveSubmitting"
icon-pack="fas"
icon-left="check">
{{ autoReceiveSubmitting ? "Working, please wait..." : "Auto-Receive All Items" }}
</b-button>
${h.end_form()}
</footer>
</div>
</b-modal>
% endif
</div>
</div>
</div>
</nav>
% endif
</%def>