- add references, collections and identifiers to dataset model
All checks were successful
CI Pipeline / japa-tests (push) Successful in 52s

- npm updates
This commit is contained in:
Kaimbacher 2023-08-23 17:07:26 +02:00
parent f6d735d0fd
commit 5f8fe1c16d
9 changed files with 459 additions and 346 deletions

View file

@ -907,26 +907,33 @@ Removes a selected keyword
<CardBox class="mb-6 shadow" has-table title="Dataset References" :header-icon="mdiPlusCircle"
v-on:header-icon-click="addReference">
<table class="table table-hover" v-if="form.references.length">
<table class="table-fixed border-green-900" v-if="form.references.length">
<thead>
<tr>
<th>Value of the identifier</th>
<th>Type</th>
<th>Relation</th>
<th>Label</th>
<th></th>
<th class="w-4/12">Value</th>
<th class="w-2/12">Type</th>
<th class="w-3/12">Relation</th>
<th class="w-2/12">Label</th>
<th class="w-1/12"></th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in form.references">
<td data-label="Reference Value">
<input name="Reference Value" class="form-control"
placeholder="[VALUE]" v-model="item.value" />
<!-- <input name="Reference Value" class="form-control"
placeholder="[VALUE]" v-model="item.value" /> -->
<FormControl required v-model="item.value" :type="'text'" placeholder="[VALUE]"
:errors="form.errors.embargo_date">
<div class="text-red-400 text-sm"
v-if="form.errors[`references.${index}.value`] && Array.isArray(form.errors[`references.${index}.value`])">
{{ form.errors[`references.${index}.value`].join(', ') }}
</div>
</FormControl>
</td>
<td>
<FormControl required v-model="form.references[index].type" type="select"
:options="referenceIdentifierTypes"
placeholder="[identifier type]">
:options="referenceIdentifierTypes" placeholder="[type]">
<div class="text-red-400 text-sm"
v-if="Array.isArray(form.errors[`references.${index}.type`])">
{{ form.errors[`references.${index}.type`].join(', ') }}
@ -940,8 +947,7 @@ Removes a selected keyword
'data-vv-scope' => 'step-2'])
!!} -->
<FormControl required v-model="form.references[index].relation" type="select"
:options="relationTypes"
placeholder="[relation type]">
:options="relationTypes" placeholder="[relation type]">
<div class="text-red-400 text-sm"
v-if="Array.isArray(form.errors[`references.${index}.relation`])">
{{ form.errors[`references.${index}.relation`].join(', ') }}
@ -949,7 +955,14 @@ Removes a selected keyword
</FormControl>
</td>
<td data-label="Reference Label">
<input name="Reference Label" class="form-control" v-model="item.label" />
<!-- <input name="Reference Label" class="form-control" v-model="item.label" /> -->
<FormControl required v-model="form.references[index].label" type="text"
placeholder="[reference label]">
<div class="text-red-400 text-sm"
v-if="form.errors[`references.${index}.label`] && Array.isArray(form.errors[`references.${index}.label`])">
{{ form.errors[`references.${index}.label`].join(', ') }}
</div>
</FormControl>
</td>
<td class="before:hidden lg:w-1 whitespace-nowrap">
<!-- <BaseButton color="info" :icon="mdiEye" small @click="isModalActive = true" /> -->