Skip to content

Commit

Permalink
Update CalendarComponent.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
aowz committed Apr 26, 2024
1 parent 48a74ae commit dfc62f8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/CalendarComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default {
let user_data = await getDoc(doc(db, "User", this.user_id));
let personal_calendars = objToMap(user_data.data().personal_calendars);
let shared_calendars = objToMap(user_data.data().shared_calendars);
let cal = user_data.data().misc_calendar
let cal = user_data.data().misc_calendar;
this.miscCal_id = cal;
//adding personal calendar id from personal calendars
if (personal_calendars.size > 0) {
Expand Down Expand Up @@ -181,7 +181,10 @@ export default {
let tagData = tagDoc.data();
this.injectStyles(tagData);
if (tagData) {
const safeClassName = tagData.calendar_name.replace(/\s+/g, "-");
const safeClassName = tagData.calendar_name.replace(
/[\s\/\\]+/g,
"-"
);
console.log(tagData.title);
this.events.push({
title: tagData.title,
Expand Down Expand Up @@ -209,7 +212,7 @@ export default {
this.injectStyles(tagData);
if (tagData) {
const safeClassName = tagData.calendar_name.replace(
/\s+/g,
/[\s\/\\]+/g,
"-"
);
console.log(tagData.title);
Expand Down Expand Up @@ -299,7 +302,7 @@ export default {
}
const color = tag.color || "#a04646"; // Default color
const safeClassName = className.replace(/\s+/g, "-");
const safeClassName = className.replace(/[\s\/\\]+/g, "-");
const cssRule = `.vuecal__event.${safeClassName} { background-color: ${color}; border: 0.001px solid #fff; color: #fff; }`;
Expand All @@ -313,7 +316,7 @@ export default {
},
refreshCalendar() {
console.log('refreshing')
console.log("refreshing");
this.events = [];
this.populate_cal_colour_and_cal_id();
},
Expand Down

0 comments on commit dfc62f8

Please sign in to comment.