¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Period |
| | | { |
| | | #keys: '3[415136.0.703300314][415136.0.703300313][415136.0.703300315]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method FilterByDatePeriod ( |
| | | Date start, |
| | | Date end |
| | | ) declarative remote as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ May-29-2024 (created) |
| | | value := false; |
| | | info( this.Index(), this.Period(), start, end ); |
| | | if( this.Index() < 2 ){ |
| | | value := true; |
| | | } |
| | | |
| | | return value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method FilterBySubscriberAndEventType ( |
| | | LibCal_Calendars subscribers |
| | | ) declarative remote as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ May-29-2024 (created) |
| | | value := false; |
| | | if( exists( subscribers, Elements, e, e.CalendarID() = this.Subscriber() ) ){ |
| | | value := true; |
| | | } |
| | | |
| | | return value; |
| | | *] |
| | | } |
| | |
| | | time := startTime.Format( 'M/D/Y' ); |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time ); |
| | | if( isnull( column ) ){ |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time ); |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time, Period := startTime.Date() ); |
| | | } |
| | | |
| | | duration := startTime.StartOfNextDay() - startTime; |
| | | if( startTime.StartOfNextDay() > endtime ){ |
| | | duration := endtime - startTime; |
| | | } |
| | | info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() ); |
| | | // info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() ); |
| | | cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() ); |
| | | row.LibCal_SubscriberEventCell( relinsert, cell ); |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ May-29-2024 (created) |
| | | for( startTime := starttime; startTime < endtime; startTime := startTime.StartOfMonth() ){ |
| | | time := startTime.Format( 'M/D/Y' ); |
| | | for( startTime := starttime; startTime < endtime; startTime := startTime.StartOfNextMonth() ){ |
| | | time := startTime; |
| | | if( starttime = startTime ){ |
| | | time := startTime.StartOfMonth().Format( 'M/D/Y' ); |
| | | time := startTime.StartOfMonth(); |
| | | } |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time ); |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ) ); |
| | | if( isnull( column ) ){ |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time ); |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time.Date() ); |
| | | } |
| | | |
| | | duration := startTime.StartOfNextMonth() - startTime; |
| | |
| | | traverse( subscribers, Elements, subscriber ){ |
| | | // info( '------------------------', subscriber.CalendarID(), subscriber.CalendarType() ); |
| | | // traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation ){ |
| | | traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory().Name() = 'Unavailable' ){ |
| | | traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory() = category ){ |
| | | // info( '------------------------', participation.Event().Subject(), '------', participation.Event().EventCategory().Name() ); |
| | | event := participation.Event(); |
| | | row := selectobject( this, LibCal_SubscriberEventRow, row, row.Subscriber() = subscriber.CalendarID() and row.Event() = event.Subject() and row.EventType() = event.EventType() ); |
| | | if( isnull( row ) ){ |
| | | row := this.LibCal_SubscriberEventRow( relnew, RowNr := rownr, Subscriber := subscriber.CalendarID(), Event := event.Subject(), EventType := event.EventType() ); |
| | | |
| | | if( counter( this, LibCal_SubscriberEventRow, linerow, linerow.Subscriber() = row.Subscriber() ) = 1 ){ |
| | | subscribercell := subscribercolumn.LibCal_SubscriberEventCell( relnew, Value := row.Subscriber() ); |
| | | row.LibCal_SubscriberEventCell( relinsert, subscribercell ); |
| | | } |
| | | |
| | | eventcell := eventcolumn.LibCal_SubscriberEventCell( relnew, Value := row.Event() ); |
| | | row.LibCal_SubscriberEventCell( relinsert, eventcell ); |
| | |
| | | |
| | | endTime := participation.EndDate().DateTime( timezone ).AddAsPeriod( timezone, event.EndTimeOfDay() ); |
| | | startTime := participation.StartDate().DateTime( timezone ).AddAsPeriod( timezone, event.StartTimeOfDay() ); |
| | | // info( participation.StartDate().DateTime( timezone ).AddAsPeriod( timezone, event.StartTimeOfDay() ), endTime ); |
| | | // info( this.ID(), startTime, endTime ); |
| | | if( this.ID() = 'Day' ){ |
| | | this.InitializeDay( this, row, startTime, endTime ); |
| | | }else if( this.ID() = 'Week' ){ |
| | |
| | | [* |
| | | // çå
°é¸½ May-29-2024 (created) |
| | | for( startTime := starttime; startTime < endtime; startTime := startTime.StartOfNextWeek() ){ |
| | | time := startTime.Format( 'M/D/Y' ); |
| | | time := startTime; |
| | | if( starttime = startTime ){ |
| | | time := startTime.StartOfWeek().Format( 'M/D/Y' ); |
| | | time := startTime.StartOfWeek(); |
| | | } |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time ); |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ) ); |
| | | if( isnull( column ) ){ |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time ); |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time.Date() ); |
| | | } |
| | | |
| | | duration := startTime.StartOfNextWeek() - startTime; |
| | | if( startTime.StartOfNextWeek() > endtime ){ |
| | | duration := endtime - startTime; |
| | | } |
| | | info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() ); |
| | | // info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() ); |
| | | cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() ); |
| | | row.LibCal_SubscriberEventCell( relinsert, cell ); |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod InitializeTable ( |
| | | LibCal_Calendars subscribers, |
| | | LibCal_Calendar owner |
| | | LibCal_Calendar owner, |
| | | LibCal_EventCategory category |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | owner.LibCal_SubscriberEventTable( relnew, ID := 'Week', Name := 'Week' ); |
| | | owner.LibCal_SubscriberEventTable( relnew, ID := 'Month', Name := 'Month' ); |
| | | } |
| | | category_i := selectobject( owner,CalendarRegistry.EventCategory, category, category.Name() = 'Unavaliable' ); |
| | | info('-----------------------------', owner.LibCal_SubscriberEventTable( relsize ), subscribers.Size(), isnull( category_i ) ); |
| | | info('-----------------------------', owner.LibCal_SubscriberEventTable( relsize ), subscribers.Size(), isnull( category ) ); |
| | | traverse( owner, LibCal_SubscriberEventTable, table ){ |
| | | table.InitializeTable( subscribers, category_i ); |
| | | table.InitializeTable( subscribers, category ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'LibCal_SubscriberEventTable' |
| | | FilterArguments: 'subscribers:dhSubscribers' |
| | | FixedFilter: 'object.FilterBySubscriberAndEventType( subscribers )' |
| | | Source: 'dhTable' |
| | | Taborder: 0 |
| | | Transformation: 'LibCal_SubscriberEventRow' |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'LibCal_SubscriberEventTable' |
| | | FilterArguments: 'starttime:dhStartDate;endtime:dhEndDate' |
| | | Source: 'dhTable' |
| | | Taborder: 0 |
| | | Transformation: 'LibCal_SubscriberEventColumn' |
| | |
| | | [ |
| | | FixedSize: true |
| | | Orientation: 'horizontal' |
| | | Taborder: 0 |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | |
| | | [ |
| | | #child: PanelCalendarSearchList |
| | | #child: PanelCalendarUnavailableEventSearchList |
| | | Component dhCalendar |
| | | { |
| | | #keys: '[415136.0.701850574]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'LibCal_Calendar' |
| | | Children: |
| | | [ |
| | | Component deCalendar |
| | | { |
| | | #keys: '[415136.0.701850618]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'LibCal_CalendarRegistry' |
| | | Source: 'LibCal_GlobalState.dhGlobalCalendarRegistry' |
| | | Taborder: 0 |
| | | Transformation: 'CommonCalendar' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component dhCategory |
| | | { |
| | | #keys: '[415136.0.701811642]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'LibCal_EventCategory' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | |
| | | BaseType: 'WebDateSelector' |
| | | Properties: |
| | | [ |
| | | Date: 9999-12-31 |
| | | Label: 'End time' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component dhStartDate id:dhStartDate_529 |
| | | { |
| | | #keys: '[415136.0.701820404]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'Date' |
| | | Properties: |
| | | [ |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component dhEndDate id:dhEndDate_480 |
| | | { |
| | | #keys: '[415136.0.701820426]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'Date' |
| | | Properties: |
| | | [ |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | [* |
| | | owner_i := LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar(); |
| | | category_i := selectobject( owner_i,CalendarRegistry.EventCategory, category, category.Name() = 'Unavaliable' ); |
| | | dhCategory.Data(category_i); |
| | | |
| | | sEvent := owner_i.Event( relshadow, |
| | | EventID := [String]Key::NextPersistentKey(), |
| | |
| | | } |
| | | |
| | | dhPotentialSubscribers.Data( &potentialSubscribers ); |
| | | |
| | | lstSubscribers.CheckAll(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelDate/DateSelectorEndTime_819 |
| | | Response OnChanged () id:Response_PanelDate_DateSelectorEndTime_OnChanged |
| | | { |
| | | #keys: '[415136.0.701820524]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebDateTimeFieldBase_OnChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | dhEndDate.Data(this.Date()); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelDate/DateSelectorStartTime_806 |
| | | Response OnChanged () id:Response_PanelDate_DateSelectorStartTime_OnChanged |
| | | { |
| | | #keys: '[415136.0.701820445]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebDateTimeFieldBase_OnChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | dhStartDate.Data(this.Date()); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelExport/ButtonHeader_763 |
| | | Response OnClick () id:Response_PanelExport_ButtonHeader_OnClick |
| | | { |
| | | #keys: '[415136.0.676930317]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | info( '--------------------------------', dhStartDate.Data(), dhEndDate.Data() ) |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar() ); |
| | | LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), dhCalendar.Data(), dhCategory.Data() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | owner_i := LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar(); |
| | | if( owner_i.LibCal_SubscriberEventTable( relsize ) < 1 ){ |
| | | LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), dhCalendar.Data(), dhCategory.Data() ); |
| | | } |
| | | table := selectobject( owner_i, LibCal_SubscriberEventTable, table, table.ID() = this.BoundValue() ); |
| | | info( isnull( owner_i ), isnull( table ), this.BoundValue() ); |
| | | info( '------------------------', owner_i.CalendarID(), table.Name() ); |
| | | |
| | | dhTable.Data( table ); |
| | | *] |
| | | GroupServerCalls: false |
| | |
| | | Body: |
| | | [* |
| | | subscribers := checkeditems.Copy(); |
| | | |
| | | subscribers.Sort( attribute( LibCal_Calendar, CalendarID ), true ); |
| | | dhSubscribers.Data( &subscribers ); |
| | | *] |
| | | GroupServerCalls: false |
| | |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormCalendarUnavailableEvent_PanelDate |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormCalendarUnavailableEvent_PanelPeriods |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormCalendarUnavailableEvent_PanelExport |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormCalendarUnavailableEvent_PanelList |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormCalendarUnavailableEvent_MatrixEditorTable |
| | | { |
| | | gridColor: '#c4c4c4' |
| | | totalHeaderWidth: 37 |
| | | attributeHeaderWidthRatio: 0.6 |
| | | nameHeaderWidthRatio: 0.4 |
| | | columnWidth: 238 |
| | | horizontalGrid: true |
| | | verticalGrid: true |
| | | backendState |
| | | { |
| | | componentId: 'QMacroPlanner::FormCalendarUnavailableEvent.MatrixEditorTable' |
| | | state |
| | | { |
| | | cells |
| | | { |
| | | attributes |
| | | { |
| | | attribute_Value |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 0 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'Value' |
| | | } |
| | | } |
| | | } |
| | | columns |
| | | { |
| | | sorting |
| | | { |
| | | criteria: "datamember:'Index'" |
| | | } |
| | | } |
| | | rows |
| | | { |
| | | sorting |
| | | { |
| | | criteria: "datamember:'RowNr'" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |