Mobile-first Quasar PWA for field technicians at erp.gigafibre.ca/field/: - Multi-barcode scanner (photo + live + manual) with device lookup - Tasks page: today's Dispatch Jobs + assigned tickets - Diagnostic: speed test, HTTP resolve, batch service check - Device detail with customer linking - Offline support: IndexedDB queue, API cache, auto-sync - Standalone nginx container with Traefik StripPrefix + Authentik SSO Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
80 lines
1.9 KiB
JavaScript
80 lines
1.9 KiB
JavaScript
/* eslint-env node */
|
|
const { configure } = require('quasar/wrappers')
|
|
|
|
module.exports = configure(function () {
|
|
return {
|
|
boot: ['pinia'],
|
|
|
|
css: ['app.scss'],
|
|
|
|
extras: ['material-icons'],
|
|
|
|
build: {
|
|
target: {
|
|
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
|
|
node: 'node20',
|
|
},
|
|
vueRouterMode: 'hash',
|
|
extendViteConf (viteConf) {
|
|
viteConf.base = process.env.DEPLOY_BASE || '/field/'
|
|
},
|
|
},
|
|
|
|
devServer: {
|
|
open: false,
|
|
host: '0.0.0.0',
|
|
port: 9002,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://erp.gigafibre.ca',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
framework: {
|
|
config: {},
|
|
plugins: ['Notify', 'Loading', 'LocalStorage', 'Dialog', 'BottomSheet'],
|
|
},
|
|
|
|
animations: [],
|
|
|
|
pwa: {
|
|
workboxMode: 'generateSW',
|
|
injectPwaMetaTags: true,
|
|
swFilename: 'sw.js',
|
|
manifestFilename: 'manifest.json',
|
|
useCredentialForManifestTag: false,
|
|
workboxOptions: {
|
|
skipWaiting: true,
|
|
clientsClaim: true,
|
|
cleanupOutdatedCaches: true,
|
|
navigateFallback: 'index.html',
|
|
navigateFallbackDenylist: [/^\/api\//],
|
|
runtimeCaching: [
|
|
{
|
|
// Cache ERPNext API responses for offline
|
|
urlPattern: /\/api\/resource\//,
|
|
handler: 'NetworkFirst',
|
|
options: {
|
|
cacheName: 'erp-api',
|
|
expiration: { maxEntries: 200, maxAgeSeconds: 86400 },
|
|
networkTimeoutSeconds: 5,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
extendManifestJson (json) {
|
|
json.name = 'Targo Field'
|
|
json.short_name = 'Field'
|
|
json.description = 'Targo Field Technician App'
|
|
json.display = 'standalone'
|
|
json.orientation = 'portrait'
|
|
json.background_color = '#ffffff'
|
|
json.theme_color = '#0f172a'
|
|
json.start_url = '.'
|
|
},
|
|
},
|
|
}
|
|
})
|