Commit 79a0101a by DESKTOP-HF0LVOG\myhr

Update การจอง

parent 0a2da74a
......@@ -170,6 +170,10 @@ export class EquipmentComponent implements OnInit {
}
saveLend() {
this.modelItemDetail.sDate = this.modelItemDetail.sDate.split("-")[0]+"/"+this.modelItemDetail.sDate.split("-")[1]+"/"+this.modelItemDetail.sDate.split("-")[2];
this.modelItemDetail.eDate = this.modelItemDetail.eDate.split("-")[0]+"/"+this.modelItemDetail.eDate.split("-")[1]+"/"+this.modelItemDetail.eDate.split("-")[2];
this.modelItemDetail.eStatus = 0 ;
this.ItemDetailService.addItemDetail(this.modelItemDetail);
this.modalService.dismissAll();
this.ngOnInit();
......@@ -178,8 +182,8 @@ export class EquipmentComponent implements OnInit {
saveBook() {
this.modelRoomDetail.sDate = this.modelRoomDetail.sDate.split("-")[2]+"/"+this.modelRoomDetail.sDate.split("-")[1]+"/"+this.modelRoomDetail.sDate.split("-")[0];
this.modelRoomDetail.eDate = this.modelRoomDetail.eDate.split("-")[2]+"/"+this.modelRoomDetail.eDate.split("-")[1]+"/"+this.modelRoomDetail.eDate.split("-")[0];
this.modelRoomDetail.sDate = this.modelRoomDetail.sDate.split("-")[0]+"/"+this.modelRoomDetail.sDate.split("-")[1]+"/"+this.modelRoomDetail.sDate.split("-")[2];
this.modelRoomDetail.eDate = this.modelRoomDetail.eDate.split("-")[0]+"/"+this.modelRoomDetail.eDate.split("-")[1]+"/"+this.modelRoomDetail.eDate.split("-")[2];
this.modelRoomDetail.rStatus = 0 ;
this.RoomDetailService.addRoomDetail(this.modelRoomDetail);
this.modalService.dismissAll();
......
......@@ -90,9 +90,9 @@
<td>{{ item.room.rName }}</td>
<td>{{ item.room.rDesc }}</td>
<td>{{ item.userName }}</td>
<td>{{ item.sDate | date : 'dd-MM-yyyy' }} {{ item.sTime.hour }}:{{
<td>{{ item.sDate | date : 'dd/MM/yyyy' }} {{ item.sTime.hour }}:{{
item.sTime.minute }}</td>
<td>{{ item.eDate | date : 'dd-MM-yyyy' }} {{ item.eTime.hour }}:{{
<td>{{ item.eDate | date : 'dd/MM/yyyy' }} {{ item.eTime.hour }}:{{
item.eTime.minute }}</td>
<td>{{ item.rStatus==0 ? "รอดำเนินการ" : "อนุมัติ" }}</td>
<div class="col-auto align-self-sm-center">
......@@ -153,9 +153,9 @@
<td>{{ item.equirment.eqName }}</td>
<td>{{ item.equirment.eqDesc }}</td>
<td>{{ item.userName }}</td>
<td>{{ item.sDate | date : 'dd-MM-yyyy' }} {{ item.sTime.hour }}:{{
<td>{{ item.sDate | date : 'dd/MM/yyyy' }} {{ item.sTime.hour }}:{{
item.sTime.minute }}</td>
<td>{{ item.eDate | date : 'dd-MM-yyyy' }} {{ item.eTime.hour }}:{{
<td>{{ item.eDate | date : 'dd/MM/yyyy' }} {{ item.eTime.hour }}:{{
item.eTime.minute }}</td>
<td>{{ item.Quantity }}</td>
<td>{{ item.eStatus==0 ? "รอดำเนินการ" : "อนุมัติ" }}</td>
......
......@@ -115,10 +115,10 @@ export class PendingComponent implements OnInit {
this.thStime= this.modelItemDetail.sTime.hour + ':' + this.modelItemDetail.sTime.minute
this.thEtime= this.modelItemDetail.eTime.hour + ':' + this.modelItemDetail.eTime.minute
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]
let sDate = this.modelItemDetail.sDate.split('/')
this.sDate = sDate[0]+"-"+sDate[1]+"-"+sDate[2]
let eDate = this.modelItemDetail.eDate.split('/')
this.eDate = eDate[0]+"-"+eDate[1]+"-"+eDate[2]
console.log(item);
this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
this.closeResult = `Closed with: ${result}`;
......@@ -131,21 +131,21 @@ export class PendingComponent implements OnInit {
this.modelRoomDetail = item ;
this.thStime= this.modelRoomDetail.sTime.hour + ':' + this.modelRoomDetail.sTime.minute
this.thEtime= this.modelRoomDetail.eTime.hour + ':' + this.modelRoomDetail.eTime.minute
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]
let sDate = this.modelRoomDetail.sDate.split('/')
this.sDate = sDate[0]+"-"+sDate[1]+"-"+sDate[2]
let eDate = this.modelRoomDetail.eDate.split('/')
this.eDate = eDate[0]+"-"+eDate[1]+"-"+eDate[2]
this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
this.closeResult = `Closed with: ${result}`;
}, (reason) => {
this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
});
console.log("date",this.sDate)
console.log("date",this.modelRoomDetail)
}
rDate(item: string, item2: string){
let Dates = item.split("-")
let dates = Dates[2]+"/"+Dates[1]+"/"+Dates[0]
let dates = Dates[0]+"/"+Dates[1]+"/"+Dates[2]
if(item2=="sdate"){
this.modelItemDetail.sDate = dates
......
......@@ -18,8 +18,8 @@ export class ItemDetailService {
eqPic: "assets/img/mou.jpg"
},
userName: 'เกม',
sDate: '09/12/2021',
eDate: '09/12/2021',
sDate: '2021/12/14',
eDate: '2021/12/14',
sTime: {
hour: 22,
minute: 30,
......@@ -46,8 +46,8 @@ export class ItemDetailService {
eqPic: "assets/img/notebook.jpg"
},
userName: 'แป๊ะ',
sDate: '09/12/2021',
eDate: '09/12/2021',
sDate: '2021/12/14',
eDate: '2021/12/14',
sTime: {
hour: 22,
minute: 30,
......
......@@ -19,8 +19,8 @@ export class RoomDetailService {
rDesc: "จำนวนคน 25 คน",
},
userName: 'เกม',
sDate: '2021/12/09',
eDate: '2021/12/09',
sDate: '2021/12/15',
eDate: '2021/12/15',
sTime: {
hour: 22,
minute: 30,
......@@ -47,8 +47,8 @@ export class RoomDetailService {
rDesc: "จำนวนคน 50 คน",
},
userName: 'เกม',
sDate: '2021/12/09',
eDate: '2021/12/09',
sDate: '2021/12/15',
eDate: '2021/12/15',
sTime: {
hour: 22,
minute: 30,
......
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