mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-11 06:38:26 +00:00
JS corrections in ChillPersonBundle required by ESLint
This commit is contained in:
@@ -342,7 +342,7 @@ export default {
|
||||
return makeFetch('POST', '/api/1.0/person/household/members/move.json', member)
|
||||
.then(_response => {
|
||||
makeFetch('POST', `/api/1.0/person/household/${responseHousehold.id}/address.json`, address)
|
||||
.then(_response => {})
|
||||
.then(_response => {console.log(_response)})
|
||||
.catch((error) => {
|
||||
if (error.name === 'ValidationException') {
|
||||
for (let v of error.violations) {
|
||||
|
||||
@@ -96,7 +96,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
saveFormOnTheFly({data, type}) {
|
||||
saveFormOnTheFly({data}) {
|
||||
makeFetch('POST', '/api/1.0/thirdparty/thirdparty.json', data)
|
||||
.then(response => {
|
||||
this.$emit('newPriorSuggestion', response);
|
||||
|
||||
@@ -336,14 +336,14 @@ export default {
|
||||
}
|
||||
},
|
||||
altNameLabel: function () {
|
||||
for (let i = 0; i < this.person.altNames.length; i++) {
|
||||
return this.person.altNames[i].label
|
||||
}
|
||||
let altNameLabel = ''
|
||||
this.person.altNames.forEach(altName => altNameLabel += altName.label)
|
||||
return altNameLabel
|
||||
},
|
||||
altNameKey: function () {
|
||||
for (let i = 0; i < this.person.altNames.length; i++) {
|
||||
return this.person.altNames[i].key
|
||||
}
|
||||
let altNameKey = ''
|
||||
this.person.altNames.forEach(altName => altNameKey += altName.key)
|
||||
return altNameKey
|
||||
},
|
||||
getUrl: function () {
|
||||
return `/fr/person/${this.person.id}/general`;
|
||||
|
||||
@@ -45,14 +45,14 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
altNameLabel: function() {
|
||||
for(let i = 0; i < this.person.altNames.length; i++){
|
||||
return this.person.altNames[i].label
|
||||
}
|
||||
let altNameLabel = ''
|
||||
this.person.altNames.forEach(altName => altNameLabel += altName.label)
|
||||
return altNameLabel
|
||||
},
|
||||
altNameKey: function() {
|
||||
for(let i = 0; i < this.person.altNames.length; i++){
|
||||
return this.person.altNames[i].key
|
||||
}
|
||||
let altNameKey = ''
|
||||
this.person.altNames.forEach(altName => altNameKey += altName.key)
|
||||
return altNameKey
|
||||
},
|
||||
cutText: function() {
|
||||
let more = (this.person.text.length > 15) ?'…' : '';
|
||||
|
||||
@@ -436,7 +436,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkErrors(e) {
|
||||
checkErrors() {
|
||||
this.errors = [];
|
||||
if (this.person.lastName === "") {
|
||||
this.errors.push("Le nom ne doit pas être vide.");
|
||||
@@ -453,7 +453,7 @@ export default {
|
||||
},
|
||||
loadData() {
|
||||
getPerson(this.id)
|
||||
.then(person => new Promise((resolve, reject) => {
|
||||
.then(person => new Promise((resolve) => {
|
||||
this.person = person;
|
||||
//console.log('get person', this.person);
|
||||
resolve();
|
||||
|
||||
Reference in New Issue
Block a user