docs(roadmap): remove duplicated delivered validation features from Requested section
This commit is contained in:
@@ -20,71 +20,9 @@ When features are requested, we will describe the work to be performed in the se
|
|||||||
|
|
||||||
The following features are currently requested:
|
The following features are currently requested:
|
||||||
|
|
||||||
* Additional Validations
|
|
||||||
* Ability to set 'number of approvals' to zero, enabling instant updates (4 days)
|
* Ability to set 'number of approvals' to zero, enabling instant updates (4 days)
|
||||||
* Ability to make automated submissions using an API
|
* Ability to make automated submissions using an API
|
||||||
|
|
||||||
### Additional Validations
|
|
||||||
|
|
||||||
The design approach for these (now delivered) features is described below:
|
|
||||||
|
|
||||||
#### Frontend Formulae
|
|
||||||
|
|
||||||
The plan here will be to introduce [hyperformula](https://hyperformula.handsontable.com/guide/demo.html) into HandsOnTable. It will allow a library of ~400 functions and advanced excel-like behaviour. It integrates natively [as a plugin with HandsOnTable](https://handsontable.com/docs/javascript-data-grid/formula-calculation/#available-functions).
|
|
||||||
|
|
||||||
The initial challenge will be that HyperFormula requires cell references to operate, eg:
|
|
||||||
|
|
||||||
|ITEM|PRICE|VOLUME|REVENUE|
|
|
||||||
|---|---|---|---|
|
|
||||||
|PAPER|4.20|100|`= B1 * C1`|
|
|
||||||
|PEN|61.02|1,971|`= B2 * C2`|
|
|
||||||
|
|
||||||
Whereas end users cannot know these references ahead of time. Therefore the references will be made using variable names, eg:
|
|
||||||
|
|
||||||
|
|
||||||
|ITEM|PRICE|VOLUME|REVENUE|
|
|
||||||
|---|---|---|---|
|
|
||||||
|PAPER|4.20|100|`= PRICE * VOLUME`|
|
|
||||||
|PEN|61.02|1,971|`= PRICE * VOLUME`|
|
|
||||||
|
|
||||||
|
|
||||||
The frontend can then perform replacement of the variables for each Formula cell. For instance, replacing ` PRICE ` with ` B1 ` and ` VOLUME ` with ` C1 ` in the first row (and with ` B2 ` and ` C2 ` in the second row respectively).
|
|
||||||
|
|
||||||
To avoid clashes with names that match function names (eg, `MATCH()`) each named variable **must have a leading and trailing blank**, and we should be sure to ignore variables inside of single or double quoted strings - eg ` ITEM & " string ITEM "` (would resolve to `A1 & "string ITEM "`).
|
|
||||||
|
|
||||||
There would be two types applied:
|
|
||||||
|
|
||||||
* `HARDFORMULA` -> Column is readonly
|
|
||||||
* `SOFTFORMULA` -> Column can be changed by the user
|
|
||||||
|
|
||||||
To enable conditional logic (eg, show the current user id if row is changed), we also need a new column in the EDIT grid, to show the edit status (Modified, Added, Deleted, Unchanged). This should be the first column, and should NOT be submitted to backend. We could display these values as icons, rather than letters.
|
|
||||||
|
|
||||||
These properties can be accessed using the following literals:
|
|
||||||
|
|
||||||
* DC.ROW_STATUS - replaced at runtime with the cell reference, eg A1 or A2. Values would be M, A, D, or U.
|
|
||||||
* DC.USER_NAME - replaced at runtime with the logged-in user id
|
|
||||||
* DC.ORIG_VALUE - replaced at runtime with the original cell value
|
|
||||||
|
|
||||||
An example of a rule value that intends to show the current user id if the row is changed:
|
|
||||||
|
|
||||||
```
|
|
||||||
RULE_VALUE= if( DC.ROW_STATUS != 'U', DC.USER_NAME, DC.ORIG_VALUE )
|
|
||||||
```
|
|
||||||
|
|
||||||
Which would translate to the following formula, after the page is loaded:
|
|
||||||
|
|
||||||
```
|
|
||||||
=if(A1!='U',"sasdemo","sasinstaller")
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Regex Rules
|
|
||||||
|
|
||||||
There are two types of rule we can apply in the form of regular expressions:
|
|
||||||
|
|
||||||
* `HARDREGEX` -> If the value fails the rule, the data cannot be submitted (turns red)
|
|
||||||
* `SOFTREGEX` -> If the value fails the rule we change the cell colour to yellow (as a warning), but can still submit
|
|
||||||
|
|
||||||
|
|
||||||
### Set Approvals to Zero
|
### Set Approvals to Zero
|
||||||
|
|
||||||
The following changes are necessary to implement this feature:
|
The following changes are necessary to implement this feature:
|
||||||
|
|||||||
Reference in New Issue
Block a user