[WIP] Фикс переменных, правка стилей

This commit is contained in:
megavrilinvv
2022-12-27 14:16:39 +03:00
parent 84f4379f2d
commit 687a56defb
8 changed files with 97 additions and 77 deletions

View File

@@ -347,7 +347,7 @@ export default {
.post("general/contact/create/", {
kind: contact.kind,
username: contact.username,
person_id: this.client.id,
person: this.client.id,
})
.then(() => {
if (this.createdClientName) this.fetchCreatedClientData;
@@ -359,7 +359,7 @@ export default {
.post(`general/contact/${contact.id}/update/`, {
kind: contact.kind,
username: contact.username,
person_id: this.client.id,
person: this.client.id,
})
.then(() => {
if (this.createdClientName) this.fetchCreatedClientData;
@@ -430,7 +430,7 @@ export default {
.then((data) => this.saveAttachment(data.results));
},
saveAttachment(data) {
this.dataAttachments = data.filter((e) => e.person_id.id === this.id);
this.dataAttachments = data.filter((e) => e.person.id === this.id);
this.lackAttachments = this.dataAttachments[0]?.id ? true : false;
},
saveNote(data) {
@@ -446,8 +446,8 @@ export default {
if (data?.id) {
this.docId = data.id;
this.dataIdentityDocument = {
numba:
data.series && data.numba ? data?.series + " " + data?.numba : "",
number:
data.series && data.number ? data?.series + " " + data?.number : "",
issued_by_org: data.issued_by_org ? data?.issued_by_org : "",
issued_by_org_code: data.issued_by_org_code
? data?.issued_by_org_code
@@ -458,7 +458,7 @@ export default {
} else {
this.lackData = false;
this.dataIdentityDocument = {
numba: "",
number: "",
issued_by_org: "",
issued_by_org_code: "",
issued_by_date: "",
@@ -469,7 +469,7 @@ export default {
fetchWrapper
.post(`general/identity_document/${this.docId}/update/`, {
kind: "PASSPORT",
series_number: this.dataIdentityDocument.numba,
series_number: this.dataIdentityDocument.number,
issued_by_org: this.dataIdentityDocument.issued_by_org,
issued_by_org_code: this.dataIdentityDocument.issued_by_org_code,
issued_by_date: this.dataIdentityDocument.issued_by_date,
@@ -565,7 +565,7 @@ export default {
this.dataAttachments = [...data];
const formData = new FormData();
this.dataAttachments.forEach((e) => {
formData.append("person_id", this.id);
formData.append("person", this.id);
formData.append("document", e);
formData.append("title", e.name.substr(0, e.name.lastIndexOf(".")));
fetchWrapper
@@ -581,7 +581,7 @@ export default {
postCreateAddress() {
fetchWrapper
.post("general/address/create/", {
person_id: this.id,
person: this.id,
full_address:
this.mergeFullAddress() || this.dataAddress.full_address,
})
@@ -598,9 +598,9 @@ export default {
postCreateIdentityDocument() {
fetchWrapper
.post("general/identity_document/create/", {
person_id: this.id,
person: this.id,
kind: "PASSPORT",
series_number: this.dataIdentityDocument.numba,
series_number: this.dataIdentityDocument.number,
issued_by_org: this.dataIdentityDocument.issued_by_org,
issued_by_org_code: this.dataIdentityDocument.issued_by_org_code,
issued_by_date: this.dataIdentityDocument.issued_by_date,
@@ -639,7 +639,7 @@ export default {
} else
fetchWrapper
.post("general/note/create/", {
person_id: this.id,
person: this.id,
title: title,
description: description,
})