diff --git a/src/components/base/BaseInputDate.vue b/src/components/base/BaseInputDate.vue new file mode 100644 index 0000000..0f0a0c1 --- /dev/null +++ b/src/components/base/BaseInputDate.vue @@ -0,0 +1,145 @@ + + + + + + diff --git a/src/components/base/BaseInputTime.vue b/src/components/base/BaseInputTime.vue new file mode 100644 index 0000000..fe75ca0 --- /dev/null +++ b/src/components/base/BaseInputTime.vue @@ -0,0 +1,139 @@ + + + + + + diff --git a/src/pages/newMedicalCard/components/MedicalFormWrapper.vue b/src/pages/newMedicalCard/components/MedicalFormWrapper.vue index 6a8f38e..47750c4 100644 --- a/src/pages/newMedicalCard/components/MedicalFormWrapper.vue +++ b/src/pages/newMedicalCard/components/MedicalFormWrapper.vue @@ -19,8 +19,26 @@ span.text-smm.font-medium {{ titleDelete }} slot .flex.h-fit.w-fit.gap-2(v-if="isEdit") - base-button.text-base.font-semibold(outlined :size="40" @click="cancel") Отменить - base-button.text-base.font-semibold(v-if="isCheckChange" :size="40" @click="save") Сохранить изменения + q-btn( + color="primary", + outline, + size="16px", + no-caps, + label="Отменить", + :style="{width: '126px', height: '40px'}", + padding="0", + @click="cancel" + ) + q-btn( + v-if="isCheckChange", + color="primary", + size="16px", + no-caps, + label="Сохранить изменения", + :style="{width: '222px', height: '40px'}", + padding="0", + @click="save" + ) + + diff --git a/src/pages/newMedicalCard/components/MedicalProtocolsList.vue b/src/pages/newMedicalCard/components/MedicalProtocolsList.vue index dec2cbe..e7903ef 100644 --- a/src/pages/newMedicalCard/components/MedicalProtocolsList.vue +++ b/src/pages/newMedicalCard/components/MedicalProtocolsList.vue @@ -9,7 +9,7 @@ icon="add", :style="{width: '100%', height: '40px'}" padding="0", - @click="createInspection" + @click="changeShownCreateModal(true)" ) .p-4.rounded.background.list .flex @@ -34,88 +34,39 @@ :protocol-data="protocol", @click="openInspection" ) + base-modal( + v-model="showModal", + title="Создание осмотра" + ) + medical-protocol-create-modal(:change-shown-create-modal="changeShownCreateModal") diff --git a/src/store/index.js b/src/store/index.js index f3a4131..ef59776 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -5,6 +5,7 @@ export default createStore({ state: { url: "https://astra-dev.dopcore.com", routingHistory: window.history, + userData: JSON.parse(localStorage.getItem("userData")), }, modules: { medical, @@ -13,5 +14,16 @@ export default createStore({ getUrl(state) { return state.url; }, + getUserData(state) { + let data = {}; + Object.keys(state.userData).forEach((key) => { + if (key !== "photo") data[key] = state.userData[key]; + else + data[key] = state.userData[key] + ? state.url + state.userData[key] + : ""; + }); + return data; + }, }, }); diff --git a/src/store/modules/medicalCard.js b/src/store/modules/medicalCard.js index 77cb5b8..3a61498 100644 --- a/src/store/modules/medicalCard.js +++ b/src/store/modules/medicalCard.js @@ -60,6 +60,73 @@ const state = () => ({ avatar: "", benefitData: [], events: [], + protocolsData: [ + { + id: 1, + employee: { + last_name: "Захаров", + first_name: "Алексей", + patronymic: "Сергеевич", + job_title: "Хирург", + photo: "", + }, + start: "2023-03-23T13:00:00+03:00", + end: "2023-03-23T13:40:00+03:00", + status: "filled", + }, + { + id: 2, + employee: { + last_name: "Лаврентьев", + first_name: "Сергей", + patronymic: "Анатольевич", + job_title: "Терапевт", + photo: "", + }, + start: "2023-04-11T18:00:00+03:00", + end: "2023-04-11T18:30:00+03:00", + status: "partially filled", + }, + { + id: 3, + employee: { + last_name: "Захаров", + first_name: "Алексей", + patronymic: "Сергеевич", + job_title: "Хирург", + photo: "", + }, + start: "2021-08-23T10:00:00+03:00", + end: "2021-08-23T13:00:00+03:00", + status: "filled", + }, + { + id: 4, + employee: { + last_name: "Щевьева", + first_name: "Лариса", + patronymic: "Николаевна", + job_title: "Ортодонт", + photo: "", + }, + start: "2023-05-23T14:10:00+03:00", + end: "2023-05-23T15:10:00+03:00", + status: "", + }, + { + id: 5, + employee: { + last_name: "Захаров", + first_name: "Алексей", + patronymic: "Сергеевич", + job_title: "Хирург", + photo: "", + }, + start: "2022-01-23T13:10:00+03:00", + end: "2022-01-23T13:30:00+03:00", + status: "filled", + }, + ], }); const getters = {