Skip to content

Close the enquiry form when she is not taking new students - #51

Merged
yt314 merged 1 commit into
mainfrom
closed-means-closed
Sep 19, 2026
Merged

yt314 merged 1 commit into
mainfrom
closed-means-closed

Conversation

@yt314

@yt314 yt314 commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

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:

PAGE SAYS: … חנה שטרן  לא מקבלת תלמידות חדשות כרגע  … מתמטיקה פיזיקה …
           פנייה למורה  משאירים פרטים והמורה חוזרת אליכם.
           שם מלא *  טלפון *  מייל  באיזה תחום?  מה תרצו לשאול? *  שליחת פנייה

TAG "לא מקבלת"?       yes
PROMISES A REPLY?    yes — "משאירים פרטים והמורה חוזרת אליכם"
SEND BUTTON?         yes

A promise of a reply she had just said she would not be giving. A parent fills it in and waits.

After

### לא מקבלת
   promises a reply?   no
   form fields:        0
   send button:        0
   card reads:         פנייה למורה  חנה שטרן לא מקבלת תלמידות חדשות כרגע, ולכן טופס
                       הפנייה סגור. פרטי הקשר שלה מופיעים למעלה, אם תרצו לנסות בכל זאת.

### מקבלת
   promises a reply?   YES
   form fields:        1
   send button:        1

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.

=== חנה שטרן (לא מקבלת) ===
HTTP 409  {"message":"המורה אינה מקבלת תלמידות חדשות כרגע, ולכן לא ניתן לשלוח אליה פנייה."}
=== מרים לוי (מקבלת) ===
HTTP 204

Checked along the way — nothing to fix

  • The search box promises "חיפוש לפי שם, עיר או שכונה". The server's search parameter 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.
  • EmailLayout already 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.
  • Both public pages checked in the browser, before and after.

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 רבקה מזרחי.

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.
@vercel

vercel Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
talmidon Ready Ready Preview Sep 19, 2026 8:19pm UTC

@yt314
yt314 merged commit 03b217a into main Sep 19, 2026
7 checks passed

This branch was successfully deployed

1 active deployment
Preview — c277ac46 Deployed Sep 19, 2026 by vercel[bot]
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.

1 participant