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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsShow.vue (-4 / +12 lines)
Lines 344-354 export default { Link Here
344
            train[attribute] = new Date()
344
            train[attribute] = new Date()
345
            const client = APIClient.preservation
345
            const client = APIClient.preservation
346
            if (train_id) {
346
            if (train_id) {
347
                client.trains
347
                return client.trains
348
                    .update(train, train_id)
348
                    .update(train, train_id)
349
                    .then(() => this.getTrain(this.train.train_id))
349
                    .then(() => this.getTrain(this.train.train_id))
350
            } else {
350
            } else {
351
                client.trains
351
                return client.trains
352
                    .create(train)
352
                    .create(train)
353
                    .then(() => this.getTrain(this.train.train_id))
353
                    .then(() => this.getTrain(this.train.train_id))
354
            }
354
            }
Lines 360-366 export default { Link Here
360
            this.updateTrainDate("sent_on")
360
            this.updateTrainDate("sent_on")
361
        },
361
        },
362
        receiveTrain() {
362
        receiveTrain() {
363
            this.updateTrainDate("received_on")
363
            this.updateTrainDate("received_on").then(
364
                success => {
365
                    // Rebuild the table to show the "copy" button
366
                    $("#" + this.table_id)
367
                        .DataTable()
368
                        .destroy()
369
                    this.build_datatable()
370
                },
371
                error => {}
372
            )
364
        },
373
        },
365
        editItem(train_item_id) {
374
        editItem(train_item_id) {
366
            this.$router.push(
375
            this.$router.push(
367
- 

Return to bug 30708