//#region src/plus/saasAttendance/settings/types.d.ts /** * 多语言名称 */ interface MultiLangName { en?: string; 'zh-CN'?: string; 'zh-HK'?: string; 'ja'?: string; 'pt'?: string; original?: string; } /** * 未排班时的打卡规则 * - anytime: 随时打卡 * - business_hours: 正常上下班(按照店铺营业时间打卡) * - select_shift: 自选班次(员工需先选班次后打卡) */ type NoShiftPolicy = 'anytime' | 'business_hours' | 'select_shift'; /** * 考勤规则 */ interface AttendanceRule { no_shift_policy: NoShiftPolicy; } /** * 考勤地点 */ interface AttendanceLocation { id: string; name: MultiLangName; radius?: number; address: { lat: number; lng: number; }; } /** * 考勤地点配置 */ interface AttendancePlace { radius: number; location: AttendanceLocation[]; } /** * 补卡类型 * - normal: 正常 * - late: 迟到 * - early_leave: 早退 * - missing: 缺卡 */ type CorrectionType = 'normal' | 'late' | 'early_leave' | 'missing'; /** * 补卡周期类型 * - natural_month: 自然月 * - custom: 自定义周期 */ type FrequencyType = 'natural_month' | 'custom'; /** * 补卡配置 */ interface AttendanceCorrection { allow: boolean; types: CorrectionType[]; approver_ids: number[]; days_limit: number; monthly_times: number; period_type: FrequencyType; period_custom: number | null; } type MemberDataViewRange = 'this_week' | 'last_week' | 'this_month'; interface AttendancePermission { member_data_view_range?: MemberDataViewRange[]; } /** * 考勤组设置值 - 完整的API数据结构 */ interface AttendanceGroupSettingsValue { id?: number; name: MultiLangName; timezone: string; rule: AttendanceRule; place: AttendancePlace; member_ids: number[]; correction: AttendanceCorrection; permission?: AttendancePermission; creator_type?: string; creator_id?: number; editor_type?: string; editor_id?: number; created_at?: string; updated_at?: string; } //#endregion export { AttendanceCorrection, AttendanceGroupSettingsValue, AttendanceLocation, AttendancePlace, AttendanceRule, CorrectionType, FrequencyType, MultiLangName, NoShiftPolicy };