Added actor date of birth and death precision.
This commit is contained in:
@@ -52,9 +52,12 @@ const fields = computed(() => [
|
||||
key: 'dateOfBirth',
|
||||
label: 'date of birth',
|
||||
type: 'date',
|
||||
value: actor.value?.dateOfBirth
|
||||
? format(actor.value.dateOfBirth, 'yyyy-MM-dd')
|
||||
: null,
|
||||
value: {
|
||||
date: actor.value?.dateOfBirth
|
||||
? format(actor.value.dateOfBirth, 'yyyy-MM-dd')
|
||||
: null,
|
||||
precision: actor.value.dateOfBirthPrecision,
|
||||
},
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
@@ -212,9 +215,12 @@ const fields = computed(() => [
|
||||
key: 'dateOfDeath',
|
||||
label: 'date of death',
|
||||
type: 'date',
|
||||
value: actor.value?.dateOfDeath
|
||||
? format(actor.value.dateOfDeath, 'yyyy-MM-dd')
|
||||
: null,
|
||||
value: {
|
||||
date: actor.value?.dateOfDeath
|
||||
? format(actor.value.dateOfDeath, 'yyyy-MM-dd')
|
||||
: null,
|
||||
precision: actor.value.dateOfDeathPrecision,
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'allowGlobalMatch',
|
||||
@@ -270,6 +276,14 @@ const keyMap = {
|
||||
country: 'residenceCountry',
|
||||
place: 'residencePlace',
|
||||
},
|
||||
dateOfBirth: {
|
||||
date: 'dateOfBirth',
|
||||
precision: 'dateOfBirthPrecision',
|
||||
},
|
||||
dateOfDeath: {
|
||||
date: 'dateOfDeath',
|
||||
precision: 'dateOfDeathPrecision',
|
||||
},
|
||||
tattoos: {
|
||||
has: 'hasTattoos',
|
||||
description: 'tattoos',
|
||||
@@ -501,6 +515,7 @@ async function submit() {
|
||||
>{{ item.unit }}
|
||||
</template>
|
||||
|
||||
<!--
|
||||
<input
|
||||
v-if="item.type === 'date'"
|
||||
v-model="edits[item.key]"
|
||||
@@ -508,6 +523,30 @@ async function submit() {
|
||||
class="date input"
|
||||
:disabled="!editing.has(item.key)"
|
||||
>
|
||||
-->
|
||||
|
||||
<div
|
||||
v-if="item.type === 'date'"
|
||||
class="date"
|
||||
>
|
||||
<input
|
||||
v-model="edits[item.key].date"
|
||||
type="date"
|
||||
class="date input"
|
||||
:disabled="!editing.has(item.key)"
|
||||
>
|
||||
|
||||
<select
|
||||
v-if="item.value.precision"
|
||||
v-model="edits[item.key].precision"
|
||||
class="input"
|
||||
:disabled="!editing.has(item.key)"
|
||||
>
|
||||
<option value="day">Day</option>
|
||||
<option value="month">Month</option>
|
||||
<option value="year">Year</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<select
|
||||
v-if="item.type === 'select'"
|
||||
|
||||
Reference in New Issue
Block a user