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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue (-10 / +27 lines)
Lines 135-147 export default { Link Here
135
        const PreservationStore = inject("PreservationStore")
135
        const PreservationStore = inject("PreservationStore")
136
        const { config } = PreservationStore
136
        const { config } = PreservationStore
137
137
138
        const { setMessage, setConfirmationDialog, loading, loaded } =
138
        const {
139
            inject("mainStore")
139
            setMessage,
140
            setWarning,
141
            setConfirmationDialog,
142
            loading,
143
            loaded,
144
        } = inject("mainStore")
140
145
141
        return {
146
        return {
142
            table,
147
            table,
143
            config,
148
            config,
144
            setMessage,
149
            setMessage,
150
            setWarning,
145
            setConfirmationDialog,
151
            setConfirmationDialog,
146
            loading,
152
            loading,
147
            loaded,
153
            loaded,
Lines 213-224 export default { Link Here
213
            client.waiting_list_items.createAll(items).then(
219
            client.waiting_list_items.createAll(items).then(
214
                result => {
220
                result => {
215
                    if (result.length) {
221
                    if (result.length) {
216
                        this.setMessage(
222
                        if (result.length != items.length) {
217
                            this.$__("%s new items added.").format(
223
                            this.setWarning(
218
                                result.length
224
                                this.$__(
219
                            ),
225
                                    "%s new items added. %s items not found."
220
                            true
226
                                ).format(
221
                        )
227
                                    result.length,
228
                                    items.length - result.length
229
                                ),
230
                                true
231
                            )
232
                        } else {
233
                            this.setMessage(
234
                                this.$__("%s new items added.").format(
235
                                    result.length
236
                                ),
237
                                true
238
                            )
239
                        }
222
                        this.last_items = result
240
                        this.last_items = result
223
                        if (this.$refs.table) {
241
                        if (this.$refs.table) {
224
                            this.$refs.table.redraw(
242
                            this.$refs.table.redraw(
Lines 228-234 export default { Link Here
228
                            this.getCountWaitingListItems()
246
                            this.getCountWaitingListItems()
229
                        }
247
                        }
230
                    } else {
248
                    } else {
231
                        this.setMessage(this.$__("No items added"))
249
                        this.setWarning(this.$__("No items added"))
232
                    }
250
                    }
233
                },
251
                },
234
                error => {}
252
                error => {}
235
- 

Return to bug 35477