События календаря
This commit is contained in:
1 parent
347d89e762
commit
3f5116dedc
2 files changed
+129
-53
No files matched your search
@@ -1,25 +1,32 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <my-helper :pretext="kl" /> -->
|
||||
<v-btn @click="useICalReader"> ical</v-btn>
|
||||
|
||||
<v-btn @click="useICalReader"> ical</v-btn>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {useICalReader} from '@/utils/universal_functions'
|
||||
import { baseURL, axiosApiInstance } from '@/utils/axios-api'
|
||||
import { ref } from 'vue';
|
||||
import { baseURL, axiosApiInstance } from "@/utils/axios-api";
|
||||
import { ref } from "vue";
|
||||
import ical from "ical.js";
|
||||
import { formatDash } from '@/utils/universal_functions'
|
||||
import { formatDash } from "@/utils/universal_functions";
|
||||
|
||||
const burl = baseURL.slice(0,-1)
|
||||
const burl = baseURL.slice(0, -1);
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const participant = ref('')
|
||||
const calendar = ref('')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const participant = ref("");
|
||||
const calendar = ref("");
|
||||
const useICalReader = async () => {
|
||||
const response = await fetch(`${burl}/media/ical/calendar.ics`);
|
||||
const data = await response.text();
|
||||
@@ -39,50 +46,32 @@ export default {
|
||||
start: event.startDate.toJSDate(),
|
||||
end: event.endDate.toJSDate(),
|
||||
location: event.location,
|
||||
attendees: event.attendees
|
||||
}
|
||||
})
|
||||
participant.value = name
|
||||
calendar.value = calendarEvents
|
||||
console.log(name, 'name')
|
||||
console.log(calendarEvents, 'calendarEventse')
|
||||
f_feedbackdata()
|
||||
// return {
|
||||
// type: "calendar",
|
||||
// title: name,
|
||||
// calendar: calendarEvents,
|
||||
// }
|
||||
}
|
||||
attendees: event.attendees,
|
||||
};
|
||||
});
|
||||
participant.value = name;
|
||||
calendar.value = calendarEvents;
|
||||
console.log(name, "name");
|
||||
console.log(calendarEvents, "calendarEventse");
|
||||
f_feedbackdata();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// const s= useICalReader(`${burl}/media/ical/calendar.ics`)
|
||||
// console.log(s.value, 'ddddddddd')
|
||||
function f_feedbackdata() {
|
||||
axiosApiInstance.post(`api/calendar_of_events/calendarEvents/`, {
|
||||
participants: participant.value,
|
||||
calendar: calendar.value
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data,'datas')
|
||||
}
|
||||
)
|
||||
axiosApiInstance
|
||||
.post(`api/calendar_of_events/calendarEvents/`, {
|
||||
participants: participant.value,
|
||||
calendar: calendar.value,
|
||||
})
|
||||
.then((data) => {
|
||||
console.log(data, "datas");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
useICalReader
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
useICalReader, selectedEvent
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<style></style>
|
||||
Reference in new issue
Block a user