Lines 64-70
export default {
Link Here
|
64 |
setup() { |
64 |
setup() { |
65 |
const AVStore = inject("AVStore") |
65 |
const AVStore = inject("AVStore") |
66 |
const { get_lib_from_av, map_av_dt_filter } = AVStore |
66 |
const { get_lib_from_av, map_av_dt_filter } = AVStore |
67 |
const { setConfirmationDialog, setMessage } = inject("mainStore") |
67 |
const { setConfirmationDialog, setMessage, setWarning } = |
|
|
68 |
inject("mainStore") |
68 |
const table = ref() |
69 |
const table = ref() |
69 |
const filters = reactive({ status: "" }) |
70 |
const filters = reactive({ status: "" }) |
70 |
return { |
71 |
return { |
Lines 72-77
export default {
Link Here
|
72 |
map_av_dt_filter, |
73 |
map_av_dt_filter, |
73 |
setConfirmationDialog, |
74 |
setConfirmationDialog, |
74 |
setMessage, |
75 |
setMessage, |
|
|
76 |
setWarning, |
75 |
table, |
77 |
table, |
76 |
filters, |
78 |
filters, |
77 |
} |
79 |
} |
Lines 156-166
export default {
Link Here
|
156 |
) |
158 |
) |
157 |
}, |
159 |
}, |
158 |
doAddItems: function (train, dt, event) { |
160 |
doAddItems: function (train, dt, event) { |
159 |
this.$router.push( |
161 |
if (train.closed_on != null) { |
160 |
"/cgi-bin/koha/preservation/trains/" + |
162 |
this.setWarning(this.$__("Cannot add items to a closed train")) |
161 |
train.train_id + |
163 |
} else { |
162 |
"/items/add" |
164 |
this.$router.push( |
163 |
) |
165 |
"/cgi-bin/koha/preservation/trains/" + |
|
|
166 |
train.train_id + |
167 |
"/items/add" |
168 |
) |
169 |
} |
164 |
}, |
170 |
}, |
165 |
table_url() { |
171 |
table_url() { |
166 |
let url = "/api/v1/preservation/trains" |
172 |
let url = "/api/v1/preservation/trains" |