NGO-DB/ndb-core

View on GitHub
src/app/features/config-setup/config-import/config-import.component.html

Summary

Maintainability
Test Coverage
<!-- todo: flex to display below each other with proper margins -->

<app-input-file (fileLoad)="loadData($event)" fileType="csv"></app-input-file>

<br />

<div class="flex-row gap-small">
  <mat-form-field>
    <mat-label>Entity Type</mat-label>
    <input matInput [(ngModel)]="entityName" title="entity type" type="text" />
  </mat-form-field>
  <button
    mat-stroked-button
    (click)="generateConfig(true)"
    [disabled]="!loadedConfigFile"
  >
    Generate Config
  </button>
  <button
    mat-stroked-button
    (click)="generateConfig(false)"
    [disabled]="!loadedConfigFile"
  >
    Generate (without default configs)
  </button>
</div>

<br />

<textarea
  [value]="generatedConfig"
  rows="10"
  class="config-textarea"
></textarea>

<br />

<button mat-stroked-button [cdkCopyToClipboard]="generatedConfig">
  Copy Config to Clipboard
</button>