Repository navigation
Close the enquiry form when she is not taking new students - #51
Merged
Merged
Conversation
The profile screen tells the teacher exactly what the switch does:
כשהאפשרות כבויה, הכרטיס שלך נשאר בספרייה ומסומן "לא מקבלת כרגע" —
כך הורים לא פונים לחינם.
Her public card did carry the tag, and then, a few lines below it, offered
the full enquiry form under "משאירים פרטים והמורה חוזרת אליכם" — a promise
of a reply she had just said she would not be giving. A parent fills it in
and waits.
The form is now replaced by a line saying it is closed, pointing at the phone
and email already published above for whoever wants to try anyway. The
endpoint refuses too, with 409: hiding the form does not stop a page that was
opened before she flipped the switch.
Adds two integration tests — an enquiry to a teacher who is accepting is
delivered, and one to a teacher who is not is refused with nothing stored.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
The profile screen tells the teacher exactly what the switch does:
Her public card did carry the tag. And then, a few lines below it, offered the full enquiry form:
A promise of a reply she had just said she would not be giving. A parent fills it in and waits.
After
Her published phone and email stay where they were, above the card — a parent who wants to try anyway still can. What goes away is the form that implied an answer was coming.
The server refuses too
Hiding the form is not enforcement: a page opened before she flipped the switch would still post.
Checked along the way — nothing to fix
searchparameter only matches the name — but this screen never uses it: the library loads the public cards once and filters them client-side across name, city and neighbourhood. The promise holds.EmailLayoutalready drops empty detail rows, so an enquiry with no email or subject does not reach the teacher with blank fields.Testing
dotnet test— 247 passing, including two new ones: an enquiry to a teacher who is accepting is delivered (204, one row stored), and one to a teacher who is not is refused (409, nothing stored).npx ng build— clean.Demo data restored and verified: all 4 teachers public and accepting again, and the only contact request in the database is the seeded one from רבקה מזרחי.