From 1bee21090f48fcd758a4e28de0c5aac495af3d6a Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期五, 31 五月 2024 17:13:26 +0800
Subject: [PATCH] 事件类型有层级

---
 _Main/BL/Relations/Relation_LibCal_EventTypeInEventType_AsChildren_LibCal_EventType_AllParent.qbl                                          |   23 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/_ROOT_Component_DialogCreateEditEventType.def                              |   64 ++
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def                                          |   14 
 _Main/BL/InfoMessages.qbl                                                                                                                  |    8 
 _Main/BL/Type_LibCal_EventEvent/Attribute_ParentID.qbl                                                                                     |    8 
 _Main/BL/Type_LibCal_EventEvent/Method_Update.qbl                                                                                          |   30 +
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/_ROOT_Component_FormEventType.def                                                      |   17 
 _Main/BL/Relations/Relation_LibCal_EventTypeInEventType_AsParent_LibCal_EventType_AllChildren.qbl                                          |   23 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_Edit.def                                                            |   20 
 _Main/BL/Type_LibCal_EventEvent/Function_CalcHasParent.qbl                                                                                 |   13 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_SetAttributeAfterApplyData.def                                      |   20 
 _Main/BL/Type_LibCal_EventEvent/Method_DeleteChildren.qbl                                                                                  |   16 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlContent.def                                                   |   67 +++
 _Main/BL/Type_LibCal_EventEvent/Method_HasDescendant.qbl                                                                                   |   21 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuEventType_OnClick.def        |   16 
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuDelete_OnClick.def                                          |   24 +
 _Main/BL/Type_LibCal_EventEvent/Attribute_HasParent.qbl                                                                                    |    8 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnCancel_OnClick.def                                  |   15 
 _Main/BL/Type_LibCal_EventEvent/StaticMethod_Update.qbl                                                                                    |   17 
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_listContextMenuEventType.def                                                 |   56 ++
 _Main/BL/Type_LibCal_EventEvent/Method_AssignParent.qbl                                                                                    |   44 ++
 _Main/BL/Type_LibCal_EventEvent/Method_GetAllParent.qbl                                                                                    |   20 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlContent_efName_OnInputIdle.def                                 |   20 
 _Main/BL/Type_LibCal_EventEvent/Function_CalcIsLeaf.qbl                                                                                    |   13 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlActions.def                                                   |   40 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuUnavailableEvent_OnClick.def |    4 
 _Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl                                                                             |   21 
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuNew_OnClick.def                                             |   23 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def                                      |   21 
 _Main/BL/Type_LibCal_EventEvent/DeclarativeTypeIndexRelation_CalcParent.qbl                                                                |   16 
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuEdit_OnClick.def                                            |   21 
 _Main/BL/Type_LibCal_EventEvent/_ROOT_Type_LibCal_EventType.qbl                                                                            |    8 
 _Main/BL/Type_LibCal_EventEvent/Method_UpdateTypeIndex.qbl                                                                                 |   21 
 _Main/BL/Type_LibCal_EventEvent/StaticMethod_Test.qbl                                                                                      |   12 
 _Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_ListList.def                                                       |    2 
 _Main/BL/Relations/Relation_LibCal_EventType_Child_LibCal_EventType_Parent.qbl                                                             |   23 +
 _Main/BL/Type_LibCal_EventEvent/StaticMethod_CanDelete.qbl                                                                                 |   22 +
 _Main/BL/Type_LibCal_EventTypeInEventType/Attribute_IsCurrent.qbl                                                                          |    8 
 _Main/BL/Relations/Relation_LibCal_EventType_AsRootEventType_LibCal_CalendarRegistry_RootEventT.qbl                                        |   26 +
 _Main/BL/Type_LibCal_EventTypeInEventType/_ROOT_Type_LibCal_EventTypeInEventType.qbl                                                       |    9 
 _Main/UI/MacroPlannerWebApp/Views/Event_type_view.vw                                                                                       |   68 +++
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_SetDefaultValue.def                                                 |   38 +
 _Main/BL/Type_LibCal_EventEvent/Attribute_IsLeaf.qbl                                                                                       |   12 
 _Main/UI/MacroPlannerWebApp/Component_LibCal_dlgEvent/Component_pnlEventType.def                                                           |    1 
 _Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def                                    |   16 
 _Main/BL/Type_LibCal_EventEvent/StaticMethod_Delete.qbl                                                                                    |   16 
 _Main/BL/Type_LibCal_EventEvent/Method_UpdateForeignKey.qbl                                                                                |    9 
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_listContextMenuEventType_MenuTest_OnClick.def                                 |   16 
 _Main/BL/Type_LibCal_EventEvent/Method_GetIsLeaf.qbl                                                                                       |   11 
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuNew_OnClick#648.def                                         |   25 +
 _Main/BL/Type_LibCal_EventEvent/TypeIndex_EventTypeIndex.qbl                                                                               |   12 
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_ListEventType.def                                                            |   72 +++
 _Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_listActionBarPageEventType.def                                               |   10 
 _Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_PanelHeader#144.def                                                |    3 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_OnOK.def                                                            |   31 +
 _Main/BL/Type_LibCal_EventEvent/Method_SetAllParent.qbl                                                                                    |   31 +
 _Main/BL/Type_LibCal_EventEvent/Method_SetRootEvent.qbl                                                                                    |   20 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_New.def                                                             |   26 +
 58 files changed, 1,265 insertions(+), 6 deletions(-)

diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl
index ef50327..a1293ed 100644
--- a/_Main/BL/InfoMessages.qbl
+++ b/_Main/BL/InfoMessages.qbl
@@ -86,4 +86,12 @@
   {
     DefaultText: 'There are duplicate three digit codes present'
   }
+  InfoMessage MP_LibCal_EventType_Exist
+  {
+    DefaultText: 'The ID or name is the same.'
+  }
+  InfoMessage MP_LibCal_EventType_HasEvent
+  {
+    DefaultText: 'The Event type of binding Event exists.'
+  }
 }
