feat(planning): grille hebdomadaire complète avec API et filtres
- Connexion API via proxy Angular (résolution CORS, base path /api) - Import CSS ng-zorro global pour les modales et composants - Filtres Camion/Show câblés sur l'affichage de la grille - Camions affichés via TrucksService (linkés au show du même créneau) - Panneau de détails : spectacles + camions du jour sélectionné - Modale de création de spectacle stylisée avec fond et centrage - Positionnement précis des events à la minute dans leur créneau - Auto-scroll vers l'heure courante au chargement - Ligne "maintenant" sur la colonne du jour actuel - Régénération des services OpenAPI (nouveaux noms de types) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+19
-17
@@ -1,36 +1,37 @@
|
||||
"use strict";
|
||||
// Cache system is a bit outdated and could do with work
|
||||
|
||||
export default (window, options, logger) => {
|
||||
let cache = null;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = (function (window, options, logger) {
|
||||
var cache = null;
|
||||
if (options.env !== 'development') {
|
||||
try {
|
||||
cache = (typeof window.localStorage === 'undefined') ? null : window.localStorage;
|
||||
} catch (_) {}
|
||||
}
|
||||
catch (_) { }
|
||||
}
|
||||
return {
|
||||
setCSS: function(path, lastModified, modifyVars, styles) {
|
||||
setCSS: function (path, lastModified, modifyVars, styles) {
|
||||
if (cache) {
|
||||
logger.info(`saving ${path} to cache.`);
|
||||
logger.info("saving ".concat(path, " to cache."));
|
||||
try {
|
||||
cache.setItem(path, styles);
|
||||
cache.setItem(`${path}:timestamp`, lastModified);
|
||||
cache.setItem("".concat(path, ":timestamp"), lastModified);
|
||||
if (modifyVars) {
|
||||
cache.setItem(`${path}:vars`, JSON.stringify(modifyVars));
|
||||
cache.setItem("".concat(path, ":vars"), JSON.stringify(modifyVars));
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
catch (e) {
|
||||
// TODO - could do with adding more robust error handling
|
||||
logger.error(`failed to save "${path}" to local storage for caching.`);
|
||||
logger.error("failed to save \"".concat(path, "\" to local storage for caching."));
|
||||
}
|
||||
}
|
||||
},
|
||||
getCSS: function(path, webInfo, modifyVars) {
|
||||
const css = cache && cache.getItem(path);
|
||||
const timestamp = cache && cache.getItem(`${path}:timestamp`);
|
||||
let vars = cache && cache.getItem(`${path}:vars`);
|
||||
|
||||
getCSS: function (path, webInfo, modifyVars) {
|
||||
var css = cache && cache.getItem(path);
|
||||
var timestamp = cache && cache.getItem("".concat(path, ":timestamp"));
|
||||
var vars = cache && cache.getItem("".concat(path, ":vars"));
|
||||
modifyVars = modifyVars || {};
|
||||
vars = vars || '{}'; // if not set, treat as the JSON representation of an empty object
|
||||
|
||||
if (timestamp && webInfo.lastModified &&
|
||||
(new Date(webInfo.lastModified).valueOf() ===
|
||||
new Date(timestamp).valueOf()) &&
|
||||
@@ -40,4 +41,5 @@ export default (window, options, logger) => {
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
});
|
||||
//# sourceMappingURL=cache.js.map
|
||||
Reference in New Issue
Block a user