Commit cd02b769 authored by vinh's avatar vinh

commit

parent 56c9fcbb
......@@ -45,7 +45,7 @@
</router-link>
</div>
<div class="logout" @click="logout">
<i class="bi bi-box-arrow-right icon"> Logout</i>
<i class="bi bi-box-arrow-right icon"> </i>Logout
</div>
</div>
</template>
......@@ -91,7 +91,7 @@ export default {
}
.icon {
color: rgb(150, 150, 150);
color: rgb(74, 74, 74);
font-size: 25px;
}
......@@ -152,4 +152,18 @@ export default {
background-color: rgb(247, 108, 105);
color: #fff;
}
@media (max-width:425px) {
.logout {
cursor: pointer;
padding-left: 20px;
font-size: 15px;
display: flex;
gap: 15px;
padding: 15px;
min-height: 100px;
align-items: center;
background-color: rgb(247, 108, 105);
}
}
</style>
......@@ -108,20 +108,19 @@ export default defineComponent({
const viewDetail = async (checkinId, bookingId) => {
try {
console.log(checkinId, bookingId)
const response = await axios.post('checkin/checkin-detail', {
checkinId: checkinId,
bookingId: bookingId
})
CheckinDetail.value = {
'Guest name': response.data.guest_name,
'Guest number': response.data.guest_number,
'Booked time': response.data.created_at,
'Employee id': response.data.id,
'Employee name': response.data.name,
'Employee role': response.data.role,
'Guest name': response.data[0].guest_name,
'Guest number': response.data[0].guest_number,
'Booked time': response.data[0].created_at,
'Employee id': response.data[1].id,
'Employee name': response.data[1].name,
'Employee role': response.data[1].role,
}
console.log(CheckinDetail.value)
console.log(response.data[1])
document.getElementById('detail-modal').style.display = 'block'
} catch (error) {
console.error(error.response.data)
......@@ -155,9 +154,21 @@ export default defineComponent({
}
const exportData = async () => {
try {
const response = await axios.get('checkin/export')
console.log(response.data)
axios({
method: 'GET',
url: 'checkin/export',
responseType: 'blob',
}).then(response => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'data.csv'); // Specify the filename
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
});
} catch (error) {
console.error(error.response.data)
}
......
......@@ -188,11 +188,11 @@ export default defineComponent({
async mounted() {
this.loaded = false
try {
const bookingThisYear = await axios.get('booking-this-year')
const bookingThisYear = await axios.get('dashboard/booking-this-year')
this.LineChartData.datasets[0].data = bookingThisYear.data
const interestThisYear = await axios.get('interest-this-year')
const interestThisYear = await axios.get('dashboard/interest-this-year')
this.BarChartData.datasets[0].data = interestThisYear.data
const IncomeAndSalary = await axios.get('income-this-month')
const IncomeAndSalary = await axios.get('dashboard/income-this-month')
this.PieChartData.datasets[0].data = IncomeAndSalary.data
this.loaded = true
} catch (e) {
......
......@@ -63,7 +63,7 @@ export default {
const modifyRoom = (id) => {
//router push to modify room
router.push('/modify/' + id)
router.push('room/modify/' + id)
}
const handleFileUpload = (event) => {
......@@ -71,7 +71,7 @@ export default {
}
const viewRoomDetail = async (id) => {
let response = await axios.post('room-detail', {
let response = await axios.post('room/room-detail', {
id: id
})
roomInfo.value = {
......
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