Repository navigation
fix(core): bank account and change request create forms were fully read-only - #20
Merged
Merged
Conversation
…ad-only Browser test of v0.2 found that the console create forms for srm_supplier_bank_account and srm_supplier_change_request rendered every locked field as read-only: the form evaluates readonlyWhen against the field defaults (status pending_verify / in_review, approval_status empty), while the server exempts INSERT from readonlyWhen (objectstack#25584). Category managers could not add a bank account and buyers could not raise a change request in the UI. - Guard the three lock predicates with has(record.id) so they only apply to saved records; the stored row on update carries id, so server-side locks are unchanged (all 82 tests pass, including the pending-account and in-review lock tests). - Show the basic / address / bank / contact groups only for the chosen change type, so a basic-info change no longer shows a bank section with the defaulted currency. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ApdH2PdG6SVQqxeEgmRP9U
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 田騏 · project thread
改了什么
v0.2 浏览器验收发现:控制台里「新建银行账户」和「新建信息变更单」的表单所有锁定字段都显示为只读,填不了。原因是界面按字段默认值(状态「待核验」/「审批中」、审批结论为空)计算
readonlyWhen,而服务端新建时不看readonlyWhen(平台问题 objectstack#25584)。locked、变更单的created/proposal三条谓词前加has(record.id) && record.id != null,只对已保存的记录生效。临时绕法,代码里注明了平台 issue。怎么验证的
pnpm verify全部通过,82 个测试通过(包括「待核验账户保持锁定」「审批中变更单不能改」这类服务端锁定测试,说明更新时的锁没有放松)。hotsrm-v02-screenshots/。Generated by Claude Code