changes
This commit is contained in:
@@ -326,15 +326,22 @@ export default {
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.record = await this.$getdata("customer", { id: this.row.customer || this.row.id }, undefined, true);
|
||||
this.record = await this.$getdata("customer", { first: true, filter: { id: this.row.customer || this.row.id } });
|
||||
if (this.isIndividual) {
|
||||
this.relatedPeople = await this.$getdata("customerpeople", {
|
||||
customer: this.row.customer || this.row.id,
|
||||
filter: {
|
||||
customer: this.row.customer || this.row.id,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
const org = await this.$getdata("organization", { customer: this.row.customer || this.row.id }, undefined, true);
|
||||
const org = await this.$getdata("organization", {
|
||||
first: true,
|
||||
filter: { customer: this.row.customer || this.row.id },
|
||||
});
|
||||
this.relatedPeople = await this.$getdata("legalrep", {
|
||||
organization: org.id,
|
||||
filter: {
|
||||
organization: org.id,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -373,17 +380,19 @@ export default {
|
||||
// refetch relatedPeople
|
||||
if (this.isIndividual) {
|
||||
this.relatedPeople = await this.$getdata("customerpeople", {
|
||||
customer: this.row.customer || this.row.id,
|
||||
filter: {
|
||||
customer: this.row.customer || this.row.id,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
const org = await this.$getdata(
|
||||
"organization",
|
||||
{ customer: this.row.customer || this.row.id },
|
||||
undefined,
|
||||
true,
|
||||
);
|
||||
const org = await this.$getdata("organization", {
|
||||
first: true,
|
||||
filter: { customer: this.row.customer || this.row.id },
|
||||
});
|
||||
this.relatedPeople = await this.$getdata("legalrep", {
|
||||
organization: org.id,
|
||||
filter: {
|
||||
organization: org.id,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -398,7 +407,10 @@ export default {
|
||||
};
|
||||
},
|
||||
async openRelatedPerson(peopleId) {
|
||||
const peopleRow = await this.$getdata("people", { id: peopleId }, undefined, true);
|
||||
const peopleRow = await this.$getdata("people", {
|
||||
first: true,
|
||||
filter: { id: peopleId },
|
||||
});
|
||||
this.showmodal = {
|
||||
component: "people/PeopleView",
|
||||
vbind: { row: peopleRow },
|
||||
|
||||
Reference in New Issue
Block a user