diff --git a/adminfront/src/features/users/components/UserBulkUploadModal.tsx b/adminfront/src/features/users/components/UserBulkUploadModal.tsx index dd95fe62..e7dc9737 100644 --- a/adminfront/src/features/users/components/UserBulkUploadModal.tsx +++ b/adminfront/src/features/users/components/UserBulkUploadModal.tsx @@ -333,7 +333,7 @@ export function UserBulkUploadModal({ finalUser.jobTitle = firstAdditional.jobTitle; if (finalUser.metadata) { finalUser.metadata.employee_id = - firstAdditional.metadata?.employee_id; + (firstAdditional.metadata?.employee_id as string) || ""; } finalUser.additionalAppointments = [ diff --git a/scripts/run_adminfront_ci_tests.sh b/scripts/run_adminfront_ci_tests.sh index b72f91a0..3bcdb1bb 100755 --- a/scripts/run_adminfront_ci_tests.sh +++ b/scripts/run_adminfront_ci_tests.sh @@ -196,12 +196,17 @@ fi set +e ( - cd "$tmp_dir/adminfront" + # [Fix] Dependency resolution fails when installing from sub-app in isolated CI. + # We must install from the workspace root (common) and ensure the workspace config + # only points to available directories (adminfront & common). + cd "$tmp_dir/common" + echo "packages: ['.', '../adminfront']" > pnpm-workspace.yaml + if [ "$reuse_seed_node_modules" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then run_with_retry 3 npm install -g pnpm fi - run_with_retry 3 CI=true pnpm install -C ../common --no-frozen-lockfile --store-dir "$pnpm_store_dir" + run_with_retry 3 env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist --store-dir "$pnpm_store_dir" fi ) 2>&1 | tee reports/adminfront-install.log install_exit_code=${PIPESTATUS[0]} @@ -217,7 +222,7 @@ if [ "$install_exit_code" -ne 0 ]; then echo "- Exit Code: \`$install_exit_code\`" echo echo "## Command" - echo "\`cd adminfront && if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install -C ../common --no-frozen-lockfile --store-dir \"\$TMPDIR/pnpm-store\"; fi\`" + echo "\`cd common && echo \"packages: ['.', '../adminfront']\" > pnpm-workspace.yaml && env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist\`" echo echo "## Install Log Tail (last 200 lines)" echo '```text' @@ -283,10 +288,9 @@ if [ "$test_exit_code" -ne 0 ]; then echo "- Exit Code: \`$test_exit_code\`" echo echo "## Commands" - echo "1. \`cd adminfront\`" - echo "2. \`if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install -C ../common --no-frozen-lockfile --store-dir \"\$TMPDIR/pnpm-store\"; fi\`" - echo "3. \`${playwright_install_desc}\`" - echo "4. \`npx playwright test\`" + echo "1. \`cd common && echo \"packages: ['.', '../adminfront']\" > pnpm-workspace.yaml && env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist\`" + echo "2. \`${playwright_install_desc}\`" + echo "3. \`pnpm exec playwright test\`" echo echo "## Log Tail (last 200 lines)" echo '```text'