Compare commits
1 Commits
fd45bf09db
...
8402774d77
Author | SHA1 | Date | |
---|---|---|---|
8402774d77 |
@ -1,30 +0,0 @@
|
|||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build and analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
||||||
- uses: sonarsource/sonarqube-scan-action@master
|
|
||||||
env:
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
|
||||||
# If you wish to fail your job when the Quality Gate is red, uncomment the
|
|
||||||
# following lines. This would typically be used to fail a deployment.
|
|
||||||
# We do not recommend to use this in a pull request. Prefer using pull request
|
|
||||||
# decoration instead.
|
|
||||||
# - uses: sonarsource/sonarqube-quality-gate-action@master
|
|
||||||
# timeout-minutes: 5
|
|
||||||
# env:
|
|
||||||
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
sonar.projectKey=Hotel-Manager
|
|
@ -1,5 +1,6 @@
|
|||||||
import { Component, Input } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { ChildComponent } from "../Child/child.component";
|
import { ChildComponent } from "../Child/child.component";
|
||||||
|
import { Input } from "@angular/core";
|
||||||
import { Hotel } from "./hotel";
|
import { Hotel } from "./hotel";
|
||||||
import { CurrencyPipe } from "@angular/common";
|
import { CurrencyPipe } from "@angular/common";
|
||||||
import { FormsModule } from "@angular/forms";
|
import { FormsModule } from "@angular/forms";
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
export interface Hotel {
|
export interface Hotel {
|
||||||
hotelId: number;
|
hotelId: number;
|
||||||
hotelName: string;
|
hotelName: String;
|
||||||
description: string;
|
description: String;
|
||||||
price: number;
|
price: number;
|
||||||
imageUrl: string;
|
imageUrl: String;
|
||||||
rating: number;
|
rating: number;
|
||||||
}
|
}
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
import { Injectable } from "@angular/core";
|
|
||||||
import { Hotel } from "../../HotelItem/hotel";
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class HotelService {
|
|
||||||
public getHotels(): Hotel[] {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
"hotelId": 1,
|
|
||||||
"hotelName": "Buea süßes Leben",
|
|
||||||
"description": "Schöne Aussicht am Meer",
|
|
||||||
"price": 230.5,
|
|
||||||
"imageUrl": "assets/img/1.jpg",
|
|
||||||
"rating": 3.5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hotelId": 2,
|
|
||||||
"hotelName": "Marrakesch",
|
|
||||||
"description": "Genießen Sie den Blick auf die Berge",
|
|
||||||
"price": 145.5,
|
|
||||||
"imageUrl": "assets/img/2.jpg",
|
|
||||||
"rating": 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hotelId": 3,
|
|
||||||
"hotelName": "Abuja neuer Palast",
|
|
||||||
"description": "Kompletter Aufenthalt mit Autoservice",
|
|
||||||
"price": 120.12,
|
|
||||||
"imageUrl": "assets/img/3.jpg",
|
|
||||||
"rating": 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hotelId": 4,
|
|
||||||
"hotelName": "Kapstadt Stadt",
|
|
||||||
"description": "Wunderschönes Ambiente für Ihren Aufenthalt",
|
|
||||||
"price": 135.12,
|
|
||||||
"imageUrl": "assets/img/4.jpg",
|
|
||||||
"rating": 2.5
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,20 +3,16 @@ import { HotelItem } from './HotelItem/HotelItem.component';
|
|||||||
import { SearchComponent } from './Search/search.component';
|
import { SearchComponent } from './Search/search.component';
|
||||||
import { UpperCasePipe } from '@angular/common';
|
import { UpperCasePipe } from '@angular/common';
|
||||||
import { TextPipe } from '../text.pipe';
|
import { TextPipe } from '../text.pipe';
|
||||||
import { HotelService } from './Parent/services/hotel.service';
|
|
||||||
import { inject } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [HotelItem, SearchComponent, UpperCasePipe, TextPipe],
|
imports: [HotelItem, SearchComponent, UpperCasePipe, TextPipe],
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
providers: [HotelService],
|
|
||||||
styleUrl: './app.component.css'
|
styleUrl: './app.component.css'
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
public search: string = "";
|
public search: string = "";
|
||||||
public hotelService: HotelService = inject(HotelService);
|
|
||||||
|
|
||||||
public test() {
|
public test() {
|
||||||
console.log(this.search);
|
console.log(this.search);
|
||||||
@ -31,6 +27,39 @@ export class AppComponent {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public hotels = this.hotelService.getHotels();
|
public hotels = [
|
||||||
|
{
|
||||||
|
"hotelId": 1,
|
||||||
|
"hotelName": "Buea süßes Leben",
|
||||||
|
"description": "Schöne Aussicht am Meer",
|
||||||
|
"price": 230.5,
|
||||||
|
"imageUrl": "assets/img/1.jpg",
|
||||||
|
"rating": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hotelId": 2,
|
||||||
|
"hotelName": "Marrakesch",
|
||||||
|
"description": "Genießen Sie den Blick auf die Berge",
|
||||||
|
"price": 145.5,
|
||||||
|
"imageUrl": "assets/img/2.jpg",
|
||||||
|
"rating": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hotelId": 3,
|
||||||
|
"hotelName": "Abuja neuer Palast",
|
||||||
|
"description": "Kompletter Aufenthalt mit Autoservice",
|
||||||
|
"price": 120.12,
|
||||||
|
"imageUrl": "assets/img/3.jpg",
|
||||||
|
"rating": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hotelId": 4,
|
||||||
|
"hotelName": "Kapstadt Stadt",
|
||||||
|
"description": "Wunderschönes Ambiente für Ihren Aufenthalt",
|
||||||
|
"price": 135.12,
|
||||||
|
"imageUrl": "assets/img/4.jpg",
|
||||||
|
"rating": 2.5
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user