-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
104 lines (92 loc) · 4.12 KB
/
Copy pathREADME.txt
File metadata and controls
104 lines (92 loc) · 4.12 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#UI Layout
#On start up
+------------------------------------+
|------------------------------------|
|--- Rule Configuration Component ---|
|------------------------------------|
+------------------------------------+
&& +-------------+ +-------------+ &&
&& |-------------| |-------------| &&
&& |-- Rule 1 ---| |-- Rule 2 ---| &&
&& |-------------| |-------------| &&
&& +-------------+ +-------------+ &&
&& +-------------+ &&&&&&&&&&&&&&&&&&
&& |-------------| &&&&&&&&&&&&&&&&&&
&& |-- Rule 3 ---| &&&&&&&&&&&&&&&&&&
&& |-------------| &&&&&&&&&&&&&&&&&&
&& +-------------+ &&&&&&&&&&&&&&&&&&
#When subrules are being added
+------------------------------------+
|------------------------------------|
|--- Rule Configuration Component ---|
|------------------------------------|
+------------------------------------+
&& +-------------+ +-------------+ &&
&& |-------------| |-------------| &&
&& |-- Rule 1 ---| |-- Rule 2 ---| &&
&& |-------------| |-------------| &&
&& +-------------+ +-------------+ &&
&& +-------------+ &&&&&&&&&&&&&&&&&&
&& |-------------| &&&&&&&&&&&&&&&&&&
&& |-- Rule 3 ---| &&&&&&&&&&&&&&&&&&
&& |-------------| &&&&&&&&&&&&&&&&&&
&& +-------------+ &&&&&&&&&&&&&&&&&&
+------------------------------------+
|------------------------------------|
|-- Logical Operator between Rules --|
|------------------------------------|
+------------------------------------+
Dialog when editing a subrule
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&+---------------+&&&&&&&&&&&
&&&&&&&&&&|---------------|&&&&&&&&&&&
&&&&&&&&&&|--- Dialog ----|&&&&&&&&&&&
&&&&&&&&&&|---------------|&&&&&&&&&&&
&&&&&&&&&&+---------------+&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#Implementation
1. Rule Configuration Component:
a. Inputs:
- Field (Dropdown)
- Field Type (Text, readonly)
- Condition (Dropdown)
- Value (Text | Number)
b. Datatypes for Field input options:
- Portfolio (string)
- Counterparty (string)
- Price (number)
c. Selecting an option for Field presets the Field Type and Condition:
- Field = Portfolio or Counterparty => Field Type = string, Condition = Containing || Not Containing || Beginning With || Ending With
- Field = Price => Field Type = number, Condition = Greater Than || Greater Than or Equal To || Lesser Than || Lesser Than or Equal To || Equal To || Not Equal To
d. Validation check:
- Field Type = number => Value must be a negative number or positive number or zero
- Field Type = string => Value must contain A-Z, a-z or whitespace
d1. Fail
- Toast will be presented to inform users of the issue
d2. Success
- Subrule will be added to the global store - Subrules are organised into 3 categories for each Field and stored in a list data structure
- Subrule will be display in the card
- The Field of the subrule added will be added, if not already existing, to a set data structure in the global for logical operator functionality
2. Rule Component:
a. Subrules are grouped by Field and organised into cards
b. Actions including editing and deleting a subrule are included
b1. Editing and deleting a subrule will update the appropriate list in the global store
b2. Editing and deleting a subrule will also re-render the UI display
b3. Clicking on the edit icon for a particular subrule will trigger a dialog to appear with editable fields (except for Field and Field Type) prepopulated with current values and acceptable values
3. Logical Operator Component (not implemented yet):
a. A node containing a list of two unique Field and one logical operator string should be used for persistence, making up a tree structure
export interface Node {
logicalOperator: 'Intersect' | 'Union',
rules: Field[]
}