This commit is contained in:
nevermoregb 2025-04-04 22:59:36 +09:00
parent 152d3c6fa9
commit 04f4346122
2 changed files with 14 additions and 1 deletions

View File

@ -65,6 +65,8 @@
import { useUserInfoStore } from '@/stores/useUserInfoStore';
import { useProjectStore } from '@/stores/useProjectStore';
import { useToastStore } from '@s/toastStore';
import { useWeatherStore } from '@/stores/useWeatherStore';
import { storeToRefs } from 'pinia';
import FullCalendar from '@fullcalendar/vue3';
import dayGridPlugin from '@fullcalendar/daygrid';
import interactionPlugin from '@fullcalendar/interaction';
@ -79,11 +81,14 @@
const user = ref({});
const userStore = useUserInfoStore();
const projectStore = useProjectStore();
const weatherStore = useWeatherStore();
const { dailyWeatherList } = storeToRefs(weatherStore);
const dayjs = inject('dayjs');
const fullCalendarRef = ref(null);
const workTimeComponentRef = ref(null);
const calendarEvents = ref([]);
//const dailyWeatherList = ref([]);
const selectedProject = ref(null);
const checkedInProject = ref(null);
@ -134,7 +139,7 @@
//
const holidayEvents = calendarEvents.value.filter(event => event.classNames?.includes('holiday-event'));
calendarEvents.value = [...holidayEvents];
calendarEvents.value = [...holidayEvents, ...dailyWeatherList.value];
//
if (res?.memberBirthdayList?.length) {
@ -550,6 +555,13 @@
param.append('month', month);
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 fetchEventList(param);

View File

@ -42,6 +42,7 @@ export const useWeatherStore = defineStore('weather', () => {
}
dailyWeatherList.value = resData.dailyWeatherList;
console.log('dailyWeatherList.value: ', dailyWeatherList.value);
const now = new Date();
const closest = data.list.reduce((prev, curr) => {