Format Home component
This commit is contained in:
parent
3321f4a58a
commit
6f9e9141b7
@ -35,7 +35,6 @@
|
||||
v-bind:class="{'d-none':today.type == 'PAID'}"
|
||||
>mdi-currency-usd-off</v-icon>{{" " + today.type}}</pre>
|
||||
<pre><v-icon color="primary">mdi-clock-outline</v-icon>{{" Start " + today.startdate}}</pre>
|
||||
|
||||
<pre><v-icon color="primary">mdi-clock-outline</v-icon>{{" End " + today.enddate}}</pre>
|
||||
</v-card>
|
||||
</v-col>
|
||||
@ -47,15 +46,11 @@
|
||||
<v-col cols="6">
|
||||
<v-card>
|
||||
<p class="pa-2" style="font-size:30pt">Accounts</p>
|
||||
<div
|
||||
:key="timeTrackAccount._links.self.href"
|
||||
v-for="timeTrackAccount in timeTrackAccounts"
|
||||
>
|
||||
<div :key="timeTrackAccount._links.self.href" v-for="timeTrackAccount in timeTrackAccounts">
|
||||
<v-row no-gutters align="center">
|
||||
<v-col cols="12">
|
||||
<v-card color="background" elevation="0" class="ma-2">
|
||||
<pre><v-icon color="primary">mdi-account-tie</v-icon>{{" Account " + timeTrackAccount.name}}</pre>
|
||||
|
||||
<pre><v-icon color="primary">mdi-currency-usd</v-icon>{{" Revenue " + timeTrackAccount.revenue}}</pre>
|
||||
</v-card>
|
||||
</v-col>
|
||||
@ -63,7 +58,6 @@
|
||||
</div>
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-card v-if="loggedIn == 'false'" class="pa-3">
|
||||
<p style="font-size:20pt">Welcome to Geo Timetracking</p>
|
||||
@ -72,9 +66,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import {baseUri} from "../variables.js";
|
||||
|
||||
export default {
|
||||
name: "Home",
|
||||
components: {},
|
||||
@ -100,14 +93,11 @@ export default {
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", baseUri + "/records/search/today", false);
|
||||
|
||||
xhttp.setRequestHeader("Authorization", sessionStorage.getItem("jwt"));
|
||||
|
||||
xhttp.send(null);
|
||||
|
||||
for (let index = 0; index < today.length; index++) {
|
||||
var record = today[index];
|
||||
|
||||
var start = record.startdate;
|
||||
|
||||
start = start.split("T");
|
||||
@ -123,7 +113,6 @@ export default {
|
||||
}
|
||||
this.todaysRecord = today;
|
||||
|
||||
|
||||
var timeTrackAccountsTMP;
|
||||
var accountxhttp = new XMLHttpRequest();
|
||||
accountxhttp.onreadystatechange = function () {
|
||||
@ -141,9 +130,7 @@ export default {
|
||||
);
|
||||
|
||||
accountxhttp.setRequestHeader("Authorization", sessionStorage.getItem("jwt"));
|
||||
|
||||
accountxhttp.send(null);
|
||||
|
||||
this.timeTrackAccounts = timeTrackAccountsTMP;
|
||||
|
||||
//Get Location
|
||||
@ -162,19 +149,12 @@ export default {
|
||||
false
|
||||
);
|
||||
|
||||
locationxhttp.setRequestHeader(
|
||||
"Authorization",
|
||||
sessionStorage.getItem("jwt")
|
||||
);
|
||||
|
||||
locationxhttp.setRequestHeader("Authorization", sessionStorage.getItem("jwt"));
|
||||
locationxhttp.send(null);
|
||||
|
||||
|
||||
this.haveLocation = locSuc;
|
||||
this.location = location;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user