Unify effective roles via post-role bindings, remove dedicated OA role UI, and update OA assignee resolution plus related SQL/docs. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
767 B
TypeScript
22 lines
767 B
TypeScript
import FcDesigner from '@form-create/designer'
|
|
import OaOvertimeKit from '@/components/oa-approval/OaOvertimeKit.vue'
|
|
import { ensureOaKitMenu } from '@/utils/oa-form-create-kit-menu'
|
|
import { overtimeKitDragRule } from '@/utils/oa-overtime-kit-rule'
|
|
|
|
const FLAG = '__oaOvertimeKitConfigured'
|
|
|
|
export function setupOaOvertimeKit(formCreate?: { component?: (name: string, c: unknown) => void }) {
|
|
if ((FcDesigner as any)[FLAG]) return
|
|
|
|
ensureOaKitMenu()
|
|
|
|
FcDesigner.component('overtimeKit', OaOvertimeKit)
|
|
if (typeof formCreate?.component === 'function') {
|
|
formCreate.component('overtimeKit', OaOvertimeKit)
|
|
}
|
|
if (typeof FcDesigner.addDragRule === 'function') {
|
|
FcDesigner.addDragRule(overtimeKitDragRule)
|
|
}
|
|
;(FcDesigner as any)[FLAG] = true
|
|
}
|