fix create form and fix origin
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
.wrapper-info.h-full
|
||||
.grid.grid-cols-2.gap-x-4.gap-y-6
|
||||
base-input(
|
||||
:disabled="!!patient.id"
|
||||
v-model="phone",
|
||||
placeholder="+7 (915) 644–92–23",
|
||||
mask="+7 (###) ###-##-##",
|
||||
@@ -19,6 +20,7 @@
|
||||
important
|
||||
)
|
||||
base-input-date(
|
||||
:disabled="!!patient.id"
|
||||
v-model="birth_date",
|
||||
size="M",
|
||||
important,
|
||||
@@ -63,6 +65,11 @@ export default {
|
||||
currentStatus: patientData.statuses.find((e) => e.name === "Не принят"),
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
primaryNumber() {
|
||||
return this.patient?.contacts?.find((e) => e.category === "PHONE")?.value;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
getEvents: "getEvents",
|
||||
@@ -90,6 +97,16 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
watch: {
|
||||
patient(val) {
|
||||
if (val.birth_date) {
|
||||
this.birth_date = val.birth_date;
|
||||
}
|
||||
if (this.primaryNumber) {
|
||||
this.phone = this.primaryNumber;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user