Commit 3d6c8fdd by Your Name

update แก้จุดผิด

parent 1d823de8
......@@ -2,12 +2,12 @@ export class SearchEqModel {
seqType : number;
sDate : Date;
eDate : string;
seqStasus: number;
seqStatus: number;
constructor(init? : SearchEqModel){
Object.assign(this, init);
this.seqType = 0;
this.sDate = new Date();
this.eDate = '';
this.seqStasus = 0;
this.seqStatus = 0;
}
}
\ No newline at end of file
......@@ -2,12 +2,12 @@ export class SearchRoomModel {
sroomType : number;
sDate : Date;
eDate : Date;
sroomStasus: number;
sroomStatus: number;
constructor(init?: SearchRoomModel) {
Object.assign(this, init);
this.sroomType = 0;
this.sDate = new Date;
this.eDate = new Date;
this.sroomStasus = 0;
this.sroomStatus = 0;
}
}
\ No newline at end of file
......@@ -36,7 +36,7 @@
<div class="input-group">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
ngbDropdownToggle >ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>จอง</button>
<button ngbDropdownItem>ไม่อนุมัติ</button>
......
......@@ -9,6 +9,8 @@ import { MyRoom } from 'src/app/models/rooms.model';
import { EquirmentService } from 'src/app/service/equirment.service';
import { RoomService } from 'src/app/service/room.service';
import { RoomDetail } from 'src/app/models/RoomDetail.model';
import { SearchEqModel } from 'src/app/models/searcheq.model';
import { SearchRoomModel } from 'src/app/models/searchroom.model';
@Component({
selector: 'ngbd-modal-content',
......@@ -105,6 +107,8 @@ export class HomePageComponent implements OnInit {
modelRoomDetail = new RoomDetail();
selectedRoomDetail = new RoomDetail();
selectedItemDetail = new ItemDetail();
searcheqModel : SearchEqModel = new SearchEqModel();
searchroomModel : SearchRoomModel = new SearchRoomModel();
hoveredDate: NgbDate | null = null;
......@@ -305,4 +309,23 @@ export class HomePageComponent implements OnInit {
// modalRef.componentInstance.quantity = this.selectedItemDetail.quantity;
// modalRef.componentInstance.sDate = this.selectedRoomDetail.sDate;
}
openSearchEq() {
console.log(this.searcheqModel)
// this.searchService.getSearchEq();
// this.modalService.dismissAll();
// this.ngOnInit();
}
openSearchRoom() {
console.log(this.searchroomModel)
// this.searchService.getSearchRoom();
// this.modalService.dismissAll();
// this.ngOnInit();
}
}
\ No newline at end of file
......@@ -35,13 +35,12 @@
<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>
<select class="custom-select form-control"
aria-label="Default select example" formControlName="rStatus">
<option value="0" selected style="color: black;">จอง</option>
<option value="1" style="color: black;">ไม่อนุมัติ</option>
<option value="2" style="color: black;">ยกเลิก</option>
</select>
<button class="btn btn-sm btn-outline-success" type="submit"
(click)="openSearchRoom()">Search</button>
</div>
......
......@@ -45,6 +45,7 @@ import { SearchRoomModel } from 'src/app/models/searchroom.model';
})
export class PendingComponent implements OnInit {
[x: string]: any;
time = { hour: 13, minute: 30 };
closeResult = '';
......@@ -243,6 +244,10 @@ export class PendingComponent implements OnInit {
}
changed(value) {
this.value = value;
}
}
export class NgbdDropdownBasic {
......
......@@ -7,7 +7,7 @@ import { Contact } from "../models/contact.model";
export class ContactService {
constructor(private http: HttpClient) { }
url: string = "http://5d75-2405-9800-bc03-3665-394e-33ce-7fe3-2ed5.ngrok.io";
url: string = "http://2839-110-169-220-190.ngrok.io";
listContact: Contact[] = []
addContact(model: Contact) {
......
......@@ -9,7 +9,7 @@ import { Type } from '../models/type.model';
export class EquirmentService {
constructor(private http: HttpClient) { }
url: string = "http://0af1-49-0-64-28.ngrok.io";
url: string = "http://2839-110-169-220-190.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://0af1-49-0-64-28.ngrok.io";
url: string = "http://2839-110-169-220-190.ngrok.io";
listItemDetail: ItemDetail[] = []
addItemDetail(model: ItemDetail) {
......
......@@ -11,7 +11,7 @@ export class RoomDetailService {
}
constructor(private http: HttpClient) { }
url: string = "http://0af1-49-0-64-28.ngrok.io";
url: string = "http://2839-110-169-220-190.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://0af1-49-0-64-28.ngrok.io";
url: string = "http://2839-110-169-220-190.ngrok.io";
listRoomModel: Room[] = []
listRoomSearch: Room[] = [];
......@@ -29,7 +29,7 @@ export class RoomService {
}
searchListRoom(searchroomModel: SearchRoomModel) {
this.http.get(this.url + '/status?sroomStasus=' + searchroomModel.sroomStasus + '&startDate=' + searchroomModel.sDate + '&endDate=' + searchroomModel.eDate).subscribe((response: any) => {
this.http.get(this.url + '/status?sroomStasus=' + searchroomModel.sroomStatus + '&startDate=' + searchroomModel.sDate + '&endDate=' + searchroomModel.eDate).subscribe((response: any) => {
console.log(response);
this.listRoomSearch = response;
}, error => {
......
......@@ -7,7 +7,7 @@ import { SearchEqModel } from '../models/searcheq.model';
export class SearchService {
constructor(private http: HttpClient) {}
url: string = "http://0af1-49-0-64-28.ngrok.io";
url: string = "http://2839-110-169-220-190.ngrok.io";
listSearchEq: SearchEqModel[] = []
getSearchEq(model: SearchEqModel){
......
......@@ -10,7 +10,7 @@ export class TypeService {
// }
constructor(private http: HttpClient) { }
url: string = "http://0af1-49-0-64-28.ngrok.io";
url: string = "http://2839-110-169-220-190.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