create style for badge 3party and introduce in ThirdPartyRenderBox.vue

This commit is contained in:
2021-10-12 17:32:17 +02:00
parent 88d073b9a9
commit b84d0100e0
11 changed files with 54 additions and 13 deletions

View File

@@ -0,0 +1,16 @@
@import 'ChillMainAssets/module/bootstrap/shared';
.badge {
&.bg-thirdparty-company {
//@extend .bg-info;
background-color: $yellow;
}
&.bg-thirdparty-child {
//@extend .bg-chill-blue;
background-color: $chill-blue;
}
&.bg-thirdparty-contact {
//@extedn .bg-secondary;
background-color: $secondary;
}
}

View File

@@ -0,0 +1 @@
require('./chillthirdparty.scss');

View File

@@ -1,2 +1,2 @@
require('./chillthirdparty.scss');
require('./index_3party.scss');

View File

@@ -13,6 +13,16 @@
</a>
<span class="name">{{ thirdparty.text }}</span>
<span class="badge bg-thirdparty-child" v-if="thirdparty.kind == 'child'">
{{ $t('thirdparty.child')}}
</span>
<span class="badge bg-thirdparty-company" v-else-if="thirdparty.kind == 'company'">
{{ $t('thirdparty.company')}}
</span>
<span class="badge bg-thirdparty-contact" v-else="thirdparty.kind == 'contact'">
{{ $t('thirdparty.contact')}}
</span>
<span v-if="options.addId == true" class="id-number" :title="'n° ' + thirdparty.id">{{ thirdparty.id }}</span>
<span v-if="options.addEntity == true && thirdparty.type === 'thirdparty'" class="badge rounded-pill bg-secondary">{{ $t('renderbox.type.thirdparty') }}</span>
@@ -57,11 +67,23 @@
import AddressRenderBox from 'ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue';
import {dateToISO} from 'ChillMainAssets/chill/js/date.js';
const i18n = {
messages: {
fr: {
tparty: {
contact: "Personne physique",
company: "Personne morale"
}
}
}
};
export default {
name: "ThirdPartyRenderBox",
components: {
AddressRenderBox
},
i18n,
props: ['thirdparty', 'options'],
computed: {
isMultiline: function() {

View File

@@ -24,13 +24,17 @@
<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">
{{ $t('tparty.company')}}
<span class="badge bg-thirdparty-company">
{{ $t('tparty.company')}}
</span>
</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">
{{ $t('tparty.contact')}}
<span class="badge bg-thirdparty-contact">
{{ $t('tparty.contact')}}
</span>
</label>
</div>
</div>