Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSimcoe committed Jul 15, 2024
1 parent 27d9391 commit 1e4c775
Show file tree
Hide file tree
Showing 29 changed files with 106 additions and 23 deletions.
4 changes: 3 additions & 1 deletion application/angular/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { NgModule } from '@angular/core';
import { MatChipsModule } from '@angular/material/chips';
import { MatTableModule } from '@angular/material/table';
import { BrowserModule } from '@angular/platform-browser';

import { HttpClientModule } from '@angular/common/http';
Expand All @@ -8,7 +10,7 @@ import { BoardGameListComponent } from './boardgame/boardgame-list/boardgame-lis

@NgModule({
declarations: [AppComponent, BoardGameListComponent],
imports: [BrowserModule, HttpClientModule],
imports: [BrowserModule, HttpClientModule, MatTableModule, MatChipsModule],
providers: [provideAnimationsAsync()],
bootstrap: [AppComponent],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Release Year</th>
<th>Categories</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let game of boardGames">
<td>{{ game.id }}</td>
<td>{{ game.name }}</td>
<td>{{ game.releaseYear }}</td>
<td>{{ game.categories.join(", ") }}</td>
</tr>
</tbody>
</table>
<mat-table [dataSource]="boardGames">
<!-- ID Column -->
<ng-container matColumnDef="id">
<mat-header-cell *matHeaderCellDef>ID</mat-header-cell>
<mat-cell *matCellDef="let game">{{ game.id }}</mat-cell>
</ng-container>

<!-- Image Column -->
<ng-container matColumnDef="image">
<mat-header-cell *matHeaderCellDef>Image</mat-header-cell>
<mat-cell *matCellDef="let game">
<img [src]="'assets/images/' + game.id + '.png'" alt="{{ game.name }}" />
</mat-cell>
</ng-container>

<!-- Name Column -->
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
<mat-cell *matCellDef="let game">{{ game.name }}</mat-cell>
</ng-container>

<!-- Release Year Column -->
<ng-container matColumnDef="releaseYear">
<mat-header-cell *matHeaderCellDef>Release Year</mat-header-cell>
<mat-cell *matCellDef="let game">{{ game.releaseYear }}</mat-cell>
</ng-container>

<!-- Categories Column -->
<ng-container matColumnDef="categories">
<mat-header-cell *matHeaderCellDef>Categories</mat-header-cell>
<mat-cell *matCellDef="let game">
<mat-chip-set>
<mat-chip *ngFor="let category of game.categories">{{
category
}}</mat-chip>
</mat-chip-set>
</mat-cell>
</ng-container>

<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ export class BoardGameListComponent implements OnInit {
}
);
}

get displayedColumns() {
return ['id', 'image', 'name', 'releaseYear', 'categories'];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.mat-mdc-chip-set {
display: flex;
flex-wrap: wrap;
}

.mat-mdc-chip {
margin: 2px;
}

.mat-column-categories {
flex: 0 0 250px; /* Adjust this value based on your needs */
}
Binary file added application/angular/src/assets/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/angular/src/assets/images/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>backend</artifactId>
<artifactId>common-backend</artifactId>

<parent>
<groupId>fr.sciam.backtofront</groupId>
Expand Down
8 changes: 6 additions & 2 deletions application/javafx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@
<artifactId>javafx</artifactId>
<name>JavaFX</name>

<properties>
<quarkusfx.version>0.4.2</quarkusfx.version>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkiverse.fx</groupId>
<artifactId>quarkus-fx</artifactId>
<version>0.4.2</version>
<version>${quarkusfx.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
Expand All @@ -25,7 +29,7 @@
</dependency>
<dependency>
<groupId>fr.sciam.backtofront</groupId>
<artifactId>backend</artifactId>
<artifactId>common-backend</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>Projet multi-modules avec une partie commune et 4 parties spécifiques</description>

<modules>
<module>backend</module>
<module>common-backend</module>
<module>javafx</module>
<module>vaadin</module>
<module>jsf</module>
Expand Down
37 changes: 37 additions & 0 deletions slides/src/main/asciidoc/parts/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,41 @@

Hello

= Application Structure Diagram

This diagram illustrates the structure of our application, including the common backend, specific backends, corresponding frontends, the JavaFX application, and the Angular application.

[plantuml]
....
@startuml
package "Backend" {
[common-backend]
[jsf-backend]
[htmx-backend]
[vaadin-backend]
}
package "Frontend" {
[jsf-frontend]
[htmx-frontend]
[vaadin-frontend]
[angular-frontend]
}
[javafx-app]
[common-backend] <|-- [jsf-backend]
[common-backend] <|-- [htmx-backend]
[common-backend] <|-- [vaadin-backend]
[jsf-backend] <-- [jsf-frontend] : consumes
[htmx-backend] <-- [htmx-frontend] : consumes
[vaadin-backend] <-- [vaadin-frontend] : consumes
[common-backend] <-- [angular-frontend] : consumes
[common-backend] <-- [javafx-app] : uses
@enduml
....

0 comments on commit 1e4c775

Please sign in to comment.