mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 09:18:24 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			454-evalua
			...
			fix_calend
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 90d3bf32e6 | |||
| ebc2921696 | 
							
								
								
									
										6
									
								
								.changes/unreleased/Feature-20250811-152154.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.changes/unreleased/Feature-20250811-152154.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| kind: Feature | ||||
| body: Add 45 and 60 min calendar ranges | ||||
| time: 2025-08-11T15:21:54.209009751+02:00 | ||||
| custom: | ||||
|     Issue: "409" | ||||
|     SchemaChange: No schema change | ||||
							
								
								
									
										6
									
								
								.changes/unreleased/Fixed-20250811-155212.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.changes/unreleased/Fixed-20250811-155212.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| kind: Fixed | ||||
| body: fix date formatting in calendar range display | ||||
| time: 2025-08-11T15:52:12.949078671+02:00 | ||||
| custom: | ||||
|     Issue: "" | ||||
|     SchemaChange: No schema change | ||||
| @@ -70,6 +70,8 @@ | ||||
|                         <option value="00:10:00">10 minutes</option> | ||||
|                         <option value="00:15:00">15 minutes</option> | ||||
|                         <option value="00:30:00">30 minutes</option> | ||||
|                         <option value="00:45:00">45 minutes</option> | ||||
|                         <option value="00:60:00">60 minutes</option> | ||||
|                     </select> | ||||
|                     <label class="input-group-text" for="slotMinTime">De</label> | ||||
|                     <select | ||||
|   | ||||
| @@ -32,6 +32,8 @@ | ||||
|                     <option value="00:10:00">10 minutes</option> | ||||
|                     <option value="00:15:00">15 minutes</option> | ||||
|                     <option value="00:30:00">30 minutes</option> | ||||
|                     <option value="00:45:00">45 minutes</option> | ||||
|                     <option value="00:60:00">60 minutes</option> | ||||
|                 </select> | ||||
|                 <label class="input-group-text" for="slotMinTime">De</label> | ||||
|                 <select | ||||
| @@ -102,7 +104,7 @@ | ||||
|                     event.title | ||||
|                 }}</b> | ||||
|                 <b v-else-if="event.extendedProps.is === 'range'" | ||||
|                     >{{ formatDate(event.startStr) }} - | ||||
|                     >{{ formatDate(event.startStr) }} - {{ formatDate(event.endStr, 'time') }}: | ||||
|                     {{ event.extendedProps.locationName }}</b | ||||
|                 > | ||||
|                 <b v-else-if="event.extendedProps.is === 'local'">{{ | ||||
| @@ -294,9 +296,26 @@ const nextWeeks = computed((): Weeks[] => | ||||
|     }), | ||||
| ); | ||||
|  | ||||
| const formatDate = (datetime: string) => { | ||||
|     console.log(typeof datetime); | ||||
|     return ISOToDate(datetime); | ||||
| const formatDate = (datetime: string, format: null | 'time' = null) => { | ||||
|     const date = ISOToDate(datetime); | ||||
|     if (!date) return ''; | ||||
|  | ||||
|     if (format === 'time') { | ||||
|         return date.toLocaleTimeString('fr-FR', { | ||||
|             hour: '2-digit', | ||||
|             minute: '2-digit' | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     // French date formatting | ||||
|     return date.toLocaleDateString('fr-FR', { | ||||
|         weekday: 'short', | ||||
|         year: 'numeric', | ||||
|         month: 'short', | ||||
|         day: 'numeric', | ||||
|         hour: '2-digit', | ||||
|         minute: '2-digit' | ||||
|     }); | ||||
| }; | ||||
|  | ||||
| const baseOptions = ref<CalendarOptions>({ | ||||
|   | ||||
| @@ -37,8 +37,13 @@ export const ISOToDate = (str: string | null): Date | null => { | ||||
|         return null; | ||||
|     } | ||||
|  | ||||
|     const [year, month, day] = str.split("-").map((p) => parseInt(p)); | ||||
|     // If the string already contains time info, use it directly | ||||
|     if (str.includes('T') || str.includes(' ')) { | ||||
|         return new Date(str); | ||||
|     } | ||||
|  | ||||
|     // Otherwise, parse date only | ||||
|     const [year, month, day] = str.split("-").map((p) => parseInt(p)); | ||||
|     return new Date(year, month - 1, day, 0, 0, 0, 0); | ||||
| }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user