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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue (-3 / +12 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 { setMessage, setWarning, setConfirmationDialog, loading, loaded } =
139
            inject("mainStore")
139
            inject("mainStore")
140
140
141
        return {
141
        return {
142
            table,
142
            table,
143
            config,
143
            config,
144
            setMessage,
144
            setMessage,
145
            setWarning,
145
            setConfirmationDialog,
146
            setConfirmationDialog,
146
            loading,
147
            loading,
147
            loaded,
148
            loaded,
Lines 213-224 export default { Link Here
213
            client.waiting_list_items.createAll(items).then(
214
            client.waiting_list_items.createAll(items).then(
214
                result => {
215
                result => {
215
                    if (result.length) {
216
                    if (result.length) {
217
                        if (result.length != items.length ){
218
                        this.setWarning(
219
                            this.$__("%s new items added. %s items not found.").format(
220
                                result.length, items.length - result.length
221
                            ),
222
                            true
223
                        )
224
                        } else {
216
                        this.setMessage(
225
                        this.setMessage(
217
                            this.$__("%s new items added.").format(
226
                            this.$__("%s new items added.").format(
218
                                result.length
227
                                result.length
219
                            ),
228
                            ),
220
                            true
229
                            true
221
                        )
230
                        )
231
                        }
222
                        this.last_items = result
232
                        this.last_items = result
223
                        if (this.$refs.table) {
233
                        if (this.$refs.table) {
224
                            this.$refs.table.redraw(
234
                            this.$refs.table.redraw(
Lines 228-234 export default { Link Here
228
                            this.getCountWaitingListItems()
238
                            this.getCountWaitingListItems()
229
                        }
239
                        }
230
                    } else {
240
                    } else {
231
                        this.setMessage(this.$__("No items added"))
241
                        this.setWarning(this.$__("No items added"))
232
                    }
242
                    }
233
                },
243
                },
234
                error => {}
244
                error => {}
235
- 

Return to bug 35477