Commit cc22bb61 by Chanachai

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

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