This commit is contained in:
2020-04-20 21:50:41 +00:00
parent 0bb976b5ce
commit 563ea0fdb0
2 changed files with 21 additions and 12 deletions

View File

@@ -66,12 +66,6 @@ CURRENT TODOs
@@@@@@@@@@@ ROADMAP STAGE 2:
todo: BUG Something fucked with history? When I click on a widget's history button in admin user history view it shows two created record with differing timestamps
- note, it doesn't seem to do it on the most recent widgets, but only on the first few created for some reason?!
todo: lighten event log icons, they look like they are actionable right now, but should look "historical"
todo: "Activity" button in object event log
- How to get to User event log history? Right now you can click on History when you see a user panel in an object log history
- but that opens the history for the User object itself, not that user's history so we need another "Activity" button I think

View File

@@ -69,11 +69,14 @@
</v-card-text>
<v-card-actions>
<v-btn text @click="openHistoryOfItem(i)">{{
$ay.t("History")
}}</v-btn>
<v-btn
v-if="canViewUserHistory(i)"
text
@click="openHistoryOfItem(i)"
>{{ $ay.t("History") }}</v-btn
@click="openHistoryOfUser(i)"
>{{ $ay.t("Activity") }}</v-btn
>
<v-btn v-if="canOpenUser" text @click="openItem(i)">{{
$ay.t("Open")
@@ -159,6 +162,7 @@ export default {
openHistoryOfItem(item) {
if (item.userId) {
//object log, so open is for user
//note: this exception is required because in object log there is no item.objecttype
this.$router.push({
name: "ay-history",
params: { ayatype: window.$gz.type.User, recordid: item.userId }
@@ -177,6 +181,16 @@ export default {
this.canOpenUser || this.$store.state.userId == objectlogitem.userId
);
},
openHistoryOfUser(item) {
this.$router.push({
name: "ay-history",
params: {
ayatype: window.$gz.type.User,
recordid: item.userId,
userlog: true
}
});
},
canOpen(otype) {
return (
this.ayaTypes[otype].openableObject && window.$gz.role.canOpen(otype)
@@ -214,13 +228,13 @@ export default {
switch (event) {
case 0:
case 5:
return "red";
return "red lighten-2";
case 1:
case 4:
case 10:
return "green";
return "green lighten-2";
default:
return "primary";
return "primary lighten-2";
}
},
getDataFromApi() {
@@ -450,7 +464,8 @@ function fetchTranslatedText(vm) {
"EventLicenseFetch",
"EventLicenseTrialRequest",
"EventServerStateChange",
"EventSeedDatabase"
"EventSeedDatabase",
"Activity"
]);
}
</script>