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"> <nav class="panel">
<p class="panel-heading">Row Status</p> <p class="panel-heading">Row Status</p>
<div class="panel-block"> <div class="panel-block">
${status_breakdown_grid} <div style="width: 100%;">
${status_breakdown_grid}
</div>
</div> </div>
</nav> </nav>
</%def> </%def>

View file

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