Commit 3d6c8fdd by Your Name

update แก้จุดผิด

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