Commit 59e9f53b by luoqi

merge: docs/plan-assignment-doctrine → test(放回左栏「真」号码筛选)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
parents dae62dbf 1c115cc3
Pipeline #3526 failed in 0 seconds
...@@ -57,14 +57,18 @@ const VIEW_TABS: Array<{ v: View; label: string; requires?: Permission }> = [ ...@@ -57,14 +57,18 @@ const VIEW_TABS: Array<{ v: View; label: string; requires?: Permission }> = [
]; ];
/** /**
* 左栏那一排筛选(「真」号码 + 「筛选标签」)—— 暂时隐藏(2026-08-04 产品走查)。 * 左栏那一排筛选的可见性 —— 两个入口**分开控**(2026-08-04 产品走查先一起藏,
* 置 `true` 即恢复;⛔ 不是删除,`PersonaTagFilter` 与 `phoneVerified` 那条服务端谓词都留着。 * 随后单独放回「真」号码)。⛔ 不是删除,`PersonaTagFilter` 与 `phoneVerified`
* 那条服务端谓词(plan.service.ts 的 `patientWhere.phoneVerified`)都一直留着。
* *
* ⚠️ 藏的只是**入口**。`realPhoneOnly` / `tags` 两个 state 初值都是"不筛", * ⚠️ 藏的只是**入口**。`realPhoneOnly` / `tags` 两个 state 初值都是"不筛",
* 所以藏起来之后请求里不会残留任何筛选条件 —— ⛔ 别改它们的初值, * 所以藏起来之后请求里不会残留任何筛选条件 —— ⛔ 别改它们的初值,
* 否则会出现"看不见的筛选"(列表少人而主管找不到原因)。 * 否则会出现"看不见的筛选"(列表少人而主管找不到原因)。
*/ */
const RAIL_FILTERS_VISIBLE: boolean = false; /** 「真」号码筛选(只看已核实的真实手机号) */
const PHONE_FILTER_VISIBLE: boolean = true;
/** 画像标签筛选 —— 仍隐藏 */
const TAG_FILTER_VISIBLE: boolean = false;
export function PatientPickerRail({ export function PatientPickerRail({
currentPlanId, currentPlanId,
...@@ -384,13 +388,17 @@ export function PatientPickerRail({ ...@@ -384,13 +388,17 @@ export function PatientPickerRail({
className="h-7 w-full rounded-md border border-slate-100 bg-slate-50 pl-7 pr-2 text-[12px] outline-none placeholder:text-slate-400 focus:border-brand-300 focus:bg-white" className="h-7 w-full rounded-md border border-slate-100 bg-slate-50 pl-7 pr-2 text-[12px] outline-none placeholder:text-slate-400 focus:border-brand-300 focus:bg-white"
/> />
</div> </div>
{RAIL_FILTERS_VISIBLE && ( {/* ⚠️ 外层条件要跟着两个开关走 —— 只判其中一个,另一个放开时整排还是不显示。
`hasPatientArchive`(宿主自带患者档案)时号码整个不展示,「真」筛选也就没意义,
这层守卫别顺手删(下面 PatientRow 的 `hidePhone` 是同一个判据)。 */}
{((PHONE_FILTER_VISIBLE && !hasPatientArchive) || TAG_FILTER_VISIBLE) && (
<div className="flex items-center gap-1.5"> <div className="flex items-center gap-1.5">
{!hasPatientArchive && ( {PHONE_FILTER_VISIBLE && !hasPatientArchive && (
<button <button
type="button" type="button"
onClick={() => setRealPhoneOnly((v) => !v)} onClick={() => setRealPhoneOnly((v) => !v)}
title="只看已核实的真实手机号" title="只看已核实的真实手机号"
aria-pressed={realPhoneOnly}
className={cn( className={cn(
'inline-flex h-6 items-center gap-1 rounded-md border px-1.5 text-[11px] transition-colors', 'inline-flex h-6 items-center gap-1 rounded-md border px-1.5 text-[11px] transition-colors',
realPhoneOnly realPhoneOnly
...@@ -401,7 +409,9 @@ export function PatientPickerRail({ ...@@ -401,7 +409,9 @@ export function PatientPickerRail({
<PhoneCall className="h-3 w-3" /> <PhoneCall className="h-3 w-3" />
</button> </button>
)} )}
{TAG_FILTER_VISIBLE && (
<PersonaTagFilter selected={tags} onToggle={toggleTag} onClear={() => setTags(new Set())} /> <PersonaTagFilter selected={tags} onToggle={toggleTag} onClear={() => setTags(new Set())} />
)}
</div> </div>
)} )}
{clinicOptions.length > 1 && ( {clinicOptions.length > 1 && (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment