View | Details | Raw Unified | Return to bug 35714
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsShow.vue (-6 / +21 lines)
Lines 183-192 Link Here
183
                        v-bind:key="counter"
183
                        v-bind:key="counter"
184
                    >
184
                    >
185
                        <input
185
                        <input
186
                            :disabled="!item.processing.letter_code"
186
                            v-model="selected_items"
187
                            v-model="selected_items"
187
                            type="checkbox"
188
                            type="checkbox"
188
                            name="user_train_item_id"
189
                            name="user_train_item_id"
189
                            :value="item.train_item_id"
190
                            :value="item.train_item_id"
191
                            :title="
192
                                !item.processing.letter_code
193
                                    ? $__(
194
                                          'Cannot print slip, this item does not have a processing with a letter template defined.'
195
                                      )
196
                                    : ''
197
                            "
190
                        />
198
                        />
191
                        <label
199
                        <label
192
                            >{{ item.user_train_item_id }}
200
                            >{{ item.user_train_item_id }}
Lines 527-541 export default { Link Here
527
        selectAll() {
535
        selectAll() {
528
            if (this.item_table.display) {
536
            if (this.item_table.display) {
529
                $("#" + this.table_id)
537
                $("#" + this.table_id)
530
                    .find("input[name='user_train_item_id'][type='checkbox']")
538
                    .find(
539
                        "input[name='user_train_item_id'][type='checkbox']:not(:disabled)"
540
                    )
531
                    .each((i, input) => {
541
                    .each((i, input) => {
532
                        this.selected_items.push($(input).val())
542
                        this.selected_items.push($(input).val())
533
                        $(input).prop("checked", true)
543
                        $(input).prop("checked", true)
534
                    })
544
                    })
535
            } else {
545
            } else {
536
                this.selected_items = this.train.items.map(
546
                this.selected_items = this.train.items
537
                    item => item.train_item_id
547
                    .filter(i => i.processing.letter_code)
538
                )
548
                    .map(item => item.train_item_id)
539
            }
549
            }
540
        },
550
        },
541
        printSelected() {
551
        printSelected() {
Lines 579-584 export default { Link Here
579
                        let train_item_id = train_item.train_item_id
589
                        let train_item_id = train_item.train_item_id
580
590
581
                        let checkbox = createVNode("input", {
591
                        let checkbox = createVNode("input", {
592
                            ...(!train_item.processing.letter_code && {
593
                                disabled: "disabled",
594
                                title: __(
595
                                    "Cannot print slip, this item does not have a processing with a letter template defined."
596
                                ),
597
                            }),
582
                            type: "checkbox",
598
                            type: "checkbox",
583
                            name: "user_train_item_id",
599
                            name: "user_train_item_id",
584
                            value: train_item_id,
600
                            value: train_item_id,
Lines 660-666 export default { Link Here
660
                            )
676
                            )
661
                        }
677
                        }
662
678
663
                        if (train_item.processing.letter_code !== null) {
679
                        if (train_item.processing.letter_code) {
664
                            let printButton = createVNode(
680
                            let printButton = createVNode(
665
                                "a",
681
                                "a",
666
                                {
682
                                {
667
- 

Return to bug 35714