diff --git a/appserver/history.json b/appserver/history.json index ec2abcb..280be90 100644 --- a/appserver/history.json +++ b/appserver/history.json @@ -1 +1 @@ -[{"id":"3f7e1c45-a2e9-4b08-a56d-e687ea79ba61","no":1,"firstName":"สมชัย14","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"1234","queue":"inqueue","roomnumber":"201","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"ebd367bf-396f-4bae-8130-1ce3fa130d38","no":2,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","queue":"inqueue","roomnumber":"202","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"507e0867-4d56-4f4e-81d1-f3a1ab0d0fde","no":1,"firstName":"มานา","lastName":"มานี","affiliation":"ลูกจ้าง","rank":"นาย","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","queue":"inroom","roomnumber":"209","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","queue":"inqueue","roomnumber":"204","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inqueue","roomnumber":"206","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"fc3710ca-c3af-4781-9c8f-4aa6657ddff4","no":5,"firstName":"สมาน788","lastName":"แสงสุข7","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"13404441144","phone":"0325647847","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"14","queue":"none","roomnumber":"205","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","typeRoom":"ช2","queue":"inroom","contract":"123","checkintime":"5","maintenance":"200","insurance":"2000","installments":"5","pickedBook":"2023-11-02T14:10:26.374Z"}] \ No newline at end of file +[{"id":"3f7e1c45-a2e9-4b08-a56d-e687ea79ba61","no":1,"firstName":"สมชัย14","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"1234","queue":"inqueue","roomnumber":"201","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"ebd367bf-396f-4bae-8130-1ce3fa130d38","no":2,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","queue":"inqueue","roomnumber":"202","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"507e0867-4d56-4f4e-81d1-f3a1ab0d0fde","no":1,"firstName":"มานา","lastName":"มานี","affiliation":"ลูกจ้าง","rank":"นาย","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","queue":"inroom","roomnumber":"209","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","queue":"inqueue","roomnumber":"204","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inqueue","roomnumber":"206","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"fc3710ca-c3af-4781-9c8f-4aa6657ddff4","no":5,"firstName":"สมาน788","lastName":"แสงสุข7","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"13404441144","phone":"0325647847","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"14","queue":"none","roomnumber":"205","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeRoom":"ช2","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inroom","installments":"","pickedBook":"2023-11-07T14:10:26.374Z","Affiliation":"ฝอ.2"}] \ No newline at end of file diff --git a/appserver/queue.json b/appserver/queue.json index ec08602..2a05f4a 100644 --- a/appserver/queue.json +++ b/appserver/queue.json @@ -12,6 +12,7 @@ "typeAffiliation": "ลูกจ้าง", "typeRanks": "ลูกจ้าง", "bookNumber": "1234", + "queue": "none", "pickedBook":"" }, { @@ -26,6 +27,7 @@ "phone": "0325647845", "typeAffiliation": "บช.ตซด.", "typeRanks": "ประทวน", + "queue": "none", "bookNumber": "1234", "pickedBook":"" }, @@ -42,6 +44,7 @@ "typeAffiliation": "ลูกจ้าง", "typeRanks": "ลูกจ้าง", "bookNumber": "1234", + "queue": "none", "pickedBook":"" }, { @@ -56,6 +59,7 @@ "typeRoom": "ช2", "typeAffiliation": "บช.ตซด.", "typeRanks": "ประทวน", + "queue": "none", "bookNumber": "14578963", "pickedBook":"" }, @@ -72,6 +76,7 @@ "typeAffiliation": "ลูกจ้าง", "typeRanks": "ลูกจ้าง", "typeUser": "ตร.", + "queue": "none", "bookNumber": "กกกกกกกกกก", "pickedBook":"" }, diff --git a/appserver/report.json b/appserver/report.json index 3db000a..844c5da 100644 --- a/appserver/report.json +++ b/appserver/report.json @@ -1 +1 @@ -[{"id":"507e0867-4d56-4f4e-81d1-f3a1ab0d0fde","no":1,"firstName":"มานา","lastName":"มานี","affiliation":"ลูกจ้าง","rank":"นาย","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","typeRoom":"ช2","queue":"inroom","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-03T14:10:26.374Z"},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","typeRoom":"ช2","queue":"inqueue","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-02T14:10:26.374Z"},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeRoom":"ช2","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inqueue","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-07T14:10:26.374Z"},{"id":"fae8c402-f815-44cc-8702-bf843dc97db4","no":6,"firstName":"กนกวรรณ","lastName":"เจริญเจริญ","affiliation":"ฝอ.1","rank":"พ.ต.อ.หญิง","idcard":"134044411441178","phone":"0974543655","status":"สมรส","typeRoom":"ช3","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"ตร.","queue":"none","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-08T10:10:26.374Z"},{"id":"fc3710ca-c3af-4781-9c8f-4aa6657ddff4","no":7,"firstName":"สมาน788","lastName":"แสงสุข7","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"13404441144","phone":"0325647847","status":"โสด","typeRoom":"ช1","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"14","queue":"none","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-08T14:10:26.374Z"},{"id":"8e81c39a-d50c-42f5-85c0-f9f773c2a4aa","no":6,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"บช.ตซด.","rank":"ส.ต.อ.","idcard":"134044411441178","phone":"0325647845","typeAffiliation":"บช.ตซด.","typeRanks":"ประทวน","typeUser":"บช.ตชด.","bookNumber":"123","queue":"none","status":"โสด","typeRoom":"ช1","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-08T12:10:26.374Z"},{"id":"ebd367bf-396f-4bae-8130-1ce3fa130d38","no":2,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","typeRoom":"ช1","bookNumber":"","queue":"inqueue","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-01T14:10:26.374Z"},{"id":"3f7e1c45-a2e9-4b08-a56d-e687ea79ba61","no":1,"firstName":"สมชัย14","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"1234","queue":"inroom","typeRoom":"ช1","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-10-08T14:10:26.374Z"},{"id":"967bf9a7-047e-4951-ba2a-190f42045715","no":5,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"ฝสสน.1","rank":"ส.ต.ท.","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeRoom":"ช1","typeAffiliation":"บก.สนน.","typeRanks":"ประทวน","typeUser":"บช.ตชด.","bookNumber":"456","queue":"inroom","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-08T14:10:26.374Z"},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","typeRoom":"ช2","queue":"inroom","contract":"123","checkintime":"5","maintenance":"200","insurance":"2000","installments":"5","pickedBook":"2023-11-02T14:10:26.374Z"}] \ No newline at end of file +[{"id":"507e0867-4d56-4f4e-81d1-f3a1ab0d0fde","no":1,"firstName":"มานา","lastName":"มานี","affiliation":"ลูกจ้าง","rank":"นาย","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","typeRoom":"ช2","queue":"inroom","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-03T14:10:26.374Z"},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeRoom":"ช2","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inqueue","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-07T14:10:26.374Z"},{"id":"fae8c402-f815-44cc-8702-bf843dc97db4","no":6,"firstName":"กนกวรรณ","lastName":"เจริญเจริญ","affiliation":"ฝอ.1","rank":"พ.ต.อ.หญิง","idcard":"134044411441178","phone":"0974543655","status":"สมรส","typeRoom":"ช3","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"ตร.","queue":"none","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-08T10:10:26.374Z"},{"id":"fc3710ca-c3af-4781-9c8f-4aa6657ddff4","no":7,"firstName":"สมาน788","lastName":"แสงสุข7","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"13404441144","phone":"0325647847","status":"โสด","typeRoom":"ช1","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"14","queue":"inqueue","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-08T14:10:26.374Z"},{"id":"8e81c39a-d50c-42f5-85c0-f9f773c2a4aa","no":6,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"บช.ตซด.","rank":"ส.ต.อ.","idcard":"134044411441178","phone":"0325647845","typeAffiliation":"บช.ตซด.","typeRanks":"ประทวน","typeUser":"บช.ตชด.","bookNumber":"123","queue":"inqueue","status":"โสด","typeRoom":"ช1","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-08T12:10:26.374Z"},{"id":"ebd367bf-396f-4bae-8130-1ce3fa130d38","no":2,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","typeRoom":"ช1","bookNumber":"","queue":"inqueue","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-01T14:10:26.374Z"},{"id":"3f7e1c45-a2e9-4b08-a56d-e687ea79ba61","no":1,"firstName":"สมชัย14","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"1234","queue":"inroom","typeRoom":"ช1","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-10-08T14:10:26.374Z"},{"id":"967bf9a7-047e-4951-ba2a-190f42045715","no":5,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"ฝสสน.1","rank":"ส.ต.ท.","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeRoom":"ช1","typeAffiliation":"บก.สนน.","typeRanks":"ประทวน","typeUser":"บช.ตชด.","bookNumber":"456","queue":"inroom","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-08T14:10:26.374Z"},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","typeRoom":"ช2","queue":"inroom","contract":"","checkintime":"","maintenance":"","insurance":"","installments":"","pickedBook":"2023-11-02T14:10:26.374Z"},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeRoom":"ช2","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inroom","installments":"","pickedBook":"2023-11-07T14:10:26.374Z"}] \ No newline at end of file diff --git a/appserver/rooms.json b/appserver/rooms.json index 20fc983..2979025 100644 --- a/appserver/rooms.json +++ b/appserver/rooms.json @@ -197,22 +197,6 @@ "roomStatus": "free", "pickedBook": "2023-11-02T14:10:26.374Z" }, - { - "buildingId": "8bc8b393-8ae2-4e65-9a35-32c0e76545b3", - "id": "a10eff34-cbe2-4a71-a44e-0d95bfe33410", - "name": "023", - "floor": 1, - "index": 2, - "numberRoom": 2, - "ranks": "", - "firstName": "", - "laststName": "", - "Affiliation": "", - "roomconditions": "ปกติ", - "typeRoom": "ช1", - "roomStatus": "free", - "pickedBook": "2023-11-02T14:10:26.374Z" - }, { "buildingId": "8bc8b393-8ae2-4e65-9a35-32c0e76545b3", "id": "03dc297e-ea5e-4852-8e49-6c9f3d2d47d4", @@ -395,5 +379,28 @@ "typeAffiliation": "ลูกจ้าง", "typeRanks": "ประทวน", "pickedBook": "2023-11-02T14:10:26.374Z" + }, + { + "buildingId": "8bc8b393-8ae2-4e65-9a35-32c0e76545b3", + "id": "a10eff34-cbe2-4a71-a44e-0d95bfe33410", + "name": "023", + "floor": 1, + "index": 2, + "numberRoom": 2, + "ranks": " ", + "firstName": "มานพ", + "laststName": "", + "Affiliation": "", + "roomconditions": "ปกติ", + "typeRoom": "ช2", + "roomStatus": "special", + "pickedBook": "2023-11-07T14:10:26.374Z", + "lastName": "มานี", + "affiliation": "ฝอ.2", + "idcard": "13404441144555", + "phone": "0325647845", + "status": "สมรส", + "typeAffiliation": "บก.อก.", + "typeRanks": "สัญญาบัตร" } ] \ No newline at end of file diff --git a/appserver/users.json b/appserver/users.json index 733f8ed..8d9ec1c 100644 --- a/appserver/users.json +++ b/appserver/users.json @@ -22,29 +22,6 @@ "installments": "", "pickedBook": "2023-11-03T14:10:26.374Z" }, - { - "id": "1cb479fa-e217-422d-938e-47f6fc9b9f32", - "no": 4, - "firstName": "มานพ", - "lastName": "มานี", - "affiliation": "ฝอ.2", - "rank": "ร.ต.ต.", - "idcard": "13404441144555", - "phone": "0325647845", - "status": "สมรส", - "typeRoom": "ช2", - "typeAffiliation": "บก.อก.", - "typeRanks": "สัญญาบัตร", - "typeUser": "บช.ตชด.", - "bookNumber": "1234", - "queue": "inqueue", - "contract": "", - "checkintime": "", - "maintenance": "", - "insurance": "", - "installments": "", - "pickedBook": "2023-11-07T14:10:26.374Z" - }, { "id": "fae8c402-f815-44cc-8702-bf843dc97db4", "no": 6, @@ -82,7 +59,7 @@ "typeRanks": "ลูกจ้าง", "typeUser": "ตร.", "bookNumber": "14", - "queue": "none", + "queue": "inqueue", "contract": "", "checkintime": "", "maintenance": "", @@ -103,7 +80,7 @@ "typeRanks": "ประทวน", "typeUser": "บช.ตชด.", "bookNumber": "123", - "queue": "none", + "queue": "inqueue", "status": "โสด", "typeRoom": "ช1", "contract": "", @@ -204,5 +181,28 @@ "insurance": "", "installments": "", "pickedBook": "2023-11-02T14:10:26.374Z" + }, + { + "id": "1cb479fa-e217-422d-938e-47f6fc9b9f32", + "no": 4, + "firstName": "มานพ", + "lastName": "มานี", + "affiliation": "ฝอ.2", + "rank": "ร.ต.ต.", + "idcard": "13404441144555", + "phone": "0325647845", + "status": "สมรส", + "typeRoom": "ช2", + "typeAffiliation": "บก.อก.", + "typeRanks": "สัญญาบัตร", + "typeUser": "บช.ตชด.", + "bookNumber": "1234", + "queue": "inroom", + "contract": "", + "checkintime": "", + "maintenance": "", + "insurance": "", + "installments": "", + "pickedBook": "2023-11-07T14:10:26.374Z" } ] \ No newline at end of file diff --git a/webapp/src/views/Restroom/DetailRoomPage.vue b/webapp/src/views/Restroom/DetailRoomPage.vue index 80e7b9f..afab150 100644 --- a/webapp/src/views/Restroom/DetailRoomPage.vue +++ b/webapp/src/views/Restroom/DetailRoomPage.vue @@ -47,7 +47,9 @@ export default { queueList: [], queuefilter: [], statusRoom: "", - dateApproved: "" + dateApproved: "", + userList: [], + selectedUser: "", }; }, created() { @@ -56,6 +58,12 @@ export default { this.id = this.$route.params.id; this.getroomByid(this.id); } + this.getAllinqueue(); + }, + watch: { + selectedUser: function (newValue) { + this.getAllusersByid(newValue.value); + }, }, methods: { gotoAction() { @@ -67,7 +75,6 @@ export default { .get(`http://localhost:3001/queue/inqueue`) .then((res) => { this.queueList = res.data; - console.log(this.queueList); this.queuefilter = this.queueList.filter((e) => e.typeRoom === this.typeroom); }) .catch((err) => { @@ -77,21 +84,58 @@ export default { console.error(error); } }, + + getAllinqueue() { + try { + axios + .get(`http://localhost:3001/queue/inqueue`) + .then((res) => { + this.userList = res.data.map((ele) => { + return { + label: ele.rank + " " + ele.firstName + " " + ele.lastName, + value: ele.id, + }; + }); + }) + .catch((err) => { + console.log(err); + }); + } catch (error) { + console.error(error); + } + }, + + getAllusersByid(id) { + this.userId = id; + try { + axios + .get(`http://localhost:3001/users/${id}`) + .then((res) => { + let data = res.data; + this.userByid = data; + }) + .catch((err) => { + console.log(err); + }); + } catch (error) { + console.error(error); + } + }, + async getroomByid(id) { try { axios.get(`http://localhost:3001/rooms/${id}`).then((res) => { this.data = res.data; console.log(this.data); - this.dateApproved = this.convertDateTolocal(this.data.pickedBook) + this.dateApproved = this.convertDateTolocal(this.data.pickedBook); this.typeroom = this.data.typeRoom; - if(this.data.affiliation) this.Affiliation = this.data.affiliation + if (this.data.affiliation) this.Affiliation = this.data.affiliation; if (this.data.roomStatus == "return") this.statusRoom = "ผ่อนผัน"; if (this.data.roomStatus == "special") this.statusRoom = "กรณีพิเศษ"; if (this.data.roomStatus == "waiting") this.statusRoom = "ชำรุด"; if (this.data.roomStatus == "unavailable") this.statusRoom = "ไม่ว่าง"; if (this.data.roomStatus == "free") this.statusRoom = "ว่าง"; - - + this.getAllqueue(); }); } catch (e) { @@ -99,11 +143,15 @@ export default { } }, - convertDateTolocal(index){ + convertDateTolocal(index) { const date = new Date(index); - const formatter = new Intl.DateTimeFormat('en-US', { day: '2-digit', month: '2-digit', year: 'numeric' }); - const formattedDate = formatter.format(date) - return formattedDate + const formatter = new Intl.DateTimeFormat("en-US", { + day: "2-digit", + month: "2-digit", + year: "numeric", + }); + const formattedDate = formatter.format(date); + return formattedDate; }, getAllusersByid(id) { @@ -123,7 +171,7 @@ export default { } }, - async submitForm() { + async submitForm(index) { let body = { ...this.userByid, queue: "inroom", @@ -144,7 +192,11 @@ export default { .then((res) => { this.submitForm2(); this.submitForm3(); - this.submitFormRoom(); + if (index == "spacia") { + this.submitRoomScapia(); + } else if (index == "normal") { + this.submitFormRoom(); + } }) .catch((err) => { console.log(err); @@ -215,6 +267,35 @@ export default { console.log(err); }); }, + + async submitRoomScapia() { + // this.data.roomStatus == "special" + let body = { + ...this.userByid, + queue: "inroom", + roomStatus: "special", + contract: this.contract, + checkintime: this.Checkintime, + maintenance: this.Maintenance, + insurance: this.insurance, + installments: this.installments, + }; + + await axios + .put(`http://localhost:3001/rooms/${this.id}`, body, { + headers: { + "Access-Control-Allow-Origin": "*", + "Content-Type": "application/json", + }, + }) + .then((res) => { + this.getAllqueue(); + this.$router.push({ path: `/room` }); + }) + .catch((err) => { + console.log(err); + }); + }, }, }; @@ -261,6 +342,15 @@ export default {

รายละเอียดห้องพัก {{ data?.numberRoom }}

+ กรณีพิเศษ จัดการห้องพัก @@ -275,14 +365,16 @@ export default {
รายละเอียดผู้เช่า

- ชือ : {{ data?.rank }} {{ data?.firstName }} + ชือ : {{ data?.rank }} {{ data?.firstName }}

สถานะห้อง : {{ statusRoom }}

-

สังกัด : {{ Affiliation }}

-

เลขบัตรประชาชน : {{ data?.idcard }}

-

วันที่ได้รับอนุมัติ : {{ dateApproved }}

+

สังกัด : {{ Affiliation }}

+

เลขบัตรประชาชน : {{ data?.idcard }}

+

วันที่ได้รับอนุมัติ : {{ dateApproved }}

-

ระยะเวลาที่เข้าพัก : {{ data?.Checkintime || 0 }} เดือน

+

+ ระยะเวลาที่เข้าพัก : {{ data?.Checkintime || 0 }} เดือน +

นามสกุล : {{ data?.lastName }}

@@ -433,7 +525,7 @@ export default { บันทึก
+ +