Replace variable names.

This commit is contained in:
James Cole
2024-04-01 20:26:02 +02:00
parent f6e28dc88f
commit 6189d24b98
13 changed files with 52 additions and 49 deletions

View File

@@ -35,6 +35,7 @@ export default () => ({
getFreshData() {
const start = new Date(window.store.get('start'));
const end = new Date(window.store.get('end'));
// needs user data.
const cacheKey = getCacheKey(PIGGY_CACHE_KEY, start, end);
const cacheValid = window.store.get('cacheValid');

View File

@@ -19,9 +19,11 @@
*/
import {format} from "date-fns";
import store from "store";
function getCacheKey(string, start, end) {
const cacheKey = format(start, 'y-MM-dd') + '_' + format(end, 'y-MM-dd') + '_' + string;
const localValue = store.get('lastActivity');
const cacheKey = format(start, 'y-MM-dd') + '_' + format(end, 'y-MM-dd') + '_' + string + localValue;
console.log('getCacheKey: ' + cacheKey);
return String(cacheKey);
}

View File

@@ -17,7 +17,7 @@
<div class="row mb-3">
<template x-for="(group, index) in userGroups" :key="index">
<div class="col-xl-4 col-lg-4 col-sm-6 col-xs-12 mb-3">
<div class="card">
<div :class="{'card': true, 'card-primary': group.in_use}">
<div class="card-header">
<h3 class="card-title">
<template x-if="group.in_use">