diff --git a/_Main/BL/Relations/Relation_LibCal_EventTypeInEventType_AsChildren_LibCal_EventType_AllParent.qbl b/_Main/BL/Relations/Relation_LibCal_EventTypeInEventType_AsChildren_LibCal_EventType_AllParent.qbl
new file mode 100644
index 0000000..91f00a8
--- /dev/null
+++ b/_Main/BL/Relations/Relation_LibCal_EventTypeInEventType_AsChildren_LibCal_EventType_AllParent.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation LibCal_EventTypeInEventType_AsChildren_LibCal_EventType_AllParent
+{
+  #keys: '1[415136.0.721964682]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide AsChildren
+  {
+    #keys: '3[415136.0.721964684][415136.0.721964683][415136.0.721964685]'
+    Cardinality: '0to1'
+    ObjectDefinition: LibCal_EventTypeInEventType
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide AllParent
+  {
+    #keys: '3[415136.0.721964687][415136.0.721964686][415136.0.721964688]'
+    Cardinality: '1toN'
+    ObjectDefinition: LibCal_EventType
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_LibCal_EventTypeInEventType_AsParent_LibCal_EventType_AllChildren.qbl b/_Main/BL/Relations/Relation_LibCal_EventTypeInEventType_AsParent_LibCal_EventType_AllChildren.qbl
new file mode 100644
index 0000000..8f1504f
--- /dev/null
+++ b/_Main/BL/Relations/Relation_LibCal_EventTypeInEventType_AsParent_LibCal_EventType_AllChildren.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation LibCal_EventTypeInEventType_AsParent_LibCal_EventType_AllChildren
+{
+  #keys: '1[415136.0.721964707]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide AsParent
+  {
+    #keys: '3[415136.0.721964709][415136.0.721964708][415136.0.721964710]'
+    Cardinality: '0to1'
+    ObjectDefinition: LibCal_EventTypeInEventType
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide AllChildren
+  {
+    #keys: '3[415136.0.721964712][415136.0.721964711][415136.0.721964713]'
+    Cardinality: '1toN'
+    ObjectDefinition: LibCal_EventType
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_LibCal_EventType_AsRootEventType_LibCal_CalendarRegistry_RootEventT.qbl b/_Main/BL/Relations/Relation_LibCal_EventType_AsRootEventType_LibCal_CalendarRegistry_RootEventT.qbl
new file mode 100644
index 0000000..586099e
--- /dev/null
+++ b/_Main/BL/Relations/Relation_LibCal_EventType_AsRootEventType_LibCal_CalendarRegistry_RootEventT.qbl
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+Relation LibCal_EventType_AsRootEventType_LibCal_CalendarRegistry_RootEventType
+{
+  #keys: '1[415136.0.721964845]'
+  ProceduralSequenceRelationStrategy
+  {
+    #keys: '13[0.0.0][415136.0.721964864][415136.0.721964858][415136.0.721964865][415136.0.721964859][415136.0.721964866][415136.0.721964860][415136.0.721964867][415136.0.721964861][415136.0.721964868][415136.0.721964862][415136.0.721964869][415136.0.721964863]'
+    SequenceElementSuffix: 'RootEventType'
+    SequenceSuffix: 'RootEventType'
+  }
+  RelationSide.LeftSide AsRootEventType
+  {
+    #keys: '3[415136.0.721964847][415136.0.721964846][415136.0.721964848]'
+    Cardinality: '0to1'
+    ObjectDefinition: LibCal_EventType
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide RootEventType
+  {
+    #keys: '3[415136.0.721964850][415136.0.721964849][415136.0.721964851]'
+    Cardinality: '1toN'
+    ObjectDefinition: LibCal_CalendarRegistry
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_LibCal_EventType_Child_LibCal_EventType_Parent.qbl b/_Main/BL/Relations/Relation_LibCal_EventType_Child_LibCal_EventType_Parent.qbl
new file mode 100644
index 0000000..57c48c7
--- /dev/null
+++ b/_Main/BL/Relations/Relation_LibCal_EventType_Child_LibCal_EventType_Parent.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation LibCal_EventType_Child_LibCal_EventType_Parent
+{
+  #keys: '1[415136.0.721945049]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Child
+  {
+    #keys: '3[415136.0.721945051][415136.0.721945050][415136.0.721945052]'
+    Cardinality: '1toN'
+    ObjectDefinition: LibCal_EventType
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide Parent
+  {
+    #keys: '3[415136.0.721945054][415136.0.721945053][415136.0.721945055]'
+    Cardinality: '0to1'
+    ObjectDefinition: LibCal_EventType
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Attribute_HasParent.qbl b/_Main/BL/Type_LibCal_EventEvent/Attribute_HasParent.qbl
new file mode 100644
index 0000000..73fa583
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Attribute_HasParent.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute HasParent
+{
+  #keys: '3[415136.0.721964666][415136.0.721964665][415136.0.721964667]'
+  Description: 'Product has parent.'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Attribute_IsLeaf.qbl b/_Main/BL/Type_LibCal_EventEvent/Attribute_IsLeaf.qbl
new file mode 100644
index 0000000..926b73c
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Attribute_IsLeaf.qbl
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsLeaf
+{
+  #keys: '3[415136.0.722000028][415136.0.722000027][415136.0.722000029]'
+  Description:
+  [*
+    Indicate if the event type in a leaf event type.
+    Leaf event type have no child event type.
+  *]
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Attribute_ParentID.qbl b/_Main/BL/Type_LibCal_EventEvent/Attribute_ParentID.qbl
new file mode 100644
index 0000000..737b2ed
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Attribute_ParentID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ParentID
+{
+  #keys: '3[415136.0.721945071][415136.0.721945070][415136.0.721945072]'
+  Description: '鐖剁骇ID'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/DeclarativeTypeIndexRelation_CalcParent.qbl b/_Main/BL/Type_LibCal_EventEvent/DeclarativeTypeIndexRelation_CalcParent.qbl
new file mode 100644
index 0000000..ef434a6
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/DeclarativeTypeIndexRelation_CalcParent.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+DeclarativeTypeIndexRelation CalcParent
+{
+  #keys: '1[415136.0.721945080]'
+  Relation: Parent
+  TypeIndex: EventTypeIndex
+  TypeIndexExpressions:
+  [
+    DeclarativeRelationTypeIndexExpression
+    {
+      #keys: '1[415136.0.721945081]'
+      TypeIndexExpression: 'this.ParentID()//String'
+    }
+  ]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Function_CalcHasParent.qbl b/_Main/BL/Type_LibCal_EventEvent/Function_CalcHasParent.qbl
new file mode 100644
index 0000000..9c431f5
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Function_CalcHasParent.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcHasParent
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� May-31-2024 (created)
+    
+    value := not isnull( this.Parent() );
+    
+    this.HasParent( value );
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Function_CalcIsLeaf.qbl b/_Main/BL/Type_LibCal_EventEvent/Function_CalcIsLeaf.qbl
new file mode 100644
index 0000000..ca7c7cc
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Function_CalcIsLeaf.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcIsLeaf
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� May-31-2024 (created)
+    
+    value := this.GetIsLeaf();
+    
+    this.IsLeaf( value );
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_AssignParent.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_AssignParent.qbl
new file mode 100644
index 0000000..b572a64
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_AssignParent.qbl
@@ -0,0 +1,44 @@
+Quintiq file version 2.0
+#parent: #root
+Method AssignParent (
+  LibCal_EventType parent
+)
+{
+  Description: 'Assign this event type as a child of the given event type'
+  TextBody:
+  [*
+    // zlg Nov-20-2015 (created)
+    oldparent := this.Parent();
+    newparentid := guard( parent.ID(), '' );
+    hasnewparent := guard( oldparent.ID(), '' ) <> newparentid;
+    
+    if( this.HasDescendant( parent ) )
+    {
+      parent.ParentID( this.ParentID() );
+    }
+    this.ParentID( newparentid );
+    
+    // Calculate siblings of the product to the new parent
+    if( hasnewparent )
+    {
+      this.ParentID( guard( parent.ID(), '' ) );
+    
+      traverse( this, AllChildren.AsChildren, p )
+      {
+        p.SetAllParent();
+      }
+    
+      // Propogate the HasParent attribute to use in setting root product
+      Transaction::Transaction().Propagate( attribute( Product_MP, HasParent ) );
+      this.SetRootEvent();
+    //  this.SetSiblings();
+    
+      // Recalculate siblings for the old parent
+    //  traverse( oldparent, AllChildren, child )
+    //  {
+    //    child.AsChildren().SetSiblings();
+    //  }
+    
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_DeleteChildren.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_DeleteChildren.qbl
new file mode 100644
index 0000000..b2e5efa
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_DeleteChildren.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method DeleteChildren (
+  LibCal_EventType eventtype
+)
+{
+  Description: 'Delete event type children'
+  TextBody:
+  [*
+    traverse( eventtype, Child, ch )
+    {
+      ch.DeleteChildren( ch );
+      ch.Delete();
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_GetAllParent.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_GetAllParent.qbl
new file mode 100644
index 0000000..3e2926f
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_GetAllParent.qbl
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetAllParent () as owning LibCal_EventTypes
+{
+  Description: 'Get all parents'
+  TextBody:
+  [*
+    retvalue := construct( LibCal_EventTypes );
+    
+    //to avoid a transaction propagate, just find the parent instead of locating via decl relation this.Parent
+    parent := LibCal_EventType::FindEventTypeIndex( this.ParentID() );
+    
+    if( not isnull( parent ) )
+    {
+      retvalue := parent.GetAllParent();
+    }
+    retvalue.Add( this );
+    return &retvalue;
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_GetIsLeaf.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_GetIsLeaf.qbl
new file mode 100644
index 0000000..38a3d3b
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_GetIsLeaf.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetIsLeaf () declarative as Boolean
+{
+  Description: 'Return true if product is leaf product.'
+  TextBody:
+  [*
+    // desmondt Nov-20-2015 (created)
+    return this.Child( relsize ) = 0;
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_HasDescendant.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_HasDescendant.qbl
new file mode 100644
index 0000000..9613ff0
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_HasDescendant.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+Method HasDescendant (
+  LibCal_EventType target
+) remote as Boolean
+{
+  Description: 'Whether this event type has descendant = target'
+  TextBody:
+  [*
+    // soh yee 3-Apr-2013 (modified)
+    
+    value := target = this;
+    
+    if( this.Child( relsize ) > 0 )
+    {
+      value := exists( this, Child, ch, ch.HasDescendant( target ) ) or value;
+    }
+    
+    return value;
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_SetAllParent.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_SetAllParent.qbl
new file mode 100644
index 0000000..2cef476
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_SetAllParent.qbl
@@ -0,0 +1,31 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetAllParent
+{
+  Description: 'Set all parents'
+  TextBody:
+  [*
+    //this is to replace the getallchildrenkey
+    traverse( this, AllParent, ap )
+    {
+      ap.IsCurrent( false );
+    }
+    allparent := this.GetAllParent();
+    
+    traverse( allparent, Elements, parent )
+    {
+      etinet := select( this, AllParent, ap, ap.AsParent() = parent, true );
+    
+      if( isnull( etinet ) )
+      {
+        etinet := this.AllParent( relnew, AsParent := parent );
+      }
+      etinet.IsCurrent( true );
+    }
+    
+    traverse( this, AllParent, ap, not ap.IsCurrent() )
+    {
+      ap.Delete();
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_SetRootEvent.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_SetRootEvent.qbl
new file mode 100644
index 0000000..224467a
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_SetRootEvent.qbl
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetRootEvent
+{
+  Description: 'Set all unit without parent as a root unit.'
+  TextBody:
+  [*
+    // desmondt Nov-26-2015 (created)
+    
+    if( this.ParentID() = '' )
+    {
+      // set as root unit
+      this.AsRootEventType( relset, this.CalendarRegistry() );
+    }
+    else
+    {
+      this.AsRootEventType( relflush );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_Update.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_Update.qbl
new file mode 100644
index 0000000..fab1baf
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_Update.qbl
@@ -0,0 +1,30 @@
+Quintiq file version 2.0
+#parent: #root
+Method Update (
+  String id,
+  String name,
+  String parentid
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� May-31-2024 (created)
+    hasnewparent := guard( this.Parent().ID(),'' ) <> parentid;
+    
+    parent := LibCal_EventType::FindEventTypeIndex( parentid );
+    isroot := isnull( parent );
+    
+    this.UpdateTypeIndex( id );
+    this.Name( name );
+    
+    //Update the parent relations
+    if( hasnewparent )
+    {
+      this.AssignParent( parent );
+    }
+    else if( isroot )
+    {
+      this.SetRootEvent();
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_UpdateForeignKey.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_UpdateForeignKey.qbl
new file mode 100644
index 0000000..598d349
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_UpdateForeignKey.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#parent: #root
+Method UpdateForeignKey (
+  String parentid
+)
+{
+  Description: 'Update foregin IDs'
+  TextBody: 'this.ParentID( parentid );'
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/Method_UpdateTypeIndex.qbl b/_Main/BL/Type_LibCal_EventEvent/Method_UpdateTypeIndex.qbl
new file mode 100644
index 0000000..2f1f49e
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/Method_UpdateTypeIndex.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+Method UpdateTypeIndex (
+  String id
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� May-31-2024 (created)
+    if( id <> this.ID() )
+    {
+      // Update foreign key of this Product_MP's child Product_MPs
+      traverse( this, Child, c )
+      {
+        c.UpdateForeignKey( id );
+      }
+      
+      LibCal_EventType::ChangeKeyEventTypeIndex( this, id );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/StaticMethod_CanDelete.qbl b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_CanDelete.qbl
new file mode 100644
index 0000000..61643ae
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_CanDelete.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CanDelete (
+  LibCal_EventTypes eventtypes,
+  output String feedback_o
+) declarative remote as Boolean
+{
+  Description: 'Check whether products are allowed to be deleted'
+  TextBody:
+  [*
+    // DWE2 Feb-16-2016 (created)
+    
+    value := exists( eventtypes, Elements, e, e.Event( relsize ) > 0 );
+    
+    if( value )
+    {
+      feedback_o := Translations::MP_LibCal_EventType_HasEvent();
+    }
+    
+    return feedback_o = '';
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Delete.qbl b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Delete.qbl
new file mode 100644
index 0000000..b7cd50a
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Delete.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Delete (
+  LibCal_EventTypes eventtypes
+)
+{
+  Description: 'Delete event types and children'
+  TextBody:
+  [*
+    traverse( eventtypes, Elements, e, not isnull( e ) )
+    {
+      e.DeleteChildren( e );
+      e.Delete();
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Test.qbl b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Test.qbl
new file mode 100644
index 0000000..5f9af36
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Test.qbl
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Test (
+  LibCal_CalendarRegistry owner
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� May-31-2024 (created)
+    owner.EventType( relflush );
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Update.qbl b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Update.qbl
new file mode 100644
index 0000000..acc3b51
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_Update.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Update (
+  LibCal_EventType eventtype,
+  String id,
+  String name,
+  LibCal_EventType parent
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� May-31-2024 (created)
+    parentid := guard( parent.ID(), '' );
+    
+    eventtype.Update( id, name, parentid );
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl
new file mode 100644
index 0000000..d06fde8
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ValidateInput (
+  output String feedback,
+  LibCal_CalendarRegistry owner,
+  String id,
+  String name
+) as Boolean
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� May-31-2024 (created)
+    feedback := '';
+    
+    if( exists( owner, EventType, et, et.ID() = id or et.Name() = name ) ){
+      feedback := Translations::MP_LibCal_EventType_Exist();
+    }
+        
+    return feedback = '';
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/TypeIndex_EventTypeIndex.qbl b/_Main/BL/Type_LibCal_EventEvent/TypeIndex_EventTypeIndex.qbl
new file mode 100644
index 0000000..c9da976
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventEvent/TypeIndex_EventTypeIndex.qbl
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+TypeIndex EventTypeIndex
+{
+  Attributes:
+  [
+    TypeIndexAttribute
+    {
+      ModelElement: ID
+    }
+  ]
+}
diff --git a/_Main/BL/Type_LibCal_EventEvent/_ROOT_Type_LibCal_EventType.qbl b/_Main/BL/Type_LibCal_EventEvent/_ROOT_Type_LibCal_EventType.qbl
index b9def67..8d7474f 100644
--- a/_Main/BL/Type_LibCal_EventEvent/_ROOT_Type_LibCal_EventType.qbl
+++ b/_Main/BL/Type_LibCal_EventEvent/_ROOT_Type_LibCal_EventType.qbl
@@ -5,5 +5,13 @@
 {
   #keys: '5[415136.0.714581706][415136.0.714581704][0.0.0][415136.0.714581705][415136.0.714581707]'
   BaseType: Object
+  OnCommit:
+  [*
+    if( isnew ){
+      this.Update( this.ID(), this.Name(), this.ParentID() );
+      this.SetAllParent();
+      this.SetRootEvent();
+    }
+  *]
   StructuredName: 'LibCal_EventTypes'
 }
diff --git a/_Main/BL/Type_LibCal_EventTypeInEventType/Attribute_IsCurrent.qbl b/_Main/BL/Type_LibCal_EventTypeInEventType/Attribute_IsCurrent.qbl
new file mode 100644
index 0000000..7111cfa
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventTypeInEventType/Attribute_IsCurrent.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCurrent
+{
+  #keys: '3[415136.0.721964679][415136.0.721964678][415136.0.721964680]'
+  Description: 'To be use in get all parent, eg to remove obsolete link'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_LibCal_EventTypeInEventType/_ROOT_Type_LibCal_EventTypeInEventType.qbl b/_Main/BL/Type_LibCal_EventTypeInEventType/_ROOT_Type_LibCal_EventTypeInEventType.qbl
new file mode 100644
index 0000000..4216e2c
--- /dev/null
+++ b/_Main/BL/Type_LibCal_EventTypeInEventType/_ROOT_Type_LibCal_EventTypeInEventType.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type LibCal_EventTypeInEventType
+{
+  #keys: '5[415136.0.721964675][415136.0.721964673][0.0.0][415136.0.721964674][415136.0.721964676]'
+  BaseType: Object
+  StructuredName: 'LibCal_EventTypeInEventTypes'
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def
index 6c23590..f6224d2 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def
@@ -3,7 +3,7 @@
 {
   Children:
   [
-    Component MenuCapacitiesUnavailableEvent
+    Component MenuUnavailableEvent
     {
       #keys: '[415136.0.645511697]'
       BaseType: 'WebMenu'
@@ -15,5 +15,17 @@
         Tooltip: 'Calendar unavailable event'
       ]
     }
+    Component MenuEventType
+    {
+      #keys: '[415136.0.725671811]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'ELEMENTS_TREE'
+        Taborder: 7
+        Title: 'Event type'
+        Tooltip: 'Event type'
+      ]
+    }
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuEventType_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuEventType_OnClick.def
new file mode 100644
index 0000000..817c8a0
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuEventType_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ContextMenuCapacities/MenuEventType
+Response OnClick () id:Response_MacroPlanner_ContextMenuCapacities_MenuEventType_OnClick
+{
+  #keys: '[415136.0.725671864]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      ApplicationScope.ViewManager().ResetUserViewById( "Event_type_view", true);
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuCapacitiesUnavailableEvent_O.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuUnavailableEvent_OnClick.def
similarity index 77%
rename from _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuCapacitiesUnavailableEvent_O.def
rename to _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuUnavailableEvent_OnClick.def
index b7ac572..cbcdaf9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuCapacitiesUnavailableEvent_O.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuUnavailableEvent_OnClick.def
@@ -1,6 +1,6 @@
 Quintiq file version 2.0
-#parent: ContextMenuCapacities/MenuCapacitiesUnavailableEvent
-Response OnClick () id:Response_MacroPlanner_ContextMenuCapacities_MenuCapacitiesUnavailableEvent_OnClick
+#parent: ContextMenuCapacities/MenuUnavailableEvent
+Response OnClick () id:Response_MacroPlanner_ContextMenuCapacities_MenuUnavailableEvent_OnClick
 {
   #keys: '[415136.0.667550585]'
   CanBindMultiple: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlActions.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlActions.def
new file mode 100644
index 0000000..6f82ffe
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlActions.def
@@ -0,0 +1,40 @@
+Quintiq file version 2.0
+Component pnlActions
+{
+  #keys: '[415136.0.725510881]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component btnOk
+    {
+      #keys: '[415136.0.725510885]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'OK'
+        Taborder: 0
+      ]
+    }
+    Component btnCancel
+    {
+      #keys: '[415136.0.725510887]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Cancel'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    Border: true
+    ExcludeFromActiveComponent: true
+    FixedSize: true
+    Orientation: 'horizontal'
+    Padding: 'true'
+    Style: 'footer'
+    Taborder: 5
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlContent.def
new file mode 100644
index 0000000..288ffcc
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Component_pnlContent.def
@@ -0,0 +1,67 @@
+Quintiq file version 2.0
+Component pnlContent
+{
+  #keys: '[415136.0.725510879]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component efName
+    {
+      #keys: '[415136.0.725510966]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'dhDialogData.Data.Name'
+        Label: 'Name'
+        Taborder: 0
+      ]
+    }
+    Component efID
+    {
+      #keys: '[415136.0.725510984]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'dhDialogData.Data.ID'
+        Label: 'ID'
+        Taborder: 1
+      ]
+    }
+    Component selParent
+    {
+      #keys: '[415136.0.724250516]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'LibCal_EventType'
+      Children:
+      [
+        Component DataExtractorProduct
+        {
+          #keys: '[415136.0.724250517]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'structured[LibCal_EventType]'
+            Source: 'dhParentEventTypeSelection'
+            Taborder: 0
+            Transformation: 'Elements'
+          ]
+        }
+      ]
+      Properties:
+      [
+        AllowEmpty: true
+        DataBinding: 'dhDialogData.Data.Parent'
+        DisplayField: 'Name'
+        FixedSize: false
+        Label: 'Parent event type'
+        Taborder: 2
+        Tooltip: '<html>Leave empty if the product is at the highest level of the product hierarchy.<br>Otherwise select the parent product.</html>'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Padding: 'true'
+    Taborder: 4
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_Edit.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_Edit.def
new file mode 100644
index 0000000..584007b
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_Edit.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+Method Edit (
+  LibCal_EventType selection
+) id:Method_DialogCreateEditEventType_Edit
+{
+  #keys: '[415136.0.724280761]'
+  Body:
+  [*
+    // Edit Product(s)
+    owner := LibCal_GlobalState.dhGlobalCalendarRegistry().Data();
+    
+    data := shadow( selection );
+    dhDialogData.Data( &data );
+    
+    Form.SetDefaultValue( owner );
+    
+    ApplicationMacroPlanner.ShowFormModal( this );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_New.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_New.def
new file mode 100644
index 0000000..139b781
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_New.def
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+Method New (
+  LibCal_EventType parent,
+  FormEventType formEventType
+) id:Method_DialogCreateEditEventType_New
+{
+  #keys: '[415136.0.725511525]'
+  Body:
+  [*
+    // To create a new product
+    owner := LibCal_GlobalState.dhGlobalCalendarRegistry().Data();
+    obj := owner.EventType( relshadow
+                                ,ID := ""
+                                ,Parent           := parent
+                               );
+    
+    dhDialogData.Data( &obj );
+    
+    dhForm.Data( formEventType );
+    
+    Form.SetDefaultValue( owner );
+    
+    ApplicationMacroPlanner.ShowFormModal( this );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_OnOK.def
new file mode 100644
index 0000000..68e57e8
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_OnOK.def
@@ -0,0 +1,31 @@
+Quintiq file version 2.0
+#parent: #root
+Method OnOK () id:Method_DialogCreateEditEventType_OnOK
+{
+  #keys: '[415136.0.724291168]'
+  Body:
+  [*
+    // onOK for ProductDialog
+    // When the user clicks ok,
+    // we either create or edit the data
+    this.ApplyChanges();
+    this.SetAttributeAfterApplyData();
+    
+    data := dhDialogData.Data();
+    
+    if( isnull( data.WrappedInstance() ) ) // New
+    {
+      // When create product, parent relation must be null (as server method has logic to detect parent change using this relation)
+      data.Parent( relflush );
+      data.Commit();
+      dhForm.Data().ListEventType().SelectByKey( data.WrappedInstance().Key() );
+    }
+    else
+    {
+      LibCal_EventType::Update( dhDialogData.Data().WrappedInstance(), efID.Text(), efName.Text()
+                                ,guard( selParent.Data(), null(  LibCal_EventType ) ) );
+    }
+    
+    this.Close();
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_SetAttributeAfterApplyData.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_SetAttributeAfterApplyData.def
new file mode 100644
index 0000000..e1b01d3
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_SetAttributeAfterApplyData.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetAttributeAfterApplyData () id:Method_DialogCreateEditEventType_SetAttributeAfterApplyData
+{
+  #keys: '[415136.0.725550482]'
+  Body:
+  [*
+    // Set attributes on apply data, before commiting the data
+    data := dhDialogData.Data();
+    
+    //Parent product
+    parentID := '';
+    parentEventType := selParent.Data();
+    if( not isnull(  parentEventType ) )
+    {
+      parentID := parentEventType.ID();
+    }
+    data.ParentID( parentID );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_SetDefaultValue.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_SetDefaultValue.def
new file mode 100644
index 0000000..ecc8b7c
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Method_SetDefaultValue.def
@@ -0,0 +1,38 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetDefaultValue (
+  LibCal_CalendarRegistry owner
+) id:Method_DialogCreateEditEventType_SetDefaultValue
+{
+  #keys: '[415136.0.725511682]'
+  Body:
+  [*
+    // Set default + init dialog
+    dialogInstance := dhDialogData.Data().WrappedInstance();
+    isNew := isnull( dialogInstance );
+    
+    // Extract the parent product by filtering out the descendents of the selected products in order to prevent circularity
+    eventtypes := construct( LibCal_EventTypes );
+    if( isNew
+        or dialogInstance.IsLeaf() ) // Is leaf
+    {
+      eventtypes := selectset( owner, EventType, et, true );
+      currentScope := dhDialogDatas.Data();
+    
+      eventtypes := eventtypes.Difference( currentScope );
+    }
+    else if( not dialogInstance.HasParent() ) // Is root level
+    {
+      eventtypes := selectset( owner, RootEventType, et, et <> dialogInstance );
+    }
+    else // Has Parent and Child
+    {
+      allEventTypes := selectset( owner, EventType, et, et <> dialogInstance );
+      myChildren := selectset( dialogInstance, AllChildren.AsChildren, c, true );
+    
+      eventtypes := allEventTypes.Difference( myChildren );
+    }
+    
+    dhParentEventTypeSelection.Data( eventtypes.Copy() );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnCancel_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnCancel_OnClick.def
new file mode 100644
index 0000000..0a8aeab
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnCancel_OnClick.def
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: pnlActions/btnCancel
+Response OnClick () id:Response_pnlActions_btnCancel_OnClick
+{
+  #keys: '[415136.0.725510891]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      Form.Close();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def
new file mode 100644
index 0000000..dfdc08e
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: pnlActions/btnOk
+Response OnClick () id:Response_pnlActions_btnOk_OnClick
+{
+  #keys: '[415136.0.725510890]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  Precondition:
+  [*
+    owner := LibCal_GlobalState.dhGlobalCalendarRegistry().Data();
+    
+    return LibCal_EventType::ValidateInput( feedback, owner, efID.Text(), efName.Text() );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      Form.OnOK();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlContent_efName_OnInputIdle.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlContent_efName_OnInputIdle.def
new file mode 100644
index 0000000..ab18cdc
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlContent_efName_OnInputIdle.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: pnlContent/efName
+Response OnInputIdle () id:Response_pnlContent_efName_OnInputIdle
+{
+  #keys: '[415136.0.724250694]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebEditField_OnInputIdle'
+  QuillAction
+  {
+    Body:
+    [*
+      // Update EditorID to have EditorName's value
+      ApplicationMacroPlanner.SetID( efID,
+                                     this.Text(),
+                                     guard( dhDialogData.Data().Name(), '' ),
+                                     guard( dhDialogData.Data().ID(), '' ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/_ROOT_Component_DialogCreateEditEventType.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/_ROOT_Component_DialogCreateEditEventType.def
new file mode 100644
index 0000000..3704db8
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/_ROOT_Component_DialogCreateEditEventType.def
@@ -0,0 +1,64 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent DialogCreateEditEventType
+{
+  #keys: '[415136.0.725510877]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: pnlContent
+    #child: pnlActions
+    Component dhDialogData
+    {
+      #keys: '[415136.0.725511066]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'shadow[LibCal_EventType]*'
+      Properties:
+      [
+        Taborder: 0
+      ]
+    }
+    Component dhForm
+    {
+      #keys: '[415136.0.725511131]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'FormEventType'
+      Properties:
+      [
+        Taborder: 3
+      ]
+    }
+    Component dhDialogDatas
+    {
+      #keys: '[415136.0.724240386]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'structured[LibCal_EventType]*'
+      Properties:
+      [
+        Taborder: 1
+      ]
+    }
+    Component dhParentEventTypeSelection
+    {
+      #keys: '[415136.0.724290253]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'structured[LibCal_EventType]*'
+      Properties:
+      [
+        MergeStyle: 'Union'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    EnterButton: 'btnOk'
+    EscapeButton: 'btnCancel'
+    ExcludeFromActiveComponent: true
+    Image: 'ELEMENTS_TREE'
+    Padding: 'false'
+    Title: 'Event type'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def
index b241133..40877ed 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def
@@ -14,7 +14,7 @@
         DataType: 'LibCal_CalendarRegistry'
         Source: 'LibCal_GlobalState.dhGlobalCalendarRegistry'
         Taborder: 0
-        Transformation: 'EventType'
+        Transformation: 'RootEventType'
       ]
     }
     #child: listActionBarPageCalendarEventTypes
@@ -25,6 +25,19 @@
       Children:
       [
         #child: listContextMenuCalendarEventTypes
+        Component DataSetLevelChildEventType id:DataSetLevelChildEventType_545
+        {
+          #keys: '[415136.0.724250822]'
+          BaseType: 'WebDataSetLevel'
+          Properties:
+          [
+            Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Name"}}]'
+            ContextMenu: 'listContextMenuCalendarEventTypes'
+            RelationFromParent: 'Child'
+            RelationRepeating: 'Child'
+            Taborder: 1
+          ]
+        }
       ]
       Properties:
       [
@@ -36,6 +49,7 @@
   ]
   Properties:
   [
+    CheckboxBehavior: 'include descendants'
     SelectionCheckboxes: true
     Taborder: 1
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_ListEventType.def b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_ListEventType.def
new file mode 100644
index 0000000..bfdfa89
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_ListEventType.def
@@ -0,0 +1,72 @@
+Quintiq file version 2.0
+Component ListEventType
+{
+  #keys: '[415136.0.724211703]'
+  BaseType: 'WebList'
+  Children:
+  [
+    Component DataExtractorEventType
+    {
+      #keys: '[415136.0.724211704]'
+      BaseType: 'WebDataExtractor'
+      Properties:
+      [
+        DataType: 'LibCal_CalendarRegistry'
+        Source: 'LibCal_GlobalState.dhGlobalCalendarRegistry'
+        Taborder: 0
+        Transformation: 'RootEventType'
+      ]
+    }
+    #child: listActionBarPageEventType
+    Component DataSetLevelEventType
+    {
+      #keys: '[415136.0.724211709]'
+      BaseType: 'WebDataSetLevel'
+      Children:
+      [
+        Component DataSetLevelChildEventType
+        {
+          #keys: '[415136.0.724212044]'
+          BaseType: 'WebDataSetLevel'
+          Properties:
+          [
+            Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Name"}}]'
+            ContextMenu: 'listContextMenuEventType'
+            RelationFromParent: 'Child'
+            RelationRepeating: 'Child'
+            Taborder: 0
+          ]
+        }
+        #child: listContextMenuEventType
+      ]
+      Properties:
+      [
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Name"}}]'
+        ContextMenu: 'listContextMenuEventType'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 0
+  ]
+  ResponseDefinitions:
+  [
+    DelegatedResponseDefinition OnClick id:Responsedef_ListEventType_WebMenu_OnClick
+    {
+      #keys: '[415136.0.725510588]'
+      Initiator: 'WebMenu'
+      IsInherited: false
+      ResponseType: 'OnClick'
+      Arguments:
+      [
+        ResponseDefinitionArgument selection
+        {
+          #keys: '[871.0.7140251]'
+          Binding: 'this.Selection()'
+        }
+      ]
+    }
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_listActionBarPageEventType.def b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_listActionBarPageEventType.def
new file mode 100644
index 0000000..a5dcc71
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_listActionBarPageEventType.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listActionBarPageEventType
+{
+  #keys: '[415136.0.724211706]'
+  BaseType: 'listActionBarPage'
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_listContextMenuEventType.def b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_listContextMenuEventType.def
new file mode 100644
index 0000000..fa6f348
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Component_listContextMenuEventType.def
@@ -0,0 +1,56 @@
+Quintiq file version 2.0
+Component listContextMenuEventType
+{
+  #keys: '[415136.0.724211711]'
+  BaseType: 'listContextMenu'
+  Children:
+  [
+    Component MenuNew
+    {
+      #keys: '[415136.0.724212191]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'NEW'
+        Taborder: 3
+        Title: 'New'
+      ]
+    }
+    Component MenuEdit
+    {
+      #keys: '[415136.0.724212233]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'PENCIL'
+        Taborder: 4
+        Title: 'Edit'
+      ]
+    }
+    Component MenuDelete
+    {
+      #keys: '[415136.0.724212277]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'DELETE'
+        Taborder: 5
+        Title: 'Delete'
+      ]
+    }
+    Component MenuTest
+    {
+      #keys: '[415136.0.729921977]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Taborder: 6
+        Title: 'test'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuDelete_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuDelete_OnClick.def
new file mode 100644
index 0000000..aaaf8fa
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuDelete_OnClick.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+#parent: ListEventType
+Response OnClick (
+  structured[LibCal_EventType] selection
+) id:Response_ListEventType_MenuDelete_OnClick
+{
+  #keys: '[415136.0.724250294]'
+  CanBindMultiple: false
+  DefinitionID => /ListEventType/Responsedef_ListEventType_WebMenu_OnClick
+  Initiator: 'MenuDelete'
+  Precondition:
+  [*
+    return LibCal_EventType::CanDelete( selection, feedback );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      //Delete event type
+      LibCal_EventType::Delete( selection );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuEdit_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuEdit_OnClick.def
new file mode 100644
index 0000000..4c6666a
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuEdit_OnClick.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: ListEventType
+Response OnClick (
+  LibCal_EventType selection
+) id:Response_ListEventType_MenuEdit_OnClick
+{
+  #keys: '[415136.0.724280641]'
+  CanBindMultiple: false
+  DefinitionID => /ListEventType/Responsedef_ListEventType_WebMenu_OnClick
+  Initiator: 'MenuEdit'
+  QuillAction
+  {
+    Body:
+    [*
+      //Edit event type
+      dlg := construct( DialogCreateEditEventType );
+      dlg.Edit( selection );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuNew_OnClick\043648.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuNew_OnClick\043648.def"
new file mode 100644
index 0000000..f4a21a0
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuNew_OnClick\043648.def"
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: ListEventType
+Response OnClick (
+  LibCal_EventType selection
+) id:Response_ListEventType_MenuNew_OnClick_648
+{
+  #keys: '[415136.0.724290534]'
+  CanBindMultiple: false
+  DefinitionID => /ListEventType/Responsedef_ListEventType_WebMenu_OnClick
+  Initiator: 'MenuNew'
+  Precondition:
+  [*
+    return MacroPlan::HasMacroPlan( MacroPlan, feedback );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      //Create a new Event type
+      dlg := construct( DialogCreateEditEventType );
+      dlg.New( selection, FormEventType );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuNew_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuNew_OnClick.def
new file mode 100644
index 0000000..9711ec5
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_ListEventType_MenuNew_OnClick.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: ListEventType
+Response OnClick () id:Response_ListEventType_MenuNew_OnClick
+{
+  #keys: '[415136.0.725510774]'
+  CanBindMultiple: false
+  DefinitionID => /ListEventType/Responsedef_ListEventType_WebMenu_OnClick
+  Initiator: 'MenuNew'
+  Precondition:
+  [*
+    return MacroPlan::HasMacroPlan( MacroPlan, feedback );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      //Create a new Event type
+      dlg := construct( DialogCreateEditEventType );
+      dlg.New( null( LibCal_EventType ), FormEventType );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_listContextMenuEventType_MenuTest_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_listContextMenuEventType_MenuTest_OnClick.def
new file mode 100644
index 0000000..3e6cf8d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/Response_listContextMenuEventType_MenuTest_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: listContextMenuEventType/MenuTest
+Response OnClick () id:Response_listContextMenuEventType_MenuTest_OnClick
+{
+  #keys: '[415136.0.729922011]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      LibCal_EventType::Test( LibCal_GlobalState.dhGlobalCalendarRegistry().Data() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEventType/_ROOT_Component_FormEventType.def b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/_ROOT_Component_FormEventType.def
new file mode 100644
index 0000000..da062d5
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEventType/_ROOT_Component_FormEventType.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FormEventType
+{
+  #keys: '[415136.0.724211650]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: ListEventType
+  ]
+  Properties:
+  [
+    Image: 'ELEMENTS_TREE'
+    Title: 'Event type'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgEvent/Component_pnlEventType.def b/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgEvent/Component_pnlEventType.def
index 5fd5ae7..2716134 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgEvent/Component_pnlEventType.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgEvent/Component_pnlEventType.def
@@ -40,6 +40,7 @@
           Properties:
           [
             DataType: 'structured[LibCal_EventType]'
+            FixedFilter: 'object.IsLeaf()'
             Source: 'dhEventTypes'
             Taborder: 0
             Transformation: 'Elements'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_ListList.def b/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_ListList.def
index eeeb5f2..6cceb92 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_ListList.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_ListList.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Calendar.CalendarID","title":"CalendarID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Calendar.CalendarID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.EventType","title":"EventType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.EventType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.Subject","title":"Subject","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.Subject"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.StartTimeOfDay","title":"StartTimeOfDay","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.StartTimeOfDay"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.EndTimeOfDay","title":"EndTimeOfDay","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.EndTimeOfDay"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.Description","title":"Description","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.Description"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Calendar.CalendarID","title":"CalendarID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Calendar.CalendarID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.EventType.Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.EventType.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.Subject","title":"Subject","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.Subject"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.StartTimeOfDay","title":"StartTimeOfDay","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.StartTimeOfDay"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.EndTimeOfDay","title":"EndTimeOfDay","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.EndTimeOfDay"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.Description","title":"Description","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.Description"}}]'
         ContextMenu: 'listContextMenu967'
         Taborder: 2
       ]
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_PanelHeader\043144.def" "b/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_PanelHeader\043144.def"
index a9c5ebc..ba6fd1e 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_PanelHeader\043144.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_PanelHeader\043144.def"
@@ -190,6 +190,7 @@
           Properties:
           [
             DataType: 'structured[LibCal_EventType]'
+            FixedFilter: 'object.IsLeaf()'
             Source: 'dhEventTypes'
             Taborder: 0
             Transformation: 'Elements'
@@ -199,8 +200,8 @@
       Properties:
       [
         DisplayField: 'Name'
+        Label: 'Event type'
         NumberOfColumns: 15
-        ShowLabel: false
         Taborder: 3
       ]
     }
diff --git a/_Main/UI/MacroPlannerWebApp/Views/Event_type_view.vw b/_Main/UI/MacroPlannerWebApp/Views/Event_type_view.vw
new file mode 100644
index 0000000..1468dcb
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Views/Event_type_view.vw
@@ -0,0 +1,68 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_FormEventType
+      {
+        title: 'QMacroPlanner::FormEventType'
+        shown: true
+        componentID: 'QMacroPlanner::FormEventType'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 15
+          columnPosition: 1
+          columnSpan: 12
+        }
+        components
+        {
+          FormEventType_ListEventType
+          {
+          }
+          FormEventType_DataSetLevelEventType
+          {
+            groupDepth: -1
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+          }
+          FormEventType_DataSetLevelChildEventType
+          {
+            groupDepth: -1
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
+    }
+    userconfigurableinformation
+    {
+    }
+    page: ''
+    group: ''
+    index: 14
+    image: 'SHARE'
+    description: ''
+  }
+  formatversion: 2
+  id: 'Event_type_view'
+  name: 'Event type view'
+  isglobal: false
+  isroot: true
+}

--
Gitblit v1.9.3