mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
onthefly create thirdparty: use badge-entity for radio buttons label
This commit is contained in:
parent
d7db8400d2
commit
6c28ff00ab
@ -26,17 +26,19 @@
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-0" type="radio" v-model="kind" value="company" id="tpartyKindInstitution">
|
||||
<label for="tpartyKindInstitution" class="required">
|
||||
<span class="badge rounded-pill bg-thirdparty-company" style="padding-top: 0;">
|
||||
{{ $t('tparty.company')}}
|
||||
</span>
|
||||
<badge-entity
|
||||
:entity="{ type: 'thirdparty', kind: 'company' }"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-0" type="radio" v-model="kind" value="contact" id="tpartyKindContact">
|
||||
<label for="tpartyKindContact" class="required">
|
||||
<span class="badge rounded-pill bg-thirdparty-contact" style="padding-top: 0;">
|
||||
{{ $t('tparty.contact')}}
|
||||
</span>
|
||||
<badge-entity
|
||||
:entity="{ type: 'thirdparty', kind: 'contact' }"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -97,26 +99,16 @@
|
||||
import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue';
|
||||
import AddAddress from 'ChillMainAssets/vuejs/Address/components/AddAddress';
|
||||
import { getThirdparty } from '../../_api/OnTheFly';
|
||||
|
||||
const i18n = {
|
||||
messages: {
|
||||
fr: {
|
||||
tparty: {
|
||||
contact: "Personne physique",
|
||||
company: "Personne morale"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue';
|
||||
|
||||
export default {
|
||||
name: "OnTheFlyThirdParty",
|
||||
props: ['id', 'type', 'action'],
|
||||
components: {
|
||||
ThirdPartyRenderBox,
|
||||
AddAddress
|
||||
AddAddress,
|
||||
BadgeEntity
|
||||
},
|
||||
i18n,
|
||||
data() {
|
||||
return {
|
||||
//context: {}, <--
|
||||
|
@ -12,7 +12,7 @@
|
||||
{% block crud_content_header %}
|
||||
<h1>
|
||||
{{ 'Update third party %name%'|trans({ '%name%': thirdParty.name }) }}
|
||||
<span class="badge bg-{{ thirdParty.active ? 'success' : 'danger' }}"
|
||||
<span class="badge bg-{{ thirdParty.active ? 'success' : 'danger' }} float-end"
|
||||
title="{{ (thirdParty.active ? 'shown to users' : 'not shown to users')|trans }}">
|
||||
{{ (thirdParty.active ? 'Active' : 'Inactive')|trans }}
|
||||
</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user