Bug 30708: Show the copy button right after the train is received
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: BULAC - http://www.bulac.fr/ Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
2f1b35ea56
commit
4819f89b43
|
|
@ -343,11 +343,11 @@ export default {
|
|||
train[attribute] = new Date()
|
||||
const client = APIClient.preservation
|
||||
if (train_id) {
|
||||
client.trains
|
||||
return client.trains
|
||||
.update(train, train_id)
|
||||
.then(() => this.getTrain(this.train.train_id))
|
||||
} else {
|
||||
client.trains
|
||||
return client.trains
|
||||
.create(train)
|
||||
.then(() => this.getTrain(this.train.train_id))
|
||||
}
|
||||
|
|
@ -359,7 +359,16 @@ export default {
|
|||
this.updateTrainDate("sent_on")
|
||||
},
|
||||
receiveTrain() {
|
||||
this.updateTrainDate("received_on")
|
||||
this.updateTrainDate("received_on").then(
|
||||
success => {
|
||||
// Rebuild the table to show the "copy" button
|
||||
$("#" + this.table_id)
|
||||
.DataTable()
|
||||
.destroy()
|
||||
this.build_datatable()
|
||||
},
|
||||
error => {}
|
||||
)
|
||||
},
|
||||
editItem(train_item_id) {
|
||||
this.$router.push(
|
||||
|
|
|
|||
Loading…
Reference in New Issue