Lines 2-8
Link Here
|
2 |
<div v-if="!initialized">{{ $__("Loading") }}</div> |
2 |
<div v-if="!initialized">{{ $__("Loading") }}</div> |
3 |
<div v-else id="agreements_show"> |
3 |
<div v-else id="agreements_show"> |
4 |
<Toolbar> |
4 |
<Toolbar> |
5 |
<ToolbarButton action="edit" @editResource="edit_agreement" /> |
5 |
<ToolbarButton action="edit" @editResource="goToResourceEdit" /> |
6 |
<ToolbarButton action="delete" @deleteResource="delete_agreement" /> |
6 |
<ToolbarButton action="delete" @deleteResource="delete_agreement" /> |
7 |
</Toolbar> |
7 |
</Toolbar> |
8 |
|
8 |
|
Lines 325-332
import { inject } from "vue"
Link Here
|
325 |
import { APIClient } from "../../fetch/api-client.js" |
325 |
import { APIClient } from "../../fetch/api-client.js" |
326 |
import Toolbar from "../Toolbar.vue" |
326 |
import Toolbar from "../Toolbar.vue" |
327 |
import ToolbarButton from "../ToolbarButton.vue" |
327 |
import ToolbarButton from "../ToolbarButton.vue" |
|
|
328 |
import AgreementResource from "./AgreementResource.vue" |
328 |
|
329 |
|
329 |
export default { |
330 |
export default { |
|
|
331 |
extends: AgreementResource, |
330 |
setup() { |
332 |
setup() { |
331 |
const format_date = $date |
333 |
const format_date = $date |
332 |
const patron_to_html = $patron_to_html |
334 |
const patron_to_html = $patron_to_html |
Lines 337-342
export default {
Link Here
|
337 |
const { get_lib_from_av } = AVStore |
339 |
const { get_lib_from_av } = AVStore |
338 |
|
340 |
|
339 |
return { |
341 |
return { |
|
|
342 |
...AgreementResource.setup(), |
340 |
format_date, |
343 |
format_date, |
341 |
patron_to_html, |
344 |
patron_to_html, |
342 |
get_lib_from_av, |
345 |
get_lib_from_av, |
Lines 383-394
export default {
Link Here
|
383 |
error => {} |
386 |
error => {} |
384 |
) |
387 |
) |
385 |
}, |
388 |
}, |
386 |
edit_agreement: function () { |
|
|
387 |
this.$router.push({ |
388 |
name: "AgreementsFormAddEdit", |
389 |
params: { agreement_id: this.agreement.agreement_id }, |
390 |
}) |
391 |
}, |
392 |
delete_agreement: function () { |
389 |
delete_agreement: function () { |
393 |
let agreement_id = this.agreement.agreement_id |
390 |
let agreement_id = this.agreement.agreement_id |
394 |
let agreement_name = this.agreement.name |
391 |
let agreement_name = this.agreement.name |
395 |
- |
|
|