yanweiyuan3
2023-10-27 d1d15b61dfcf7fd0f800b32359f082cf580ed556
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Quintiq file version 2.0
#parent: MatrixEditorTransitionMatrix
Response OnCheckEditability (
  CampaignType_MP row,
  CampaignType_MP column,
  TransitionType_MP cell,
  Duration value
) id:Response_MatrixEditorTransitionMatrix_OnCheckEditability
{
  #keys: '[143600.0.1312464488]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMatrixEditor_OnCheckEditability'
  QuillAction
  {
    Body:
    [*
      // Precon to prevent edit on transiton type from different unit
      feedback := '';
      unit := ifexpr( not isnull( cell ), cell.Unit(), column.Unit() );
      fromcampaigntype :=  ifexpr( not isnull( cell ), cell.FromCampaignType(), row );
      tocampaigntype := ifexpr( not isnull( cell ), cell.ToCampaignType(), column );
       
      canedit := TransitionType_MP::CanEdit( feedback,
                                             unit,
                                             fromcampaigntype,
                                             tocampaigntype );
      
      editinfo.CanEdit( canedit );
      editinfo.UserHint( feedback );
      
      if( canedit ) 
      {  
         // cannot be smaller than 0:00:00
         editinfo.MinValue( Duration::Zero() );
      }
    *]
    GroupServerCalls: false
  }
}