1 <eg-staff-banner bannerText="Composite Attribute Entry Definitions" i18n-bannerText></eg-staff-banner>
3 <div class="row justify-content-center mb-4">
4 <button class="btn btn-outline-dark text-center" (click)="back()">
5 ← Return to Coded Value Map Configuration
9 <h5>Record Attribute: {{attribute}}</h5>
10 <h5>Coded Value: {{code}} / {{value}}</h5>
13 <h3 class="text-center mt-4">Composite Data Expression</h3>
14 <div class="p-2 text-white bg-dark rounded col-lg-8 offset-lg-2">
15 {{expressionAsString()}}
18 <h3 class="mt-4">Composite Data Tree</h3>
20 <div class="col-lg-6">
21 <div class="d-flex mb-4" *ngIf="tree">
22 <button class="btn btn-warning mr-2" (click)="deleteNode()"
23 [disabled]="!hasSelectedNode()" i18n>
26 <button class="btn btn-success mr-1" (click)="saveTree()"
27 [disabled]="!changesMade" i18n>
32 <eg-tree [tree]="tree" (nodeClicked)="nodeClicked($event)" *ngIf="tree">
34 <p *ngIf="!tree" class="font-italic mt-4 ml-3">No tree</p>
36 <button class="btn btn-danger mt-4" (click)="deleteTree()" i18n *ngIf="tree">
40 <div class="col-lg-6">
42 <button class="btn btn-outline-dark mr-3"
43 (click)="newPointType='bool'" i18n>Add New Boolean Operator</button>
44 <button class="btn btn-outline-dark"
45 (click)="newPointType='attr'" i18n>Add New Record Attribute</button>
48 <eg-composite-new-point #newPoint [pointType]="newPointType"></eg-composite-new-point>
50 <div class="row mt-2 ml-2 font-italic" *ngIf="newPointType && tree">
52 <li>Define a new node using the above fields.</li>
53 <li>Select a boolean node in the tree.</li>
54 <li>Click the "Add..." button to add the new node
55 as a child of the selected node.</li>
57 <p><b>Note</b> - A NOT boolean node can only have one child: a record attribute, or an
58 AND / OR boolean node with its own children.</p>
60 <div *ngIf="!tree" class="row mt-2 ml-2 font-italic">To start a new tree add a boolean operator
61 or record attribute and click "New Tree".</div>
62 <div class="row ml-2 mt-2" *ngIf="!tree">
63 <button class="btn btn-success" (click)="createNewTree()" i18n
64 [disabled]="newTreeButtonDisabled()">
68 <div class="row ml-2" *ngIf="newPointType && tree">
69 <button class="btn btn-success" (click)="addChildNode()"
70 [disabled]="addButtonDisabled()" i18n>
73 <button class="btn btn-success ml-3" (click)="addChildNode(true)"
74 [disabled]="replaceButtonDisabled()" i18n>
81 <eg-string #saveSuccess i18n-text text="Saved Composite Data Tree"></eg-string>
82 <eg-string #saveFail i18n-text text="Failed to Save Composite Data Tree"></eg-string>