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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue (-24 / +22 lines)
Lines 51-57 Link Here
51
                                v-model="agreement.status"
51
                                v-model="agreement.status"
52
                                label="description"
52
                                label="description"
53
                                :reduce="av => av.value"
53
                                :reduce="av => av.value"
54
                                :options="av_agreement_statuses"
54
                                :options="
55
                                    authorisedValues['av_agreement_statuses']
56
                                "
55
                                @option:selected="onStatusChanged"
57
                                @option:selected="onStatusChanged"
56
                                :required="!agreement.status"
58
                                :required="!agreement.status"
57
                            >
59
                            >
Lines 75-81 Link Here
75
                                v-model="agreement.closure_reason"
77
                                v-model="agreement.closure_reason"
76
                                label="description"
78
                                label="description"
77
                                :reduce="av => av.value"
79
                                :reduce="av => av.value"
78
                                :options="av_agreement_closure_reasons"
80
                                :options="
81
                                    authorisedValues[
82
                                        'av_agreement_closure_reasons'
83
                                    ]
84
                                "
79
                                :disabled="
85
                                :disabled="
80
                                    agreement.status == 'closed' ? false : true
86
                                    agreement.status == 'closed' ? false : true
81
                                "
87
                                "
Lines 117-123 Link Here
117
                                v-model="agreement.renewal_priority"
123
                                v-model="agreement.renewal_priority"
118
                                label="description"
124
                                label="description"
119
                                :reduce="av => av.value"
125
                                :reduce="av => av.value"
120
                                :options="av_agreement_renewal_priorities"
126
                                :options="
127
                                    authorisedValues[
128
                                        'av_agreement_renewal_priorities'
129
                                    ]
130
                                "
121
                            />
131
                            />
122
                        </li>
132
                        </li>
123
                        <li>
133
                        <li>
Lines 136-156 Link Here
136
                <UserRoles
146
                <UserRoles
137
                    :user_type="$__('Agreement user %s')"
147
                    :user_type="$__('Agreement user %s')"
138
                    :user_roles="agreement.user_roles"
148
                    :user_roles="agreement.user_roles"
139
                    :av_user_roles="av_user_roles"
149
                    :av_user_roles="authorisedValues['av_user_roles']"
140
                />
150
                />
141
                <AgreementLicenses
151
                <AgreementLicenses
142
                    :agreement_licenses="agreement.agreement_licenses"
152
                    :agreement_licenses="agreement.agreement_licenses"
143
                    :av_agreement_license_statuses="
153
                    :av_agreement_license_statuses="
144
                        av_agreement_license_statuses
154
                        authorisedValues['av_agreement_license_statuses']
145
                    "
155
                    "
146
                    :av_agreement_license_location="
156
                    :av_agreement_license_location="
147
                        av_agreement_license_location
157
                        authorisedValues['av_agreement_license_location']
148
                    "
158
                    "
149
                />
159
                />
150
                <AgreementRelationships
160
                <AgreementRelationships
151
                    :agreement_id="agreement.agreement_id"
161
                    :agreement_id="agreement.agreement_id"
152
                    :relationships="agreement.agreement_relationships"
162
                    :relationships="agreement.agreement_relationships"
153
                    :av_agreement_relationships="av_agreement_relationships"
163
                    :av_agreement_relationships="
164
                        authorisedValues['av_agreement_relationships']
165
                    "
154
                />
166
                />
155
                <Documents :documents="agreement.documents" />
167
                <Documents :documents="agreement.documents" />
156
                <fieldset class="action">
168
                <fieldset class="action">
