Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -89,6 +89,24 @@ ensure_ui_permissions() {
|
|||||||
find "$ui_root" -type f -exec chmod 644 {} \;
|
find "$ui_root" -type f -exec chmod 644 {} \;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ensure_ui_readable_by_nginx() {
|
||||||
|
ui_index="$APP_DIR/ui/dist/spa/index.html"
|
||||||
|
|
||||||
|
if [[ ! -f "$ui_index" ]]; then
|
||||||
|
echo "ERROR: UI index not found at $ui_index"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify nginx user can read index.html and traverse parent directories.
|
||||||
|
if id -u www-data >/dev/null 2>&1; then
|
||||||
|
if ! su -s /bin/sh -c "test -r '$ui_index'" www-data; then
|
||||||
|
echo "ERROR: www-data cannot read $ui_index"
|
||||||
|
namei -l "$ui_index" || true
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
build_api_binary() {
|
build_api_binary() {
|
||||||
if ! command -v go >/dev/null 2>&1; then
|
if ! command -v go >/dev/null 2>&1; then
|
||||||
echo "go command not found; cannot build backend binary."
|
echo "go command not found; cannot build backend binary."
|
||||||
@@ -146,6 +164,7 @@ run_deploy() {
|
|||||||
|
|
||||||
echo "== ENSURE UI PERMISSIONS =="
|
echo "== ENSURE UI PERMISSIONS =="
|
||||||
ensure_ui_permissions
|
ensure_ui_permissions
|
||||||
|
ensure_ui_readable_by_nginx
|
||||||
|
|
||||||
echo "== BUILD API =="
|
echo "== BUILD API =="
|
||||||
build_api_binary
|
build_api_binary
|
||||||
@@ -156,8 +175,22 @@ run_deploy() {
|
|||||||
echo "== ENSURE PDF FONTS =="
|
echo "== ENSURE PDF FONTS =="
|
||||||
ensure_pdf_fonts
|
ensure_pdf_fonts
|
||||||
|
|
||||||
echo "== RESTART SERVICE =="
|
echo "== RESTART SERVICES =="
|
||||||
systemctl restart bssapp
|
systemctl restart bssapp
|
||||||
|
if systemctl cat nginx >/dev/null 2>&1; then
|
||||||
|
systemctl restart nginx
|
||||||
|
if ! systemctl is-active --quiet nginx; then
|
||||||
|
echo "ERROR: nginx service failed to start"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "WARN: nginx service not found; frontend may be unreachable."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! systemctl is-active --quiet bssapp; then
|
||||||
|
echo "ERROR: bssapp service failed to start"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "[DEPLOY FINISHED] $(date '+%F %T')"
|
echo "[DEPLOY FINISHED] $(date '+%F %T')"
|
||||||
}
|
}
|
||||||
|
|||||||
17
svc/main.go
17
svc/main.go
@@ -616,16 +616,21 @@ func main() {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
port := strings.TrimSpace(os.Getenv("HTTPPORT"))
|
host := strings.TrimSpace(os.Getenv("API_HOST"))
|
||||||
|
port := strings.TrimSpace(os.Getenv("API_PORT"))
|
||||||
|
|
||||||
|
if host == "" {
|
||||||
|
host = "0.0.0.0"
|
||||||
|
}
|
||||||
if port == "" {
|
if port == "" {
|
||||||
port = "8080"
|
port = "8080"
|
||||||
}
|
}
|
||||||
if !strings.HasPrefix(port, ":") {
|
|
||||||
port = ":" + port
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Println("Server calisiyor: http://localhost" + port)
|
addr := host + ":" + port
|
||||||
log.Fatal(http.ListenAndServe(port, handler))
|
|
||||||
|
log.Println("🚀 Server running at:", addr)
|
||||||
|
log.Fatal(http.ListenAndServe(addr, handler))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func mountSPA(r *mux.Router) {
|
func mountSPA(r *mux.Router) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-page v-if="canReadFinance" class="q-pa-md page-col">
|
<q-page v-if="canReadFinance" class="q-pa-md page-col statement-page">
|
||||||
|
|
||||||
<!-- 🔹 Cari Kod / İsim (sabit) -->
|
<!-- 🔹 Cari Kod / İsim (sabit) -->
|
||||||
<div class="filter-sticky">
|
<div class="filter-sticky">
|
||||||
@@ -163,19 +163,21 @@
|
|||||||
|
|
||||||
<!-- Ana Tablo -->
|
<!-- Ana Tablo -->
|
||||||
<q-table
|
<q-table
|
||||||
class="sticky-table"
|
class="sticky-table statement-table"
|
||||||
title="Hareketler"
|
title="Hareketler"
|
||||||
:rows="statementheaderStore.groupedRows"
|
:rows="statementheaderStore.groupedRows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
:row-key="row => row.OrderHeaderID + '_' + row.OrderNumber"
|
:row-key="rowKeyFn"
|
||||||
|
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
dense
|
dense
|
||||||
|
hide-bottom
|
||||||
|
wrap-cells
|
||||||
:rows-per-page-options="[0]"
|
:rows-per-page-options="[0]"
|
||||||
:loading="statementheaderStore.loading"
|
:loading="statementheaderStore.loading"
|
||||||
:table-style="{ tableLayout: 'auto', minWidth: '1600px' }"
|
:table-style="{ tableLayout: 'fixed', width: '100%' }"
|
||||||
>
|
>
|
||||||
<template #body="props">
|
<template #body="props">
|
||||||
|
|
||||||
@@ -542,3 +544,100 @@ async function CurrheadDownload() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.statement-page {
|
||||||
|
height: calc(100vh - 56px);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scroll {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sticky-bar {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(.q-table__container) {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(.q-table__top) {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(.q-table__middle) {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: auto !important;
|
||||||
|
max-height: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(thead th) {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 10;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(th),
|
||||||
|
.statement-table :deep(td) {
|
||||||
|
padding: 3px 6px !important;
|
||||||
|
font-size: 11px !important;
|
||||||
|
line-height: 1.2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(td) {
|
||||||
|
white-space: nowrap !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
text-overflow: ellipsis !important;
|
||||||
|
max-width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(td[data-col="aciklama"]),
|
||||||
|
.statement-table :deep(th[data-col="aciklama"]) {
|
||||||
|
max-width: 220px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(.resizable-cell-content) {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: normal !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1366px) {
|
||||||
|
.statement-table :deep(th),
|
||||||
|
.statement-table :deep(td) {
|
||||||
|
font-size: 10px !important;
|
||||||
|
padding: 2px 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(td) {
|
||||||
|
max-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table :deep(td[data-col="aciklama"]),
|
||||||
|
.statement-table :deep(th[data-col="aciklama"]) {
|
||||||
|
max-width: 180px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user