Skip to content

Commit

Permalink
Go directly into application upload file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccollum-woolpert committed Feb 2, 2024
1 parent 4f08401 commit 5b40a43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,4 @@ <h4 class="strong d-flex mt-4 mb-2">
</div>
</div>
</div>
<div mat-dialog-actions>
<a
class="secondary-link mr-4"
tabindex="0"
(click)="cancel()"
(keydown.enter)="cancel()"
(keydown.space)="cancel()"
>Cancel</a
>
<button
type="submit"
mat-raised-button
color="primary"
[disabled]="form.invalid || validatingUpload || resolvingPlaceIds">
OK
</button>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ export class UploadDialogComponent {
this.scenario = null;
this.fileName.setValue(file.name);
this.validatingUpload = false;

if (!this.scenarioHasPlaceIds) {
this.solve();
}

return;
}

Expand All @@ -171,6 +176,10 @@ export class UploadDialogComponent {
}
this.validatingUpload = false;
this.fileName.setValue(file.name);

if (!this.zipContentsInvalid && !this.fileInvalid && !this.scenarioHasPlaceIds) {
this.solve();
}
}

get scenarioHasPlaceIds(): boolean {
Expand Down Expand Up @@ -243,6 +252,10 @@ export class UploadDialogComponent {
}

this.resolvingPlaceIds = false;

if (!this.placeIdError) {
this.solve();
}
}
}

Expand Down

0 comments on commit 5b40a43

Please sign in to comment.