Merge remote-tracking branch 'origin/master'
This commit is contained in:
135
ui/quasar.config.js.temporary.compiled.1778575479739.mjs
Normal file
135
ui/quasar.config.js.temporary.compiled.1778575479739.mjs
Normal file
@@ -0,0 +1,135 @@
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* THIS FILE IS GENERATED AUTOMATICALLY.
|
||||
* 1. DO NOT edit this file directly as it won't do anything.
|
||||
* 2. EDIT the original quasar.config file INSTEAD.
|
||||
* 3. DO NOT git commit this file. It should be ignored.
|
||||
*
|
||||
* This file is still here because there was an error in
|
||||
* the original quasar.config file and this allows you to
|
||||
* investigate the Node.js stack error.
|
||||
*
|
||||
* After you fix the original file, this file will be
|
||||
* deleted automatically.
|
||||
**/
|
||||
|
||||
|
||||
// quasar.config.js
|
||||
import { defineConfig } from "@quasar/app-webpack/wrappers";
|
||||
var quasar_config_default = defineConfig(() => {
|
||||
const apiBaseUrl = (process.env.VITE_API_BASE_URL || "/api").trim();
|
||||
return {
|
||||
/* =====================================================
|
||||
APP INFO
|
||||
===================================================== */
|
||||
productName: "Baggi BSS",
|
||||
productDescription: "Baggi Tekstil Business Support System",
|
||||
/* =====================================================
|
||||
BOOT FILES
|
||||
===================================================== */
|
||||
boot: ["dayjs", "locale", "resizeObserverGuard"],
|
||||
/* =====================================================
|
||||
GLOBAL CSS
|
||||
===================================================== */
|
||||
css: ["app.css"],
|
||||
/* =====================================================
|
||||
ICONS / FONTS
|
||||
===================================================== */
|
||||
extras: [
|
||||
"roboto-font",
|
||||
"material-icons"
|
||||
],
|
||||
/* =====================================================
|
||||
BUILD (PRODUCTION)
|
||||
===================================================== */
|
||||
build: {
|
||||
vueRouterMode: "hash",
|
||||
env: {
|
||||
VITE_API_BASE_URL: apiBaseUrl
|
||||
},
|
||||
esbuildTarget: {
|
||||
browser: ["es2022", "firefox115", "chrome115", "safari14"],
|
||||
node: "node20"
|
||||
},
|
||||
// Cache & performance
|
||||
gzip: true,
|
||||
preloadChunks: true
|
||||
},
|
||||
/* =====================================================
|
||||
DEV SERVER (LOCAL)
|
||||
===================================================== */
|
||||
devServer: {
|
||||
server: { type: "http" },
|
||||
port: 9e3,
|
||||
open: true,
|
||||
client: {
|
||||
overlay: {
|
||||
errors: true,
|
||||
warnings: false,
|
||||
runtimeErrors: false
|
||||
}
|
||||
},
|
||||
// DEV proxy (CORS'suz)
|
||||
proxy: [
|
||||
{
|
||||
context: ["/api"],
|
||||
target: "http://localhost:8080",
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
ws: true,
|
||||
timeout: 0,
|
||||
proxyTimeout: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
/* =====================================================
|
||||
QUASAR FRAMEWORK
|
||||
===================================================== */
|
||||
framework: {
|
||||
config: {
|
||||
notify: {
|
||||
position: "top",
|
||||
timeout: 2500
|
||||
}
|
||||
},
|
||||
lang: "tr",
|
||||
plugins: [
|
||||
"Loading",
|
||||
"Dialog",
|
||||
"Notify"
|
||||
]
|
||||
},
|
||||
animations: [],
|
||||
/* =====================================================
|
||||
SSR / PWA (DISABLED)
|
||||
===================================================== */
|
||||
ssr: {
|
||||
prodPort: 3e3,
|
||||
middlewares: ["render"],
|
||||
pwa: false
|
||||
},
|
||||
pwa: {
|
||||
workboxMode: "GenerateSW"
|
||||
},
|
||||
/* =====================================================
|
||||
MOBILE / DESKTOP
|
||||
===================================================== */
|
||||
capacitor: {
|
||||
hideSplashscreen: true
|
||||
},
|
||||
electron: {
|
||||
preloadScripts: ["electron-preload"],
|
||||
inspectPort: 5858,
|
||||
bundler: "packager",
|
||||
builder: {
|
||||
appId: "baggisowtfaresystem"
|
||||
}
|
||||
},
|
||||
bex: {
|
||||
extraScripts: []
|
||||
}
|
||||
};
|
||||
});
|
||||
export {
|
||||
quasar_config_default as default
|
||||
};
|
||||
45
ui/src/modules/activityLogs/index.js
Normal file
45
ui/src/modules/activityLogs/index.js
Normal file
@@ -0,0 +1,45 @@
|
||||
// ui/src/modules/activityLogs/index.js
|
||||
|
||||
export const ACTIVITY_LOGS_ALLOWED_USER_IDS = [5]
|
||||
|
||||
function toNumberOrNull (v) {
|
||||
const n = Number(v)
|
||||
return Number.isFinite(n) ? n : null
|
||||
}
|
||||
|
||||
export function getAuthUserId (authUser) {
|
||||
if (!authUser || typeof authUser !== 'object') return null
|
||||
|
||||
// tolerate backend field naming differences
|
||||
return (
|
||||
toNumberOrNull(authUser.id) ??
|
||||
toNumberOrNull(authUser.ID) ??
|
||||
toNumberOrNull(authUser.user_id) ??
|
||||
toNumberOrNull(authUser.userId) ??
|
||||
null
|
||||
)
|
||||
}
|
||||
|
||||
export function isActivityLogsAllowedUser (authUser) {
|
||||
const id = getAuthUserId(authUser)
|
||||
if (id == null) return false
|
||||
return ACTIVITY_LOGS_ALLOWED_USER_IDS.includes(id)
|
||||
}
|
||||
|
||||
export const activityLogsRoute = {
|
||||
path: 'activity-logs',
|
||||
name: 'activity-logs',
|
||||
component: () => import('pages/ActivityLogs.vue'),
|
||||
meta: {
|
||||
permission: 'system:read',
|
||||
onlyUserIds: ACTIVITY_LOGS_ALLOWED_USER_IDS
|
||||
}
|
||||
}
|
||||
|
||||
export const activityLogsMenuItem = {
|
||||
label: 'Loglar',
|
||||
to: '/app/activity-logs',
|
||||
permission: 'system:read',
|
||||
onlyUserIds: ACTIVITY_LOGS_ALLOWED_USER_IDS
|
||||
}
|
||||
|
||||
13
ui/src/pages/Unauthorized.vue
Normal file
13
ui/src/pages/Unauthorized.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<q-page class="q-pa-md flex flex-center">
|
||||
<div class="column items-center">
|
||||
<div class="text-negative text-h6 q-mb-sm">Erisim reddedildi</div>
|
||||
<div class="text-grey-7 q-mb-md">Bu sayfayi gormek icin yetkiniz yok.</div>
|
||||
<q-btn color="primary" unelevated label="Ana panele don" to="/app" />
|
||||
</div>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user