@@ -21,8 +21,6 @@ import {
2121 Schema_OptimisticEvent ,
2222 Schema_WebEvent ,
2323} from "@web/common/types/web.event.types" ;
24- import { validateGridEvent } from "@web/common/validators/grid.event.validator" ;
25- import { validateSomedayEvent } from "@web/common/validators/someday.event.validator" ;
2624
2725export const gridEventDefaultPosition = {
2826 isOverlapping : false ,
@@ -205,46 +203,6 @@ export const prepEvtAfterDraftDrop = (
205203 return event ;
206204} ;
207205
208- export const prepEvtBeforeSubmit = ( draft : Schema_WebEvent , userId : string ) => {
209- const _event = {
210- ...draft ,
211- origin : draft . origin ?? Origin . COMPASS ,
212- user : userId ,
213- } ;
214-
215- if ( draft . recurrence ) Object . assign ( _event , { recurrence : draft . recurrence } ) ;
216-
217- // Ensure the event has a position field for grid validation
218- // If it doesn't have one (e.g., all-day events), convert it to a grid event first
219- const eventWithPosition = _event . position
220- ? _event
221- : assembleGridEvent ( _event ) ;
222-
223- const event = validateGridEvent ( eventWithPosition ) ;
224- return event ;
225- } ;
226-
227- export const prepSomedayEventBeforeSubmit = (
228- draft : Schema_WebEvent ,
229- userId : string ,
230- ) => {
231- const _event : Omit < Schema_WebEvent , "recurrence" > = {
232- ...draft ,
233- origin : Origin . COMPASS ,
234- user : userId ,
235- _id : draft . _id ! ,
236- startDate : draft . startDate ! ,
237- endDate : draft . endDate ! ,
238- priority : draft . priority ?? Priorities . UNASSIGNED ,
239- } ;
240-
241- if ( draft . recurrence ) Object . assign ( _event , { recurrence : draft . recurrence } ) ;
242-
243- const event = validateSomedayEvent ( _event ) ;
244-
245- return event ;
246- } ;
247-
248206export const replaceIdWithOptimisticId = (
249207 event : Schema_GridEvent ,
250208) : Schema_OptimisticEvent => {
0 commit comments