diff options
Diffstat (limited to 'lib/compliance/services.ts')
| -rw-r--r-- | lib/compliance/services.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/compliance/services.ts b/lib/compliance/services.ts index 2856cb0a..03c19952 100644 --- a/lib/compliance/services.ts +++ b/lib/compliance/services.ts @@ -1148,6 +1148,7 @@ export async function getRedFlagManagers() { with: { purchasingManager: true, complianceManager: true, + hseManager: true, }, orderBy: [desc(redFlagManagers.createdAt)], }); @@ -1163,6 +1164,7 @@ export async function getRedFlagManagers() { export async function createRedFlagManagers(data: { purchasingManagerId: number | null; complianceManagerId: number | null; + hseManagerId: number | null; }) { try { const [newManager] = await db @@ -1170,6 +1172,7 @@ export async function createRedFlagManagers(data: { .values({ purchasingManagerId: data.purchasingManagerId, complianceManagerId: data.complianceManagerId, + hseManagerId: data.hseManagerId, }) .returning(); @@ -1187,6 +1190,7 @@ export async function updateRedFlagManagers( data: { purchasingManagerId?: number | null; complianceManagerId?: number | null; + hseManagerId?: number | null; } ) { try { @@ -1220,6 +1224,7 @@ export async function getOrCreateRedFlagManagers() { await createRedFlagManagers({ purchasingManagerId: null, complianceManagerId: null, + hseManagerId: null, }); // 다시 relations를 포함해서 조회 |
