Phase 2: AI Chat, Calendar, Odoo connector, PWA

- AI Chat endpoint (/api/v1/chat) with Claude API context
- Calendar page with FullCalendar.js (day/week/month)
- Odoo API connector (import/export/webhook)
- PWA manifest + service worker for offline
- SW register component

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude CLI Agent
2026-03-29 10:12:53 +00:00
parent b5a6dd6d6f
commit 55993b70b2
16 changed files with 402 additions and 24 deletions

27
apps/tasks/public/sw.js Normal file
View File

@@ -0,0 +1,27 @@
const CACHE = "taskteam-v1";
const PRECACHE = ["/tasks", "/login", "/manifest.json"];
self.addEventListener("install", (e) => {
e.waitUntil(caches.open(CACHE).then((c) => c.addAll(PRECACHE)));
self.skipWaiting();
});
self.addEventListener("activate", (e) => {
e.waitUntil(caches.keys().then((keys) =>
Promise.all(keys.filter((k) => k !== CACHE).map((k) => caches.delete(k)))
));
self.clients.claim();
});
self.addEventListener("fetch", (e) => {
if (e.request.method !== "GET") return;
e.respondWith(
fetch(e.request)
.then((r) => {
const clone = r.clone();
caches.open(CACHE).then((c) => c.put(e.request, clone));
return r;
})
.catch(() => caches.match(e.request))
);
});