Lines 182-206 import { storeToRefs } from "pinia" Link Here
182
194
183
export default {
195
export default {
184
    setup() {
196
    setup() {
185
        const AVStore = inject("AVStore")
197
        const ERMStore = inject("ERMStore")
186
        const {
198
        const { authorisedValues } = storeToRefs(ERMStore)
187
            av_agreement_statuses,
188
            av_agreement_closure_reasons,
189
            av_agreement_renewal_priorities,
190
            av_user_roles,
191
            av_agreement_license_statuses,
192
            av_agreement_license_location,
193
            av_agreement_relationships,
194
        } = storeToRefs(AVStore)
195
199
196
        return {
200
        return {
197
            av_agreement_statuses,
201
            authorisedValues,
198
            av_agreement_closure_reasons,
199
            av_agreement_renewal_priorities,
200
            av_user_roles,
201
            av_agreement_license_statuses,
202
            av_agreement_license_location,
203
            av_agreement_relationships,
204
            max_allowed_packet,
202
            max_allowed_packet,
205
        }
203
        }
206
    },
204
    },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue (-8 / +20 lines)
Lines 76-82 export default { Link Here
76
        const { setConfirmationDialog, setMessage } = inject("mainStore")
76
        const { setConfirmationDialog, setMessage } = inject("mainStore")
77
77
78
        const { authorisedValues } = inject("ERMStore")
78
        const { authorisedValues } = inject("ERMStore")
79
        console.log(authorisedValues)
80
79
81
        const table = ref()
80
        const table = ref()
82
81
Lines 96-101 export default { Link Here
96
            escape_str,
95
            escape_str,
97
            agreement_table_settings,
96
            agreement_table_settings,
98
            filters,
97
            filters,
98
            authorisedValues,
99
        }
99
        }
100
    },
100
    },
101
    data: function () {
101
    data: function () {
Lines 125-140 export default { Link Here
125
                            e["_str"] = e["name"]
125
                            e["_str"] = e["name"]
126
                            return e
126
                            return e
127
                        }),
127
                        }),
128
                    3: () => this.map_av_dt_filter("av_agreement_statuses"),
128
                    3: () =>
129
                        this.map_av_dt_filter(
130
                            this.authorisedValues["av_agreement_statuses"]
131
                        ),
129
                    4: () =>
132
                    4: () =>
130
                        this.map_av_dt_filter("av_agreement_closure_reasons"),
133
                        this.map_av_dt_filter(
134
                            this.authorisedValues[
135
                                "av_agreement_closure_reasons"
136
                            ]
137
                        ),
131
                    5: [
138
                    5: [
132
                        { _id: 0, _str: this.$__("No") },
139
                        { _id: 0, _str: this.$__("No") },
133
                        { _id: 1, _str: this.$__("Yes") },
140
                        { _id: 1, _str: this.$__("Yes") },
134
                    ],
141
                    ],
135
                    6: () =>
142
                    6: () =>
136
                        this.map_av_dt_filter(
143
                        this.map_av_dt_filter(
137
                            "av_agreement_renewal_priorities"
144
                            this.authorisedValues[
145
                                "av_agreement_renewal_priorities"
146
                            ]
138
                        ),
147
                        ),
139
                },
148
                },
140
                actions: {
149
                actions: {
Lines 251-256 export default { Link Here
251
        getTableColumns: function () {
260
        getTableColumns: function () {
252
            let get_lib_from_av = this.get_lib_from_av
261
            let get_lib_from_av = this.get_lib_from_av
253
            let escape_str = this.escape_str
262
            let escape_str = this.escape_str
263
            let AVs = this.authorisedValues
254
264
255
            return [
265
            return [
256
                {
266
                {
Lines 296-302 export default { Link Here
296
                    orderable: true,
306
                    orderable: true,
297
                    render: function (data, type, row, meta) {
307
                    render: function (data, type, row, meta) {
298
                        return escape_str(
308
                        return escape_str(
299
                            get_lib_from_av("av_agreement_statuses", row.status)
309
                            get_lib_from_av(
310
                                AVs["av_agreement_statuses"],
311
                                row.status
312
                            )
300
                        )
313
                        )
301
                    },
314
                    },
302
                },
315
                },
Lines 308-314 export default { Link Here
308
                    render: function (data, type, row, meta) {
321
                    render: function (data, type, row, meta) {
309
                        return escape_str(
322
                        return escape_str(
310
                            get_lib_from_av(
323
                            get_lib_from_av(
311
                                "av_agreement_closure_reasons",
324
                                AVs["av_agreement_closure_reasons"],
312
                                row.closure_reason
325
                                row.closure_reason
313
                            )
326
                            )
314
                        )
327
                        )
Lines 333-339 export default { Link Here
333
                    render: function (data, type, row, meta) {
346
                    render: function (data, type, row, meta) {
334
                        return escape_str(
347
                        return escape_str(
335
                            get_lib_from_av(
348
                            get_lib_from_av(
336
                                "av_agreement_renewal_priorities",
349
                                AVs["av_agreement_renewal_priorities"],
337
                                row.renewal_priority
350
                                row.renewal_priority
338
                            )
351
                            )
339
                        )
352
                        )
340
- 

Return to bug 37930