Skip to content

Commit

Permalink
feat(): add url to response
Browse files Browse the repository at this point in the history
  • Loading branch information
inpercima committed Feb 23, 2025
1 parent 1a6636e commit 903988b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ public class Lunch {
private String status;

private String pdfLink;

private String url;
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public void prepare() {
*/
public Lunch buildLunch(final String meal) {
final Lunch lunch = new Lunch();
lunch.setUrl(this.getBistro().getUrl());
lunch.setBistroName(this.getBistro().getName());
lunch.setMeal(StringUtils.isNotBlank(state.getStatusText()) ? state.getStatusText() : meal);
lunch.setStatus(this.getState().getStatus());
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/shared/lunch/lunch.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
} @if (loaded) { @for (item of lunch; track item) {
<mat-card class="w-4/5 mx-auto">
<mat-card-header [class]="item.status">
<mat-card-title>{{ item.bistroName }}</mat-card-title>
<mat-card-title><a [href]="item.url" target="_blank">{{ item.bistroName }}</a></mat-card-title>
</mat-card-header>
<mat-divider></mat-divider>
<mat-card-content>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/app/shared/lunch/lunch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export interface Lunch {
status: string;

pdfLink: string;

url: string;
}

0 comments on commit 903988b

Please sign in to comment.