Merge production main into shared baseline for SABC release
Preserve SABC storage-type and batch-search changes, logistics column resizing, and production-main employee-hours and route export compatibility. Verified 54 focused tests and type-check; no pending production migrations.
This commit is contained in:
commit
56548a731e
@ -4,7 +4,7 @@ import { ErrorCode } from '@/server/core/errors'
|
|||||||
import { handleRequest, jsonError, jsonSuccess } from '@/server/core/response'
|
import { handleRequest, jsonError, jsonSuccess } from '@/server/core/response'
|
||||||
import { uploadBufferToObjectStorage } from '@/lib/storage'
|
import { uploadBufferToObjectStorage } from '@/lib/storage'
|
||||||
|
|
||||||
export const SUPPLIER_RECOMMENDED_IMAGE_STORAGE_PREFIX = 'supplier-recommended-images'
|
const SUPPLIER_RECOMMENDED_IMAGE_STORAGE_PREFIX = 'supplier-recommended-images'
|
||||||
|
|
||||||
const SUPPLIER_RECOMMENDED_IMAGE_MAX_BYTES = 25 * 1024 * 1024
|
const SUPPLIER_RECOMMENDED_IMAGE_MAX_BYTES = 25 * 1024 * 1024
|
||||||
|
|
||||||
|
|||||||
@ -22,10 +22,11 @@ jest.mock('@/server/repositories/employee-hours-config.repository', () => ({
|
|||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
jest.mock('@/lib/storage', () => ({
|
jest.mock('@/server/repositories/work-record.repository', () => ({
|
||||||
normalizeObjectStorageUrlForPersistence: jest.fn((url: string) =>
|
workRecordRepository: {
|
||||||
url.replace('https://cp.jiansun.vip', ''),
|
findScoreRuleById: jest.fn(),
|
||||||
),
|
findScoreRules: jest.fn(),
|
||||||
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
jest.mock('@/lib/storage', () => ({
|
jest.mock('@/lib/storage', () => ({
|
||||||
@ -40,7 +41,7 @@ import { employeeHoursConfigRepository } from '@/server/repositories/employee-ho
|
|||||||
import { employeeHoursRecordService } from './employee-hours-record.service'
|
import { employeeHoursRecordService } from './employee-hours-record.service'
|
||||||
|
|
||||||
const recordRepository = employeeHoursRecordRepository as jest.Mocked<typeof employeeHoursRecordRepository>
|
const recordRepository = employeeHoursRecordRepository as jest.Mocked<typeof employeeHoursRecordRepository>
|
||||||
const ruleRepository = employeeHoursConfigRepository as jest.Mocked<Pick<typeof employeeHoursConfigRepository, 'findRuleById' | 'findRules'>>
|
const ruleRepository = employeeHoursConfigRepository as jest.Mocked<typeof employeeHoursConfigRepository>
|
||||||
|
|
||||||
const employee = { id: 'owner-config-1', nickname: '青山', department: '供应链中心' }
|
const employee = { id: 'owner-config-1', nickname: '青山', department: '供应链中心' }
|
||||||
const rule = {
|
const rule = {
|
||||||
|
|||||||
@ -11,8 +11,8 @@ import type {
|
|||||||
import { calculateEmployeeHoursDuration, DEFAULT_EMPLOYEE_HOURS_SORT, EMPLOYEE_HOURS_SORT_KEYS } from '@/lib/employee-hours'
|
import { calculateEmployeeHoursDuration, DEFAULT_EMPLOYEE_HOURS_SORT, EMPLOYEE_HOURS_SORT_KEYS } from '@/lib/employee-hours'
|
||||||
import { normalizeObjectStorageUrlForPersistence } from '@/lib/storage'
|
import { normalizeObjectStorageUrlForPersistence } from '@/lib/storage'
|
||||||
import { AppError, ErrorCode } from '@/server/core/errors'
|
import { AppError, ErrorCode } from '@/server/core/errors'
|
||||||
import { employeeHoursConfigRepository } from '@/server/repositories/employee-hours-config.repository'
|
|
||||||
import { employeeHoursRecordRepository } from '@/server/repositories/employee-hours-record.repository'
|
import { employeeHoursRecordRepository } from '@/server/repositories/employee-hours-record.repository'
|
||||||
|
import { employeeHoursConfigRepository } from '@/server/repositories/employee-hours-config.repository'
|
||||||
import { assertEmployeeHoursRecordAccess, type EmployeeHoursScope } from './employee-hours-access.service'
|
import { assertEmployeeHoursRecordAccess, type EmployeeHoursScope } from './employee-hours-access.service'
|
||||||
|
|
||||||
const DATE_PATTERN = /^(\d{4})-(\d{1,2})-(\d{1,2})$/
|
const DATE_PATTERN = /^(\d{4})-(\d{1,2})-(\d{1,2})$/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user