changes untested
This commit is contained in:
55
src/pages/Index.vue
Normal file → Executable file
55
src/pages/Index.vue
Normal file → Executable file
@@ -22,7 +22,7 @@
|
||||
<div class="grid grid-cols-12 p-5">
|
||||
<div class="col-span-12 font-bold text-xl">Todays stats</div>
|
||||
<div class="col-span-6 py-2"> Total Deliveries: {{delivery_count}}</div>
|
||||
<div class="col-span-6 py-2"> Total Service Calls: {{service_count}}</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-6 bg-neutral" >
|
||||
@@ -34,15 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-6 bg-neutral" >
|
||||
<div class="grid grid-cols-12 p-5 ">
|
||||
<div class="col-span-12 font-bold text-xl">Todays Service Price</div>
|
||||
<div class="col-span-12 py-2"> Price / hour: ${{price_hourly}}</div>
|
||||
<div class="col-span-12 py-2"> Emergency Fee: ${{emergency_fee}}</div>
|
||||
<div class="col-span-12 py-2"> Emergency Price / hour: ${{emergency_rate}}</div>
|
||||
|
||||
<div class="col-span-12 py-2"> Cleaning ${{cleaning}}</div>
|
||||
<div class="col-span-12 py-2"> Out of Oil: ${{out_of_oil}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,17 +64,10 @@ export default defineComponent({
|
||||
return {
|
||||
token: null,
|
||||
delivery_count: 0,
|
||||
service_count: 0,
|
||||
today_oil_price: '',
|
||||
|
||||
same_day: '',
|
||||
price_hourly: '',
|
||||
emergency_fee: '',
|
||||
emergency_rate: '',
|
||||
prime: '',
|
||||
cleaning: '',
|
||||
out_of_oil: '',
|
||||
|
||||
user: {
|
||||
user_id: 0,
|
||||
user_name: '',
|
||||
@@ -111,9 +96,8 @@ export default defineComponent({
|
||||
created() {
|
||||
this.userStatus()
|
||||
this.today_delivery_count()
|
||||
this.today_service_count()
|
||||
this.today_price_oil()
|
||||
this.today_price_service()
|
||||
|
||||
},
|
||||
methods: {
|
||||
userStatus() {
|
||||
@@ -164,18 +148,7 @@ export default defineComponent({
|
||||
this.delivery_count = response.data.data;
|
||||
})
|
||||
},
|
||||
today_service_count() {
|
||||
let path = import.meta.env.VITE_BASE_URL + '/stats/service/count/today'
|
||||
axios({
|
||||
method: "get",
|
||||
url: path,
|
||||
withCredentials: true,
|
||||
headers: authHeader(),
|
||||
})
|
||||
.then((response: any) => {
|
||||
this.service_count = response.data.data;
|
||||
})
|
||||
},
|
||||
|
||||
today_price_oil() {
|
||||
let path = import.meta.env.VITE_BASE_URL + '/info/price/oil'
|
||||
axios({
|
||||
@@ -188,25 +161,7 @@ export default defineComponent({
|
||||
this.today_oil_price = response.data.price;
|
||||
})
|
||||
},
|
||||
today_price_service() {
|
||||
let path = import.meta.env.VITE_BASE_URL + '/info/price/service'
|
||||
axios({
|
||||
method: "get",
|
||||
url: path,
|
||||
withCredentials: true,
|
||||
headers: authHeader(),
|
||||
})
|
||||
.then((response: any) => {
|
||||
console.log(response.data)
|
||||
this.same_day = response.data.same_day;
|
||||
this.price_hourly = response.data.price_hourly;
|
||||
this.emergency_fee = response.data.emergency_fee;
|
||||
this.emergency_rate = response.data.emergency_rate;
|
||||
this.prime = response.data.prime;
|
||||
this.cleaning = response.data.cleaning;
|
||||
this.out_of_oil = response.data.out_of_oil;
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user