Merge branch 'feature/создание-договора' into 'master'
Добавил пациента в store See merge request andrusyakka/urban-couscous!218
This commit is contained in:
@@ -552,6 +552,9 @@ export default {
|
|||||||
this.isOpenPopup = !this.isOpenPopup;
|
this.isOpenPopup = !this.isOpenPopup;
|
||||||
},
|
},
|
||||||
openDetailInfo(e) {
|
openDetailInfo(e) {
|
||||||
|
if (!this.isOpenDetailInfo)
|
||||||
|
this.$store.state.currentPatient = this.client;
|
||||||
|
else this.$store.state.currentPatient = {};
|
||||||
this.isOpenDetailInfo = !this.isOpenDetailInfo;
|
this.isOpenDetailInfo = !this.isOpenDetailInfo;
|
||||||
this.isOpenDetailInfo && this.fetchClientDetail(e.currentTarget.id);
|
this.isOpenDetailInfo && this.fetchClientDetail(e.currentTarget.id);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.wrap.flex.flex-col.gap-y-6
|
.wrap.flex.flex-col.gap-y-6
|
||||||
.flex.flex.flex-col.gap-y-9
|
.flex.flex.flex-col.gap-y-9
|
||||||
span.font-bold.text-xl Создание пакета документов
|
span.font-bold.text-xl Договор
|
||||||
.flex.justify-center.items-center.gap-x-2
|
.flex.justify-center.items-center.gap-x-2
|
||||||
base-button.button(:size="32", :rounded="true")
|
base-button.button(:size="32", :rounded="true")
|
||||||
span(v-if="!isServices") 1
|
span(v-if="!isServices") 1
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
span(:style="{color: isServices ? 'var(--btn-blue-color)' : 'var(--font-dark-blue-color)' }") Услуги
|
span(:style="{color: isServices ? 'var(--btn-blue-color)' : 'var(--font-dark-blue-color)' }") Услуги
|
||||||
.base.flex.flex-col.gap-y-6(v-if="!isServices")
|
.base.flex.flex-col.gap-y-6(v-if="!isServices")
|
||||||
.flex.flex-col.gap-y-6
|
.flex.flex-col.gap-y-6
|
||||||
span.font-bold Основное
|
span.font-bold Пациент
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
.counter.font-semibold.text-smm Название пакета
|
.counter.font-semibold.text-smm ФИО
|
||||||
base-input(
|
base-input(
|
||||||
v-model:value="packageDocs.packageName",
|
v-model:value="patient",
|
||||||
placeholder="Введите название для пакета документов"
|
placeholder="Введите название для пакета документов"
|
||||||
)
|
)
|
||||||
span.counter
|
span.counter
|
||||||
@@ -92,8 +92,14 @@ export default {
|
|||||||
return {
|
return {
|
||||||
isServices: false,
|
isServices: false,
|
||||||
packageDocs: {
|
packageDocs: {
|
||||||
packageName: "",
|
packageName: this.$store.state.currentPatient?.last_name,
|
||||||
},
|
},
|
||||||
|
patient:
|
||||||
|
this.$store.state.currentPatient?.last_name +
|
||||||
|
" " +
|
||||||
|
this.$store.state.currentPatient?.first_name +
|
||||||
|
" " +
|
||||||
|
this.$store.state.currentPatient?.patronymic,
|
||||||
isAllServices: false,
|
isAllServices: false,
|
||||||
userIds: [],
|
userIds: [],
|
||||||
services: [
|
services: [
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
import { createStore } from "vuex";
|
import { createStore } from "vuex";
|
||||||
|
|
||||||
export default createStore({
|
export default createStore({
|
||||||
state: {},
|
state: {
|
||||||
mutations: {},
|
currentPatient: {},
|
||||||
|
test: "Привет",
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
setCurrentPatient(state, patient) {
|
||||||
|
state.currentPatient = patient;
|
||||||
|
},
|
||||||
|
},
|
||||||
actions: {},
|
actions: {},
|
||||||
modules: {},
|
modules: {},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user