Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🀍

1009 B
Raw Blame
<form
  class="d-flex flex-column h-100"
  [formGroup]="createWatchlistItemForm"
  (keyup.enter)="createWatchlistItemForm.valid && onSubmit()"
  (ngSubmit)="onSubmit()"
>
  <h1 i18n mat-dialog-title>Add asset to watchlist</h1>
  <div class="flex-grow-1 py-3" mat-dialog-content>
    <mat-form-field appearance="outline" class="w-100">
      <mat-label i18n>Name, symbol or ISIN</mat-label>
      <gf-symbol-autocomplete formControlName="searchSymbol" />
    </mat-form-field>
  </div>
  <div class="d-flex justify-content-end" mat-dialog-actions>
    <button mat-button type="button" (click)="onCancel()">
      @if (createWatchlistItemForm.dirty) {
        <ng-container i18n>Cancel</ng-container>
      } @else {
        <ng-container i18n>Close</ng-container>
      }
    </button>
    <button
      color="primary"
      mat-flat-button
      type="submit"
      [disabled]="createWatchlistItemForm.hasError('incomplete')"
    >
      <ng-container i18n>Save</ng-container>
    </button>
  </div>
</form>