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