mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
display resources table row
This commit is contained in:
parent
d872bf65dd
commit
9710f8be63
@ -1,10 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td>{{ resource.resource.text }}</td>
|
<td>
|
||||||
<td>{{ resource.resource.type }} {{ resource.resource.id }}</td>
|
<span class="badge badge-pill badge-secondary"
|
||||||
<td></td>
|
v-bind:title="resource.resource.id">
|
||||||
<td></td>
|
<span v-if="resource.resource.type === 'person'" >{{ $t('item.type_person') }}</span>
|
||||||
|
<span v-if="resource.resource.type === 'thirdparty'" >{{ $t('item.type_thirdparty') }}</span>
|
||||||
|
</span>
|
||||||
|
{{ resource.resource.text }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td v-if="resource.resource.type === 'person'">
|
||||||
|
{{ $tc('person.born') }}{{ $d(resource.resource.birthdate.datetime, 'short') }}
|
||||||
|
</td>
|
||||||
|
<td v-else-if="resource.resource.type === 'thirdparty'">
|
||||||
|
{{ resource.resource.address.text }}<br>
|
||||||
|
{{ resource.resource.address.postcode.name }}
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
@ -37,14 +49,20 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'ResourceItem',
|
name: 'ResourceItem',
|
||||||
props: ['resource'],
|
props: ['resource'],
|
||||||
data() {
|
emits: ['remove'],
|
||||||
return {
|
computed: {
|
||||||
url: {
|
type() {
|
||||||
show: 'show', //'/fr/person/' + this.resource.person.id + '/general',
|
return this.resource.resource.type;
|
||||||
edit: 'edit' //'/fr/person/' + this.resource.person.id + '/general/edit'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
emits: ['remove']
|
url() {
|
||||||
|
return (this.type === 'person') ? {
|
||||||
|
show: `/fr/person/${this.resource.resource.id}/general`,
|
||||||
|
edit: `/fr/person/${this.resource.resource.id}/general/edit`
|
||||||
|
} : {
|
||||||
|
show: `/fr/thirdparty/thirdparty/${this.resource.resource.id}/show`,
|
||||||
|
edit: `/fr/thirdparty/thirdparty/${this.resource.resource.id}/update`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,10 +7,8 @@
|
|||||||
<table class="rounded">
|
<table class="rounded">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="chill-orange">{{ $t('resources.firstname') }}</th>
|
<th class="chill-orange">{{ $t('resources.text') }}</th>
|
||||||
<th class="chill-orange">{{ $t('resources.lastname') }}</th>
|
<th class="chill-orange">{{ $t('resources.description') }}</th>
|
||||||
<th>3</th>
|
|
||||||
<th>4</th>
|
|
||||||
<th class="chill-orange">{{ $t('action.actions') }}</th>
|
<th class="chill-orange">{{ $t('action.actions') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -49,8 +49,8 @@ const appMessages = {
|
|||||||
resources: {
|
resources: {
|
||||||
title: "Interlocuteurs privilégiés",
|
title: "Interlocuteurs privilégiés",
|
||||||
counter: "Pas d'interlocuteur | 1 interlocuteur | {count} interlocuteurs",
|
counter: "Pas d'interlocuteur | 1 interlocuteur | {count} interlocuteurs",
|
||||||
firstname: "Prénom",
|
text: "Dénomination",
|
||||||
lastname: "Nom",
|
description: "Description",
|
||||||
add_resources: "Ajouter des interlocuteurs",
|
add_resources: "Ajouter des interlocuteurs",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,11 @@ const personMessages = {
|
|||||||
type_thirdparty: "Tiers",
|
type_thirdparty: "Tiers",
|
||||||
type_household: "Ménage"
|
type_household: "Ménage"
|
||||||
},
|
},
|
||||||
|
person: {
|
||||||
|
firstname: "Prénom",
|
||||||
|
lastname: "Nom",
|
||||||
|
born: "né le ",
|
||||||
|
},
|
||||||
error_only_one_person: "Une seule personne peut être sélectionnée !"
|
error_only_one_person: "Une seule personne peut être sélectionnée !"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user