feat: push notifications, calendar view, photo attachments

- Push notifications: custom SW (injectManifest), usePushNotifications hook,
  push-notify Edge Function, push_subscriptions migration, bell toggle in header
- Calendar view: month-grid CalendarPage + useCalendar hook, scheduled_at column
  migration, datetime field in OrderModal, CalendarDays nav item + route
- Photo attachments: useOrderPhotos hook, photo gallery/upload in OrderModal (edit
  mode), order-photos Storage bucket migration with RLS policies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-10 17:25:04 +03:00
parent 5a9b6c4c7f
commit af9e7ce1af
12 changed files with 688 additions and 18 deletions
+6 -8
View File
@@ -6,6 +6,11 @@ export default defineConfig({
plugins: [
react(),
VitePWA({
// injectManifest lets us supply our own src/sw.js so we can add
// push/notificationclick handlers alongside Workbox precaching.
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.js',
registerType: 'autoUpdate',
includeAssets: ['favicon.svg', 'favicon.ico', 'apple-touch-icon-180x180.png'],
manifest: {
@@ -25,15 +30,8 @@ export default defineConfig({
{ src: 'maskable-icon-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
],
},
workbox: {
injectManifest: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
runtimeCaching: [
{
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,
handler: 'CacheFirst',
options: { cacheName: 'google-fonts-cache', expiration: { maxEntries: 10, maxAgeSeconds: 60 * 60 * 24 * 365 } },
},
],
},
}),
],