Skip to content

feat: sync last-semester IPK with graduation input and auto-update status (ENH-006) - #108

Merged
ffooll-bit merged 1 commit into
mainfrom
feature/ipk-last-semester-sync
Aug 30, 2026
Merged

feat: sync last-semester IPK with graduation input and auto-update status (ENH-006)#108
ffooll-bit merged 1 commit into
mainfrom
feature/ipk-last-semester-sync

Conversation

@ffooll-bit

Copy link
Copy Markdown
Owner

Summary

Sync the student's "last semester IPK" as a single, two-way synced source shared between the step 5 graduation IPK input and the last (newest) academic row in the step 2 table. When the last academic row is still active and its IPK differs from the Excel IPK, an "Auto-update IPK & status ke Aktif" button stages the Excel IPK and the Aktif status for that row; when the row is inactive, only an informational warning is shown. The staged value flows through the existing stepPostfinish() deferred push, so no mutation happens until submission.

Related issues

Fixes #100

Checklist

  • php -l passes on all modified PHP files
  • npm run build succeeds and committed assets are up to date
  • php spark routes shows correct new routes (if routes changed)
  • vendor/bin/php-cs-fixer fix passes (no style violations)
  • vendor/bin/phpunit is green (if tests exist): 36/36
  • No debug code: dd(), var_dump(), console.log(), print_r(), exit()
  • All user inputs validated server-side
  • All POST forms include csrf_field()
  • All HTML output uses esc()
  • No unrelated files changed
  • CHANGELOG updated if this is a user-facing change
  • Behaviour verified in the browser if UI changed (attach a screenshot if useful)

Screenshot (if applicable)

Not attached (no Neo Feeder mutation; wizard session cancelled before advancing).

Notes for reviewers

  • The Auto-update button resolves the "Aktif" status code from the existing status dropdown options ($statusOptions, label match) instead of hardcoding 'A' — consistent with the design decision that the table's own input is the source of truth for status.
  • No controller change to finish()/stepPost(): the synced IPK and status are captured normally on stepPost and pushed by the existing per-semester updatePerkuliahanMahasiswa loop at finish().
  • Browser-verified live: Excel IPK 3.5 vs last-row PDDIKTI IPK 3.40 (semester 20252, active) triggered the banner + button; typing in step 5 synced to the table and vice-versa; the button set the last-row IPK to the Excel value, selected status Aktif, synced step 5, and removed the banner. Inactive last rows render only the warning.

@ffooll-bit
ffooll-bit merged commit 4d36328 into main Aug 30, 2026
1 check passed
@ffooll-bit
ffooll-bit deleted the feature/ipk-last-semester-sync branch August 30, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-check Excel IPK against last academic row; defer auto-update to finish

1 participant