Spaces:
Building
Building
Update flare-ui/src/app/dialogs/api-edit-dialog/api-edit-dialog.component.html
Browse files
flare-ui/src/app/dialogs/api-edit-dialog/api-edit-dialog.component.html
CHANGED
@@ -44,29 +44,32 @@
|
|
44 |
class="json-textarea"
|
45 |
(click)="saveCursorPosition('body_template', $event)"
|
46 |
(keyup)="saveCursorPosition('body_template', $event)"></textarea>
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
</
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
70 |
</div>
|
71 |
</div>
|
72 |
|
|
|
44 |
class="json-textarea"
|
45 |
(click)="saveCursorPosition('body_template', $event)"
|
46 |
(keyup)="saveCursorPosition('body_template', $event)"></textarea>
|
47 |
+
<div class="template-helpers">
|
48 |
+
<mat-expansion-panel>
|
49 |
+
<mat-expansion-panel-header>
|
50 |
+
<mat-panel-title>
|
51 |
+
<mat-icon>help_outline</mat-icon>
|
52 |
+
Template Variables
|
53 |
+
</mat-panel-title>
|
54 |
+
</mat-expansion-panel-header>
|
55 |
+
<div class="hint-text" style="margin-bottom: 16px; padding: 16px; background-color: #e3f2fd; border-radius: 4px;">
|
56 |
+
<mat-icon style="vertical-align: middle; color: #1976d2;">info</mat-icon>
|
57 |
+
<strong style="color: #1976d2;">Important:</strong><br>
|
58 |
+
Write all variables <strong>without quotes</strong>: <code>{{'{{'}}variables.pnr{{'}}'}}</code><br>
|
59 |
+
The system will automatically add quotes for string values during execution.<br><br>
|
60 |
+
<strong>Examples:</strong><br>
|
61 |
+
• <code>{ "pnr": {{'{{'}}variables.pnr{{'}}'}} }</code> → <code>{ "pnr": "ABC123" }</code><br>
|
62 |
+
• <code>{ "count": {{'{{'}}variables.passenger_count{{'}}'}} }</code> → <code>{ "count": 2 }</code><br>
|
63 |
+
• <code>{ "active": {{'{{'}}variables.enabled{{'}}'}} }</code> → <code>{ "active": true }</code>
|
64 |
+
</div>
|
65 |
+
<div class="template-list">
|
66 |
+
<mat-chip *ngFor="let templateVar of getTemplateVariables()"
|
67 |
+
(click)="insertTemplateVariable('body_template', templateVar)"
|
68 |
+
class="template-chip">
|
69 |
+
{{ templateVar }}
|
70 |
+
</mat-chip>
|
71 |
+
</div>
|
72 |
+
</mat-expansion-panel>
|
73 |
</div>
|
74 |
</div>
|
75 |
|