Lines 83-89
Link Here
|
83 |
</li> |
83 |
</li> |
84 |
</ol> |
84 |
</ol> |
85 |
</fieldset> |
85 |
</fieldset> |
86 |
<a v-if="licenses.length" class="btn btn-default" @click="addLicense" |
86 |
<a v-if="license_count > 0" class="btn btn-default" @click="addLicense" |
87 |
><font-awesome-icon icon="plus" /> {{ $__("Add new license") }}</a |
87 |
><font-awesome-icon icon="plus" /> {{ $__("Add new license") }}</a |
88 |
> |
88 |
> |
89 |
<span v-else>{{ $__("There are no licenses created yet") }}</span> |
89 |
<span v-else>{{ $__("There are no licenses created yet") }}</span> |
Lines 98-104
export default {
Link Here
|
98 |
name: "AgreementLicenses", |
98 |
name: "AgreementLicenses", |
99 |
data() { |
99 |
data() { |
100 |
return { |
100 |
return { |
101 |
licenses: [], |
101 |
license_count: null, |
102 |
} |
102 |
} |
103 |
}, |
103 |
}, |
104 |
props: { |
104 |
props: { |
Lines 108-116
export default {
Link Here
|
108 |
}, |
108 |
}, |
109 |
beforeCreate() { |
109 |
beforeCreate() { |
110 |
const client = APIClient.erm |
110 |
const client = APIClient.erm |
111 |
client.licenses.getAll().then( |
111 |
client.licenses.count().then( |
112 |
licenses => { |
112 |
count => { |
113 |
this.licenses = licenses |
113 |
this.license_count = count |
114 |
this.initialized = true |
114 |
this.initialized = true |
115 |
}, |
115 |
}, |
116 |
error => {} |
116 |
error => {} |
117 |
- |
|
|