WIP Добавил выбор соцсети и доверенного лица из существующих персон
This commit is contained in:
@@ -4,6 +4,7 @@ import { genderOptions } from "@/pages/newMedicalCard/utils/medicalConfig";
|
||||
const state = () => ({
|
||||
medicalCard: {},
|
||||
confidantData: [],
|
||||
personFiltredList: [],
|
||||
contactsData: {
|
||||
phones: [],
|
||||
emails: [],
|
||||
@@ -252,6 +253,15 @@ const actions = {
|
||||
commit("setConfidantData");
|
||||
});
|
||||
},
|
||||
getPersonsFiltredList({ commit }) {
|
||||
fetchWrapper
|
||||
.get(
|
||||
`general/person/?last_name=${localStorage.getItem("searchConfidant")}`
|
||||
)
|
||||
.then((res) => {
|
||||
commit("setPersonFiltredList", res.results);
|
||||
});
|
||||
},
|
||||
returnInitData({ commit }) {
|
||||
commit("setBasicData");
|
||||
commit("setContactsData");
|
||||
@@ -295,6 +305,9 @@ const mutations = {
|
||||
setConfidantData(state) {
|
||||
state.confidantData = this.getters.getConfidantData;
|
||||
},
|
||||
setPersonFiltredList(state, persons) {
|
||||
state.personFiltredList = persons;
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user