mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-04-02 10:20:51 +08:00
Implement toggle for zebra printers searching feature [SCI-7242] (#4470)
This commit is contained in:
parent
691b9abac7
commit
0e8ad6abf1
3 changed files with 8 additions and 2 deletions
app
javascript
views/repositories
|
@ -17,6 +17,7 @@ function initPrintModalComponent() {
|
||||||
return {
|
return {
|
||||||
showModal: false,
|
showModal: false,
|
||||||
row_ids: [],
|
row_ids: [],
|
||||||
|
zebraEnabled: container.data('zebra-enabled'),
|
||||||
urls: {
|
urls: {
|
||||||
print: container.data('print-url'),
|
print: container.data('print-url'),
|
||||||
zebraProgress: container.data('zebra-progress-url'),
|
zebraProgress: container.data('zebra-progress-url'),
|
||||||
|
|
|
@ -85,7 +85,8 @@
|
||||||
props: {
|
props: {
|
||||||
showModal: Boolean,
|
showModal: Boolean,
|
||||||
row_ids: Array,
|
row_ids: Array,
|
||||||
urls: Object
|
urls: Object,
|
||||||
|
zebraEnabled: Boolean
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -114,7 +115,9 @@
|
||||||
this.$emit('close');
|
this.$emit('close');
|
||||||
});
|
});
|
||||||
|
|
||||||
this.initZebraPrinter();
|
if (this.zebraEnabled) {
|
||||||
|
this.initZebraPrinter();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
templates_dropdown() {
|
templates_dropdown() {
|
||||||
|
|
|
@ -91,11 +91,13 @@
|
||||||
data-label-templates-url="<%= label_templates_path(format: :json) %>"
|
data-label-templates-url="<%= label_templates_path(format: :json) %>"
|
||||||
data-rows-url="<%= rows_to_print_repository_repository_rows_path(repository_id: @repository) %>"
|
data-rows-url="<%= rows_to_print_repository_repository_rows_path(repository_id: @repository) %>"
|
||||||
data-fluics-info-url="<%= Constants::SCINOTE_FLUICS_URL %>"
|
data-fluics-info-url="<%= Constants::SCINOTE_FLUICS_URL %>"
|
||||||
|
data-zebra-enabled="<%= Rails.configuration.x.zebra_print_enabled %>"
|
||||||
>
|
>
|
||||||
<print-modal-container
|
<print-modal-container
|
||||||
:show-modal = "showModal"
|
:show-modal = "showModal"
|
||||||
:row_ids = "row_ids"
|
:row_ids = "row_ids"
|
||||||
:urls = "urls"
|
:urls = "urls"
|
||||||
|
:zebra-enabled = "zebraEnabled"
|
||||||
@close="closeModal"
|
@close="closeModal"
|
||||||
></print-modal-container>
|
></print-modal-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue