Commit 1d823de8 by Your Name

update sdate edate search

parent faad4a2e
......@@ -9,62 +9,44 @@
<div class="card-header">
<div class="col-sm-12">
<form class="form-inline">
<div class="form-group hidden">
<div class="input-group">
<input name="datepicker" class="form-control" ngbDatepicker
#datepicker="ngbDatepicker" [autoClose]="'outside'"
(dateSelect)="onDateSelection($event)" [displayMonths]="2"
[dayTemplate]="t" outsideDays="hidden" [startDate]="fromDate!"
tabindex="-1">
<ng-template #t let-date let-focused="focused">
<span class="custom-day" [class.focused]="focused"
[class.range]="isRange(date)"
[class.faded]="isHovered(date) || isInside(date)"
(mouseenter)="hoveredDate = date"
(mouseleave)="hoveredDate = null">
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input #dpFromDate class="form-control" placeholder="yyyy-mm-dd"
name="dpFromDate" [value]="formatter.format(fromDate)"
(input)="fromDate = validateInput(fromDate, dpFromDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d1"
#c1="ngModel" [(ngModel)]="searchroomModel.sDate" ngbDatepicker
#d1="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d1.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-2">
<div class="form-group">
<div class="input-group">
<input #dpToDate class="form-control" placeholder="yyyy-mm-dd"
name="dpToDate" [value]="formatter.format(toDate)"
(input)="toDate = validateInput(toDate, dpToDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d2"
#c2="ngModel" [(ngModel)]="searchroomModel.eDate" ngbDatepicker
#d2="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d2.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>จอง</button>
<button ngbDropdownItem>ไม่อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
</div>
<button class="btn btn-sm btn-outline-success"
type="submit" (click)="openSearchRoom()">Search</button>
</form>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>จอง</button>
<button ngbDropdownItem>ไม่อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchRoom()">Search</button>
</div>
</div>
</form>
</div>
</div>
</div>
......@@ -133,63 +115,45 @@
<div class="card-header">
<div class="col-sm-12">
<form class="form-inline">
<div class="form-group hidden">
<div class="input-group">
<input name="datepicker" class="form-control" ngbDatepicker
#datepicker="ngbDatepicker" [autoClose]="'outside'"
(dateSelect)="onDateSelection($event)" [displayMonths]="2"
[dayTemplate]="t" outsideDays="hidden" [startDate]="fromDate!"
tabindex="-1">
<ng-template #t let-date let-focused="focused">
<span class="custom-day" [class.focused]="focused"
[class.range]="isRange(date)"
[class.faded]="isHovered(date) || isInside(date)"
(mouseenter)="hoveredDate = date"
(mouseleave)="hoveredDate = null">
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input #dpFromDate class="form-control" placeholder="yyyy-mm-dd"
name="dpFromDate" [value]="formatter.format(fromDate)"
(input)="fromDate = validateInput(fromDate, dpFromDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d1"
#c1="ngModel" [(ngModel)]="searcheqModel.sDate" ngbDatepicker
#d1="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d1.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-2">
<div class="form-group">
<div class="input-group">
<input #dpToDate class="form-control" placeholder="yyyy-mm-dd"
name="dpToDate" [value]="formatter.format(toDate)"
(input)="toDate = validateInput(toDate, dpToDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d2"
#c2="ngModel" [(ngModel)]="searcheqModel.eDate" ngbDatepicker
#d2="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d2.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>รอดำเนินการ</button>
<button ngbDropdownItem>อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
<button ngbDropdownItem>สำเร็จแล้ว</button>
</div>
<button class="btn btn-sm btn-outline-success"
type="submit" (click)="openSearchEq()">Search</button>
</form>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>รอดำเนินการ</button>
<button ngbDropdownItem>อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
<button ngbDropdownItem>สำเร็จแล้ว</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchEq()">Search</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="card-body">
......
......@@ -9,62 +9,44 @@
<div class="card-header">
<div class="col-sm-12">
<form class="form-inline">
<div class="form-group hidden">
<div class="input-group">
<input name="datepicker" class="form-control" ngbDatepicker
#datepicker="ngbDatepicker" [autoClose]="'outside'"
(dateSelect)="onDateSelection($event)" [displayMonths]="2"
[dayTemplate]="t" outsideDays="hidden" [startDate]="fromDate!"
tabindex="-1">
<ng-template #t let-date let-focused="focused">
<span class="custom-day" [class.focused]="focused"
[class.range]="isRange(date)"
[class.faded]="isHovered(date) || isInside(date)"
(mouseenter)="hoveredDate = date"
(mouseleave)="hoveredDate = null">
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input #dpFromDate class="form-control" placeholder="yyyy-mm-dd"
name="dpFromDate" [value]="formatter.format(fromDate)"
(input)="fromDate = validateInput(fromDate, dpFromDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d1"
#c1="ngModel" [(ngModel)]="searchroomModel.sDate" ngbDatepicker
#d1="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d1.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-2">
<div class="form-group">
<div class="input-group">
<input #dpToDate class="form-control" placeholder="yyyy-mm-dd"
name="dpToDate" [value]="formatter.format(toDate)"
(input)="toDate = validateInput(toDate, dpToDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d2"
#c2="ngModel" [(ngModel)]="searchroomModel.eDate" ngbDatepicker
#d2="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d2.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>จอง</button>
<button ngbDropdownItem>ไม่อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
</div>
<button class="btn btn-sm btn-outline-success"
type="submit">Search</button>
</form>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>จอง</button>
<button ngbDropdownItem>ไม่อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchRoom()">Search</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="card-body">
......@@ -85,63 +67,45 @@
<div class="card-header">
<div class="col-sm-12">
<form class="form-inline">
<div class="form-group hidden">
<div class="input-group">
<input name="datepicker" class="form-control" ngbDatepicker
#datepicker="ngbDatepicker" [autoClose]="'outside'"
(dateSelect)="onDateSelection($event)" [displayMonths]="2"
[dayTemplate]="t" outsideDays="hidden" [startDate]="fromDate!"
tabindex="-1">
<ng-template #t let-date let-focused="focused">
<span class="custom-day" [class.focused]="focused"
[class.range]="isRange(date)"
[class.faded]="isHovered(date) || isInside(date)"
(mouseenter)="hoveredDate = date"
(mouseleave)="hoveredDate = null">
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input #dpFromDate class="form-control" placeholder="yyyy-mm-dd"
name="dpFromDate" [value]="formatter.format(fromDate)"
(input)="fromDate = validateInput(fromDate, dpFromDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d1"
#c1="ngModel" [(ngModel)]="searcheqModel.sDate" ngbDatepicker
#d1="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d1.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-2">
<div class="form-group">
<div class="input-group">
<input #dpToDate class="form-control" placeholder="yyyy-mm-dd"
name="dpToDate" [value]="formatter.format(toDate)"
(input)="toDate = validateInput(toDate, dpToDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d2"
#c2="ngModel" [(ngModel)]="searcheqModel.eDate" ngbDatepicker
#d2="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d2.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>รอดำเนินการ</button>
<button ngbDropdownItem>อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
<button ngbDropdownItem>สำเร็จแล้ว</button>
</div>
<button class="btn btn-sm btn-outline-success"
type="submit">Search</button>
</form>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>รอดำเนินการ</button>
<button ngbDropdownItem>อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
<button ngbDropdownItem>สำเร็จแล้ว</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchEq()">Search</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="card-body">
......
......@@ -9,63 +9,44 @@
<div class="card-header">
<div class="col-sm-12">
<form class="form-inline">
<div class="form-group hidden">
<div class="input-group">
<input name="datepicker" class="form-control" ngbDatepicker
[(ngModel)]="searchroomModel.sDate"
[(ngModel)]="searchroomModel.eDate" #datepicker="ngbDatepicker"
[autoClose]="'outside'" (dateSelect)="onDateSelection($event)"
[displayMonths]="2" [dayTemplate]="t" outsideDays="hidden"
[startDate]="fromDate!" tabindex="-1">
<ng-template #t let-date let-focused="focused">
<span class="custom-day" [class.focused]="focused"
[class.range]="isRange(date)"
[class.faded]="isHovered(date) || isInside(date)"
(mouseenter)="hoveredDate = date"
(mouseleave)="hoveredDate = null">
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input #dpFromDate class="form-control" placeholder="yyyy-mm-dd"
name="dpFromDate" [value]="formatter.format(fromDate)"
(input)="fromDate = validateInput(fromDate, dpFromDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d1"
#c1="ngModel" [(ngModel)]="searchroomModel.sDate" ngbDatepicker
#d1="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d1.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-2">
<div class="form-group">
<div class="input-group">
<input #dpToDate class="form-control" placeholder="yyyy-mm-dd"
name="dpToDate" [value]="formatter.format(toDate)"
(input)="toDate = validateInput(toDate, dpToDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d2"
#c2="ngModel" [(ngModel)]="searchroomModel.eDate" ngbDatepicker
#d2="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d2.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>จอง</button>
<button ngbDropdownItem>ไม่อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchRoom()">Search</button>
</form>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>จอง</button>
<button ngbDropdownItem>ไม่อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchRoom()">Search</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="card-body">
......@@ -134,64 +115,45 @@
<div class="card-header">
<div class="col-sm-12">
<form class="form-inline">
<div class="form-group hidden">
<div class="input-group">
<input name="datepicker" class="form-control" ngbDatepicker
[(ngModel)]="searcheqModel.sDate" [(ngModel)]="searcheqModel.eDate"
#datepicker="ngbDatepicker" [autoClose]="'outside'"
(dateSelect)="onDateSelection($event)" [displayMonths]="2"
[dayTemplate]="t" outsideDays="hidden" [startDate]="fromDate!"
tabindex="-1">
<ng-template #t let-date let-focused="focused">
<span class="custom-day" [class.focused]="focused"
[class.range]="isRange(date)"
[class.faded]="isHovered(date) || isInside(date)"
(mouseenter)="hoveredDate = date"
(mouseleave)="hoveredDate = null">
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input #dpFromDate class="form-control" placeholder="yyyy-mm-dd"
name="dpFromDate" [value]="formatter.format(fromDate)"
(input)="fromDate = validateInput(fromDate, dpFromDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d1"
#c1="ngModel" [(ngModel)]="searcheqModel.sDate" ngbDatepicker
#d1="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d1.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-2">
<div class="form-group">
<div class="input-group">
<input #dpToDate class="form-control" placeholder="yyyy-mm-dd"
name="dpToDate" [value]="formatter.format(toDate)"
(input)="toDate = validateInput(toDate, dpToDate.value)">
<input class="form-control" placeholder="dd/mm/yyyy" name="d2"
#c2="ngModel" [(ngModel)]="searcheqModel.eDate" ngbDatepicker
#d2="ngbDatepicker">
<div class="input-group-append">
<button class="btn btn-outline-secondary calendar"
(click)="datepicker.toggle()" type="button"></button>
(click)="d2.toggle()" type="button"></button>
</div>
</div>
</div>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>รอดำเนินการ</button>
<button ngbDropdownItem>อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
<button ngbDropdownItem>สำเร็จแล้ว</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchEq()">Search</button>
</form>
<div class="form-group ml-3">
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>รอดำเนินการ</button>
<button ngbDropdownItem>อนุมัติ</button>
<button ngbDropdownItem>ยกเลิก</button>
<button ngbDropdownItem>สำเร็จแล้ว</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchEq()">Search</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="card-body">
......
......@@ -78,7 +78,7 @@ export class PendingComponent implements OnInit {
constructor(private calendar: NgbCalendar, public formatter: NgbDateParserFormatter, private modalService: NgbModal, private ItemDetailService: ItemDetailService, private RoomDetailService: RoomDetailService, private searchService: SearchService) {
this.fromDate = calendar.getToday();
this.toDate = calendar.getNext(calendar.getToday(), 'd', 10);
this.toDate = calendar.getNext(calendar.getToday(), 'd', 5);
this.refreshItemDetail();
}
......@@ -236,7 +236,7 @@ export class PendingComponent implements OnInit {
openSearchRoom() {
console.log(this.searchroomModel)
// this.searchService.getSearchRoom();
// this.modalService.dismissAll();
// this.ngOnInit();
......
......@@ -9,7 +9,7 @@ import { Type } from '../models/type.model';
export class EquirmentService {
constructor(private http: HttpClient) { }
url: string = "http://5d75-2405-9800-bc03-3665-394e-33ce-7fe3-2ed5.ngrok.io";
url: string = "http://0af1-49-0-64-28.ngrok.io";
listEquirment: Equirment[] = []
addEquirment(model: Equirment) {
......
......@@ -7,7 +7,7 @@ import { Observable } from 'rxjs';
export class ItemDetailService {
constructor(private http: HttpClient) { }
url: string = "http://5d75-2405-9800-bc03-3665-394e-33ce-7fe3-2ed5.ngrok.io";
url: string = "http://0af1-49-0-64-28.ngrok.io";
listItemDetail: ItemDetail[] = []
addItemDetail(model: ItemDetail) {
......
......@@ -11,7 +11,7 @@ export class RoomDetailService {
}
constructor(private http: HttpClient) { }
url: string = "http://5d75-2405-9800-bc03-3665-394e-33ce-7fe3-2ed5.ngrok.io";
url: string = "http://0af1-49-0-64-28.ngrok.io";
listRoomDetail: RoomDetail[] = []
editRoomDetail(model: RoomDetail) {
......
......@@ -8,7 +8,7 @@ import { SearchRoomModel } from '../models/searchroom.model';
export class RoomService {
constructor(private http: HttpClient) { }
url: string = "http://5d75-2405-9800-bc03-3665-394e-33ce-7fe3-2ed5.ngrok.io";
url: string = "http://0af1-49-0-64-28.ngrok.io";
listRoomModel: Room[] = []
listRoomSearch: Room[] = [];
......
......@@ -7,7 +7,7 @@ import { SearchEqModel } from '../models/searcheq.model';
export class SearchService {
constructor(private http: HttpClient) {}
url: string = "http://5d75-2405-9800-bc03-3665-394e-33ce-7fe3-2ed5.ngrok.io";
url: string = "http://0af1-49-0-64-28.ngrok.io";
listSearchEq: SearchEqModel[] = []
getSearchEq(model: SearchEqModel){
......
......@@ -10,7 +10,7 @@ export class TypeService {
// }
constructor(private http: HttpClient) { }
url: string = "http://5d75-2405-9800-bc03-3665-394e-33ce-7fe3-2ed5.ngrok.io";
url: string = "http://0af1-49-0-64-28.ngrok.io";
listType: Type[] = []
addType(model: Type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment