lazhen
2024-05-29 1aa50242db4bd962c4bbf68e7f8eb8c003bbde9a
日历不可用事件界面产线筛选
已添加6个文件
已修改15个文件
262 ■■■■■ 文件已修改
_Main/BL/Type_LibCal_SubscriberEventColumn/Attribute_Period.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventColumn/Method_FilterByDatePeriod.qbl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventRow/Method_FilterBySubscriberAndEventType.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/StaticMethod_InitializeTable.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelCalendarSearchList.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelCalendarUnavailableEvent.def 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelCalendarUnavailableEventSearchList.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelDate.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Method_InitializeSubscribers.def 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelDate_DateSelectorEndTime_OnChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelDate_DateSelectorStartTime_OnChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelExport_ButtonHeader_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelExport_ButtonInitialize_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelPeriods_RadioButtonGroupUseForPlanning_OnChanged.def 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnCheckedChanged.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/Calendar_unavailable_event_view.vw 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventColumn/Attribute_Period.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Period
{
  #keys: '3[415136.0.703300314][415136.0.703300313][415136.0.703300315]'
  ValueType: Date
}
_Main/BL/Type_LibCal_SubscriberEventColumn/Method_FilterByDatePeriod.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
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;
  *]
}
_Main/BL/Type_LibCal_SubscriberEventRow/Method_FilterBySubscriberAndEventType.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
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;
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl
@@ -14,14 +14,14 @@
      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 );
    }
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl
@@ -10,14 +10,14 @@
  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;
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
@@ -22,15 +22,17 @@
    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 );
@@ -39,7 +41,7 @@
    
        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' ){
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl
@@ -11,20 +11,20 @@
  [*
    // ç”„兰鸽 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 );
    }
_Main/BL/Type_LibCal_SubscriberEventTable/StaticMethod_InitializeTable.qbl
@@ -2,7 +2,8 @@
#parent: #root
StaticMethod InitializeTable (
  LibCal_Calendars subscribers,
  LibCal_Calendar owner
  LibCal_Calendar owner,
  LibCal_EventCategory category
)
{
  TextBody:
@@ -13,10 +14,9 @@
      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 );
    }
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
@@ -45,6 +45,8 @@
          Properties:
          [
            DataType: 'LibCal_SubscriberEventTable'
            FilterArguments: 'subscribers:dhSubscribers'
            FixedFilter: 'object.FilterBySubscriberAndEventType( subscribers )'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LibCal_SubscriberEventRow'
@@ -71,6 +73,7 @@
          Properties:
          [
            DataType: 'LibCal_SubscriberEventTable'
            FilterArguments: 'starttime:dhStartDate;endtime:dhEndDate'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LibCal_SubscriberEventColumn'
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelCalendarSearchList.def
@@ -12,6 +12,6 @@
  [
    FixedSize: true
    Orientation: 'horizontal'
    Taborder: 0
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelCalendarUnavailableEvent.def
@@ -7,6 +7,41 @@
  [
    #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:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelCalendarUnavailableEventSearchList.def
@@ -10,6 +10,6 @@
  ]
  Properties:
  [
    Taborder: 1
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelDate.def
@@ -21,10 +21,31 @@
      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:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Method_InitializeSubscribers.def
@@ -7,6 +7,7 @@
  [*
    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(),
@@ -32,5 +33,7 @@
    }
    
    dhPotentialSubscribers.Data( &potentialSubscribers );
    lstSubscribers.CheckAll();
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelDate_DateSelectorEndTime_OnChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
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
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelDate_DateSelectorStartTime_OnChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
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
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelExport_ButtonHeader_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
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
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelExport_ButtonInitialize_OnClick.def
@@ -9,7 +9,7 @@
  {
    Body:
    [*
      LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar() );
      LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), dhCalendar.Data(), dhCategory.Data() );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelPeriods_RadioButtonGroupUseForPlanning_OnChanged.def
@@ -10,9 +10,11 @@
    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
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnCheckedChanged.def
@@ -12,7 +12,7 @@
    Body:
    [*
      subscribers := checkeditems.Copy();
      subscribers.Sort( attribute( LibCal_Calendar, CalendarID ), true );
      dhSubscribers.Data( &subscribers );
    *]
    GroupServerCalls: false
_Main/UI/MacroPlannerWebApp/Views/Calendar_unavailable_event_view.vw
@@ -59,10 +59,67 @@
          {
            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'"
                  }
                }
              }
            }
          }
        }
      }
    }