Commit cc22bb61 by Chanachai

Update ข้อความในปุ่มค้นหาขึ้น

parent 513f6499
...@@ -18,7 +18,8 @@ export class ItemDetail { ...@@ -18,7 +18,8 @@ export class ItemDetail {
}; };
eStatus: string; eStatus: string;
Quantity: string; Quantity: string;
eTelephone: number; eTelephone: string;
email: string;
Remark: string; Remark: string;
constructor(init?: ItemDetail) { constructor(init?: ItemDetail) {
Object.assign(this, init); Object.assign(this, init);
...@@ -30,6 +31,7 @@ export class ItemDetail { ...@@ -30,6 +31,7 @@ export class ItemDetail {
this.eStatus = ''; this.eStatus = '';
this.Quantity = ''; this.Quantity = '';
this.eTelephone = undefined; this.eTelephone = undefined;
this.email = undefined;
this.Remark = ''; this.Remark = '';
} }
} }
......
...@@ -17,7 +17,8 @@ export class RoomDetail { ...@@ -17,7 +17,8 @@ export class RoomDetail {
second: number; second: number;
}; };
rStatus: string; rStatus: string;
rTelephone: number; rTelephone: string;
email: string;
Remark: string; Remark: string;
constructor(init?: RoomDetail) { constructor(init?: RoomDetail) {
Object.assign(this, init); Object.assign(this, init);
...@@ -28,6 +29,7 @@ export class RoomDetail { ...@@ -28,6 +29,7 @@ export class RoomDetail {
this.eDate = ''; this.eDate = '';
this.rStatus = ''; this.rStatus = '';
this.rTelephone = undefined; this.rTelephone = undefined;
this.email = undefined;
this.Remark = ''; this.Remark = '';
} }
} }
......
...@@ -7,6 +7,8 @@ import { ItemDetailService } from 'src/app/service/item-detail.service'; ...@@ -7,6 +7,8 @@ import { ItemDetailService } from 'src/app/service/item-detail.service';
import { RoomDetail } from 'src/app/models/roomDetail.model'; import { RoomDetail } from 'src/app/models/roomDetail.model';
import { RoomDetailService } from 'src/app/service/room-detail.service'; import { RoomDetailService } from 'src/app/service/room-detail.service';
import { MyRoom, Room } from 'src/app/models/rooms.model'; import { MyRoom, Room } from 'src/app/models/rooms.model';
import { EquirmentService } from 'src/app/service/equirment.service';
import { RoomService } from 'src/app/service/room.service';
@Component({ @Component({
selector: 'app-admin-pending', selector: 'app-admin-pending',
...@@ -41,8 +43,15 @@ import { MyRoom, Room } from 'src/app/models/rooms.model'; ...@@ -41,8 +43,15 @@ import { MyRoom, Room } from 'src/app/models/rooms.model';
}) })
export class AdminPendingComponent implements OnInit { export class AdminPendingComponent implements OnInit {
time = { hour: 13, minute: 30 };
page = 1; page = 1;
pageSize = 10; pageSize = 10;
collectionSize = 0;
pageListRoom = 1;
pageSizeListRoom = 10;
collectionSizeListRoom = 0;
closeResult = ''; closeResult = '';
...@@ -54,7 +63,6 @@ export class AdminPendingComponent implements OnInit { ...@@ -54,7 +63,6 @@ export class AdminPendingComponent implements OnInit {
modelItemDetail = new ItemDetail(); modelItemDetail = new ItemDetail();
modelRoomDetail = new RoomDetail(); modelRoomDetail = new RoomDetail();
collectionSize = this.listitemDetail.length;
hoveredDate: NgbDate | null = null; hoveredDate: NgbDate | null = null;
fromDate: NgbDate | null; fromDate: NgbDate | null;
...@@ -70,7 +78,8 @@ export class AdminPendingComponent implements OnInit { ...@@ -70,7 +78,8 @@ export class AdminPendingComponent implements OnInit {
} }
constructor(private calendar: NgbCalendar, public formatter: NgbDateParserFormatter, private modalService: NgbModal, private ItemDetailService: ItemDetailService, private RoomDetailService: RoomDetailService) { constructor(private calendar: NgbCalendar, public formatter: NgbDateParserFormatter, private modalService: NgbModal, private ItemDetailService: ItemDetailService, private RoomDetailService: RoomDetailService
, private equirmentService: EquirmentService, private roomService: RoomService) {
this.fromDate = calendar.getToday(); this.fromDate = calendar.getToday();
this.toDate = calendar.getNext(calendar.getToday(), 'd', 10); this.toDate = calendar.getNext(calendar.getToday(), 'd', 10);
this.refreshitemDetail(); this.refreshitemDetail();
...@@ -179,10 +188,21 @@ export class AdminPendingComponent implements OnInit { ...@@ -179,10 +188,21 @@ export class AdminPendingComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.listitemDetail = this.ItemDetailService.getListItemDetail(); this.listitemDetail = this.ItemDetailService.getListItemDetail();
this.listroomDetail = this.RoomDetailService.getListRoomDetail(); this.listroomDetail = this.RoomDetailService.getListRoomDetail();
this.collectionSizeListRoom = this.listitemDetail.length;
console.log(this.listitemDetail); console.log(this.listitemDetail);
} }
saveEquirment() {
this.equirmentService.addEquirment(this.modelEquirment);
this.modalService.dismissAll();
this.ngOnInit();
}
saveRoom() {
this.roomService.addRoom(this.modelRoom);
this.modalService.dismissAll();
this.ngOnInit();
}
} }
export class NgbdDropdownBasic { export class NgbdDropdownBasic {
......
...@@ -40,20 +40,26 @@ import { MyRoom, Room } from 'src/app/models/rooms.model'; ...@@ -40,20 +40,26 @@ import { MyRoom, Room } from 'src/app/models/rooms.model';
}) })
export class PendingComponent implements OnInit { export class PendingComponent implements OnInit {
page = 1; time = { hour: 13, minute: 30 };
pageSize = 10;
closeResult = ''; closeResult = '';
listItemDetail : ItemDetail[] = []; listItemDetail : ItemDetail[] = [];
listRoomDetail : RoomDetail[] = []; listRoomDetail : RoomDetail[] = [];
page = 1;
pageSize = 10;
collectionSize = 0;
pageListRoom = 1;
pageSizeListRoom = 10;
collectionSizeListRoom = 0;
modelEquirment = new Equirment(); modelEquirment = new Equirment();
modelRoom = new MyRoom(); modelRoom = new MyRoom();
modelItemDetail = new ItemDetail(); modelItemDetail = new ItemDetail();
modelRoomDetail = new RoomDetail(); modelRoomDetail = new RoomDetail();
collectionSize = this.listItemDetail.length;
hoveredDate: NgbDate | null = null; hoveredDate: NgbDate | null = null;
fromDate: NgbDate | null; fromDate: NgbDate | null;
...@@ -98,7 +104,12 @@ export class PendingComponent implements OnInit { ...@@ -98,7 +104,12 @@ export class PendingComponent implements OnInit {
this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
}); });
} }
date='10-12-2561'
show(a:string){
console.log(a)
}
sDate = ""
eDate = ""
openItemDetail(content : string ,item : ItemDetail) { openItemDetail(content : string ,item : ItemDetail) {
this.modelItemDetail = item ; this.modelItemDetail = item ;
this.thStime= this.modelItemDetail.sTime.hour + ':' + this.modelItemDetail.sTime.minute this.thStime= this.modelItemDetail.sTime.hour + ':' + this.modelItemDetail.sTime.minute
...@@ -106,6 +117,7 @@ export class PendingComponent implements OnInit { ...@@ -106,6 +117,7 @@ export class PendingComponent implements OnInit {
let SDate = this.modelItemDetail.sDate.split('/') let SDate = this.modelItemDetail.sDate.split('/')
this.sDate = SDate[2]+"-"+SDate[1]+"-"+SDate[0] this.sDate = SDate[2]+"-"+SDate[1]+"-"+SDate[0]
let EDate = this.modelItemDetail.eDate.split('/') let EDate = this.modelItemDetail.eDate.split('/')
this.eDate = EDate[2]+"-"+EDate[1]+"-"+EDate[0]
console.log(item); console.log(item);
this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => { this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
this.closeResult = `Closed with: ${result}`; this.closeResult = `Closed with: ${result}`;
...@@ -114,12 +126,6 @@ export class PendingComponent implements OnInit { ...@@ -114,12 +126,6 @@ export class PendingComponent implements OnInit {
}); });
} }
date='10-12-2561'
show(a:string){
console.log(a)
}
sDate = ""
eDate = ""
openRoomDetail(content : string ,item : RoomDetail) { openRoomDetail(content : string ,item : RoomDetail) {
this.modelRoomDetail = item ; this.modelRoomDetail = item ;
this.thStime= this.modelRoomDetail.sTime.hour + ':' + this.modelRoomDetail.sTime.minute this.thStime= this.modelRoomDetail.sTime.hour + ':' + this.modelRoomDetail.sTime.minute
...@@ -127,6 +133,7 @@ export class PendingComponent implements OnInit { ...@@ -127,6 +133,7 @@ export class PendingComponent implements OnInit {
let SDate = this.modelRoomDetail.sDate.split('/') let SDate = this.modelRoomDetail.sDate.split('/')
this.sDate = SDate[2]+"-"+SDate[1]+"-"+SDate[0] this.sDate = SDate[2]+"-"+SDate[1]+"-"+SDate[0]
let EDate = this.modelRoomDetail.eDate.split('/') let EDate = this.modelRoomDetail.eDate.split('/')
this.eDate = EDate[2]+"-"+EDate[1]+"-"+EDate[0]
this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => { this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
this.closeResult = `Closed with: ${result}`; this.closeResult = `Closed with: ${result}`;
}, (reason) => { }, (reason) => {
...@@ -178,6 +185,7 @@ export class PendingComponent implements OnInit { ...@@ -178,6 +185,7 @@ export class PendingComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.listItemDetail = this.ItemDetailService.getListItemDetail(); this.listItemDetail = this.ItemDetailService.getListItemDetail();
this.listRoomDetail = this.RoomDetailService.getListRoomDetail(); this.listRoomDetail = this.RoomDetailService.getListRoomDetail();
this.collectionSizeListRoom = this.listRoomDetail.length;
console.log(this.listItemDetail); console.log(this.listItemDetail);
} }
......
...@@ -33,6 +33,7 @@ export class ItemDetailService { ...@@ -33,6 +33,7 @@ export class ItemDetailService {
eStatus: 'รอการอนุมัติ', eStatus: 'รอการอนุมัติ',
Quantity: '1', Quantity: '1',
eTelephone: undefined, eTelephone: undefined,
email: undefined,
Remark: 'test', Remark: 'test',
}, },
{ {
...@@ -60,6 +61,7 @@ export class ItemDetailService { ...@@ -60,6 +61,7 @@ export class ItemDetailService {
eStatus: 'รอการอนุมัติ', eStatus: 'รอการอนุมัติ',
Quantity: '1', Quantity: '1',
eTelephone: undefined, eTelephone: undefined,
email: undefined,
Remark: 'test', Remark: 'test',
}, },
......
...@@ -33,6 +33,7 @@ export class RoomDetailService { ...@@ -33,6 +33,7 @@ export class RoomDetailService {
}, },
rStatus: 'รอการอนุมัติ', rStatus: 'รอการอนุมัติ',
rTelephone: undefined, rTelephone: undefined,
email: undefined,
Remark: 'test', Remark: 'test',
}, },
{ {
...@@ -60,6 +61,7 @@ export class RoomDetailService { ...@@ -60,6 +61,7 @@ export class RoomDetailService {
}, },
rStatus: 'รอการอนุมัติ', rStatus: 'รอการอนุมัติ',
rTelephone: undefined, rTelephone: undefined,
email: undefined,
Remark: 'test', Remark: 'test',
}, },
......
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