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 343-353 export default { Link Here
343
            train[attribute] = new Date()
343
            train[attribute] = new Date()
344
            const client = APIClient.preservation
344
            const client = APIClient.preservation
345
            if (train_id) {
345
            if (train_id) {
346
                client.trains
346
                return client.trains
347
                    .update(train, train_id)
347
                    .update(train, train_id)
348
                    .then(() => this.getTrain(this.train.train_id))
348
                    .then(() => this.getTrain(this.train.train_id))
349
            } else {
349
            } else {
350
                client.trains
350
                return client.trains
351
                    .create(train)
351
                    .create(train)
352
                    .then(() => this.getTrain(this.train.train_id))
352
                    .then(() => this.getTrain(this.train.train_id))
353
            }
353
            }
Lines 359-365 export default { Link Here
359
            this.updateTrainDate("sent_on")
359
            this.updateTrainDate("sent_on")
360
        },
360
        },
361
        receiveTrain() {
361
        receiveTrain() {
362
            this.updateTrainDate("received_on")
362
            this.updateTrainDate("received_on").then(
363
                success => {
364
                    // Rebuild the table to show the "copy" button
365
                    $("#" + this.table_id)
366
                        .DataTable()
367
                        .destroy()
368
                    this.build_datatable()
369
                },
370
                error => {}
371
            )
363
        },
372
        },
364
        editItem(train_item_id) {
373
        editItem(train_item_id) {
365
            this.$router.push(
374
            this.$router.push(
366
- 

Return to bug 30708