Fix product view page when user cannot view version history

This commit is contained in:
Lance Edgar 2021-11-03 18:30:16 -05:00
parent 8a378317c0
commit b0fa559760

View file

@ -544,9 +544,13 @@
<%def name="modify_this_page_vars()">
${parent.modify_this_page_vars()}
% if request.rattail_config.versioning_enabled() and master.has_perm('versions'):
<script type="text/javascript">
ThisPageData.vendorSourcesData = ${json.dumps(vendor_sources['data'])|n}
ThisPageData.lookupCodesData = ${json.dumps(lookup_codes['data'])|n}
% if request.rattail_config.versioning_enabled() and master.has_perm('versions'):
ThisPageData.showingPriceHistory_regular = false
ThisPageData.regularPriceHistoryDataRaw = ${json.dumps(regular_price_history_grid.get_buefy_data()['data'])|n}
ThisPageData.regularPriceHistoryLoading = false
@ -635,9 +639,6 @@
})
}
ThisPageData.vendorSourcesData = ${json.dumps(vendor_sources['data'])|n}
ThisPageData.lookupCodesData = ${json.dumps(lookup_codes['data'])|n}
ThisPageData.showingCostHistory = false
ThisPageData.costHistoryDataRaw = ${json.dumps(cost_history_grid.get_buefy_data()['data'])|n}
ThisPageData.costHistoryLoading = false
@ -667,8 +668,8 @@
})
}
</script>
% endif
</script>
</%def>