diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+ +
\ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+ +
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+ +
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+ +
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+ +
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+ +
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/dashboards/dashboard4/dashboard4.component.html b/src/app/dashboards/dashboard4/dashboard4.component.html index 21b12e3..d15b0d4 100644 --- a/src/app/dashboards/dashboard4/dashboard4.component.html +++ b/src/app/dashboards/dashboard4/dashboard4.component.html @@ -3,12 +3,12 @@
-
+
- +
-
+
- +
\ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/dashboards/dashboard4/dashboard4.component.html b/src/app/dashboards/dashboard4/dashboard4.component.html index 21b12e3..d15b0d4 100644 --- a/src/app/dashboards/dashboard4/dashboard4.component.html +++ b/src/app/dashboards/dashboard4/dashboard4.component.html @@ -3,12 +3,12 @@
-
+
- +
-
+
- +
\ No newline at end of file diff --git a/src/app/shared/sidebar/menu-items.ts b/src/app/shared/sidebar/menu-items.ts index 716ed81..a42d118 100644 --- a/src/app/shared/sidebar/menu-items.ts +++ b/src/app/shared/sidebar/menu-items.ts @@ -3,6 +3,110 @@ export const ROUTES: RouteInfo[] = [ { path: '', + title: 'Inicio', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '', + title: 'Reservas', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create', + title: 'Crear', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/to-assign', + title: 'Asignar', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/search-or-create', + title: 'Buscar o Crear Cliente', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/delete', + title: 'Eliminar', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/see-reservation', + title: 'Ver Reservacion', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + ] + }, + { + path: '', title: 'Personal', icon: '', class: 'nav-small-cap', @@ -49,6 +153,16 @@ labelClass: '', extralink: false, submenu: [] + }, + { + path: '/dashboard/dashboard4', + title: 'Manager Hotel', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] } ] }, diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/dashboards/dashboard4/dashboard4.component.html b/src/app/dashboards/dashboard4/dashboard4.component.html index 21b12e3..d15b0d4 100644 --- a/src/app/dashboards/dashboard4/dashboard4.component.html +++ b/src/app/dashboards/dashboard4/dashboard4.component.html @@ -3,12 +3,12 @@
-
+
- +
-
+
- +
\ No newline at end of file diff --git a/src/app/shared/sidebar/menu-items.ts b/src/app/shared/sidebar/menu-items.ts index 716ed81..a42d118 100644 --- a/src/app/shared/sidebar/menu-items.ts +++ b/src/app/shared/sidebar/menu-items.ts @@ -3,6 +3,110 @@ export const ROUTES: RouteInfo[] = [ { path: '', + title: 'Inicio', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '', + title: 'Reservas', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create', + title: 'Crear', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/to-assign', + title: 'Asignar', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/search-or-create', + title: 'Buscar o Crear Cliente', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/delete', + title: 'Eliminar', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/see-reservation', + title: 'Ver Reservacion', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + ] + }, + { + path: '', title: 'Personal', icon: '', class: 'nav-small-cap', @@ -49,6 +153,16 @@ labelClass: '', extralink: false, submenu: [] + }, + { + path: '/dashboard/dashboard4', + title: 'Manager Hotel', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] } ] }, diff --git a/src/assets/images/room/habitacion doble.jpg b/src/assets/images/room/habitacion doble.jpg new file mode 100644 index 0000000..1c713cf --- /dev/null +++ b/src/assets/images/room/habitacion doble.jpg Binary files differ diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/dashboards/dashboard4/dashboard4.component.html b/src/app/dashboards/dashboard4/dashboard4.component.html index 21b12e3..d15b0d4 100644 --- a/src/app/dashboards/dashboard4/dashboard4.component.html +++ b/src/app/dashboards/dashboard4/dashboard4.component.html @@ -3,12 +3,12 @@
-
+
- +
-
+
- +
\ No newline at end of file diff --git a/src/app/shared/sidebar/menu-items.ts b/src/app/shared/sidebar/menu-items.ts index 716ed81..a42d118 100644 --- a/src/app/shared/sidebar/menu-items.ts +++ b/src/app/shared/sidebar/menu-items.ts @@ -3,6 +3,110 @@ export const ROUTES: RouteInfo[] = [ { path: '', + title: 'Inicio', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '', + title: 'Reservas', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create', + title: 'Crear', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/to-assign', + title: 'Asignar', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/search-or-create', + title: 'Buscar o Crear Cliente', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/delete', + title: 'Eliminar', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/see-reservation', + title: 'Ver Reservacion', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + ] + }, + { + path: '', title: 'Personal', icon: '', class: 'nav-small-cap', @@ -49,6 +153,16 @@ labelClass: '', extralink: false, submenu: [] + }, + { + path: '/dashboard/dashboard4', + title: 'Manager Hotel', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] } ] }, diff --git a/src/assets/images/room/habitacion doble.jpg b/src/assets/images/room/habitacion doble.jpg new file mode 100644 index 0000000..1c713cf --- /dev/null +++ b/src/assets/images/room/habitacion doble.jpg Binary files differ diff --git a/src/assets/images/room/habitacion sencilla.jpg b/src/assets/images/room/habitacion sencilla.jpg new file mode 100644 index 0000000..594cc60 --- /dev/null +++ b/src/assets/images/room/habitacion sencilla.jpg Binary files differ diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/dashboards/dashboard4/dashboard4.component.html b/src/app/dashboards/dashboard4/dashboard4.component.html index 21b12e3..d15b0d4 100644 --- a/src/app/dashboards/dashboard4/dashboard4.component.html +++ b/src/app/dashboards/dashboard4/dashboard4.component.html @@ -3,12 +3,12 @@
-
+
- +
-
+
- +
\ No newline at end of file diff --git a/src/app/shared/sidebar/menu-items.ts b/src/app/shared/sidebar/menu-items.ts index 716ed81..a42d118 100644 --- a/src/app/shared/sidebar/menu-items.ts +++ b/src/app/shared/sidebar/menu-items.ts @@ -3,6 +3,110 @@ export const ROUTES: RouteInfo[] = [ { path: '', + title: 'Inicio', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '', + title: 'Reservas', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create', + title: 'Crear', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/to-assign', + title: 'Asignar', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/search-or-create', + title: 'Buscar o Crear Cliente', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/delete', + title: 'Eliminar', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/see-reservation', + title: 'Ver Reservacion', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + ] + }, + { + path: '', title: 'Personal', icon: '', class: 'nav-small-cap', @@ -49,6 +153,16 @@ labelClass: '', extralink: false, submenu: [] + }, + { + path: '/dashboard/dashboard4', + title: 'Manager Hotel', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] } ] }, diff --git a/src/assets/images/room/habitacion doble.jpg b/src/assets/images/room/habitacion doble.jpg new file mode 100644 index 0000000..1c713cf --- /dev/null +++ b/src/assets/images/room/habitacion doble.jpg Binary files differ diff --git a/src/assets/images/room/habitacion sencilla.jpg b/src/assets/images/room/habitacion sencilla.jpg new file mode 100644 index 0000000..594cc60 --- /dev/null +++ b/src/assets/images/room/habitacion sencilla.jpg Binary files differ diff --git a/src/assets/images/room/privada doble.jpg b/src/assets/images/room/privada doble.jpg new file mode 100644 index 0000000..4274d88 --- /dev/null +++ b/src/assets/images/room/privada doble.jpg Binary files differ diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/dashboards/dashboard4/dashboard4.component.html b/src/app/dashboards/dashboard4/dashboard4.component.html index 21b12e3..d15b0d4 100644 --- a/src/app/dashboards/dashboard4/dashboard4.component.html +++ b/src/app/dashboards/dashboard4/dashboard4.component.html @@ -3,12 +3,12 @@
-
+
- +
-
+
- +
\ No newline at end of file diff --git a/src/app/shared/sidebar/menu-items.ts b/src/app/shared/sidebar/menu-items.ts index 716ed81..a42d118 100644 --- a/src/app/shared/sidebar/menu-items.ts +++ b/src/app/shared/sidebar/menu-items.ts @@ -3,6 +3,110 @@ export const ROUTES: RouteInfo[] = [ { path: '', + title: 'Inicio', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '', + title: 'Reservas', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create', + title: 'Crear', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/to-assign', + title: 'Asignar', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/search-or-create', + title: 'Buscar o Crear Cliente', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/delete', + title: 'Eliminar', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/see-reservation', + title: 'Ver Reservacion', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + ] + }, + { + path: '', title: 'Personal', icon: '', class: 'nav-small-cap', @@ -49,6 +153,16 @@ labelClass: '', extralink: false, submenu: [] + }, + { + path: '/dashboard/dashboard4', + title: 'Manager Hotel', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] } ] }, diff --git a/src/assets/images/room/habitacion doble.jpg b/src/assets/images/room/habitacion doble.jpg new file mode 100644 index 0000000..1c713cf --- /dev/null +++ b/src/assets/images/room/habitacion doble.jpg Binary files differ diff --git a/src/assets/images/room/habitacion sencilla.jpg b/src/assets/images/room/habitacion sencilla.jpg new file mode 100644 index 0000000..594cc60 --- /dev/null +++ b/src/assets/images/room/habitacion sencilla.jpg Binary files differ diff --git a/src/assets/images/room/privada doble.jpg b/src/assets/images/room/privada doble.jpg new file mode 100644 index 0000000..4274d88 --- /dev/null +++ b/src/assets/images/room/privada doble.jpg Binary files differ diff --git a/src/assets/images/room/suite privada.jpg b/src/assets/images/room/suite privada.jpg new file mode 100644 index 0000000..3162177 --- /dev/null +++ b/src/assets/images/room/suite privada.jpg Binary files differ diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/dashboards/dashboard4/dashboard4.component.html b/src/app/dashboards/dashboard4/dashboard4.component.html index 21b12e3..d15b0d4 100644 --- a/src/app/dashboards/dashboard4/dashboard4.component.html +++ b/src/app/dashboards/dashboard4/dashboard4.component.html @@ -3,12 +3,12 @@
-
+
- +
-
+
- +
\ No newline at end of file diff --git a/src/app/shared/sidebar/menu-items.ts b/src/app/shared/sidebar/menu-items.ts index 716ed81..a42d118 100644 --- a/src/app/shared/sidebar/menu-items.ts +++ b/src/app/shared/sidebar/menu-items.ts @@ -3,6 +3,110 @@ export const ROUTES: RouteInfo[] = [ { path: '', + title: 'Inicio', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '', + title: 'Reservas', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create', + title: 'Crear', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/to-assign', + title: 'Asignar', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/search-or-create', + title: 'Buscar o Crear Cliente', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/delete', + title: 'Eliminar', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/see-reservation', + title: 'Ver Reservacion', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + ] + }, + { + path: '', title: 'Personal', icon: '', class: 'nav-small-cap', @@ -49,6 +153,16 @@ labelClass: '', extralink: false, submenu: [] + }, + { + path: '/dashboard/dashboard4', + title: 'Manager Hotel', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] } ] }, diff --git a/src/assets/images/room/habitacion doble.jpg b/src/assets/images/room/habitacion doble.jpg new file mode 100644 index 0000000..1c713cf --- /dev/null +++ b/src/assets/images/room/habitacion doble.jpg Binary files differ diff --git a/src/assets/images/room/habitacion sencilla.jpg b/src/assets/images/room/habitacion sencilla.jpg new file mode 100644 index 0000000..594cc60 --- /dev/null +++ b/src/assets/images/room/habitacion sencilla.jpg Binary files differ diff --git a/src/assets/images/room/privada doble.jpg b/src/assets/images/room/privada doble.jpg new file mode 100644 index 0000000..4274d88 --- /dev/null +++ b/src/assets/images/room/privada doble.jpg Binary files differ diff --git a/src/assets/images/room/suite privada.jpg b/src/assets/images/room/suite privada.jpg new file mode 100644 index 0000000..3162177 --- /dev/null +++ b/src/assets/images/room/suite privada.jpg Binary files differ diff --git a/src/assets/images/room/suite.jpg b/src/assets/images/room/suite.jpg new file mode 100644 index 0000000..66c3adc --- /dev/null +++ b/src/assets/images/room/suite.jpg Binary files differ diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a60fbcc..2e10d5f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,10 @@ children: [ { path: '', redirectTo: '/dashboard/dashboard1', pathMatch: 'full' }, { + path: 'bookings', + loadChildren: () => import('./bookings/bookings.module').then(m => m.BookingsModule) + }, + { path: 'dashboard', loadChildren: () => import('./dashboards/dashboard.module').then(m => m.DashboardModule) }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 97fb301..d590b84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { AppComponent } from './app.component'; import { SpinnerComponent } from './shared/spinner.component'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true, wheelSpeed: 2, diff --git a/src/app/bookings/bookings-components/filter/filter.component.css b/src/app/bookings/bookings-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.css diff --git a/src/app/bookings/bookings-components/filter/filter.component.html b/src/app/bookings/bookings-components/filter/filter.component.html new file mode 100644 index 0000000..a3c0776 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.html @@ -0,0 +1,40 @@ +
+
Filtro
+
+ +
+
+ +
+ + +
+
+ + +
+
+

+
+
+ +
+ + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/bookings/bookings-components/filter/filter.component.ts b/src/app/bookings/bookings-components/filter/filter.component.ts new file mode 100644 index 0000000..949ca99 --- /dev/null +++ b/src/app/bookings/bookings-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FilterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/bookings-components/list/list.component.css b/src/app/bookings/bookings-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.css diff --git a/src/app/bookings/bookings-components/list/list.component.html b/src/app/bookings/bookings-components/list/list.component.html new file mode 100644 index 0000000..d1aba39 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.html @@ -0,0 +1,40 @@ +
+
Habitaciones Disponibles
+
+
+
+
+
+ +
+ + +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/bookings/bookings-components/list/list.component.ts b/src/app/bookings/bookings-components/list/list.component.ts new file mode 100644 index 0000000..f7a75f3 --- /dev/null +++ b/src/app/bookings/bookings-components/list/list.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; +interface Room { + id?: number; + name: string; + description: string; + active: boolean; + price: number; + discount: number; + photo: string; + hotel_id: number; + type_room_id: number; +} +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'] +}) +export class ListComponent implements OnInit { + closeResult = ''; + listaHab: Room[]; + constructor(private modalService: NgbModal) { } + + ngOnInit(): void { + this.listRoom(); + } + open(content) { + this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { + this.closeResult = `Closed with: ${result}`; + }, (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + }); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + listRoom() { + const rooms: Room[] = [ + { + id: 1, + name: 'suite', + description: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 2, + name: 'Habitacion con vista al mar', + description: + 'Consta de dos camas y una vista increible', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/vista la mar.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 3, + name: 'Habitacion privada doble', + description: + 'Con closet y cama doble ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/privada doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 4, + name: 'Suite Privada', + description: + 'suite privada', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/suite privada.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 5, + name: 'Habitacion Doble', + description: + 'Cama doble', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion doble.jpg', + hotel_id: 1, + type_room_id: 2, + }, + { + id: 6, + name: 'Habitacion sencilla', + description: + 'Cama sencilla ', + active: true, + price: 12456, + discount: 3456, + photo: 'assets/images/room/habitacion sencilla.jpg', + hotel_id: 1, + type_room_id: 2, + }, + ]; + this.listaHab = rooms; + } + +} diff --git a/src/app/bookings/bookings.module.ts b/src/app/bookings/bookings.module.ts new file mode 100644 index 0000000..3887a58 --- /dev/null +++ b/src/app/bookings/bookings.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BookingsRoutes } from './bookings.routing'; +import { RouterModule } from '@angular/router'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; + +@NgModule({ + declarations: [ + SearchOrCreateComponent, + SearchRoomComponent, + ToAssignComponent, + FilterComponent, + ListComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(BookingsRoutes), + ] +}) +export class BookingsModule { } diff --git a/src/app/bookings/bookings.routing.ts b/src/app/bookings/bookings.routing.ts new file mode 100644 index 0000000..45159e8 --- /dev/null +++ b/src/app/bookings/bookings.routing.ts @@ -0,0 +1,46 @@ +import { Routes } from '@angular/router'; +import { FilterComponent } from './bookings-components/filter/filter.component'; +import { ListComponent } from './bookings-components/list/list.component'; +import { SearchOrCreateComponent } from './create/search-or-create/search-or-create.component'; +import { SearchRoomComponent } from './create/search-room/search-room.component'; +import { ToAssignComponent } from './create/to-assign/to-assign.component'; + + + +export const BookingsRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'bookings-components', + children: [ + { + path: 'filter', + component: FilterComponent , + }, + { + path: 'list', + component: ListComponent, + } + ] + }, + { + path: 'create', + children: [ + { + path: 'search-or-create', + component: SearchOrCreateComponent, + }, + { + path: 'search-room', + component: SearchRoomComponent, + }, + { + path: 'to-assign', + component: ToAssignComponent, + } + ] + }, + ] + } +]; diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.css b/src/app/bookings/create/search-or-create/search-or-create.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.css diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.html b/src/app/bookings/create/search-or-create/search-or-create.component.html new file mode 100644 index 0000000..27419c9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.html @@ -0,0 +1 @@ +

hola buscar y crear

\ No newline at end of file diff --git a/src/app/bookings/create/search-or-create/search-or-create.component.ts b/src/app/bookings/create/search-or-create/search-or-create.component.ts new file mode 100644 index 0000000..f7161a9 --- /dev/null +++ b/src/app/bookings/create/search-or-create/search-or-create.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-or-create', + templateUrl: './search-or-create.component.html', + styleUrls: ['./search-or-create.component.css'] +}) +export class SearchOrCreateComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/search-room/search-room.component.css b/src/app/bookings/create/search-room/search-room.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.css diff --git a/src/app/bookings/create/search-room/search-room.component.html b/src/app/bookings/create/search-room/search-room.component.html new file mode 100644 index 0000000..d15b0d4 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.html @@ -0,0 +1,14 @@ + + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/bookings/create/search-room/search-room.component.ts b/src/app/bookings/create/search-room/search-room.component.ts new file mode 100644 index 0000000..48a1ae5 --- /dev/null +++ b/src/app/bookings/create/search-room/search-room.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-search-room', + templateUrl: './search-room.component.html', + styleUrls: ['./search-room.component.css'] +}) +export class SearchRoomComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bookings/create/to-assign/to-assign.component.css b/src/app/bookings/create/to-assign/to-assign.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.css diff --git a/src/app/bookings/create/to-assign/to-assign.component.html b/src/app/bookings/create/to-assign/to-assign.component.html new file mode 100644 index 0000000..223d602 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.html @@ -0,0 +1 @@ +

to-assign works!

diff --git a/src/app/bookings/create/to-assign/to-assign.component.ts b/src/app/bookings/create/to-assign/to-assign.component.ts new file mode 100644 index 0000000..62ce050 --- /dev/null +++ b/src/app/bookings/create/to-assign/to-assign.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-to-assign', + templateUrl: './to-assign.component.html', + styleUrls: ['./to-assign.component.css'] +}) +export class ToAssignComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.css b/src/app/dashboards/dashboard-components/filter/filter.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.css diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.html b/src/app/dashboards/dashboard-components/filter/filter.component.html new file mode 100644 index 0000000..e4da1d2 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.html @@ -0,0 +1,11 @@ +
+

Filtro

+ +
+
    +
  • sss
  • +
  • Second item
  • +
  • Third item
  • +
  • Fourth
  • +
+
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filter/filter.component.ts b/src/app/dashboards/dashboard-components/filter/filter.component.ts new file mode 100644 index 0000000..65c9451 --- /dev/null +++ b/src/app/dashboards/dashboard-components/filter/filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter', + templateUrl: './filter.component.html', + styleUrls: ['./filter.component.css'] +}) +export class FiltroComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.css b/src/app/dashboards/dashboard-components/filtro/filtro.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.html b/src/app/dashboards/dashboard-components/filtro/filtro.component.html deleted file mode 100644 index 116674f..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts deleted file mode 100644 index 67c03ef..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FiltroComponent } from './filtro.component'; - -describe('FiltroComponent', () => { - let component: FiltroComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FiltroComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FiltroComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts b/src/app/dashboards/dashboard-components/filtro/filtro.component.ts deleted file mode 100644 index 6c79d9b..0000000 --- a/src/app/dashboards/dashboard-components/filtro/filtro.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-filtro', - templateUrl: './filtro.component.html', - styleUrls: ['./filtro.component.css'] -}) -export class FiltroComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/dashboards/dashboard-components/list/list.component.css b/src/app/dashboards/dashboard-components/list/list.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.css diff --git a/src/app/dashboards/dashboard-components/list/list.component.html b/src/app/dashboards/dashboard-components/list/list.component.html new file mode 100644 index 0000000..60ff089 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.html @@ -0,0 +1,86 @@ +
+
Habitaciones Disponibles
+ +
+
+ + +
+
+
+ +
+ hijnjonm +
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/list/list.component.ts b/src/app/dashboards/dashboard-components/list/list.component.ts new file mode 100644 index 0000000..48a4792 --- /dev/null +++ b/src/app/dashboards/dashboard-components/list/list.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'app-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.css'], +}) +export class ListarComponent implements OnInit { + closeResult = ''; + + constructor(private modalService: NgbModal) {} + + ngOnInit(): void {} + + open(content) { + this.modalService + .open(content, { ariaLabelledBy: 'modal-basic-title' }) + .result.then( + (result) => { + this.closeResult = `Closed with: ${result}`; + }, + (reason) => { + this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + } + ); + } + + private getDismissReason(reason: any): string { + if (reason === ModalDismissReasons.ESC) { + return 'by pressing ESC'; + } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + return 'by clicking on a backdrop'; + } else { + return `with: ${reason}`; + } + } + +} diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.css b/src/app/dashboards/dashboard-components/listar/listar.component.css deleted file mode 100644 index e69de29..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.css +++ /dev/null diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.html b/src/app/dashboards/dashboard-components/listar/listar.component.html deleted file mode 100644 index b2f8d52..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.html +++ /dev/null @@ -1,61 +0,0 @@ -
- -
-
- - - - - - - - - - - - - - - - -
NombreDisponibilidadAcciones
- - - -
Sencilla
- Habitacion sencilla -
-
- - - - -
-
- Actualizar - Eliminar -
-
-
-
- - - - - \ No newline at end of file diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts b/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts deleted file mode 100644 index 2e56019..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ListarComponent } from './listar.component'; - -describe('ListarComponent', () => { - let component: ListarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ListarComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ListarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/dashboards/dashboard-components/listar/listar.component.ts b/src/app/dashboards/dashboard-components/listar/listar.component.ts deleted file mode 100644 index 348c008..0000000 --- a/src/app/dashboards/dashboard-components/listar/listar.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; - -@Component({ - selector: 'app-listar', - templateUrl: './listar.component.html', - styleUrls: ['./listar.component.css'] -}) -export class ListarComponent implements OnInit { - closeResult = ''; - constructor(private modalService: NgbModal) { } - - ngOnInit(): void { - } - - open(content) { - this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => { - this.closeResult = `Closed with: ${result}`; - }, (reason) => { - this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; - }); - } - - private getDismissReason(reason: any): string { - if (reason === ModalDismissReasons.ESC) { - return 'by pressing ESC'; - } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { - return 'by clicking on a backdrop'; - } else { - return `with: ${reason}`; - } - } - - -} - - diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.css b/src/app/dashboards/dashboard-components/reserve/reserve.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.css diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.html b/src/app/dashboards/dashboard-components/reserve/reserve.component.html new file mode 100644 index 0000000..01cd01d --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.html @@ -0,0 +1 @@ +

reserve works!

diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts new file mode 100644 index 0000000..ae618fa --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReserveComponent } from './reserve.component'; + +describe('ReserveComponent', () => { + let component: ReserveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReserveComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReserveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboards/dashboard-components/reserve/reserve.component.ts b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts new file mode 100644 index 0000000..ac8dcc8 --- /dev/null +++ b/src/app/dashboards/dashboard-components/reserve/reserve.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reserve', + templateUrl: './reserve.component.html', + styleUrls: ['./reserve.component.css'] +}) +export class ReserveComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/dashboards/dashboard.module.ts b/src/app/dashboards/dashboard.module.ts index 731d446..785260f 100644 --- a/src/app/dashboards/dashboard.module.ts +++ b/src/app/dashboards/dashboard.module.ts @@ -6,6 +6,7 @@ import { Dashboard1Component } from './dashboard1/dashboard1.component'; import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; +import { Dashboard4Component } from './dashboard4/dashboard4.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DashboardRoutes } from './dashboard.routing'; import { ChartistModule } from 'ng-chartist'; @@ -26,9 +27,9 @@ import { FeedsComponent } from './dashboard-components/feeds/feeds.component'; import { EarningComponent } from './dashboard-components/earning-report/earning-report.component'; import { ActivityComponent } from './dashboard-components/activity-timeline/activity.component'; -import { Dashboard4Component } from './dashboard4/dashboard4.component'; -import { FiltroComponent } from './dashboard-components/filtro/filtro.component'; -import { ListarComponent } from './dashboard-components/listar/listar.component'; +import { FiltroComponent } from './dashboard-components/filter/filter.component'; +import { ListarComponent } from './dashboard-components/list/list.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; @NgModule({ imports: [ @@ -44,6 +45,7 @@ Dashboard1Component, Dashboard2Component, Dashboard3Component, + Dashboard4Component, IncomeCounterComponent, ProjectCounterComponent, ProjectComponent, @@ -59,9 +61,9 @@ FeedsComponent, EarningComponent, ActivityComponent, - Dashboard4Component, FiltroComponent, - ListarComponent + ListarComponent, + ReserveComponent ] }) export class DashboardModule { } diff --git a/src/app/dashboards/dashboard.routing.ts b/src/app/dashboards/dashboard.routing.ts index cdce98a..a972a04 100644 --- a/src/app/dashboards/dashboard.routing.ts +++ b/src/app/dashboards/dashboard.routing.ts @@ -4,6 +4,8 @@ import { Dashboard2Component } from './dashboard2/dashboard2.component'; import { Dashboard3Component } from './dashboard3/dashboard3.component'; import { Dashboard4Component } from './dashboard4/dashboard4.component'; +import { ReserveComponent } from './dashboard-components/reserve/reserve.component'; + export const DashboardRoutes: Routes = [ @@ -46,14 +48,18 @@ { path: 'dashboard4', component: Dashboard4Component, - data :{ + data : { title: 'Manager Hotel', urls: [ { title: 'Dashboard', url: '/dashboard'}, { title: 'Manager Hotel'} ] } - } + }, + { + path: 'reserve', + component: ReserveComponent + }, ] } ]; diff --git a/src/app/dashboards/dashboard4/dashboard4.component.html b/src/app/dashboards/dashboard4/dashboard4.component.html index 21b12e3..d15b0d4 100644 --- a/src/app/dashboards/dashboard4/dashboard4.component.html +++ b/src/app/dashboards/dashboard4/dashboard4.component.html @@ -3,12 +3,12 @@
-
+
- +
-
+
- +
\ No newline at end of file diff --git a/src/app/shared/sidebar/menu-items.ts b/src/app/shared/sidebar/menu-items.ts index 716ed81..a42d118 100644 --- a/src/app/shared/sidebar/menu-items.ts +++ b/src/app/shared/sidebar/menu-items.ts @@ -3,6 +3,110 @@ export const ROUTES: RouteInfo[] = [ { path: '', + title: 'Inicio', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '', + title: 'Reservas', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create', + title: 'Crear', + icon: '', + class: 'has-arrow', + label: '', + labelClass: 'label label-rouded label-themecolor', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/to-assign', + title: 'Asignar', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + { + path: '/bookings/create/search-or-create', + title: 'Buscar o Crear Cliente', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/delete', + title: 'Eliminar', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + { + path: '/bookings/see-reservation', + title: 'Ver Reservacion', + icon: '', + class: 'has-arrow', + label: '', + labelClass: '', + extralink: false, + submenu: [ + { + path: '/bookings/create/search-room', + title: 'Buscar Habitacion', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] + }, + ] + }, + ] + }, + { + path: '', title: 'Personal', icon: '', class: 'nav-small-cap', @@ -49,6 +153,16 @@ labelClass: '', extralink: false, submenu: [] + }, + { + path: '/dashboard/dashboard4', + title: 'Manager Hotel', + icon: '', + class: '', + label: '', + labelClass: '', + extralink: false, + submenu: [] } ] }, diff --git a/src/assets/images/room/habitacion doble.jpg b/src/assets/images/room/habitacion doble.jpg new file mode 100644 index 0000000..1c713cf --- /dev/null +++ b/src/assets/images/room/habitacion doble.jpg Binary files differ diff --git a/src/assets/images/room/habitacion sencilla.jpg b/src/assets/images/room/habitacion sencilla.jpg new file mode 100644 index 0000000..594cc60 --- /dev/null +++ b/src/assets/images/room/habitacion sencilla.jpg Binary files differ diff --git a/src/assets/images/room/privada doble.jpg b/src/assets/images/room/privada doble.jpg new file mode 100644 index 0000000..4274d88 --- /dev/null +++ b/src/assets/images/room/privada doble.jpg Binary files differ diff --git a/src/assets/images/room/suite privada.jpg b/src/assets/images/room/suite privada.jpg new file mode 100644 index 0000000..3162177 --- /dev/null +++ b/src/assets/images/room/suite privada.jpg Binary files differ diff --git a/src/assets/images/room/suite.jpg b/src/assets/images/room/suite.jpg new file mode 100644 index 0000000..66c3adc --- /dev/null +++ b/src/assets/images/room/suite.jpg Binary files differ diff --git a/src/assets/images/room/vista al mar.jpg b/src/assets/images/room/vista al mar.jpg new file mode 100644 index 0000000..733ba91 --- /dev/null +++ b/src/assets/images/room/vista al mar.jpg Binary files differ