mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-19 04:08:06 +00:00
Nettoyage des imports inutilisés dans plusieurs composants Vue pour améliorer la lisibilité du code et gestion des valeurs nulles dans PersonRenderBox.vue.
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineProps } from "vue";
|
||||
import BadgeEntity from "ChillMainAssets/vuejs/_components/BadgeEntity.vue";
|
||||
import HouseholdRenderBox from "ChillPersonAssets/vuejs/_components/Entity/HouseholdRenderBox.vue";
|
||||
import { Suggestion } from "ChillPersonAssets/types";
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineProps } from "vue";
|
||||
import { computed } from "vue";
|
||||
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue";
|
||||
import BadgeEntity from "ChillMainAssets/vuejs/_components/BadgeEntity.vue";
|
||||
import PersonText from "ChillPersonAssets/vuejs/_components/Entity/PersonText.vue";
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineProps } from "vue";
|
||||
import BadgeEntity from "ChillMainAssets/vuejs/_components/BadgeEntity.vue";
|
||||
import UserRenderBoxBadge from "ChillMainAssets/vuejs/_components/Entity/UserRenderBoxBadge.vue";
|
||||
import { Suggestion } from "ChillPersonAssets/types";
|
||||
|
||||
@@ -35,9 +35,11 @@
|
||||
/>
|
||||
<span v-if="person.birthdate">
|
||||
{{
|
||||
// TODO: refactor ISOToDate to alway return Date and dont allow null value as argaument. Manage error with try/catch if needed.
|
||||
trans(RENDERBOX_BIRTHDAY_STATEMENT, {
|
||||
gender: toGenderTranslation(person.gender),
|
||||
birthdate: ISOToDate(person.birthdate?.datetime),
|
||||
birthdate:
|
||||
ISOToDate(person.birthdate.datetime) ?? new Date(),
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
@@ -51,7 +53,8 @@
|
||||
{{
|
||||
trans(RENDERBOX_DEATHDATE_STATEMENT, {
|
||||
gender: toGenderTranslation(person.gender),
|
||||
deathdate: ISOToDate(person.deathdate?.datetime),
|
||||
deathdate:
|
||||
ISOToDate(person.deathdate?.datetime) ?? new Date(),
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<span
|
||||
class="age"
|
||||
v-if="addAge && person.birthdate !== null && person.deathdate === null"
|
||||
> {{ trans(RENDERBOX_YEARS_OLD, person.age) }}</span
|
||||
> {{ trans(RENDERBOX_YEARS_OLD, { n: person.age }) }}</span
|
||||
>
|
||||
<span v-else-if="addAge && person.deathdate !== null"> (‡)</span>
|
||||
</span>
|
||||
@@ -17,7 +17,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, toRefs } from "vue";
|
||||
import { trans, RENDERBOX_YEARS_OLD } from "translator";
|
||||
import { AltName, Person } from "ChillPersonAssets/types";
|
||||
import { Person } from "ChillPersonAssets/types";
|
||||
|
||||
const props = defineProps<{
|
||||
person: Person;
|
||||
|
||||
Reference in New Issue
Block a user