This commit is contained in:
@@ -972,8 +972,14 @@ export default {
|
||||
ret.push(6);
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// Random integer from 0 to max
|
||||
//
|
||||
//
|
||||
getRandomInt: function(max) {
|
||||
return Math.floor(Math.random() * max);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
||||
@@ -181,11 +181,10 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//this.refresh();
|
||||
if (this.updateFrequency > 0) {
|
||||
this.timer = setInterval(() => {
|
||||
this.refresh();
|
||||
}, this.updateFrequency);
|
||||
}, this.updateFrequency + window.$gz.util.getRandomInt(30000)); //add up to 30 seconds so they don't all fire at once
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon="$ayiStickyNote"
|
||||
:add-url="'home-reminders/0'"
|
||||
:show-more-button="false"
|
||||
:update-frequency="65000"
|
||||
:update-frequency="300000"
|
||||
:error-message="errorMessage"
|
||||
v-bind="$attrs"
|
||||
@dash-refresh="getDataFromApi()"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<gz-dash
|
||||
icon="$ayiCalendarCheck"
|
||||
:show-more-button="false"
|
||||
:update-frequency="65000"
|
||||
:update-frequency="300000"
|
||||
:error-message="errorMessage"
|
||||
v-bind="$attrs"
|
||||
@dash-refresh="getDataFromApi()"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon="$ayiUserClock"
|
||||
:add-url="'svc-workorders/0'"
|
||||
:show-more-button="false"
|
||||
:update-frequency="60000"
|
||||
:update-frequency="300000"
|
||||
:error-message="errorMessage"
|
||||
v-bind="$attrs"
|
||||
@dash-refresh="getDataFromApi()"
|
||||
|
||||
@@ -66,9 +66,12 @@
|
||||
</component>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-btn outlined @click.native="showSelector = true">{{
|
||||
$ay.t("Add")
|
||||
}}</v-btn>
|
||||
<v-btn
|
||||
v-if="formState.ready"
|
||||
text
|
||||
@click.native="showSelector = true"
|
||||
>{{ $ay.t("Add") }}</v-btn
|
||||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user