update calendar fixes, WIP create trajet

This commit is contained in:
Tiavina 2024-12-20 16:43:50 +03:00
parent 8f0eee2446
commit b56b6e1d50
6 changed files with 17 additions and 10 deletions

View File

@ -37,6 +37,7 @@ import MapMarker from 'vue-material-design-icons/MapMarker.vue'
import Tag from 'vue-material-design-icons/Tag.vue' import Tag from 'vue-material-design-icons/Tag.vue'
import TextBoxOutline from 'vue-material-design-icons/TextBoxOutline.vue' import TextBoxOutline from 'vue-material-design-icons/TextBoxOutline.vue'
import Bell from 'vue-material-design-icons/Bell.vue' import Bell from 'vue-material-design-icons/Bell.vue'
import Human from 'vue-material-design-icons/Human.vue'
export default { export default {
components: { components: {
@ -48,6 +49,7 @@ export default {
Tag, Tag,
TextBoxOutline, TextBoxOutline,
Bell, Bell,
Human
}, },
props: { props: {
/** /**

View File

@ -134,7 +134,6 @@ const setCustomKeyValueToIcsAndReturnIcs = (ics, key,value) => {
} }
const setCustomKeyValuesArrayToIcsAndReturnIcs = (ics, keyValueArray) => { const setCustomKeyValuesArrayToIcsAndReturnIcs = (ics, keyValueArray) => {
debugger
for (var key in keyValueArray) { for (var key in keyValueArray) {
const value = keyValueArray[key] ? keyValueArray[key] : ''; const value = keyValueArray[key] ? keyValueArray[key] : '';
ics = setCustomKeyValueToIcsAndReturnIcs(ics, key, value); ics = setCustomKeyValueToIcsAndReturnIcs(ics, key, value);

View File

@ -106,8 +106,8 @@ const mapEventComponentToEventObject = (eventComponent) => {
isAllDay: eventComponent.isAllDay(), isAllDay: eventComponent.isAllDay(),
canModifyAllDay: eventComponent.canModifyAllDay(), canModifyAllDay: eventComponent.canModifyAllDay(),
location: eventComponent.location, location: eventComponent.location,
client : eventComponent.client, client : "CLIENT",
embalmer : eventComponent.embalmer, embalmer : "TEST",
description: eventComponent.description, description: eventComponent.description,
accessClass: eventComponent.accessClass, accessClass: eventComponent.accessClass,
status: eventComponent.status, status: eventComponent.status,
@ -193,7 +193,15 @@ const mapEventComponentToEventObject = (eventComponent) => {
} }
} }
return eventObject if(eventComponent.hasProperty('CLIENT')){
eventObject.client = eventComponent.getFirstPropertyFirstValue('CLIENT');
}
if(eventComponent.hasProperty('EMBALMER')){
eventObject.embalmer = eventComponent.getFirstPropertyFirstValue('EMBALMER');
}
return eventObject;
} }
/** /**

View File

@ -127,7 +127,7 @@ const getRFCProperties = () => {
clients: { clients: {
readableName: t('calendar', 'Clients'), readableName: t('calendar', 'Clients'),
icon: 'Tag', icon: 'Human',
searchable: true, searchable: true,
multiple: false, multiple: false,
info: t('calendar', 'Client from Gestion'), info: t('calendar', 'Client from Gestion'),
@ -139,12 +139,12 @@ const getRFCProperties = () => {
client: { client: {
readableName: t('calendar', 'client'), readableName: t('calendar', 'client'),
placeholder: t('calendar', 'Add a client'), placeholder: t('calendar', 'Add a client'),
icon: 'User', icon: 'Human',
}, },
embalmers: { embalmers: {
readableName: t('calendar', 'Embalmers'), readableName: t('calendar', 'Embalmers'),
icon: 'User', icon: 'Human',
searchable: true, searchable: true,
multiple: false, multiple: false,
info: t('calendar', 'Thanatopracteur from Gestion'), info: t('calendar', 'Thanatopracteur from Gestion'),
@ -156,7 +156,7 @@ const getRFCProperties = () => {
embalmer: { embalmer: {
readableName: t('calendar', 'Embalmer'), readableName: t('calendar', 'Embalmer'),
placeholder: t('calendar', 'Add a thanatopracteur'), placeholder: t('calendar', 'Add a thanatopracteur'),
icon: 'MapMarker', icon: 'Human',
}, },
articles: { articles: {

View File

@ -1684,7 +1684,6 @@ const actions = {
async saveCalendarObjectInstance({ state, dispatch, commit }, { thisAndAllFuture, calendarId }) { async saveCalendarObjectInstance({ state, dispatch, commit }, { thisAndAllFuture, calendarId }) {
const eventComponent = state.calendarObjectInstance.eventComponent const eventComponent = state.calendarObjectInstance.eventComponent
const calendarObject = state.calendarObject const calendarObject = state.calendarObject
debugger
updateAlarms(eventComponent) updateAlarms(eventComponent)
updateTalkParticipants(eventComponent) updateTalkParticipants(eventComponent)

View File

@ -224,7 +224,6 @@ const actions = {
* @return {Promise<void>} * @return {Promise<void>}
*/ */
async updateCalendarObject(context, { calendarObject }) { async updateCalendarObject(context, { calendarObject }) {
debugger
let eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT'); let eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT');
if (calendarObject.existsOnServer) { if (calendarObject.existsOnServer) {
calendarObject.dav.data = calendarObject.calendarComponent.toICS() calendarObject.dav.data = calendarObject.calendarComponent.toICS()