Skip to content

Commit

Permalink
Remove merge error duplicated mat card
Browse files Browse the repository at this point in the history
  • Loading branch information
romeonicholas committed Oct 31, 2023
1 parent c3e8895 commit 78327ea
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,53 @@

<div class="wrapper flex justify-center">
<mat-card class="mat-card-form" *ngIf="modelService.model$ | async">
<div class="wrapper flex justify-center">
<mat-card class="mat-card-form" *ngIf="modelService.model$ | async">
<form [formGroup]="form">
<fieldset class="flex justify-between">
<mat-form-field class="max-w-[185px]" appearance="fill">
<mat-label>Modelling tool</mat-label>
<input
matInput
[value]="(modelService.model$ | async)!.tool.name"
disabled
/>
</mat-form-field>
<mat-form-field class="max-w-[185px]" appearance="fill">
<mat-label>Version</mat-label>
<mat-select formControlName="version" id="version-selector">
<mat-option
*ngFor="let version of this.toolVersions"
[value]="version.id"
>
{{ version.name }}
<span *ngIf="version.is_recommended"> (recommended)</span>
<span *ngIf="version.is_deprecated"> (deprecated)</span>
</mat-option>
</mat-select>
</mat-form-field>
</fieldset>
<fieldset>
<mat-form-field appearance="fill">
<mat-label>Model nature</mat-label>
<mat-select formControlName="nature">
<mat-option
*ngFor="let nature of this.toolNatures"
[value]="nature.id"
>
{{ nature.name }}
</mat-option>
</mat-select>
</mat-form-field>
</fieldset>
</form>
<div class="flex justify-end">
<button
mat-raised-button
color="primary"
[disabled]="!form.valid || buttonDisabled"
(click)="onSubmit()"
>
Save model
</button>
</div>
</mat-card>
<form [formGroup]="form">
<fieldset class="flex justify-between">
<mat-form-field class="max-w-[185px]" appearance="fill">
<mat-label>Modelling tool</mat-label>
<input
matInput
[value]="(modelService.model$ | async)!.tool.name"
disabled
/>
</mat-form-field>
<mat-form-field class="max-w-[185px]" appearance="fill">
<mat-label>Version</mat-label>
<mat-select formControlName="version" id="version-selector">
<mat-option
*ngFor="let version of this.toolVersions"
[value]="version.id"
>
{{ version.name }}
<span *ngIf="version.is_recommended"> (recommended)</span>
<span *ngIf="version.is_deprecated"> (deprecated)</span>
</mat-option>
</mat-select>
</mat-form-field>
</fieldset>
<fieldset>
<mat-form-field appearance="fill">
<mat-label>Model nature</mat-label>
<mat-select formControlName="nature">
<mat-option
*ngFor="let nature of this.toolNatures"
[value]="nature.id"
>
{{ nature.name }}
</mat-option>
</mat-select>
</mat-form-field>
</fieldset>
</form>
<div class="flex justify-end">
<button
mat-raised-button
color="primary"
[disabled]="!form.valid || buttonDisabled"
(click)="onSubmit()"
>
Save model
</button>
</div>
</mat-card>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { Router } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { filter, take } from 'rxjs';
import {
Expand Down

0 comments on commit 78327ea

Please sign in to comment.