[WIP] Доработал note и возможность их создания

This commit is contained in:
megavrilinvv
2022-12-16 15:54:10 +03:00
parent 1c25170828
commit cb1fcd9818
7 changed files with 99 additions and 13 deletions

View File

@@ -433,9 +433,15 @@ export default {
this.lackAttachments = this.dataAttachments[0]?.id ? true : false;
},
saveNote(data) {
this.dataNotes = [...data.note];
this.lackNotes = this.dataNotes[0]?.id ? true : false;
if (data?.note[0]) {
this.dataNotes = [...data.note];
this.lackNotes = true;
} else {
this.lackNotes = false;
this.dataNotes = [{ title: "", description: "" }];
}
},
saveIdentityDocument(data) {
if (data?.id) {
this.docId = data.id;
@@ -621,12 +627,12 @@ export default {
);
});
},
postCreateNote() {
postCreateNote(title, description) {
fetchWrapper
.post("general/note/create/", {
person_id: this.id,
title: this.dataNotes[0].title,
description: this.dataNotes[0].title,
title: title,
description: description,
})
.then(() => this.fetchClientDetail(this.id));
},