major update

This commit is contained in:
2024-10-17 17:01:42 -04:00
parent 9029993c49
commit c6f806f733
41 changed files with 899 additions and 254 deletions

View File

@@ -45,6 +45,15 @@
<div class="col-span-12 py-2"> search: @ = last name search</div>
<div class="col-span-12 py-2"> search: ! = address</div>
<div class="col-span-12 py-2"> search: # = phone number</div>
<div class="col-span-12 py-2"> search: $ = account number</div>
</div>
</div>
<div class="col-span-12 bg-secondary">
<div class="grid grid-cols-12 p-5 bg-neutral m-5">
<div class="col-span-12 font-bold text-xl">This Weeks Stats</div>
<div class="col-span-12 py-2"> Total Deliveries: {{ total_deliveries }}</div>
<div class="col-span-12 py-2"> Total Gallons : {{ total_gallons_past_week }}</div>
<div class="col-span-12 py-2"> Total Profit: ${{ total_profit_past_week }}</div>
</div>
</div>
</div>
@@ -105,6 +114,11 @@ export default defineComponent({
employee_type: '',
employee_state: '',
},
total_gallons_past_week: 0,
total_profit_past_week: 0,
total_deliveries: 0,
loaded: false,
}
@@ -115,6 +129,10 @@ export default defineComponent({
this.today_delivery_count()
this.today_delivery_delivered()
this.today_price_oil()
this.totalgallonsweek()
this.totalprofitweek()
},
methods: {
@@ -138,7 +156,33 @@ export default defineComponent({
})
},
totalgallonsweek() {
let path = import.meta.env.VITE_BASE_URL + '/stats/gallons/week';
axios({
method: "get",
url: path,
withCredentials: true,
headers: authHeader(),
})
.then((response: any) => {
this.total_gallons_past_week = response.data.total;
})
},
totalprofitweek() {
let path = import.meta.env.VITE_BASE_URL + '/money/profit/week';
axios({
method: "get",
url: path,
withCredentials: true,
headers: authHeader(),
})
.then((response: any) => {
this.total_profit_past_week = response.data.total_profit;
this.total_deliveries = response.data.total_deliveries;
})
},
employeeStatus() {
let path = import.meta.env.VITE_BASE_URL + '/employee/userid/' + this.user.user_id;
axios({