This commit is contained in:
kamoa457 2023-11-08 21:56:23 +07:00
parent 009fd40cb4
commit e2f4f8d1b4
4 changed files with 67 additions and 15 deletions

View File

@ -83,6 +83,54 @@
"Roomconditions": "ชำรุด", "Roomconditions": "ชำรุด",
"status": "waiting" "status": "waiting"
}, },
{
"index": 8,
"floor": 2,
"numberRoom": 3,
"ranks": "",
"firstName": "",
"laststName": "",
"Affiliation": "",
"typeRoom": "ช2",
"Roomconditions": "ปกติ",
"status": "free"
},
{
"index": 5,
"floor": 1,
"numberRoom": 5,
"ranks": "",
"firstName": "",
"laststName": "",
"Affiliation": "",
"typeRoom": "ช1",
"Roomconditions": "ปกติ",
"status": "free"
},
{
"index": 6,
"floor": 2,
"numberRoom": 1,
"ranks": "ส.ต.ต.",
"firstName": "ปิติ9",
"laststName": "มีดี",
"Affiliation": "ฝอ. 1",
"typeRoom": "ช3",
"Roomconditions": "ปกติ",
"status": "special"
},
{
"index": 7,
"floor": 2,
"numberRoom": 2,
"ranks": "ส.ต.ต.",
"firstName": "ปิติ6",
"laststName": "มีดี",
"Affiliation": "ฝอ. 7",
"typeRoom": "ช2",
"Roomconditions": "ชำรุด",
"status": "waiting"
},
{ {
"index": 8, "index": 8,
"floor": 2, "floor": 2,

View File

@ -60,6 +60,11 @@ app.put('/users/:id', (req, res) => {
if (req.body.status) parsedData.status = req.body.status if (req.body.status) parsedData.status = req.body.status
if (req.body.typeAffiliation) parsedData.typeAffiliation = req.body.typeAffiliation if (req.body.typeAffiliation) parsedData.typeAffiliation = req.body.typeAffiliation
if (req.body.typeRanks) parsedData.typeRanks = req.body.typeRanks if (req.body.typeRanks) parsedData.typeRanks = req.body.typeRanks
if (req.body.queue) parsedData.queue = req.body.queue
if (req.body.no) parsedData.no = req.body.no
if (req.body.bookNumber) parsedData.bookNumber = req.body.bookNumber
if (req.body.pickedBook) parsedData.pickedBook = req.body.pickedBook
if (req.body.typeRoom) parsedData.typeRoom = req.body.typeRoom
filterdata.push(parsedData) filterdata.push(parsedData)
fs.writeFile('./users.json', JSON.stringify(filterdata, null, 2), (err) => { fs.writeFile('./users.json', JSON.stringify(filterdata, null, 2), (err) => {
if (err) { if (err) {

View File

@ -69,9 +69,9 @@ export default {
if (e.target) this.typeroomByqueue = e.target.value; if (e.target) this.typeroomByqueue = e.target.value;
}, },
editTypeRoom(event){ editTypeRoom(event) {
console.log(event); console.log(event);
this.typeroomByqueue = event this.typeroomByqueue = event;
}, },
queuefilter(e) { queuefilter(e) {
@ -401,7 +401,7 @@ export default {
</div> </div>
<div class="mb-4"> <div class="mb-4">
<label style="margin-left: -5px">นทลงรบหนงส</label> <label style="margin-left: -5px">นทลงรบหนงส</label>
<Datepicker style="text-align: center;" v-model="picked" /> <Datepicker style="text-align: center" v-model="picked" />
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label style="margin-right: 20px">ประเภทหองพ</label> <label style="margin-right: 20px">ประเภทหองพ</label>
@ -534,7 +534,6 @@ export default {
<label class="form-check-label" for="inlineRadio54">ช3</label> <label class="form-check-label" for="inlineRadio54">ช3</label>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">

View File

@ -233,7 +233,7 @@ export default {
:style="`background-image: url(${vueMkHeader})`" :style="`background-image: url(${vueMkHeader})`"
loading="lazy" loading="lazy"
> >
<div class="container"> <div class="container-fluid">
<div class="text-center" style="margin-top: -120px"> <div class="text-center" style="margin-top: -120px">
<img src="../../assets/img/logo.png" alt="title" loading="lazy" class="w-35" /> <img src="../../assets/img/logo.png" alt="title" loading="lazy" class="w-35" />
</div> </div>
@ -255,7 +255,7 @@ export default {
<section> <section>
<div class="card card-body blur shadow-blur mx-3 mx-md-4 mt-n6 pt-6"> <div class="card card-body blur shadow-blur mx-3 mx-md-4 mt-n6 pt-6">
<div class="page-header min-vh-45"> <div class="page-header min-vh-45">
<div class="container"> <div class="container-fluid">
<!-- d-flex justify-content-between --> <!-- d-flex justify-content-between -->
<div> <div>
<Breadcrumbs <Breadcrumbs
@ -393,7 +393,7 @@ export default {
> >
</p> </p>
<div class="collapse show" id="collapseExample" aria-expanded="true"> <div class="collapse show" id="collapseExample" aria-expanded="true">
<div class="flex-container"> <div class="flex-container-fluid">
<div v-for="(item2, index) in roomData" :key="index"> <div v-for="(item2, index) in roomData" :key="index">
<div <div
class="card mb-2" class="card mb-2"
@ -404,7 +404,7 @@ export default {
'bg-return': item2?.status == 'return', 'bg-return': item2?.status == 'return',
'bgg-red': item2?.status == 'special', 'bgg-red': item2?.status == 'special',
}" }"
:style="{ width: `220px`, height: `170px` }" :style="{ height: `150px` }"
> >
<div class="card-body p-1"> <div class="card-body p-1">
<a <a
@ -456,7 +456,7 @@ export default {
{{ item2?.ranks }} {{ item2?.firstName }} {{ item2?.ranks }} {{ item2?.firstName }}
{{ item2?.laststName }} {{ item2?.laststName }}
</p> </p>
<div> <p>
<span <span
v-if="item2?.status !== 'special'" v-if="item2?.status !== 'special'"
style="text-align: right; font-size: small" style="text-align: right; font-size: small"
@ -467,7 +467,7 @@ export default {
style="text-align: right; font-size: 16px" style="text-align: right; font-size: 16px"
>{{ "กรณีพิเศษ" }}</span >{{ "กรณีพิเศษ" }}</span
> >
</div> </p>
</a> </a>
</div> </div>
</div> </div>
@ -570,15 +570,15 @@ export default {
</section> </section>
</template> </template>
<style> <style>
.flex-container { .flex-container-fluid {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: nowrap;
} }
.flex-container > div { .flex-container-fluid > div {
background-color: #f1f1f1; background-color: #f1f1f1;
width: 220px; width: 150px;
height: 170px; height: 150px;
margin: 12px; margin: 12px;
text-align: center; text-align: center;
line-height: 75px; line-height: 75px;