1
This commit is contained in:
parent
152d3c6fa9
commit
04f4346122
@ -65,6 +65,8 @@
|
|||||||
import { useUserInfoStore } from '@/stores/useUserInfoStore';
|
import { useUserInfoStore } from '@/stores/useUserInfoStore';
|
||||||
import { useProjectStore } from '@/stores/useProjectStore';
|
import { useProjectStore } from '@/stores/useProjectStore';
|
||||||
import { useToastStore } from '@s/toastStore';
|
import { useToastStore } from '@s/toastStore';
|
||||||
|
import { useWeatherStore } from '@/stores/useWeatherStore';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
import FullCalendar from '@fullcalendar/vue3';
|
import FullCalendar from '@fullcalendar/vue3';
|
||||||
import dayGridPlugin from '@fullcalendar/daygrid';
|
import dayGridPlugin from '@fullcalendar/daygrid';
|
||||||
import interactionPlugin from '@fullcalendar/interaction';
|
import interactionPlugin from '@fullcalendar/interaction';
|
||||||
@ -79,11 +81,14 @@
|
|||||||
const user = ref({});
|
const user = ref({});
|
||||||
const userStore = useUserInfoStore();
|
const userStore = useUserInfoStore();
|
||||||
const projectStore = useProjectStore();
|
const projectStore = useProjectStore();
|
||||||
|
const weatherStore = useWeatherStore();
|
||||||
|
const { dailyWeatherList } = storeToRefs(weatherStore);
|
||||||
|
|
||||||
const dayjs = inject('dayjs');
|
const dayjs = inject('dayjs');
|
||||||
const fullCalendarRef = ref(null);
|
const fullCalendarRef = ref(null);
|
||||||
const workTimeComponentRef = ref(null);
|
const workTimeComponentRef = ref(null);
|
||||||
const calendarEvents = ref([]);
|
const calendarEvents = ref([]);
|
||||||
|
//const dailyWeatherList = ref([]);
|
||||||
|
|
||||||
const selectedProject = ref(null);
|
const selectedProject = ref(null);
|
||||||
const checkedInProject = ref(null);
|
const checkedInProject = ref(null);
|
||||||
@ -134,7 +139,7 @@
|
|||||||
|
|
||||||
// 기존의 공휴일 이벤트는 유지
|
// 기존의 공휴일 이벤트는 유지
|
||||||
const holidayEvents = calendarEvents.value.filter(event => event.classNames?.includes('holiday-event'));
|
const holidayEvents = calendarEvents.value.filter(event => event.classNames?.includes('holiday-event'));
|
||||||
calendarEvents.value = [...holidayEvents];
|
calendarEvents.value = [...holidayEvents, ...dailyWeatherList.value];
|
||||||
|
|
||||||
// 생일자
|
// 생일자
|
||||||
if (res?.memberBirthdayList?.length) {
|
if (res?.memberBirthdayList?.length) {
|
||||||
@ -550,6 +555,13 @@
|
|||||||
param.append('month', month);
|
param.append('month', month);
|
||||||
param.append('day', day);
|
param.append('day', day);
|
||||||
|
|
||||||
|
if (!weatherStore.dailyWeatherList?.length) {
|
||||||
|
console.log(123);
|
||||||
|
await weatherStore.getWeatherInfo();
|
||||||
|
//dailyWeatherList.value = weatherStore.dailyWeatherList;
|
||||||
|
console.log('dailyWeatherList.value: ', dailyWeatherList.value);
|
||||||
|
}
|
||||||
|
|
||||||
// 이벤트 카테고리 호출
|
// 이벤트 카테고리 호출
|
||||||
await fetchCategoryList();
|
await fetchCategoryList();
|
||||||
await fetchEventList(param);
|
await fetchEventList(param);
|
||||||
|
|||||||
@ -42,6 +42,7 @@ export const useWeatherStore = defineStore('weather', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dailyWeatherList.value = resData.dailyWeatherList;
|
dailyWeatherList.value = resData.dailyWeatherList;
|
||||||
|
console.log('dailyWeatherList.value: ', dailyWeatherList.value);
|
||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const closest = data.list.reduce((prev, curr) => {
|
const closest = data.list.reduce((prev, curr) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user