支持企微通讯录缺失手机号(07-26-internal-ops-recovery-baseline)
这个提交包含在:
@@ -13,7 +13,7 @@ import { Label } from "../../components/ui/label";
|
||||
|
||||
export interface CreateUserFormData {
|
||||
name: string;
|
||||
phone: string;
|
||||
phone: string | null;
|
||||
email: string;
|
||||
departmentId: string | undefined;
|
||||
directManagerId: string | null;
|
||||
@@ -61,7 +61,6 @@ export function CreateUserDialog({
|
||||
const canSubmit =
|
||||
!isPending &&
|
||||
trimmedName !== "" &&
|
||||
trimmedPhone !== "" &&
|
||||
trimmedEmail !== "" &&
|
||||
rolesArray.length >= 1;
|
||||
|
||||
@@ -84,7 +83,7 @@ export function CreateUserDialog({
|
||||
function handleSubmit() {
|
||||
onSubmit({
|
||||
name: trimmedName,
|
||||
phone: trimmedPhone,
|
||||
phone: trimmedPhone || null,
|
||||
email: trimmedEmail,
|
||||
departmentId: departmentId || undefined,
|
||||
directManagerId: directManagerId ? directManagerId : null,
|
||||
@@ -117,13 +116,13 @@ export function CreateUserDialog({
|
||||
/>
|
||||
</div>
|
||||
<div className="grid gap-2">
|
||||
<Label htmlFor="phone">手机号</Label>
|
||||
<Label htmlFor="phone">手机号(可暂不填写)</Label>
|
||||
<Input
|
||||
id="phone"
|
||||
data-testid="users-create-phone"
|
||||
value={phone}
|
||||
onChange={(e) => setPhone(e.target.value)}
|
||||
placeholder="13800000001"
|
||||
placeholder="后续可由本人授权或管理员补齐"
|
||||
/>
|
||||
</div>
|
||||
<div className="grid gap-2">
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface UserImportDialogProps {
|
||||
const TEMPLATE_CSV = [
|
||||
"employeeNo,name,phone,email,departmentName,title,directManagerEmployeeNo,roles,hireDate",
|
||||
"E1001,李经理,13800000001,[email protected],行政部,经理,,manager,2026-03-01",
|
||||
"E1002,张三,13800000002,[email protected],行政部,员工,E1001,employee,2026-03-15",
|
||||
"E1002,张三,,[email protected],行政部,员工,E1001,employee,2026-03-15",
|
||||
].join("\n");
|
||||
|
||||
function toCsvCell(value: string) {
|
||||
@@ -205,10 +205,10 @@ export function UserImportDialog({ open, onOpenChange, onImported }: UserImportD
|
||||
}}
|
||||
/>
|
||||
<div className="text-xs text-zinc-500">
|
||||
必填列:employeeNo、name、phone、email、departmentName
|
||||
必填列:employeeNo、name、email、departmentName
|
||||
</div>
|
||||
<div className="text-xs text-zinc-500">
|
||||
选填列:title、directManagerEmployeeNo、roles、hireDate
|
||||
选填列:phone、title、directManagerEmployeeNo、roles、hireDate
|
||||
</div>
|
||||
{selectedFile ? (
|
||||
<div className="rounded-lg border border-zinc-200 px-3 py-2 text-xs text-zinc-600">
|
||||
|
||||
在新工单中引用
屏蔽一个用户