fix(owner-vue): order status 버그픽스

- order status 변경
This commit is contained in:
hoon7566
2022-03-17 15:17:44 +09:00
parent ce95517bad
commit 0123766d68
13 changed files with 62 additions and 258 deletions

View File

@@ -29,29 +29,29 @@ const routes = [
component: DashboardLayout,
beforeEnter: authCheck,
children: [
{
path: "/dashboard",
name: 'dashboard',
component: () => import('./../views/Dashboard')
},
{
path: '/category',
name: 'category',
beforeEnter: authCheck,
component: () => import('./../views/Category')
},
{
path: '/menu',
name: 'menu',
beforeEnter: authCheck,
component: () => import('./../views/Menu')
},
{
path: '/prev-order',
name: 'prev-order',
beforeEnter: authCheck,
component: () => import('./../views/PrevOrder')
},
{
path: '/order',
name: 'order',
beforeEnter: authCheck,
component: () => import('./../views/Order.vue')
}
]

View File

@@ -1,212 +0,0 @@
<template>
<div class="dashboard">
<v-subheader class="py-0 d-flex justify-space-between rounded-lg">
<h3>Dashboard</h3>
<v-btn color="success">
View Orders
</v-btn>
</v-subheader>
<br>
<v-row>
<v-col lg="7" cols="12">
<v-alert dense text type="success">
Login Successfully! Welcome to <strong>Web Burden</strong>
</v-alert>
<v-row>
<v-col lg="6" cols="12" v-for="(item,index) in activityLog" :key="index">
<v-card elevation="2" class="rounded-lg">
<v-card-text class="d-flex justify-space-between align-center">
<div>
<strong>{{ item.title }}</strong> <br>
<span>Last 3 weeks</span>
</div>
<v-avatar size="60" :color="item.color" style="border: 3px solid #444">
<span style="color: white">{{item.amount}} +</span>
</v-avatar>
</v-card-text>
<v-card-actions class="d-flex justify-space-between">
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-col>
<v-col cols="12" lg="5">
<v-card>
<v-card-title>Activities</v-card-title>
<v-card-text class="py-0">
<v-timeline align-top dense>
<v-timeline-item color="indigo" small>
<strong>5 Minuts ago</strong>
<div class="text-caption">
You have new order please check this out
</div>
</v-timeline-item>
<v-timeline-item color="green" small>
<strong>35 Minuts ago</strong>
<div class="text-caption mb-2">
A Product has delivered!
</div>
</v-timeline-item>
<v-timeline-item color="indigo" small>
<strong>44 Minuts ago</strong>
<div class="text-caption">
You have new order please check this out
</div>
</v-timeline-item>
</v-timeline>
</v-card-text>
</v-card>
</v-col>
<v-col>
<v-card>
<v-data-table
caption="Recent Order list"
:headers="headers"
:items="desserts"
:items-per-page="5"
class="elevation-1"
>
<template v-slot:item.action="">
<v-btn color="success" outlined small shaped >View</v-btn>
</template>
</v-data-table>
</v-card>
</v-col>
</v-row>
</div>
</template>
<script>
export default {
name: "Dashboard",
data() {
return {
activityLog: [
{title: 'Total Products', amount: 50, icon: 'mdi-account', color: 'cyan lighten-3'},
{title: 'Total Customer', amount: 3433, icon: 'mdi-account-group-outline', color: 'green darken-2'},
{title: 'Total Sale', amount: 3433, icon: 'mdi-account-group-outline', color: 'blue-grey darken-1'},
{
title: 'Pending Orders',
amount: 3433,
icon: 'mdi-account-group-outline',
color: 'deep-orange darken-1'
},
],
headers: [
{
text: 'Dessert (100g serving)',
align: 'start',
sortable: false,
value: 'name',
},
{text: 'Calories', value: 'calories'},
{text: 'Fat (g)', value: 'fat'},
{text: 'Carbs (g)', value: 'carbs'},
{text: 'Protein (g)', value: 'protein'},
{text: 'Iron (%)', value: 'iron'},
{text: 'Actions', value: 'action'},
],
desserts: [
{
name: 'Frozen Yogurt',
calories: 159,
fat: 6.0,
carbs: 24,
protein: 4.0,
iron: '1%',
},
{
name: 'Ice cream sandwich',
calories: 237,
fat: 9.0,
carbs: 37,
protein: 4.3,
iron: '1%',
},
{
name: 'Eclair',
calories: 262,
fat: 16.0,
carbs: 23,
protein: 6.0,
iron: '7%',
},
{
name: 'Cupcake',
calories: 305,
fat: 3.7,
carbs: 67,
protein: 4.3,
iron: '8%',
},
{
name: 'Gingerbread',
calories: 356,
fat: 16.0,
carbs: 49,
protein: 3.9,
iron: '16%',
},
{
name: 'Jelly bean',
calories: 375,
fat: 0.0,
carbs: 94,
protein: 0.0,
iron: '0%',
},
{
name: 'Lollipop',
calories: 392,
fat: 0.2,
carbs: 98,
protein: 0,
iron: '2%',
},
{
name: 'Honeycomb',
calories: 408,
fat: 3.2,
carbs: 87,
protein: 6.5,
iron: '45%',
},
{
name: 'Donut',
calories: 452,
fat: 25.0,
carbs: 51,
protein: 4.9,
iron: '22%',
},
{
name: 'KitKat',
calories: 518,
fat: 26.0,
carbs: 65,
protein: 7,
iron: '6%',
},
],
}
},
methods: {
onButtonClick(item) {
console.log('click on ' + item.no)
}
}
}
</script>
<style scoped>
.overlap-icon {
position: absolute;
top: -33px;
text-align: center;
padding-top: 12px;
}
</style>

View File

@@ -1,10 +1,13 @@
<template>
<!-- <v-navigation-drawer v-model="drawer" app> -->
<v-navigation-drawer app>
<v-navigation-drawer
v-model="drawer"
app>
<v-img
height="140"
class="pa-4"
src="https://preview.pixlr.com/images/800wm/1439/2/1439104804.jpg"
>
<div class="text-center">
<v-avatar class="mb-4" color="grey darken-1" size="64">
@@ -18,13 +21,13 @@
</v-img>
<v-divider></v-divider>
<v-list>
<v-list-item v-for="[icon, text] in links" :key="icon" link>
<v-list-item v-for="(link,index) in links" :key="link.icon" link @click="clickGo(index, link.url)">
<v-list-item-icon>
<v-icon>{{ icon }}</v-icon>
<v-icon>{{ link.icon }}</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>{{ text }}</v-list-item-title>
<v-list-item-title>{{ link.name }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
@@ -38,14 +41,26 @@ export default {
data() {
return {
links: [
["mdi-microsoft-windows", "Dashboard"],
["mdi-account", "Profile"],
["mdi-clipboard-list-outline", "Products"],
["mdi-card-account-details-outline", "Orders"],
["mdi-cog", "System Setting"],
{name: "지난 주문", url: "/prev-order", icon: "mdi-home-outline"},
{name: "카테고리", url: "/category", icon: "mdi-magnify"},
{name: "주문", url: "/order", icon: "mdi-cards-heart-outline"},
{name: "메뉴 관리", url: "/menu", icon: "mdi-cards-heart-outline"},
],
};
},
methods: {
clickGo: function (index, url) {
this.value = index;
this.$router.push(url);
}
},mounted() {
const path =this.$route.path
this.links.forEach((link, index) => {
if(link.url === path){
this.value = index
}
})
}
};
</script>