Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -93,7 +93,7 @@ ensure_ui_permissions() {
|
|||||||
|
|
||||||
clean_ui_build_artifacts() {
|
clean_ui_build_artifacts() {
|
||||||
cd "$APP_DIR/ui"
|
cd "$APP_DIR/ui"
|
||||||
# dist'i silmiyoruz -> eski chunklar k<EFBFBD>sa s<EFBFBD>re kalabilir, ChunkLoadError azal<EFBFBD>r
|
# dist'i silmiyoruz -> eski chunklar kısa süre kalabilir, ChunkLoadError azalır
|
||||||
rm -rf .quasar node_modules/.cache || true
|
rm -rf .quasar node_modules/.cache || true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,6 +217,36 @@ ensure_ui_readable_by_nginx() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ensure_node20_for_ui_build() {
|
||||||
|
local required_major=20
|
||||||
|
local nvm_dir="${NVM_DIR:-$HOME/.nvm}"
|
||||||
|
|
||||||
|
if [[ -s "$nvm_dir/nvm.sh" ]]; then
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "$nvm_dir/nvm.sh"
|
||||||
|
nvm install "$required_major" >/dev/null
|
||||||
|
nvm use "$required_major" >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v node >/dev/null 2>&1; then
|
||||||
|
echo "ERROR: node command not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local node_version
|
||||||
|
node_version="$(node -v 2>/dev/null || true)"
|
||||||
|
local node_major
|
||||||
|
node_major="$(echo "$node_version" | sed -E 's/^v([0-9]+).*/\1/')"
|
||||||
|
|
||||||
|
if [[ -z "$node_major" || "$node_major" -lt "$required_major" ]]; then
|
||||||
|
echo "ERROR: Node.js >=${required_major} required for UI build. Current: ${node_version:-unknown}"
|
||||||
|
echo "Hint: install nvm and run: nvm install ${required_major} && nvm alias default ${required_major}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "UI build runtime: node=$node_version npm=$(npm -v)"
|
||||||
|
}
|
||||||
|
|
||||||
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 "ERROR: go command not found"
|
echo "ERROR: go command not found"
|
||||||
@@ -291,6 +321,7 @@ run_deploy() {
|
|||||||
|
|
||||||
log_step "BUILD UI"
|
log_step "BUILD UI"
|
||||||
cd "$APP_DIR/ui"
|
cd "$APP_DIR/ui"
|
||||||
|
ensure_node20_for_ui_build
|
||||||
clean_ui_build_artifacts
|
clean_ui_build_artifacts
|
||||||
npm ci --no-audit --no-fund --include=optional
|
npm ci --no-audit --no-fund --include=optional
|
||||||
npm i -D --no-audit --no-fund sass-embedded@1.93.2
|
npm i -D --no-audit --no-fund sass-embedded@1.93.2
|
||||||
|
|||||||
@@ -965,7 +965,9 @@ async function openAttributeDialog (itemCode) {
|
|||||||
|
|
||||||
const baseRows = fromLookup.map(row => {
|
const baseRows = fromLookup.map(row => {
|
||||||
const currentCode = dbMap.get(Number(row.AttributeTypeCodeNumber || 0)) || ''
|
const currentCode = dbMap.get(Number(row.AttributeTypeCodeNumber || 0)) || ''
|
||||||
const currentOptions = Array.isArray(row.options) ? [...row.options] : []
|
const currentOptions = Array.isArray(row.AllOptions)
|
||||||
|
? [...row.AllOptions]
|
||||||
|
: (Array.isArray(row.Options) ? [...row.Options] : [])
|
||||||
if (currentCode && !currentOptions.some(opt => String(opt?.value || '').trim() === currentCode)) {
|
if (currentCode && !currentOptions.some(opt => String(opt?.value || '').trim() === currentCode)) {
|
||||||
currentOptions.unshift({ value: currentCode, label: `${currentCode} - (Mevcut)` })
|
currentOptions.unshift({ value: currentCode, label: `${currentCode} - (Mevcut)` })
|
||||||
}
|
}
|
||||||
@@ -1040,7 +1042,9 @@ async function collectProductAttributesFromSelectedRows (selectedRows) {
|
|||||||
const baseRows = buildAttributeRowsFromLookup(lookup)
|
const baseRows = buildAttributeRowsFromLookup(lookup)
|
||||||
rows = baseRows.map(row => {
|
rows = baseRows.map(row => {
|
||||||
const currentCode = dbMap.get(Number(row.AttributeTypeCodeNumber || 0)) || ''
|
const currentCode = dbMap.get(Number(row.AttributeTypeCodeNumber || 0)) || ''
|
||||||
const currentOptions = Array.isArray(row.options) ? [...row.options] : []
|
const currentOptions = Array.isArray(row.AllOptions)
|
||||||
|
? [...row.AllOptions]
|
||||||
|
: (Array.isArray(row.Options) ? [...row.Options] : [])
|
||||||
if (currentCode && !currentOptions.some(opt => String(opt?.value || '').trim() === currentCode)) {
|
if (currentCode && !currentOptions.some(opt => String(opt?.value || '').trim() === currentCode)) {
|
||||||
currentOptions.unshift({ value: currentCode, label: `${currentCode} - (Mevcut)` })
|
currentOptions.unshift({ value: currentCode, label: `${currentCode} - (Mevcut)` })
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user