| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <template>
- <div>
- <credential-form-modal modal-id="newCredentialModal" :descriptions="creddescList" :create="true" :pcid="pcid"></credential-form-modal>
- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#newCredentialModal">New Credential</button>
- <div v-for="credential in credentials" :key="credential.credid">
- <credential :credential="credential" :descriptions="creddescList"></credential>
- </div>
- </div>
- </template>
- <script>
- export default {
- props: {
- credentialList: {
- type: Array,
- required: true
- },
- descriptions: {
- type: Array,
- required: true
- },
- pcid: {
- type: Number
- },
- groupid: {
- type: Number
- }
- },
- data () {
- return {
- credentials: this.credentialList
- }
- },
- computed : {
- creddescList: function () {
- let list = {}
- this.descriptions.map(val => {
- list[val.creddescid] = val.credtitle
- })
- return list
- }
- },
- }
- </script>
|