mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
Merge remote-tracking branch 'origin/master' into issue469_budget
This commit is contained in:
@@ -278,6 +278,7 @@ table.table-bordered {
|
||||
}
|
||||
|
||||
/// meta-data
|
||||
div.createdBy,
|
||||
div.updatedBy,
|
||||
div.metadata {
|
||||
span.user, span.date {
|
||||
|
@@ -279,6 +279,7 @@ div.wrap-header {
|
||||
|
||||
li {
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,7 +317,7 @@ div.float-button {
|
||||
|
||||
div.action {
|
||||
height: calc(100% - 0em);
|
||||
shape-outside: inset(calc(100% - 4em) 0 0);
|
||||
shape-outside: inset(calc(100% - 2em) 0 0);
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
padding: 0 0 0 1em;
|
||||
@@ -328,6 +329,10 @@ div.float-button {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.chill-entity.entity-address .address p {
|
||||
display: unset;
|
||||
}
|
||||
}
|
||||
&.debug {
|
||||
padding: 1em;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
ul.record_actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap-reverse;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
padding: 0.5em 0;
|
||||
|
||||
|
@@ -73,8 +73,8 @@ section.chill-entity {
|
||||
}
|
||||
p {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 1.5em;
|
||||
text-indent: -1.5em;
|
||||
//margin: 0 0 0 1.5em;
|
||||
//text-indent: -1.5em;
|
||||
|
||||
&.street {
|
||||
span.streetnumber {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Generic api method that can be adapted to any fetch request
|
||||
*/
|
||||
const makeFetch = (method, url, body) => {
|
||||
const makeFetch = (method, url, body) => {
|
||||
return fetch(url, {
|
||||
method: method,
|
||||
headers: {
|
||||
@@ -11,19 +11,20 @@
|
||||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
console.log('200 error')
|
||||
return response.json();
|
||||
}
|
||||
|
||||
if (response.status === 422) {
|
||||
console.log('422 error')
|
||||
return response.json().then(response => {
|
||||
throw ValidationException(response)
|
||||
});
|
||||
}
|
||||
|
||||
if (response.status === 403) {
|
||||
return response.json().then(() => {
|
||||
throw AccessException();
|
||||
});
|
||||
console.log('403 error')
|
||||
throw AccessException(response);
|
||||
}
|
||||
|
||||
throw {
|
||||
@@ -88,14 +89,13 @@ const ValidationException = (response) => {
|
||||
error.violations = response.violations.map((violation) => `${violation.title}: ${violation.propertyPath}`);
|
||||
error.titles = response.violations.map((violation) => violation.title);
|
||||
error.propertyPaths = response.violations.map((violation) => violation.propertyPath);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
const AccessException = () => {
|
||||
const AccessException = (response) => {
|
||||
const error = {};
|
||||
error.name = 'AccessException';
|
||||
error.violations = ['You are no longer permitted to perform this action'];
|
||||
error.violations = ['You are not allowed to perform this action'];
|
||||
|
||||
return error;
|
||||
}
|
||||
|
@@ -1,16 +1,39 @@
|
||||
.confidential{
|
||||
.confidential {
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
.toggle-far-twig {
|
||||
i {
|
||||
bottom: 0px;
|
||||
right: -30px;
|
||||
}
|
||||
}
|
||||
|
||||
.toggle-close-twig {
|
||||
i {
|
||||
bottom: 0px;
|
||||
right: -5px;
|
||||
}
|
||||
}
|
||||
.toggle{
|
||||
margin-left: 30px;
|
||||
margin-top: 5px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
right: 10px;
|
||||
z-index: 5;
|
||||
right: -30px
|
||||
}
|
||||
|
||||
.toggle-far {
|
||||
bottom: 0px;
|
||||
right: 20px !important;
|
||||
}
|
||||
|
||||
.toggle-close {
|
||||
bottom: 125px;
|
||||
right: 15px !important;
|
||||
}
|
||||
|
||||
.blur {
|
||||
-webkit-filter: blur(5px);
|
||||
-moz-filter: blur(5px);
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<slot name="confidential-content"></slot>
|
||||
</div>
|
||||
<div>
|
||||
<i class="fa fa-eye toggle" aria-hidden="true" @click="toggleBlur"></i>
|
||||
<i class="fa fa-eye toggle" :class="positionBtn" aria-hidden="true" @click="toggleBlur"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -12,6 +12,7 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "Confidential",
|
||||
props: ['positionBtnFar'],
|
||||
data() {
|
||||
return {
|
||||
isBlurred: true,
|
||||
@@ -19,9 +20,14 @@ export default {
|
||||
},
|
||||
methods : {
|
||||
toggleBlur() {
|
||||
console.log('toggle blur');
|
||||
console.log(this.positionBtnFar);
|
||||
this.isBlurred = !this.isBlurred;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
positionBtn() {
|
||||
return this.positionBtnFar ? 'toggle-far' : 'toggle-close'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<component :is="component" class="address" :class="multiline">
|
||||
|
||||
<div v-if="isConfidential">
|
||||
<confidential>
|
||||
<confidential :positionBtnFar="true">
|
||||
<template v-slot:confidential-content>
|
||||
<div v-if="isMultiline === true">
|
||||
<p v-for="(l, i) in address.lines" :key="`line-${i}`">
|
||||
|
@@ -70,7 +70,8 @@ const messages = {
|
||||
},
|
||||
holder: "Titulaire",
|
||||
years_old: "an | {n} an | {n} ans",
|
||||
|
||||
residential_address: "Adresse de résidence",
|
||||
located_at: "réside chez"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -59,7 +59,7 @@
|
||||
must be shown in such list
|
||||
#}
|
||||
{%- if render == 'list' -%}
|
||||
<li class="chill-entity entity-address {% if address.confidential %}confidential{% endif %}">
|
||||
<li class="chill-entity entity-address {% if address.confidential %} confidential toggle-far-twig {% endif %}">
|
||||
{% if options['with_picto'] %}
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{% endif %}
|
||||
@@ -68,7 +68,7 @@
|
||||
{%- endif -%}
|
||||
|
||||
{%- if render == 'inline' -%}
|
||||
<span class="chill-entity entity-address {% if address.confidential %}confidential{% endif %}">
|
||||
<span class="chill-entity entity-address {% if address.confidential %} confidential toggle-far-twig {% endif %}">
|
||||
{% if options['with_picto'] %}
|
||||
<i class="fa fa-fw fa-map-marker"></i>
|
||||
{% endif %}
|
||||
@@ -77,7 +77,7 @@
|
||||
{%- endif -%}
|
||||
|
||||
{%- if render == 'bloc' -%}
|
||||
<div class="chill-entity entity-address {% if address.confidential %}confidential{% endif %}">
|
||||
<div class="chill-entity entity-address {% if address.confidential %} confidential toggle-close-twig {% endif %}">
|
||||
{% if options['has_no_address'] == true and address.isNoAddress == true %}
|
||||
{% if address.postCode is not empty %}
|
||||
<div class="address{% if options['multiline'] %} multiline{% endif %}{% if options['with_delimiter'] %} delimiter{% endif %}">
|
||||
|
@@ -18,8 +18,10 @@
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.name }}</td>
|
||||
<td>{{ entity.phonenumber1 }}</td>
|
||||
<td>{{ entity.phonenumber2 }}</td>
|
||||
<td>
|
||||
{{ entity.phonenumber1|chill_format_phonenumber }}
|
||||
</td>
|
||||
<td>{{ entity.phonenumber2|chill_format_phonenumber }}</td>
|
||||
<td>{{ entity.email }}</td>
|
||||
<td>
|
||||
{% if entity.address is not null %}
|
||||
|
Reference in New Issue
Block a user