From 7ba9073f61f44b41b941ab6ee732d02b47b988f4 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期四, 30 五月 2024 18:11:41 +0800
Subject: [PATCH] 日历不可用事件界面完成

---
 _Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def |   13 ++++++
 _Main/BL/Type_LibCal_SubscriberEventCell/Attribute_End.qbl                                         |    7 +++
 _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl                                 |   18 +++++++--
 _Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Start.qbl                                       |    7 +++
 _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl                               |   18 +++++++--
 _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl                                |   18 +++++++--
 _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl                               |    6 +-
 _Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Description.qbl                                 |    8 ++++
 _Main/BL/Type_LibCal_SubscriberEventCell/Method_GetMatrixTooltip.qbl                               |   22 +++++++++++
 9 files changed, 102 insertions(+), 15 deletions(-)

diff --git a/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Description.qbl b/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Description.qbl
new file mode 100644
index 0000000..d0b54d0
--- /dev/null
+++ b/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Description.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Description
+{
+  #keys: '3[415136.0.722750591][415136.0.722750590][415136.0.722750592]'
+  Description: '澶囨敞'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_End.qbl b/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_End.qbl
new file mode 100644
index 0000000..956531d
--- /dev/null
+++ b/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_End.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute End
+{
+  #keys: '3[415136.0.722560047][415136.0.722560046][415136.0.722560048]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Start.qbl b/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Start.qbl
new file mode 100644
index 0000000..5854198
--- /dev/null
+++ b/_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Start.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Start
+{
+  #keys: '3[415136.0.722560040][415136.0.722560039][415136.0.722560041]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_LibCal_SubscriberEventCell/Method_GetMatrixTooltip.qbl b/_Main/BL/Type_LibCal_SubscriberEventCell/Method_GetMatrixTooltip.qbl
new file mode 100644
index 0000000..b14cf04
--- /dev/null
+++ b/_Main/BL/Type_LibCal_SubscriberEventCell/Method_GetMatrixTooltip.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetMatrixTooltip () declarative remote as String
+{
+  Description: '鎮诞鎻愮ず淇℃伅'
+  TextBody:
+  [*
+    // 鐢勫叞楦� May-30-2024 (created)
+    tooltip := '<table>';
+    tooltip := tooltip + '<tr><td><b>Start time:</b></td><td>' + this.Start() + '</td></tr>';
+    tooltip := tooltip + '<tr><td><b>End time:</b></td><td>' + this.End() + '</td></tr>';
+    tooltip := tooltip + '<tr><td><b>Description:</b></td><td>';
+    if( this.Description() <> '' ){
+      tooltip := tooltip + this.Description() + '</td></tr>';
+    }else{
+      tooltip := tooltip + '鏃�</td></tr>';
+    }
+    tooltip := tooltip + '</table>'; 
+    
+    return tooltip;
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl
index c60a7d7..e332105 100644
--- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl
+++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl
@@ -4,7 +4,8 @@
   LibCal_SubscriberEventTable table,
   LibCal_SubscriberEventRow row,
   DateTime starttime,
-  DateTime endtime
+  DateTime endtime,
+  String desc
 )
 {
   TextBody:
@@ -17,13 +18,22 @@
         column := table.LibCal_SubscriberEventColumn( relnew, Name := time, Period := startTime.Date() );
       }
       
-      duration := startTime.StartOfNextDay() - startTime;
       if( startTime.StartOfNextDay() > endtime ){
         duration := endtime - startTime;
+        cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal()
+                                                   , Start := startTime.Format( 'M/D/Y H:m' )
+                                                   , End := endtime.Format( 'M/D/Y H:m' )
+                                                   , Description := desc );
+        row.LibCal_SubscriberEventCell( relinsert, cell );
+      }else{
+        duration := startTime.StartOfNextDay() - startTime;
+        cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal()
+                                                   , Start := startTime.Format( 'M/D/Y H:m' )
+                                                   , End := startTime.StartOfNextDay().Format( 'M/D/Y H:m' )
+                                                   , Description := desc );
+        row.LibCal_SubscriberEventCell( relinsert, cell );
       }
     //  info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() );
-      cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() );
-      row.LibCal_SubscriberEventCell( relinsert, cell );
     }
   *]
 }
diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl
index 8010e2b..c5ee580 100644
--- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl
+++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl
@@ -4,7 +4,8 @@
   LibCal_SubscriberEventTable table,
   LibCal_SubscriberEventRow row,
   DateTime starttime,
-  DateTime endtime
+  DateTime endtime,
+  String desc
 )
 {
   TextBody:
@@ -20,13 +21,22 @@
         column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time.Date() );
       }
       
-      duration := startTime.StartOfNextMonth() - startTime;
       if( startTime.StartOfNextMonth() > endtime ){
         duration := endtime - startTime;
+        cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal()
+                                                   , Start := startTime.Format( 'M/D/Y H:m' )
+                                                   , End := endtime.Format( 'M/D/Y H:m' )
+                                                   , Description := desc );
+        row.LibCal_SubscriberEventCell( relinsert, cell );
+      }else{
+        duration := startTime.StartOfNextMonth() - startTime;
+        cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal()
+                                                   , Start := startTime.Format( 'M/D/Y H:m' )
+                                                   , End := startTime.StartOfNextMonth().Format( 'M/D/Y H:m' )
+                                                   , Description := desc );
+        row.LibCal_SubscriberEventCell( relinsert, cell );
       }
     //  info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() );
-      cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() );
-      row.LibCal_SubscriberEventCell( relinsert, cell );
     }
   *]
 }
diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
index 6ef690d..89da25f 100644
--- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
+++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
@@ -48,11 +48,11 @@
         startTime   := participation.StartDate().DateTime( timezone ).AddAsPeriod( timezone, event.StartTimeOfDay() );
     //    info( this.ID(), startTime, endTime );
         if( this.ID() = 'Day' ){
-          this.InitializeDay( this, row, startTime, endTime );
+          this.InitializeDay( this, row, startTime, endTime, event.Description() );
         }else if( this.ID() = 'Week' ){
-          this.InitializeWeek( this, row, startTime, endTime );
+          this.InitializeWeek( this, row, startTime, endTime, event.Description() );
         }else{
-          this.InitializeMonth( this, row, startTime, endTime );
+          this.InitializeMonth( this, row, startTime, endTime, event.Description() );
         }
     
       }
diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl
index d1da787..f9cfed4 100644
--- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl
+++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl
@@ -4,7 +4,8 @@
   LibCal_SubscriberEventTable table,
   LibCal_SubscriberEventRow row,
   DateTime starttime,
-  DateTime endtime
+  DateTime endtime,
+  String desc
 )
 {
   TextBody:
@@ -20,13 +21,22 @@
         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;
+        cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal()
+                                                   , Start := startTime.Format( 'M/D/Y H:m' )
+                                                   , End := endtime.Format( 'M/D/Y H:m' )
+                                                   , Description := desc );
+        row.LibCal_SubscriberEventCell( relinsert, cell );
+      }else{
+        duration := startTime.StartOfNextWeek() - startTime;
+        cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal()
+                                                   , Start := startTime.Format( 'M/D/Y H:m' )
+                                                   , End := startTime.StartOfNextWeek().Format( 'M/D/Y H:m' )
+                                                   , Description := desc );
+        row.LibCal_SubscriberEventCell( relinsert, cell );
       }
     //  info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() );
-      cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() );
-      row.LibCal_SubscriberEventCell( relinsert, cell );
     }
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
index fdee85e..8b3cfbe 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
@@ -91,6 +91,19 @@
     }
     #child: matrixEditorActionBarPageTable
     #child: matrixeditorContextMenuTable
+    Component UserConfigurableInformationTable
+    {
+      #keys: '[415136.0.720821389]'
+      BaseType: 'WebUserConfigurableInformation'
+      Properties:
+      [
+        Identifier: 'Cell:sec'
+        ObjectType: 'LibCal_SubscriberEventCell'
+        Precondition: 'object.LibCal_SubscriberEventColumn().Index() > 1'
+        Taborder: 5
+        Tooltip: "VALUE(guard( object.GetMatrixTooltip() , '' ))"
+      ]
+    }
   ]
   Properties:
   [

--
Gitblit v1.9.3