ciyidogan commited on
Commit
e71d582
·
verified ·
1 Parent(s): de6b186

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
- <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="template-list">
56
- <mat-chip *ngFor="let templateVar of getTemplateVariables()"
57
- (click)="insertTemplateVariable('body_template', templateVar)"
58
- class="template-chip">
59
- {{ templateVar }}
60
- </mat-chip>
61
- </div>
62
- </mat-expansion-panel>
63
- </div>
64
- <button mat-button type="button"
65
- (click)="validateJSON('body_template')"
66
- [color]="validateJSON('body_template') ? 'primary' : 'warn'">
67
- <mat-icon>check_circle</mat-icon>
68
- Validate JSON
69
- </button>
 
 
 
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