@dative-gpi/foundation-shared-components 1.0.56 → 1.0.58-groupings
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/map/snow.png +0 -0
- package/components/FSAccordionPanel.vue +40 -21
- package/components/FSBreadcrumbs.vue +21 -12
- package/components/FSButton.vue +16 -16
- package/components/FSCalendar.vue +50 -12
- package/components/FSCalendarTwin.vue +95 -43
- package/components/FSCard.vue +61 -9
- package/components/FSCardPlaceholder.vue +8 -5
- package/components/FSCheckbox.vue +5 -4
- package/components/FSChip.vue +73 -45
- package/components/FSChipGroup.vue +69 -0
- package/components/FSClickable.vue +11 -9
- package/components/FSClock.vue +30 -12
- package/components/FSCol.vue +11 -5
- package/components/FSColorIcon.vue +23 -5
- package/components/FSDialog.vue +2 -1
- package/components/FSDialogContent.vue +12 -11
- package/components/FSDialogForm.vue +22 -2
- package/components/FSDialogFormBody.vue +50 -31
- package/components/FSDialogMenu.vue +17 -8
- package/components/FSDialogMultiFormBody.vue +79 -56
- package/components/FSDialogRemove.vue +7 -8
- package/components/FSDialogSubmit.vue +20 -11
- package/components/FSEditImage.vue +1 -1
- package/components/FSEditImageUI.vue +20 -10
- package/components/FSFadeOut.vue +53 -21
- package/components/FSForm.vue +10 -8
- package/components/FSGrid.vue +1 -1
- package/components/FSIcon.vue +4 -3
- package/components/FSIconCard.vue +68 -12
- package/components/FSImage.vue +9 -2
- package/components/FSImageUI.vue +8 -15
- package/components/FSInformationsMenu.vue +142 -0
- package/components/FSInstantPicker.vue +269 -0
- package/components/FSLink.vue +25 -9
- package/components/FSLoader.vue +28 -10
- package/components/FSMenu.vue +47 -0
- package/components/FSOptionGroup.vue +57 -9
- package/components/FSOptionItem.vue +4 -4
- package/components/FSPagination.vue +1 -1
- package/components/FSPlayButtons.vue +72 -0
- package/components/FSProgressBar.vue +94 -0
- package/components/FSRadio.vue +5 -4
- package/components/FSRadioGroup.vue +3 -3
- package/components/FSRouterLink.vue +42 -0
- package/components/FSSlideGroup.vue +19 -5
- package/components/FSSlider.vue +6 -5
- package/components/FSSpan.vue +12 -7
- package/components/FSSwitch.vue +47 -21
- package/components/FSTab.vue +15 -13
- package/components/FSTabs.vue +32 -7
- package/components/FSTag.vue +16 -5
- package/components/FSTagGroup.vue +4 -4
- package/components/FSText.vue +11 -7
- package/components/FSToggleSet.vue +7 -7
- package/components/FSWindow.vue +122 -5
- package/components/FSWrapGroup.vue +13 -1
- package/components/agenda/FSAgenda.vue +50 -37
- package/components/agenda/FSAgendaDialogCalendar.vue +2 -2
- package/components/agenda/FSAgendaHeader.vue +35 -10
- package/components/agenda/FSAgendaHorizontalEvent.vue +18 -6
- package/components/agenda/FSAgendaHoursRow.vue +48 -8
- package/components/agenda/FSAgendaVerticalEvent.vue +1 -1
- package/components/agenda/FSDayAgenda.vue +1 -2
- package/components/agenda/FSMonthAgenda.vue +3 -9
- package/components/agenda/FSSelectAgendaMode.vue +2 -2
- package/components/agenda/FSWeekAgenda.vue +7 -13
- package/components/autocompletes/FSAutoCompleteAddress.vue +25 -20
- package/components/autocompletes/FSAutocompleteLanguage.vue +7 -1
- package/components/autocompletes/FSAutocompleteTimeZone.vue +7 -1
- package/components/buttons/FSButtonAdd.vue +1 -1
- package/components/buttons/FSButtonAddLabel.vue +1 -1
- package/components/buttons/FSButtonCancel.vue +1 -1
- package/components/buttons/FSButtonCancelLabel.vue +1 -1
- package/components/buttons/FSButtonCheckbox.vue +4 -4
- package/components/buttons/FSButtonCopy.vue +1 -1
- package/components/buttons/FSButtonCopyLabel.vue +1 -1
- package/components/buttons/FSButtonDuplicate.vue +1 -1
- package/components/buttons/FSButtonDuplicateLabel.vue +1 -1
- package/components/buttons/FSButtonEdit.vue +1 -1
- package/components/buttons/FSButtonEditLabel.vue +1 -1
- package/components/buttons/FSButtonFile.vue +1 -1
- package/components/buttons/FSButtonFileLabel.vue +1 -1
- package/components/buttons/FSButtonNext.vue +1 -1
- package/components/buttons/FSButtonNextLabel.vue +1 -1
- package/components/buttons/FSButtonPrevious.vue +1 -1
- package/components/buttons/FSButtonPreviousLabel.vue +1 -1
- package/components/buttons/FSButtonRedo.vue +1 -1
- package/components/buttons/FSButtonRedoLabel.vue +1 -1
- package/components/buttons/FSButtonRemove.vue +1 -1
- package/components/buttons/FSButtonRemoveLabel.vue +1 -1
- package/components/buttons/FSButtonSave.vue +1 -1
- package/components/buttons/FSButtonSaveLabel.vue +1 -1
- package/components/buttons/FSButtonSearch.vue +1 -1
- package/components/buttons/FSButtonSearchLabel.vue +1 -1
- package/components/buttons/FSButtonUndo.vue +1 -1
- package/components/buttons/FSButtonUndoLabel.vue +1 -1
- package/components/buttons/FSButtonUpdate.vue +1 -1
- package/components/buttons/FSButtonUpdateLabel.vue +1 -1
- package/components/buttons/FSButtonValidate.vue +1 -1
- package/components/buttons/FSButtonValidateLabel.vue +1 -1
- package/components/calendar/FSSimpleCalendar.vue +145 -0
- package/components/calendar/FSSimpleCalendarHeader.vue +60 -0
- package/components/calendar/FSSimpleMonthSelector.vue +138 -0
- package/components/deviceOrganisations/FSConnectivity.vue +16 -4
- package/components/deviceOrganisations/FSConnectivityCard.vue +17 -45
- package/components/deviceOrganisations/FSStatus.vue +16 -4
- package/components/deviceOrganisations/FSStatusCard.vue +33 -59
- package/components/deviceOrganisations/FSStatusRichCard.vue +171 -0
- package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
- package/components/deviceOrganisations/FSStatusesRow.vue +8 -2
- package/components/deviceOrganisations/FSWorstAlert.vue +37 -42
- package/components/deviceOrganisations/FSWorstAlertCard.vue +35 -84
- package/components/fields/FSAutocompleteField.vue +85 -82
- package/components/fields/FSAutocompleteTag.vue +1 -1
- package/components/fields/FSBaseField.vue +54 -30
- package/components/fields/FSClosableSearchField.vue +83 -0
- package/components/fields/FSColorField.vue +48 -44
- package/components/fields/FSCommentField.vue +28 -16
- package/components/fields/FSDateField.vue +13 -10
- package/components/fields/FSDateRangeField.vue +6 -5
- package/components/fields/FSDateTimeField.vue +14 -11
- package/components/fields/FSDateTimeRangeDialog.vue +160 -0
- package/components/fields/FSDateTimeRangeField.vue +23 -115
- package/components/fields/FSEntityFieldUI.vue +36 -19
- package/components/fields/FSGradientField.vue +5 -5
- package/components/fields/FSIconField.vue +16 -9
- package/components/fields/FSMagicConfigField.vue +15 -7
- package/components/fields/FSMagicField.vue +7 -2
- package/components/fields/FSNumberField.vue +9 -4
- package/components/fields/FSPasswordField.vue +7 -7
- package/components/fields/FSRichTextField.vue +78 -58
- package/components/fields/FSSearchField.vue +9 -115
- package/components/fields/FSSelectField.vue +69 -71
- package/components/fields/FSTagField.vue +10 -10
- package/components/fields/FSTermField.vue +72 -47
- package/components/fields/FSTextArea.vue +17 -11
- package/components/fields/FSTextField.vue +15 -10
- package/components/fields/FSTimeField.vue +14 -10
- package/components/fields/FSTimeRangeField.vue +310 -0
- package/components/fields/FSTimeStepField.vue +5 -5
- package/components/fields/FSTranslateField.vue +10 -10
- package/components/fields/FSTranslateRichTextField.vue +41 -20
- package/components/fields/FSTranslateTextArea.vue +10 -10
- package/components/fields/FSTreeViewField.vue +15 -13
- package/components/fields/periodicField/FSPeriodicDailyField.vue +7 -7
- package/components/fields/periodicField/FSPeriodicField.vue +15 -15
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +16 -16
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +28 -18
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +12 -12
- package/components/lists/FSDataIteratorItem.vue +23 -67
- package/components/lists/FSDataTableUI.vue +220 -137
- package/components/lists/FSDraggable.vue +2 -2
- package/components/lists/FSFilterButton.vue +14 -16
- package/components/lists/FSHeaderButton.vue +11 -9
- package/components/lists/FSHiddenButton.vue +9 -9
- package/components/lists/FSLoadDataTable.vue +10 -7
- package/components/lists/FSSimpleList.vue +96 -102
- package/components/lists/FSSimpleListItem.vue +131 -0
- package/components/map/FSMap.vue +146 -158
- package/components/map/FSMapFeatureGroup.vue +7 -1
- package/components/map/FSMapLayerButton.vue +4 -3
- package/components/map/FSMapMarker.vue +70 -48
- package/components/map/FSMapMarkerClusterGroup.vue +32 -7
- package/components/map/FSMapOverlay.vue +44 -24
- package/components/map/FSMapPolygon.vue +16 -4
- package/components/map/FSMapTileLayer.vue +26 -9
- package/components/map/layers.ts +0 -0
- package/components/selects/FSSelectAutoRefresh.vue +8 -8
- package/components/selects/FSSelectDashboardVariableType.vue +4 -3
- package/components/selects/FSSelectDateSetting.vue +2 -2
- package/components/selects/FSSelectDays.vue +8 -8
- package/components/selects/FSSelectListMode.vue +2 -2
- package/components/selects/FSSelectMapLayer.vue +68 -0
- package/components/selects/FSSelectMonths.vue +13 -13
- package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
- package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
- package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
- package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
- package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
- package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
- package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
- package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
- package/components/tiles/FSAlertTileUI.vue +90 -0
- package/components/tiles/FSChartTileUI.vue +61 -52
- package/components/tiles/FSCommentTileUI.vue +38 -13
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +14 -2
- package/components/tiles/FSDashboardShallowTileUI.vue +14 -2
- package/components/tiles/FSDeviceOrganisationTileUI.vue +6 -6
- package/components/tiles/FSGroupTileUI.vue +58 -110
- package/components/tiles/FSGroupingTileUI.vue +115 -0
- package/components/tiles/FSLoadTile.vue +16 -10
- package/components/tiles/FSLocationTileUI.vue +63 -55
- package/components/tiles/FSModelTileUI.vue +5 -46
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
- package/components/tiles/FSSimpleTileUI.vue +34 -29
- package/components/tiles/FSTile.vue +46 -39
- package/components/tiles/FSUserOrganisationTileUI.vue +1 -7
- package/components/toggleSets/FSToggleSetPosition.vue +1 -1
- package/components/views/FSBaseView.vue +64 -0
- package/components/views/FSEntityView.vue +12 -140
- package/components/views/FSSimpleView.vue +29 -0
- package/components/views/desktop/FSBaseDefaultDesktopView.vue +135 -0
- package/components/views/desktop/FSBaseDesktopView.vue +53 -0
- package/components/views/desktop/FSBaseEntityDesktopView.vue +211 -0
- package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
- package/components/views/mobile/FSBaseEntityMobileView.vue +206 -0
- package/components/views/mobile/FSBaseMobileView.vue +53 -0
- package/composables/index.ts +1 -0
- package/composables/useAddress.ts +40 -8
- package/composables/useBreakpoints.ts +40 -4
- package/composables/useColors.ts +16 -7
- package/composables/useMagicFieldProvider.ts +1 -0
- package/composables/useMapLayers.ts +62 -0
- package/composables/useSlots.ts +2 -1
- package/models/colors.ts +2 -1
- package/models/deviceAlerts.ts +1 -0
- package/models/magicFields.ts +1 -0
- package/models/map.ts +12 -10
- package/models/rules.ts +6 -3
- package/models/tables.ts +5 -2
- package/models/variableNode.ts +8 -5
- package/package.json +5 -5
- package/styles/components/fs_agenda.scss +4 -0
- package/styles/components/fs_agenda_event.scss +1 -1
- package/styles/components/fs_agenda_hours_row.scss +0 -8
- package/styles/components/fs_autocomplete_field.scss +0 -13
- package/styles/components/fs_breadcrumbs.scss +18 -36
- package/styles/components/fs_button.scss +7 -5
- package/styles/components/fs_calendar.scss +1 -0
- package/styles/components/fs_card.scss +9 -0
- package/styles/components/fs_chip.scss +13 -7
- package/styles/components/fs_clickable.scss +16 -23
- package/styles/components/fs_clock.scss +0 -10
- package/styles/components/fs_col.scss +1 -1
- package/styles/components/fs_color_field.scss +1 -4
- package/styles/components/fs_data_table.scss +6 -9
- package/styles/components/fs_dialog.scss +4 -10
- package/styles/components/fs_dialog_menu.scss +4 -2
- package/styles/components/fs_draggable.scss +0 -5
- package/styles/components/fs_edit_image.scss +8 -0
- package/styles/components/fs_fade_out.scss +10 -2
- package/styles/components/fs_filter_button.scss +1 -6
- package/styles/components/fs_hidden_button.scss +2 -7
- package/styles/components/fs_image_card.scss +6 -4
- package/styles/components/fs_magic_config_field.scss +1 -2
- package/styles/components/fs_map.scss +57 -17
- package/styles/components/fs_meta_field.scss +3 -5
- package/styles/components/fs_option_group.scss +15 -5
- package/styles/components/fs_password_field.scss +4 -2
- package/styles/components/fs_progress_bar.scss +14 -0
- package/styles/components/fs_radio.scss +0 -11
- package/styles/components/fs_rich_text_field.scss +1 -10
- package/styles/components/fs_select_field.scss +4 -13
- package/styles/components/fs_slide_group.scss +7 -0
- package/styles/components/fs_span.scss +13 -5
- package/styles/components/fs_status_rich_card.scss +6 -0
- package/styles/components/fs_switch.scss +1 -0
- package/styles/components/fs_tabs.scss +19 -33
- package/styles/components/fs_tag.scss +8 -22
- package/styles/components/fs_text_area.scss +2 -21
- package/styles/components/fs_tile.scss +0 -19
- package/styles/components/fs_window.scss +3 -1
- package/styles/components/fs_wrap_group.scss +7 -0
- package/styles/components/index.scss +2 -6
- package/styles/globals/index.scss +1 -5
- package/styles/globals/overrides.scss +28 -61
- package/styles/globals/scrollbars.scss +8 -0
- package/styles/globals/text_fonts.scss +18 -66
- package/styles/globals/touchscreen.scss +2 -2
- package/tools/alertsTools.ts +87 -12
- package/tools/chartsTools.ts +143 -16
- package/tools/index.ts +3 -1
- package/tools/reportsTools.ts +38 -0
- package/tools/timeRangeTools.ts +125 -0
- package/utils/badge.ts +9 -5
- package/utils/filter.ts +7 -4
- package/utils/index.ts +1 -0
- package/utils/leafletMarkers.ts +4 -4
- package/utils/operations.ts +108 -0
- package/utils/sort.ts +2 -2
- package/utils/time.ts +16 -16
- package/components/fields/FSTimeSlotField.vue +0 -250
- package/components/views/FSEntityHeader.vue +0 -350
- package/components/views/FSListHeader.vue +0 -83
- package/components/views/FSListView.vue +0 -83
- package/components/views/FSSkeletonView.vue +0 -100
- package/styles/components/fs_data_iterator_item.scss +0 -33
- package/styles/components/fs_icon_field.scss +0 -12
- package/styles/components/fs_search_field.scss +0 -3
- package/styles/components/fs_tag_field.scss +0 -8
- package/styles/components/fs_time_field.scss +0 -12
- package/styles/components/fs_timeslot_field.scss +0 -12
- package/styles/globals/breakpoints.scss +0 -20
- package/styles/globals/fixes.scss +0 -5
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
|
+
v-if="$props.start && $props.end"
|
|
3
4
|
:height="$props.height"
|
|
4
5
|
:width="$props.width"
|
|
5
6
|
gap="24px"
|
|
6
7
|
>
|
|
7
8
|
<FSAgendaHeader
|
|
8
9
|
:mode="$props.mode!"
|
|
9
|
-
:start="start"
|
|
10
|
-
:end="end"
|
|
10
|
+
:start="$props.start"
|
|
11
|
+
:end="$props.end"
|
|
11
12
|
:now="now"
|
|
12
13
|
@update:start="($event) => $emit('update:start', $event)"
|
|
13
14
|
@update:end="($event) => $emit('update:end', $event)"
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
:value="AgendaMode.Day"
|
|
29
30
|
:events="$props.events"
|
|
30
31
|
:firstColumnWidth="dayColumnWidth"
|
|
31
|
-
:start="start"
|
|
32
|
-
:end="end"
|
|
32
|
+
:start="$props.start"
|
|
33
|
+
:end="$props.end"
|
|
33
34
|
:now="now"
|
|
34
35
|
:nowIsInSelectedRange="nowIsInSelectedRange"
|
|
35
36
|
:loading="$props.loading"
|
|
@@ -44,8 +45,8 @@
|
|
|
44
45
|
:value="AgendaMode.Week"
|
|
45
46
|
:events="$props.events"
|
|
46
47
|
:firstColumnWidth="dayColumnWidth"
|
|
47
|
-
:start="start"
|
|
48
|
-
:end="end"
|
|
48
|
+
:start="$props.start"
|
|
49
|
+
:end="$props.end"
|
|
49
50
|
:now="now"
|
|
50
51
|
:nowIsInSelectedRange="nowIsInSelectedRange"
|
|
51
52
|
:loading="$props.loading"
|
|
@@ -60,8 +61,8 @@
|
|
|
60
61
|
:value="AgendaMode.Month"
|
|
61
62
|
:events="$props.events"
|
|
62
63
|
:firstColumnWidth="dayColumnWidth"
|
|
63
|
-
:start="start"
|
|
64
|
-
:end="end"
|
|
64
|
+
:start="$props.start"
|
|
65
|
+
:end="$props.end"
|
|
65
66
|
:now="now"
|
|
66
67
|
:nowIsInSelectedRange="nowIsInSelectedRange"
|
|
67
68
|
:loading="$props.loading"
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
</template>
|
|
79
80
|
|
|
80
81
|
<script lang="ts">
|
|
81
|
-
import { defineComponent, type PropType, computed, ref, onUnmounted, watch } from 'vue';
|
|
82
|
+
import { defineComponent, type PropType, computed, ref, onUnmounted, watch, onMounted } from 'vue';
|
|
82
83
|
|
|
83
84
|
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
84
85
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -140,7 +141,7 @@ export default defineComponent({
|
|
|
140
141
|
required: false
|
|
141
142
|
}
|
|
142
143
|
},
|
|
143
|
-
emits: ['update:mode', 'click:eventId', 'update:start', 'update:end'],
|
|
144
|
+
emits: ['update', 'update:mode', 'click:eventId', 'update:start', 'update:end'],
|
|
144
145
|
setup(props, { emit }) {
|
|
145
146
|
const { todayToEpoch, epochToLocalDayStart, epochToLocalDayEnd } = useDateFormat();
|
|
146
147
|
const { isExtraSmall } = useBreakpoints();
|
|
@@ -150,41 +151,45 @@ export default defineComponent({
|
|
|
150
151
|
const now = ref(todayToEpoch());
|
|
151
152
|
const defaultMode = ref(props.mode);
|
|
152
153
|
|
|
153
|
-
const
|
|
154
|
-
if (props.start) {
|
|
155
|
-
return
|
|
156
|
-
}
|
|
157
|
-
if (props.mode === AgendaMode.Week) {
|
|
158
|
-
return epochToLocalDayStart(now.value - (new Date(now.value).getDay() - 1) * 24 * 60 * 60 * 1000);
|
|
159
|
-
}
|
|
160
|
-
if (props.mode === AgendaMode.Month) {
|
|
161
|
-
return epochToLocalDayStart(new Date(now.value).setDate(1));
|
|
154
|
+
const nowIsInSelectedRange = computed(() => {
|
|
155
|
+
if (!props.start || !props.end) {
|
|
156
|
+
return false;
|
|
162
157
|
}
|
|
163
|
-
return
|
|
158
|
+
return now.value >= props.start && now.value <= props.end;
|
|
164
159
|
});
|
|
165
160
|
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
const nowInterval = setInterval(() => {
|
|
162
|
+
now.value = todayToEpoch();
|
|
163
|
+
}, 10000);
|
|
164
|
+
|
|
165
|
+
onMounted(() => {
|
|
166
|
+
if(props.end && props.start) {
|
|
167
|
+
return;
|
|
169
168
|
}
|
|
170
169
|
if (props.mode === AgendaMode.Week) {
|
|
171
|
-
|
|
170
|
+
const newStart = epochToLocalDayStart(now.value - (new Date(now.value).getDay() - 1) * 24 * 60 * 60 * 1000);
|
|
171
|
+
const newEnd = epochToLocalDayEnd(now.value + (7 - new Date(now.value).getDay()) * 24 * 60 * 60 * 1000);
|
|
172
|
+
emit("update:start", newStart);
|
|
173
|
+
emit("update:end", newEnd);
|
|
174
|
+
emit("update", { start: newStart, end: newEnd, mode: props.mode });
|
|
175
|
+
return;
|
|
172
176
|
}
|
|
173
177
|
if (props.mode === AgendaMode.Month) {
|
|
174
178
|
const lastDayOfMonth = new Date(new Date(now.value).getFullYear(), new Date(now.value).getMonth() + 1, 0);
|
|
175
|
-
|
|
179
|
+
const newStart = epochToLocalDayStart(new Date(now.value).setDate(1));
|
|
180
|
+
const newEnd = lastDayOfMonth.getTime()
|
|
181
|
+
emit("update:start", newStart);
|
|
182
|
+
emit("update:end", newEnd );
|
|
183
|
+
emit("update", { start: newStart, end: newEnd, mode: props.mode });
|
|
184
|
+
return;
|
|
176
185
|
}
|
|
177
|
-
|
|
186
|
+
const newStart = epochToLocalDayStart(now.value);
|
|
187
|
+
const newEnd = epochToLocalDayEnd(now.value);
|
|
188
|
+
emit("update:start", newStart);
|
|
189
|
+
emit("update:end", newEnd);
|
|
190
|
+
emit("update", { start: newStart, end: newEnd, mode: props.mode });
|
|
178
191
|
});
|
|
179
192
|
|
|
180
|
-
const nowIsInSelectedRange = computed(() => {
|
|
181
|
-
return now.value >= start.value && now.value <= end.value;
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
const nowInterval = setInterval(() => {
|
|
185
|
-
now.value = todayToEpoch();
|
|
186
|
-
}, 10000);
|
|
187
|
-
|
|
188
193
|
onUnmounted(() => {
|
|
189
194
|
clearInterval(nowInterval);
|
|
190
195
|
});
|
|
@@ -192,16 +197,24 @@ export default defineComponent({
|
|
|
192
197
|
watch(isExtraSmall, (value) => {
|
|
193
198
|
if (value && props.mode !== AgendaMode.Day) {
|
|
194
199
|
emit('update:mode', AgendaMode.Day);
|
|
200
|
+
emit("update", {
|
|
201
|
+
start: props.start,
|
|
202
|
+
end: props.end,
|
|
203
|
+
mode: AgendaMode.Day
|
|
204
|
+
});
|
|
195
205
|
} else if (!value && defaultMode.value !== AgendaMode.Day) {
|
|
196
206
|
emit('update:mode', defaultMode.value);
|
|
207
|
+
emit("update", {
|
|
208
|
+
start: props.start,
|
|
209
|
+
end: props.end,
|
|
210
|
+
mode: defaultMode.value
|
|
211
|
+
});
|
|
197
212
|
}
|
|
198
|
-
}
|
|
213
|
+
});
|
|
199
214
|
|
|
200
215
|
return {
|
|
201
216
|
AgendaMode,
|
|
202
|
-
start,
|
|
203
217
|
dayColumnWidth,
|
|
204
|
-
end,
|
|
205
218
|
now,
|
|
206
219
|
nowIsInSelectedRange
|
|
207
220
|
};
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
:elevation="true"
|
|
8
8
|
>
|
|
9
9
|
<FSCol
|
|
10
|
-
gap="12px"
|
|
11
10
|
padding="16px"
|
|
11
|
+
gap="12px"
|
|
12
12
|
>
|
|
13
13
|
<FSCalendar
|
|
14
14
|
v-model="calendarValue"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<FSButton
|
|
17
17
|
color="primary"
|
|
18
18
|
width="100%"
|
|
19
|
-
:label="$tr('ui.
|
|
19
|
+
:label="$tr('ui.common.submit', 'Validate')"
|
|
20
20
|
@click="onSubmit"
|
|
21
21
|
/>
|
|
22
22
|
</FSCol>
|
|
@@ -16,12 +16,18 @@
|
|
|
16
16
|
@click="onPrevious"
|
|
17
17
|
/>
|
|
18
18
|
<FSButton
|
|
19
|
-
width="
|
|
19
|
+
width="220px"
|
|
20
20
|
color="primary"
|
|
21
21
|
:border="false"
|
|
22
|
-
:label="epochToMonthYearOnlyFormat($props.start)"
|
|
23
22
|
@click="showCalendarDialog = true"
|
|
24
|
-
|
|
23
|
+
>
|
|
24
|
+
<FSSpan
|
|
25
|
+
class="fs-agenda-header-text"
|
|
26
|
+
font="text-button"
|
|
27
|
+
>
|
|
28
|
+
{{ epochToMonthYearOnlyFormat($props.start) }}
|
|
29
|
+
</FSSpan>
|
|
30
|
+
</FSButton>
|
|
25
31
|
<FSButton
|
|
26
32
|
variant="icon"
|
|
27
33
|
icon="mdi-chevron-right"
|
|
@@ -41,7 +47,7 @@
|
|
|
41
47
|
/>
|
|
42
48
|
<FSButton
|
|
43
49
|
prependIcon="mdi-calendar-today-outline"
|
|
44
|
-
:label="$tr('ui.
|
|
50
|
+
:label="$tr('ui.common.today', 'Today')"
|
|
45
51
|
@click="onToday"
|
|
46
52
|
/>
|
|
47
53
|
</FSRow>
|
|
@@ -52,7 +58,7 @@
|
|
|
52
58
|
>
|
|
53
59
|
<FSButton
|
|
54
60
|
prependIcon="mdi-calendar-today-outline"
|
|
55
|
-
:label="$tr('ui.
|
|
61
|
+
:label="$tr('ui.common.today', 'Today')"
|
|
56
62
|
width="100%"
|
|
57
63
|
@click="onToday"
|
|
58
64
|
/>
|
|
@@ -89,7 +95,7 @@
|
|
|
89
95
|
</template>
|
|
90
96
|
|
|
91
97
|
<script lang="ts">
|
|
92
|
-
import { defineComponent, type PropType, ref } from 'vue';
|
|
98
|
+
import { defineComponent, type PropType, ref, watch } from 'vue';
|
|
93
99
|
|
|
94
100
|
import { useDateFormat } from '@dative-gpi/foundation-shared-services/composables';
|
|
95
101
|
|
|
@@ -100,6 +106,7 @@ import FSRow from '../FSRow.vue';
|
|
|
100
106
|
import FSButton from '../FSButton.vue';
|
|
101
107
|
import FSSelectAgendaMode from './FSSelectAgendaMode.vue';
|
|
102
108
|
import FSAgendaDialogCalendar from './FSAgendaDialogCalendar.vue';
|
|
109
|
+
import FSSpan from '../FSSpan.vue';
|
|
103
110
|
|
|
104
111
|
export default defineComponent({
|
|
105
112
|
name: 'FSAgendaHeader',
|
|
@@ -108,6 +115,7 @@ export default defineComponent({
|
|
|
108
115
|
FSSelectAgendaMode,
|
|
109
116
|
FSCol,
|
|
110
117
|
FSButton,
|
|
118
|
+
FSSpan,
|
|
111
119
|
FSRow
|
|
112
120
|
},
|
|
113
121
|
props: {
|
|
@@ -128,7 +136,7 @@ export default defineComponent({
|
|
|
128
136
|
required: true
|
|
129
137
|
}
|
|
130
138
|
},
|
|
131
|
-
emits: ['update:start', 'update:end', 'update:mode'],
|
|
139
|
+
emits: ['update', 'update:start', 'update:end', 'update:mode'],
|
|
132
140
|
setup(props, { emit }) {
|
|
133
141
|
const { epochToMonthYearOnlyFormat, epochToDayMonthLongOnly, epochToLocalDayStart, epochToLocalDayEnd } = useDateFormat();
|
|
134
142
|
|
|
@@ -137,18 +145,24 @@ export default defineComponent({
|
|
|
137
145
|
const updateDateRange = (dayStart: number) => {
|
|
138
146
|
const newStart = epochToLocalDayStart(dayStart);
|
|
139
147
|
if (props.mode === AgendaMode.Week) {
|
|
148
|
+
const newEnd = epochToLocalDayEnd(newStart + (7 - new Date(newStart).getDay()) * 24 * 60 * 60 * 1000)
|
|
140
149
|
emit('update:start', newStart);
|
|
141
|
-
emit('update:end',
|
|
150
|
+
emit('update:end', newEnd);
|
|
151
|
+
emit('update', { start: newStart, end: newEnd, mode: props.mode })
|
|
142
152
|
return;
|
|
143
153
|
}
|
|
144
154
|
if (props.mode === AgendaMode.Month) {
|
|
145
155
|
emit('update:start', newStart);
|
|
146
156
|
const lastDayOfMonth = new Date(new Date(newStart).getFullYear(), new Date(newStart).getMonth() + 1, 0);
|
|
147
|
-
|
|
157
|
+
const newEnd = epochToLocalDayEnd(lastDayOfMonth.getTime());
|
|
158
|
+
emit('update:end', newEnd);
|
|
159
|
+
emit('update', { start: newStart, end: newEnd, mode: props.mode })
|
|
148
160
|
return;
|
|
149
161
|
}
|
|
162
|
+
const newEnd = epochToLocalDayEnd(newStart);
|
|
150
163
|
emit('update:start', newStart);
|
|
151
|
-
emit('update:end',
|
|
164
|
+
emit('update:end', newEnd);
|
|
165
|
+
emit('update', { start: newStart, end: newEnd, mode: props.mode })
|
|
152
166
|
}
|
|
153
167
|
|
|
154
168
|
const onNext = () => {
|
|
@@ -175,6 +189,17 @@ export default defineComponent({
|
|
|
175
189
|
}
|
|
176
190
|
}
|
|
177
191
|
|
|
192
|
+
watch(() => props.mode, (newMode) => {
|
|
193
|
+
const dayBtwStartAndEnd = props.start + (props.end - props.start) / 2;
|
|
194
|
+
if (newMode === AgendaMode.Week) {
|
|
195
|
+
updateDateRange(dayBtwStartAndEnd - (new Date(dayBtwStartAndEnd).getDay() - 1) * 24 * 60 * 60 * 1000);
|
|
196
|
+
} else if (newMode === AgendaMode.Month) {
|
|
197
|
+
updateDateRange(new Date(dayBtwStartAndEnd).setDate(1));
|
|
198
|
+
} else if (newMode === AgendaMode.Day) {
|
|
199
|
+
updateDateRange(dayBtwStartAndEnd);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
178
203
|
return {
|
|
179
204
|
AgendaMode,
|
|
180
205
|
showCalendarDialog,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@click="$emit('click', $props.id)"
|
|
16
16
|
>
|
|
17
17
|
<template
|
|
18
|
-
#default="{ label, icon, timeStart, timeEnd, iconBis, variant }"
|
|
18
|
+
#default="{ label, icon, timeStart, timeEnd, iconBis, variant, width }"
|
|
19
19
|
>
|
|
20
20
|
<slot
|
|
21
21
|
name="default"
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
:timeStart="timeStart"
|
|
26
26
|
:timeEnd="timeEnd"
|
|
27
27
|
:variant="variant"
|
|
28
|
+
:width="width"
|
|
28
29
|
/>
|
|
29
30
|
</template>
|
|
30
31
|
</FSAgendaHorizontalEvent>
|
|
@@ -43,10 +44,11 @@
|
|
|
43
44
|
name="default"
|
|
44
45
|
:label="label"
|
|
45
46
|
:icon="icon"
|
|
46
|
-
:iconBis="iconBis"
|
|
47
|
+
:iconBis="endToday ? iconBis : null"
|
|
47
48
|
:timeStart="epochToShortTimeOnlyFormat($props.start)"
|
|
48
49
|
:timeEnd="epochToShortTimeOnlyFormat($props.end)"
|
|
49
50
|
:variant="$props.variant"
|
|
51
|
+
:width="width"
|
|
50
52
|
/>
|
|
51
53
|
</FSClickable>
|
|
52
54
|
</template>
|
|
@@ -118,12 +120,20 @@ export default defineComponent({
|
|
|
118
120
|
return dayEnd.value - props.dayStart;
|
|
119
121
|
});
|
|
120
122
|
|
|
123
|
+
const startToday = computed(() => {
|
|
124
|
+
return props.start >= props.dayStart;
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const endToday = computed(() => {
|
|
128
|
+
return props.end <= dayEnd.value;
|
|
129
|
+
});
|
|
130
|
+
|
|
121
131
|
const dayDurationOffset = computed(() => {
|
|
122
132
|
return dayDuration.value - dayToMillisecond(1);
|
|
123
133
|
});
|
|
124
134
|
|
|
125
135
|
const leftPosition = computed(() => {
|
|
126
|
-
if (
|
|
136
|
+
if (!startToday.value) {
|
|
127
137
|
return 0;
|
|
128
138
|
}
|
|
129
139
|
return millisecondToDay(props.start - props.dayStart - dayDurationOffset.value) * 100;
|
|
@@ -132,12 +142,12 @@ export default defineComponent({
|
|
|
132
142
|
const width = computed(() => {
|
|
133
143
|
let start = props.start - dayDurationOffset.value;
|
|
134
144
|
let end = props.end - dayDurationOffset.value;
|
|
135
|
-
if(props.variant === 'current') {
|
|
145
|
+
if(props.variant === 'current' && dayEnd.value > props.now) {
|
|
136
146
|
end = props.now;
|
|
137
|
-
} else if (
|
|
147
|
+
} else if (!endToday.value) {
|
|
138
148
|
end = dayEnd.value - dayDurationOffset.value;
|
|
139
149
|
}
|
|
140
|
-
if (
|
|
150
|
+
if (!startToday.value) {
|
|
141
151
|
start = props.dayStart;
|
|
142
152
|
}
|
|
143
153
|
|
|
@@ -148,12 +158,14 @@ export default defineComponent({
|
|
|
148
158
|
const style = computed((): StyleValue => {
|
|
149
159
|
return {
|
|
150
160
|
'--fs-agenda-event-left': `${leftPosition.value}%`,
|
|
161
|
+
'--fs-agenda-event-border-width': startToday.value ? '3px' : '0px',
|
|
151
162
|
};
|
|
152
163
|
});
|
|
153
164
|
|
|
154
165
|
return {
|
|
155
166
|
style,
|
|
156
167
|
width,
|
|
168
|
+
endToday,
|
|
157
169
|
epochToShortTimeOnlyFormat
|
|
158
170
|
};
|
|
159
171
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
gap="0"
|
|
4
4
|
>
|
|
5
5
|
<FSRow
|
|
6
|
+
:padding="`0 ${paddingRightHours} 0 ${paddingLeftHours}`"
|
|
6
7
|
class="fs-agenda-hours-row"
|
|
7
8
|
:wrap="false"
|
|
8
9
|
gap="0"
|
|
@@ -36,14 +37,15 @@
|
|
|
36
37
|
</FSRow>
|
|
37
38
|
</FSRow>
|
|
38
39
|
<FSRow
|
|
39
|
-
|
|
40
|
+
:padding="`0 ${paddingRightMarkers} 0 ${paddingLeftMarkers}`"
|
|
41
|
+
class="fs-agenda-hours-row-markers"
|
|
40
42
|
:wrap="false"
|
|
41
43
|
gap="0"
|
|
42
44
|
>
|
|
43
45
|
<FSRow
|
|
44
|
-
v-for="hour in
|
|
45
|
-
:key="hour"
|
|
46
|
-
:style="getMarkerStyle(displayNow && hour === modelValue)"
|
|
46
|
+
v-for="hour in 24"
|
|
47
|
+
:key="hour-1"
|
|
48
|
+
:style="getMarkerStyle(displayNow && hour-1 === modelValue)"
|
|
47
49
|
width="100%"
|
|
48
50
|
height="0"
|
|
49
51
|
align="center-center"
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
<script lang="ts">
|
|
60
62
|
import { defineComponent, computed, type StyleValue } from 'vue';
|
|
61
63
|
|
|
62
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
64
|
+
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
63
65
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
64
66
|
|
|
65
67
|
import FSText from '../FSText.vue';
|
|
@@ -87,18 +89,51 @@ export default defineComponent({
|
|
|
87
89
|
required: false,
|
|
88
90
|
default: false,
|
|
89
91
|
},
|
|
92
|
+
firstColumnWidth: {
|
|
93
|
+
type: String,
|
|
94
|
+
required: true,
|
|
95
|
+
},
|
|
90
96
|
},
|
|
91
|
-
setup() {
|
|
97
|
+
setup(props) {
|
|
92
98
|
const { getColors } = useColors();
|
|
99
|
+
const { isMobileSized } = useBreakpoints();
|
|
93
100
|
|
|
94
101
|
const lightColors = getColors(ColorEnum.Light);
|
|
95
102
|
const primaryColors = getColors(ColorEnum.Primary);
|
|
96
103
|
const fontColor = lightColors.dark;
|
|
97
104
|
|
|
105
|
+
const hoursToShow = computed(() => {
|
|
106
|
+
if(isMobileSized.value) {
|
|
107
|
+
return 12;
|
|
108
|
+
}
|
|
109
|
+
return 24;
|
|
110
|
+
});
|
|
111
|
+
|
|
98
112
|
const hours = computed(() => {
|
|
99
|
-
return Array.from({ length:
|
|
113
|
+
return Array.from({ length: hoursToShow.value }, (_, i) => i * (24 / hoursToShow.value));
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
const paddingLeftHours = computed(() => {
|
|
117
|
+
// ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}) is the width of each hour slot (2 hour if 12 hours are shown, 1 hour if 24 hours are shown)
|
|
118
|
+
// 0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}) is half of the width of each hour slot
|
|
119
|
+
// So we have : ${props.firstColumnWidth} - Half of the width of each hour slot
|
|
120
|
+
return `calc(${props.firstColumnWidth} - 0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}))`;
|
|
100
121
|
});
|
|
101
122
|
|
|
123
|
+
const paddingRightHours = computed(() => {
|
|
124
|
+
return `calc(0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}))`;
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const paddingLeftMarkers = computed(() => {
|
|
128
|
+
return `calc(${props.firstColumnWidth} - 0.5 * ((100% - ${props.firstColumnWidth}) / 24))`;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
const paddingRightMarkers = computed(() => {
|
|
132
|
+
return `calc(0.5 * ((100% - ${props.firstColumnWidth}) / 24))`;
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
102
137
|
const getMarkerStyle = (isNowHour: boolean): StyleValue => {
|
|
103
138
|
if(isNowHour) {
|
|
104
139
|
return {
|
|
@@ -113,8 +148,13 @@ export default defineComponent({
|
|
|
113
148
|
const to2Digits = (value: number) => value.toString().padStart(2, '0');
|
|
114
149
|
|
|
115
150
|
return {
|
|
116
|
-
fontColor,
|
|
117
151
|
hours,
|
|
152
|
+
fontColor,
|
|
153
|
+
hoursToShow,
|
|
154
|
+
paddingLeftHours,
|
|
155
|
+
paddingRightHours,
|
|
156
|
+
paddingLeftMarkers,
|
|
157
|
+
paddingRightMarkers,
|
|
118
158
|
getMarkerStyle,
|
|
119
159
|
to2Digits
|
|
120
160
|
};
|
|
@@ -131,7 +131,7 @@ export default defineComponent({
|
|
|
131
131
|
const height = computed(() => {
|
|
132
132
|
let start = props.start - dayDurationOffset.value;
|
|
133
133
|
let end = props.end - dayDurationOffset.value;
|
|
134
|
-
if (props.variant === 'current') {
|
|
134
|
+
if (props.variant === 'current' && dayEnd.value > props.now) {
|
|
135
135
|
end = props.now;
|
|
136
136
|
} else if (props.end > dayEnd.value) {
|
|
137
137
|
end = dayEnd.value - dayDurationOffset.value;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<FSRow
|
|
3
3
|
class="fs-day-agenda"
|
|
4
4
|
height="100%"
|
|
5
|
-
padding="8px 0 0 0"
|
|
6
5
|
:wrap="false"
|
|
7
6
|
gap="0px"
|
|
8
7
|
:style="style"
|
|
@@ -180,7 +179,7 @@ export default defineComponent({
|
|
|
180
179
|
|
|
181
180
|
const dayEvents = computed(() => {
|
|
182
181
|
return props.events.filter((event) => {
|
|
183
|
-
return
|
|
182
|
+
return event.start < props.end && event.end > props.start;
|
|
184
183
|
});
|
|
185
184
|
});
|
|
186
185
|
|
|
@@ -9,13 +9,8 @@
|
|
|
9
9
|
gap="0"
|
|
10
10
|
:wrap="false"
|
|
11
11
|
>
|
|
12
|
-
<FSCol
|
|
13
|
-
height="100%"
|
|
14
|
-
:width="$props.firstColumnWidth"
|
|
15
|
-
>
|
|
16
|
-
</FSCol>
|
|
17
|
-
|
|
18
12
|
<FSAgendaHoursRow
|
|
13
|
+
:firstColumnWidth="$props.firstColumnWidth"
|
|
19
14
|
:displayNow="$props.nowIsInSelectedRange"
|
|
20
15
|
:modelValue="nowHour"
|
|
21
16
|
/>
|
|
@@ -240,9 +235,8 @@ export default defineComponent({
|
|
|
240
235
|
|
|
241
236
|
const getDayEvents = (dayStartEpoch: number) => {
|
|
242
237
|
return props.events.filter((event) => {
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
return isStartingInDay || isEndingInDay;
|
|
238
|
+
const dayEndEpoch = dayStartEpoch + 1000 * 60 * 60 * 24;
|
|
239
|
+
return event.start < dayEndEpoch && event.end > dayStartEpoch;
|
|
246
240
|
});
|
|
247
241
|
};
|
|
248
242
|
|
|
@@ -42,8 +42,8 @@ export default defineComponent({
|
|
|
42
42
|
const { $tr } = useTranslationsProvider();
|
|
43
43
|
|
|
44
44
|
const items = [
|
|
45
|
-
{ id: AgendaMode.Week, label: $tr('ui.
|
|
46
|
-
{ id: AgendaMode.Month, label: $tr('ui.
|
|
45
|
+
{ id: AgendaMode.Week, label: $tr('ui.common.week', 'Week'), icon: 'mdi-calendar-week' },
|
|
46
|
+
{ id: AgendaMode.Month, label: $tr('ui.common.month', 'Month'), icon: 'mdi-calendar-month' },
|
|
47
47
|
];
|
|
48
48
|
|
|
49
49
|
return {
|
|
@@ -9,13 +9,8 @@
|
|
|
9
9
|
gap="0"
|
|
10
10
|
:wrap="false"
|
|
11
11
|
>
|
|
12
|
-
<FSCol
|
|
13
|
-
height="100%"
|
|
14
|
-
:width="$props.firstColumnWidth"
|
|
15
|
-
>
|
|
16
|
-
</FSCol>
|
|
17
|
-
|
|
18
12
|
<FSAgendaHoursRow
|
|
13
|
+
:firstColumnWidth="$props.firstColumnWidth"
|
|
19
14
|
:displayNow="$props.nowIsInSelectedRange"
|
|
20
15
|
:modelValue="nowHour"
|
|
21
16
|
/>
|
|
@@ -75,7 +70,7 @@
|
|
|
75
70
|
class="fs-agenda-week-number-label"
|
|
76
71
|
:color="weekTextColor"
|
|
77
72
|
>
|
|
78
|
-
{{ $tr('ui.common.
|
|
73
|
+
{{ $tr('ui.common.week-short', 'W{0}',day.weekNumber) }}
|
|
79
74
|
</FSText>
|
|
80
75
|
</FSCol>
|
|
81
76
|
</FSCard>
|
|
@@ -125,7 +120,7 @@
|
|
|
125
120
|
@click="() => $emit('click:eventId', event.id)"
|
|
126
121
|
>
|
|
127
122
|
<template
|
|
128
|
-
#default="{ label, icon, timeStart, timeEnd, iconBis, variant }"
|
|
123
|
+
#default="{ label, icon, timeStart, timeEnd, iconBis, variant, width }"
|
|
129
124
|
>
|
|
130
125
|
<FSRow
|
|
131
126
|
align="center-left"
|
|
@@ -158,7 +153,7 @@
|
|
|
158
153
|
</FSRow>
|
|
159
154
|
</FSCol>
|
|
160
155
|
<FSCol
|
|
161
|
-
v-if="iconBis && variant !== 'current'"
|
|
156
|
+
v-if="iconBis && variant !== 'current' && width > 13"
|
|
162
157
|
align="center-right"
|
|
163
158
|
padding="8px 8px 8px 0"
|
|
164
159
|
width="hug"
|
|
@@ -259,7 +254,7 @@ export default defineComponent({
|
|
|
259
254
|
$tr('ui.common.monday-short', 'MON'),
|
|
260
255
|
$tr('ui.common.tuesday-short', 'TUE'),
|
|
261
256
|
$tr('ui.common.wednesday-short', 'WED'),
|
|
262
|
-
$tr('
|
|
257
|
+
$tr('ui.common.thursday-short', 'THU'),
|
|
263
258
|
$tr('ui.common.friday-short', 'FRI'),
|
|
264
259
|
$tr('ui.common.saturday-short', 'SAT')
|
|
265
260
|
];
|
|
@@ -309,9 +304,8 @@ export default defineComponent({
|
|
|
309
304
|
|
|
310
305
|
const getDayEvents = (dayStartEpoch: number) => {
|
|
311
306
|
return props.events.filter((event) => {
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
return isStartingInDay || isEndingInDay;
|
|
307
|
+
const dayEndEpoch = dayStartEpoch + 1000 * 60 * 60 * 24;
|
|
308
|
+
return event.start < dayEndEpoch && event.end > dayStartEpoch;
|
|
315
309
|
});
|
|
316
310
|
};
|
|
317
311
|
|