| | |
| | | Attribute RowNr |
| | | { |
| | | #keys: '3[415136.0.671975114][415136.0.671975113][415136.0.671975115]' |
| | | IsReadOnly: true |
| | | ValueType: Number |
| | | } |
| | |
| | | daytime := this.GetTimeByTimeUnit( starttime, startTime, Translations::MP_GlobalParameters_Day() ); |
| | | daycolumn := table.GetColumnByTimeUnit( table, daytime, Translations::MP_GlobalParameters_Day() ); |
| | | daycell := daycolumn.GetCellByTimeUnit( this, desc ); |
| | | if( table.MaxDayDate().IsInfinite() ){ |
| | | table.MaxDayDate( daytime ); |
| | | }else{ |
| | | table.MaxDayDate( ifexpr( table.MaxDayDate() < daytime, daytime, table.MaxDayDate() ) ); |
| | | } |
| | | if( table.MinDayDate().IsInfinite() ){ |
| | | table.MinDayDate( daytime ); |
| | | }else{ |
| | | table.MinDayDate( ifexpr( table.MinDayDate() > daytime, daytime, table.MinDayDate() ) ); |
| | | } |
| | | |
| | | dayvalue := [Real]daycell.Value(); |
| | | if( startTime.StartOfNextDay() > endtime ){ |
| | |
| | | weektime := this.GetTimeByTimeUnit( starttime, startTime, Translations::MP_GlobalParameters_Week() ); |
| | | weekcolumn := table.GetColumnByTimeUnit( table, weektime, Translations::MP_GlobalParameters_Week() ); |
| | | weekcell := weekcolumn.GetCellByTimeUnit( this, desc ); |
| | | |
| | | if( table.MaxWeekDate().IsInfinite() ){ |
| | | table.MaxWeekDate( weektime ); |
| | | }else{ |
| | | table.MaxWeekDate( ifexpr( table.MaxWeekDate() < weektime, weektime, table.MaxWeekDate() ) ); |
| | | } |
| | | if( table.MinWeekDate().IsInfinite() ){ |
| | | table.MinWeekDate( weektime ); |
| | | }else{ |
| | | table.MinWeekDate( ifexpr( table.MinWeekDate() > weektime, weektime, table.MinWeekDate() ) ); |
| | | } |
| | | weekvalue := [Real]weekcell.Value(); |
| | | if( startTime.StartOfNextWeek() > endtime ){ |
| | | duration := endtime - startTime; |
| | |
| | | monthtime := this.GetTimeByTimeUnit( starttime, startTime, Translations::MP_GlobalParameters_Month() ); |
| | | monthcolumn := table.GetColumnByTimeUnit( table, monthtime, Translations::MP_GlobalParameters_Month() ); |
| | | monthcell := monthcolumn.GetCellByTimeUnit( this, desc ); |
| | | info( nextmonthtime, startTime, monthtime, isnull( monthcolumn ), isnull( monthcell ) ); |
| | | if( table.MaxMonthDate().IsInfinite() ){ |
| | | table.MaxMonthDate( monthtime ); |
| | | }else{ |
| | | table.MaxMonthDate( ifexpr( table.MaxMonthDate() < monthtime, monthtime, table.MaxMonthDate() ) ); |
| | | } |
| | | if( table.MinMonthDate().IsInfinite() ){ |
| | | table.MinMonthDate( monthtime ); |
| | | }else{ |
| | | table.MinMonthDate( ifexpr( table.MinMonthDate() > monthtime, monthtime, table.MinMonthDate() ) ); |
| | | } |
| | | // info( nextmonthtime, startTime, monthtime, isnull( monthcolumn ), isnull( monthcell ) ); |
| | | monthvalue := [Real]monthcell.Value(); |
| | | if( startTime.StartOfNextMonth() > endtime ){ |
| | | duration := endtime - startTime; |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jul-26-2024 (created) |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ), column.TimeUnit() = timeunit ); |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.TimeUnit() = timeunit and column.Period() = time ); |
| | | if( isnull( column ) ){ |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time, TimeUnit := timeunit ); |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ May-28-2024 (created) |
| | | rownr := this.LibCal_SubscriberEventRow( relsize ); |
| | | |
| | | traverse( subscribers, Elements, subscriber ){ |
| | | |
| | | traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory().Name() = 'Unavailable' ){ |
| | | event := participation.Event(); |
| | | |
| | | row := selectobject( this, LibCal_SubscriberEventRow, row, row.Subscriber() = subscriber.CalendarID() |
| | | and row.Event() = event.Subject() |
| | | and row.EventType() = guard( event.EventType().Name(), '' ) |
| | | ); |
| | | //rownr := this.LibCal_SubscriberEventRow( relsize ); |
| | | traverse( this.LibCal_Calendar(), Event.LeadingParticipation, lp, lp.Event().EventCategory().Name() = 'Unavailable' ){ |
| | | event := lp.Event(); |
| | | rows := selectset( this, LibCal_SubscriberEventRow, row, row.Event() = event.Subject() and row.EventType() = guard( event.EventType().Name(), '' ) ); |
| | | traverse( lp, Subscription, subscription ){ |
| | | row := selectobject( rows, Elements, row, row.Subscriber() = subscription.Calendar().CalendarID() ); |
| | | |
| | | if( isnull( row ) ){ |
| | | row := this.LibCal_SubscriberEventRow( relnew, RowNr := rownr, Subscriber := subscriber.CalendarID(), |
| | | Event := event.Subject(), |
| | | EventType := guard( event.EventType().Name(), '' ) ); |
| | | row := this.LibCal_SubscriberEventRow( relnew, Subscriber := subscription.Calendar().CalendarID() |
| | | , Event := event.Subject() |
| | | , EventType := guard( event.EventType().Name(), '' ) ); |
| | | |
| | | rownr := rownr + 1; |
| | | } |
| | | |
| | | traverse( participation, ExplicitTimeInterval, eti ){ |
| | | traverse( subscription, ExplicitTimeInterval, eti ){ |
| | | row.InitializeDate( this, eti.Start(), eti.End(), event.Description() ); |
| | | } |
| | | |
| | |
| | | //traverse( this, LibCal_SubscriberEventColumn, column ){ |
| | | // info( '------------------------', column.Name(), column.Period(), column.TimeUnit() ); |
| | | //} |
| | | |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxDayDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxWeekDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxMonthDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinDayDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinWeekDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinMonthDate ) ); |
| | | // |
| | | //Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxDayDate ) ); |
| | | //Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxWeekDate ) ); |
| | | //Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxMonthDate ) ); |
| | | //Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinDayDate ) ); |
| | | //Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinWeekDate ) ); |
| | | //Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinMonthDate ) ); |
| | | this.ProcessColumnDay(); |
| | | this.ProcessColumnWeek(); |
| | | this.ProcessColumnMonth(); |
| | |
| | | [* |
| | | // çå
°é¸½ May-28-2024 (created) |
| | | owner.LibCal_SubscriberEventTable( relflush ); |
| | | if( owner.LibCal_SubscriberEventTable( relsize ) < 1 ){ |
| | | owner.LibCal_SubscriberEventTable( relnew, ID := LibCal_SubscriberEventTable::GetDefaultName(), Name := LibCal_SubscriberEventTable::GetDefaultName() ); |
| | | } |
| | | table := owner.LibCal_SubscriberEventTable( relnew, ID := LibCal_SubscriberEventTable::GetDefaultName(), Name := LibCal_SubscriberEventTable::GetDefaultName() ); |
| | | |
| | | traverse( owner, LibCal_SubscriberEventTable, table ){ |
| | | table.InitializeTable( subscribers ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Legend: 'Name' |
| | | SortCriteria: 'RowNr' |
| | | SortCriteria: 'Name' |
| | | Taborder: 1 |
| | | ] |
| | | } |