diff --git a/src/pages/calendar/TheCalendar.vue b/src/pages/calendar/TheCalendar.vue index bdc820a..d49d619 100644 --- a/src/pages/calendar/TheCalendar.vue +++ b/src/pages/calendar/TheCalendar.vue @@ -56,6 +56,8 @@ import CalendarSidebar from "./components/CalendarSidebar.vue"; import CalendarFormAddEvent from "./components/CalendarFormAddEvent.vue"; import BaseModal from "@/components/base/BaseModal.vue"; import CalendarDeleteModal from "./components/CalendarDeleteModal.vue"; +import { calendarConfig } from "@/pages/calendar/utils/calendarConfig"; + export default { name: "TheCalendar", components: { @@ -84,51 +86,7 @@ export default { isOpenForm: false, WORKING_STATUS: "WORKS", changeFormWasClosed: false, - //TODO: Вынести eventStatuses в config - eventStatuses: [ - { - id: 0, - label: "Планируется прием", - value: "PLANNED", - color: "var(--default-white)", - }, - { - id: 1, - label: "Отменил", - value: "CANCELED", - color: "var(--bg-event-grey-color)", - }, - { - id: 2, - label: "Ожидается прием", - value: "EXPECTED", - color: "var(--bg-event-yellow-color)", - }, - { - id: 3, - label: "Опаздывает", - value: "LATE", - color: "var(--bg-event-orange-color)", - }, - { - id: 4, - label: "Идет прием", - value: "RECEPTION", - color: "var(--bg-event-blue-color)", - }, - { - id: 5, - label: "Прием завершен", - value: "COMPLETED", - color: "var(--bg-event-green-color)", - }, - { - id: 6, - label: "Не пришел", - value: "DID_NOT_COME", - color: "var(--bg-event-red-color)", - }, - ], + eventStatuses: calendarConfig, }; }, methods: { diff --git a/src/pages/calendar/utils/calendarConfig.js b/src/pages/calendar/utils/calendarConfig.js new file mode 100644 index 0000000..9bd2ac5 --- /dev/null +++ b/src/pages/calendar/utils/calendarConfig.js @@ -0,0 +1,44 @@ +export const calendarConfig = [ + { + id: 0, + label: "Планируется прием", + value: "PLANNED", + color: "var(--default-white)", + }, + { + id: 1, + label: "Отменил", + value: "CANCELED", + color: "var(--bg-event-grey-color)", + }, + { + id: 2, + label: "Ожидается прием", + value: "EXPECTED", + color: "var(--bg-event-yellow-color)", + }, + { + id: 3, + label: "Опаздывает", + value: "LATE", + color: "var(--bg-event-orange-color)", + }, + { + id: 4, + label: "Идет прием", + value: "RECEPTION", + color: "var(--bg-event-blue-color)", + }, + { + id: 5, + label: "Прием завершен", + value: "COMPLETED", + color: "var(--bg-event-green-color)", + }, + { + id: 6, + label: "Не пришел", + value: "DID_NOT_COME", + color: "var(--bg-event-red-color)", + }, +]; diff --git a/src/pages/schedule/components/FormChangeShift.vue b/src/pages/schedule/components/FormChangeShift.vue index 283bf3d..33259ef 100644 --- a/src/pages/schedule/components/FormChangeShift.vue +++ b/src/pages/schedule/components/FormChangeShift.vue @@ -1,5 +1,5 @@