dealer related new attributes mapped to the user table
This commit is contained in:
parent
2d6729ea30
commit
94bc21ba23
@ -1,2 +1,2 @@
|
||||
import{a as t}from"./index-B9vDSbbE.js";import"./radix-vendor-DA0cB_hD.js";import"./charts-vendor-Cji9-Yri.js";import"./utils-vendor-DHm03ykU.js";import"./ui-vendor-DtH22-aU.js";import"./socket-vendor-TjCxX7sJ.js";import"./redux-vendor-tbZCm13o.js";import"./router-vendor-CRr9x_Jp.js";async function m(n){return(await t.post(`/conclusions/${n}/generate`)).data.data}async function d(n,o){return(await t.post(`/conclusions/${n}/finalize`,{finalRemark:o})).data.data}async function f(n){return(await t.get(`/conclusions/${n}`)).data.data}export{d as finalizeConclusion,m as generateConclusion,f as getConclusion};
|
||||
//# sourceMappingURL=conclusionApi-DFZpYv7A.js.map
|
||||
import{a as t}from"./index-CEqn7Fyp.js";import"./radix-vendor-DA0cB_hD.js";import"./charts-vendor-Cji9-Yri.js";import"./utils-vendor-DHm03ykU.js";import"./ui-vendor-BZmDhLpD.js";import"./socket-vendor-TjCxX7sJ.js";import"./redux-vendor-tbZCm13o.js";import"./router-vendor-YTj2hkRM.js";async function m(n){return(await t.post(`/conclusions/${n}/generate`)).data.data}async function d(n,o){return(await t.post(`/conclusions/${n}/finalize`,{finalRemark:o})).data.data}async function f(n){return(await t.get(`/conclusions/${n}`)).data.data}export{d as finalizeConclusion,m as generateConclusion,f as getConclusion};
|
||||
//# sourceMappingURL=conclusionApi-Duu_VHzp.js.map
|
||||
@ -1 +1 @@
|
||||
{"version":3,"file":"conclusionApi-DFZpYv7A.js","sources":["../../src/services/conclusionApi.ts"],"sourcesContent":["import apiClient from './authApi';\r\n\r\nexport interface ConclusionRemark {\r\n conclusionId: string;\r\n requestId: string;\r\n aiGeneratedRemark: string | null;\r\n aiModelUsed: string | null;\r\n aiConfidenceScore: number | null;\r\n finalRemark: string | null;\r\n editedBy: string | null;\r\n isEdited: boolean;\r\n editCount: number;\r\n approvalSummary: any;\r\n documentSummary: any;\r\n keyDiscussionPoints: string[];\r\n generatedAt: string | null;\r\n finalizedAt: string | null;\r\n createdAt: string;\r\n updatedAt: string;\r\n}\r\n\r\n/**\r\n * Generate AI-powered conclusion remark\r\n */\r\nexport async function generateConclusion(requestId: string): Promise<{\r\n conclusionId: string;\r\n aiGeneratedRemark: string;\r\n keyDiscussionPoints: string[];\r\n confidence: number;\r\n generatedAt: string;\r\n}> {\r\n const response = await apiClient.post(`/conclusions/${requestId}/generate`);\r\n return response.data.data;\r\n}\r\n\r\n/**\r\n * Update conclusion remark (edit by initiator)\r\n */\r\nexport async function updateConclusion(requestId: string, finalRemark: string): Promise<ConclusionRemark> {\r\n const response = await apiClient.put(`/conclusions/${requestId}`, { finalRemark });\r\n return response.data.data;\r\n}\r\n\r\n/**\r\n * Finalize conclusion and close request\r\n */\r\nexport async function finalizeConclusion(requestId: string, finalRemark: string): Promise<{\r\n conclusionId: string;\r\n requestNumber: string;\r\n status: string;\r\n finalRemark: string;\r\n finalizedAt: string;\r\n}> {\r\n const response = await apiClient.post(`/conclusions/${requestId}/finalize`, { finalRemark });\r\n return response.data.data;\r\n}\r\n\r\n/**\r\n * Get conclusion for a request\r\n */\r\nexport async function getConclusion(requestId: string): Promise<ConclusionRemark> {\r\n const response = await apiClient.get(`/conclusions/${requestId}`);\r\n return response.data.data;\r\n}\r\n\r\n"],"names":["generateConclusion","requestId","apiClient","finalizeConclusion","finalRemark","getConclusion"],"mappings":"6RAwBA,eAAsBA,EAAmBC,EAMtC,CAED,OADiB,MAAMC,EAAU,KAAK,gBAAgBD,CAAS,WAAW,GAC1D,KAAK,IACvB,CAaA,eAAsBE,EAAmBF,EAAmBG,EAMzD,CAED,OADiB,MAAMF,EAAU,KAAK,gBAAgBD,CAAS,YAAa,CAAE,YAAAG,EAAa,GAC3E,KAAK,IACvB,CAKA,eAAsBC,EAAcJ,EAA8C,CAEhF,OADiB,MAAMC,EAAU,IAAI,gBAAgBD,CAAS,EAAE,GAChD,KAAK,IACvB"}
|
||||
{"version":3,"file":"conclusionApi-Duu_VHzp.js","sources":["../../src/services/conclusionApi.ts"],"sourcesContent":["import apiClient from './authApi';\r\n\r\nexport interface ConclusionRemark {\r\n conclusionId: string;\r\n requestId: string;\r\n aiGeneratedRemark: string | null;\r\n aiModelUsed: string | null;\r\n aiConfidenceScore: number | null;\r\n finalRemark: string | null;\r\n editedBy: string | null;\r\n isEdited: boolean;\r\n editCount: number;\r\n approvalSummary: any;\r\n documentSummary: any;\r\n keyDiscussionPoints: string[];\r\n generatedAt: string | null;\r\n finalizedAt: string | null;\r\n createdAt: string;\r\n updatedAt: string;\r\n}\r\n\r\n/**\r\n * Generate AI-powered conclusion remark\r\n */\r\nexport async function generateConclusion(requestId: string): Promise<{\r\n conclusionId: string;\r\n aiGeneratedRemark: string;\r\n keyDiscussionPoints: string[];\r\n confidence: number;\r\n generatedAt: string;\r\n}> {\r\n const response = await apiClient.post(`/conclusions/${requestId}/generate`);\r\n return response.data.data;\r\n}\r\n\r\n/**\r\n * Update conclusion remark (edit by initiator)\r\n */\r\nexport async function updateConclusion(requestId: string, finalRemark: string): Promise<ConclusionRemark> {\r\n const response = await apiClient.put(`/conclusions/${requestId}`, { finalRemark });\r\n return response.data.data;\r\n}\r\n\r\n/**\r\n * Finalize conclusion and close request\r\n */\r\nexport async function finalizeConclusion(requestId: string, finalRemark: string): Promise<{\r\n conclusionId: string;\r\n requestNumber: string;\r\n status: string;\r\n finalRemark: string;\r\n finalizedAt: string;\r\n}> {\r\n const response = await apiClient.post(`/conclusions/${requestId}/finalize`, { finalRemark });\r\n return response.data.data;\r\n}\r\n\r\n/**\r\n * Get conclusion for a request\r\n */\r\nexport async function getConclusion(requestId: string): Promise<ConclusionRemark> {\r\n const response = await apiClient.get(`/conclusions/${requestId}`);\r\n return response.data.data;\r\n}\r\n\r\n"],"names":["generateConclusion","requestId","apiClient","finalizeConclusion","finalRemark","getConclusion"],"mappings":"6RAwBA,eAAsBA,EAAmBC,EAMtC,CAED,OADiB,MAAMC,EAAU,KAAK,gBAAgBD,CAAS,WAAW,GAC1D,KAAK,IACvB,CAaA,eAAsBE,EAAmBF,EAAmBG,EAMzD,CAED,OADiB,MAAMF,EAAU,KAAK,gBAAgBD,CAAS,YAAa,CAAE,YAAAG,EAAa,GAC3E,KAAK,IACvB,CAKA,eAAsBC,EAAcJ,EAA8C,CAEhF,OADiB,MAAMC,EAAU,IAAI,gBAAgBD,CAAS,EAAE,GAChD,KAAK,IACvB"}
|
||||
1
build/assets/index-0iF6k2IE.css
Normal file
1
build/assets/index-0iF6k2IE.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
build/assets/index-CEqn7Fyp.js.map
Normal file
1
build/assets/index-CEqn7Fyp.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
import{g as s}from"./index-B9vDSbbE.js";import"./radix-vendor-DA0cB_hD.js";import"./charts-vendor-Cji9-Yri.js";import"./utils-vendor-DHm03ykU.js";import"./ui-vendor-DtH22-aU.js";import"./socket-vendor-TjCxX7sJ.js";import"./redux-vendor-tbZCm13o.js";import"./router-vendor-CRr9x_Jp.js";function R(o){const{requestId:e,status:t,request:a,navigate:r}=o;if((t==null?void 0:t.toLowerCase())==="draft"||t==="DRAFT"){r(`/edit-request/${e}`);return}const i=s(e);r(i)}export{R as navigateToRequest};
|
||||
//# sourceMappingURL=requestNavigation-DVuzZmST.js.map
|
||||
import{g as s}from"./index-CEqn7Fyp.js";import"./radix-vendor-DA0cB_hD.js";import"./charts-vendor-Cji9-Yri.js";import"./utils-vendor-DHm03ykU.js";import"./ui-vendor-BZmDhLpD.js";import"./socket-vendor-TjCxX7sJ.js";import"./redux-vendor-tbZCm13o.js";import"./router-vendor-YTj2hkRM.js";function R(o){const{requestId:e,status:t,request:a,navigate:r}=o;if((t==null?void 0:t.toLowerCase())==="draft"||t==="DRAFT"){r(`/edit-request/${e}`);return}const i=s(e);r(i)}export{R as navigateToRequest};
|
||||
//# sourceMappingURL=requestNavigation-BN50PdXY.js.map
|
||||
@ -1 +1 @@
|
||||
{"version":3,"file":"requestNavigation-DVuzZmST.js","sources":["../../src/utils/requestNavigation.ts"],"sourcesContent":["/**\r\n * Global Request Navigation Utility\r\n * \r\n * Centralized navigation logic for request-related routes.\r\n * This utility decides where to navigate when clicking on request cards\r\n * from anywhere in the application.\r\n * \r\n * Features:\r\n * - Single point of navigation logic\r\n * - Handles draft vs active requests\r\n * - Supports different flow types (CUSTOM, DEALER_CLAIM)\r\n * - Type-safe navigation\r\n */\r\n\r\nimport { NavigateFunction } from 'react-router-dom';\r\nimport { getRequestDetailRoute, RequestFlowType } from './requestTypeUtils';\r\n\r\nexport interface RequestNavigationOptions {\r\n requestId: string;\r\n requestTitle?: string;\r\n status?: string;\r\n request?: any; // Full request object if available\r\n navigate: NavigateFunction;\r\n}\r\n\r\n/**\r\n * Navigate to the appropriate request detail page based on request type\r\n * \r\n * This is the single point of navigation for all request cards.\r\n * It handles:\r\n * - Draft requests (navigate to edit)\r\n * - Different flow types (CUSTOM, DEALER_CLAIM)\r\n * - Status-based routing\r\n */\r\nexport function navigateToRequest(options: RequestNavigationOptions): void {\r\n const { requestId, status, request, navigate } = options;\r\n\r\n // Check if request is a draft - if so, route to edit form instead of detail view\r\n const isDraft = status?.toLowerCase() === 'draft' || status === 'DRAFT';\r\n if (isDraft) {\r\n navigate(`/edit-request/${requestId}`);\r\n return;\r\n }\r\n\r\n // Determine the appropriate route based on request type\r\n const route = getRequestDetailRoute(requestId, request);\r\n navigate(route);\r\n}\r\n\r\n/**\r\n * Navigate to create a new request based on flow type\r\n */\r\nexport function navigateToCreateRequest(\r\n navigate: NavigateFunction,\r\n flowType: RequestFlowType = 'CUSTOM'\r\n): void {\r\n const route = flowType === 'DEALER_CLAIM' \r\n ? '/claim-management' \r\n : '/new-request';\r\n navigate(route);\r\n}\r\n\r\n/**\r\n * Create a navigation handler function for request cards\r\n * This can be used directly in onClick handlers\r\n */\r\nexport function createRequestNavigationHandler(\r\n navigate: NavigateFunction\r\n) {\r\n return (requestId: string, requestTitle?: string, status?: string, request?: any) => {\r\n navigateToRequest({\r\n requestId,\r\n requestTitle,\r\n status,\r\n request,\r\n navigate,\r\n });\r\n };\r\n}\r\n"],"names":["navigateToRequest","options","requestId","status","request","navigate","route","getRequestDetailRoute"],"mappings":"6RAkCO,SAASA,EAAkBC,EAAyC,CACzE,KAAM,CAAE,UAAAC,EAAW,OAAAC,EAAQ,QAAAC,EAAS,SAAAC,GAAaJ,EAIjD,IADgBE,GAAA,YAAAA,EAAQ,iBAAkB,SAAWA,IAAW,QACnD,CACXE,EAAS,iBAAiBH,CAAS,EAAE,EACrC,MACF,CAGA,MAAMI,EAAQC,EAAsBL,CAAkB,EACtDG,EAASC,CAAK,CAChB"}
|
||||
{"version":3,"file":"requestNavigation-BN50PdXY.js","sources":["../../src/utils/requestNavigation.ts"],"sourcesContent":["/**\r\n * Global Request Navigation Utility\r\n * \r\n * Centralized navigation logic for request-related routes.\r\n * This utility decides where to navigate when clicking on request cards\r\n * from anywhere in the application.\r\n * \r\n * Features:\r\n * - Single point of navigation logic\r\n * - Handles draft vs active requests\r\n * - Supports different flow types (CUSTOM, DEALER_CLAIM)\r\n * - Type-safe navigation\r\n */\r\n\r\nimport { NavigateFunction } from 'react-router-dom';\r\nimport { getRequestDetailRoute, RequestFlowType } from './requestTypeUtils';\r\n\r\nexport interface RequestNavigationOptions {\r\n requestId: string;\r\n requestTitle?: string;\r\n status?: string;\r\n request?: any; // Full request object if available\r\n navigate: NavigateFunction;\r\n}\r\n\r\n/**\r\n * Navigate to the appropriate request detail page based on request type\r\n * \r\n * This is the single point of navigation for all request cards.\r\n * It handles:\r\n * - Draft requests (navigate to edit)\r\n * - Different flow types (CUSTOM, DEALER_CLAIM)\r\n * - Status-based routing\r\n */\r\nexport function navigateToRequest(options: RequestNavigationOptions): void {\r\n const { requestId, status, request, navigate } = options;\r\n\r\n // Check if request is a draft - if so, route to edit form instead of detail view\r\n const isDraft = status?.toLowerCase() === 'draft' || status === 'DRAFT';\r\n if (isDraft) {\r\n navigate(`/edit-request/${requestId}`);\r\n return;\r\n }\r\n\r\n // Determine the appropriate route based on request type\r\n const route = getRequestDetailRoute(requestId, request);\r\n navigate(route);\r\n}\r\n\r\n/**\r\n * Navigate to create a new request based on flow type\r\n */\r\nexport function navigateToCreateRequest(\r\n navigate: NavigateFunction,\r\n flowType: RequestFlowType = 'CUSTOM'\r\n): void {\r\n const route = flowType === 'DEALER_CLAIM' \r\n ? '/claim-management' \r\n : '/new-request';\r\n navigate(route);\r\n}\r\n\r\n/**\r\n * Create a navigation handler function for request cards\r\n * This can be used directly in onClick handlers\r\n */\r\nexport function createRequestNavigationHandler(\r\n navigate: NavigateFunction\r\n) {\r\n return (requestId: string, requestTitle?: string, status?: string, request?: any) => {\r\n navigateToRequest({\r\n requestId,\r\n requestTitle,\r\n status,\r\n request,\r\n navigate,\r\n });\r\n };\r\n}\r\n"],"names":["navigateToRequest","options","requestId","status","request","navigate","route","getRequestDetailRoute"],"mappings":"6RAkCO,SAASA,EAAkBC,EAAyC,CACzE,KAAM,CAAE,UAAAC,EAAW,OAAAC,EAAQ,QAAAC,EAAS,SAAAC,GAAaJ,EAIjD,IADgBE,GAAA,YAAAA,EAAQ,iBAAkB,SAAWA,IAAW,QACnD,CACXE,EAAS,iBAAiBH,CAAS,EAAE,EACrC,MACF,CAGA,MAAMI,EAAQC,EAAsBL,CAAkB,EACtDG,EAASC,CAAK,CAChB"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -52,15 +52,15 @@
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/index-B9vDSbbE.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CEqn7Fyp.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/charts-vendor-Cji9-Yri.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/radix-vendor-DA0cB_hD.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/utils-vendor-DHm03ykU.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/ui-vendor-DtH22-aU.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/ui-vendor-BZmDhLpD.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/socket-vendor-TjCxX7sJ.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/redux-vendor-tbZCm13o.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/router-vendor-CRr9x_Jp.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-4P6wtC-r.css">
|
||||
<link rel="modulepreload" crossorigin href="/assets/router-vendor-YTj2hkRM.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-0iF6k2IE.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@ -39,14 +39,15 @@ These are **custom claims** that Tanflow may include based on their configuratio
|
||||
| `employee_id` | string | Alternative employee ID field | ✅ Yes (fallback) |
|
||||
| `department` | string | Department/Division | ✅ Yes |
|
||||
| `designation` | string | Job designation/position | ✅ Yes |
|
||||
| `title` | string | Job title | ✅ Yes (as `designation` fallback) |
|
||||
| `title` | string | Job title | ❌ No |
|
||||
| `designation` | string | Job designation/position | ✅ Yes (as `designation`) |
|
||||
| `employeeType` | string | Employee type (Dealer, Full-time, Contract, etc.) | ✅ Yes (as `jobTitle`) |
|
||||
| `organization` | string | Organization name | ❌ No |
|
||||
| `division` | string | Division name | ❌ No |
|
||||
| `location` | string | Office location | ❌ No |
|
||||
| `manager` | string | Manager name/email | ❌ No |
|
||||
| `manager_id` | string | Manager employee ID | ❌ No |
|
||||
| `cost_center` | string | Cost center code | ❌ No |
|
||||
| `employee_type` | string | Employee type (Full-time, Contract, etc.) | ❌ No |
|
||||
| `hire_date` | string | Date of hire | ❌ No |
|
||||
| `office_location` | string | Office location | ❌ No |
|
||||
| `country` | string | Country code | ❌ No |
|
||||
@ -69,8 +70,14 @@ const userData: SSOUserData = {
|
||||
lastName: tanflowUserInfo.family_name || tanflowUserInfo.lastName || undefined,
|
||||
displayName: tanflowUserInfo.name || tanflowUserInfo.displayName || undefined,
|
||||
department: tanflowUserInfo.department || undefined,
|
||||
designation: tanflowUserInfo.title || tanflowUserInfo.designation || undefined,
|
||||
designation: tanflowUserInfo.designation || undefined, // Map designation to designation
|
||||
phone: tanflowUserInfo.phone_number || tanflowUserInfo.phone || undefined,
|
||||
// Additional fields
|
||||
manager: tanflowUserInfo.manager || undefined,
|
||||
jobTitle: tanflowUserInfo.employeeType || undefined, // Map employeeType to jobTitle
|
||||
postalAddress: tanflowUserInfo.address ? (typeof tanflowUserInfo.address === 'string' ? tanflowUserInfo.address : JSON.stringify(tanflowUserInfo.address)) : undefined,
|
||||
mobilePhone: tanflowUserInfo.mobile_phone || tanflowUserInfo.mobilePhone || undefined,
|
||||
adGroups: Array.isArray(tanflowUserInfo.groups) ? tanflowUserInfo.groups : undefined,
|
||||
};
|
||||
```
|
||||
|
||||
@ -88,11 +95,11 @@ const userData: SSOUserData = {
|
||||
| `lastName` | `family_name` or `lastName` | ❌ | Optional |
|
||||
| `displayName` | `name` or `displayName` | ❌ | Auto-generated if missing |
|
||||
| `department` | `department` | ❌ | Optional |
|
||||
| `designation` | `title` or `designation` | ❌ | Optional |
|
||||
| `designation` | `designation` | ❌ | Optional |
|
||||
| `phone` | `phone_number` or `phone` | ❌ | Optional |
|
||||
| `manager` | `manager` | ❌ | **NOT currently extracted** |
|
||||
| `manager` | `manager` | ❌ | Optional (extracted if available) |
|
||||
| `secondEmail` | N/A | ❌ | Not available from Tanflow |
|
||||
| `jobTitle` | `title` | ❌ | **NOT currently extracted** |
|
||||
| `jobTitle` | `employeeType` | ❌ | Optional (maps employeeType to jobTitle) |
|
||||
| `employeeNumber` | N/A | ❌ | Not available from Tanflow |
|
||||
| `postalAddress` | `address` (structured) | ❌ | **NOT currently extracted** |
|
||||
| `mobilePhone` | N/A | ❌ | Not available from Tanflow |
|
||||
@ -113,10 +120,11 @@ Consider extracting these fields if available from Tanflow:
|
||||
const userData: SSOUserData = {
|
||||
// ... existing fields ...
|
||||
|
||||
// Additional fields
|
||||
// Additional fields (already implemented)
|
||||
manager: tanflowUserInfo.manager || undefined,
|
||||
jobTitle: tanflowUserInfo.title || tanflowUserInfo.designation || undefined,
|
||||
postalAddress: tanflowUserInfo.address ? JSON.stringify(tanflowUserInfo.address) : undefined,
|
||||
jobTitle: tanflowUserInfo.employeeType || undefined, // Map employeeType to jobTitle
|
||||
postalAddress: tanflowUserInfo.address ? (typeof tanflowUserInfo.address === 'string' ? tanflowUserInfo.address : JSON.stringify(tanflowUserInfo.address)) : undefined,
|
||||
mobilePhone: tanflowUserInfo.mobile_phone || tanflowUserInfo.mobilePhone || undefined,
|
||||
adGroups: Array.isArray(tanflowUserInfo.groups) ? tanflowUserInfo.groups : undefined,
|
||||
|
||||
// Location object
|
||||
|
||||
@ -352,6 +352,7 @@ export class AuthService {
|
||||
displayName: user.displayName || null,
|
||||
department: user.department || null,
|
||||
designation: user.designation || null,
|
||||
jobTitle: user.jobTitle || null,
|
||||
role: user.role
|
||||
},
|
||||
accessToken,
|
||||
@ -907,8 +908,9 @@ export class AuthService {
|
||||
hasEmail: !!tanflowUserInfo.email,
|
||||
hasPreferredUsername: !!tanflowUserInfo.preferred_username,
|
||||
hasEmployeeId: !!(tanflowUserInfo.employeeId || tanflowUserInfo.employee_id),
|
||||
hasEmployeeType: !!tanflowUserInfo.employeeType,
|
||||
hasDepartment: !!tanflowUserInfo.department,
|
||||
hasDesignation: !!(tanflowUserInfo.title || tanflowUserInfo.designation),
|
||||
hasDesignation: !!tanflowUserInfo.designation,
|
||||
hasManager: !!tanflowUserInfo.manager,
|
||||
hasGroups: Array.isArray(tanflowUserInfo.groups),
|
||||
groupsCount: Array.isArray(tanflowUserInfo.groups) ? tanflowUserInfo.groups.length : 0,
|
||||
@ -920,6 +922,8 @@ export class AuthService {
|
||||
name: tanflowUserInfo.name,
|
||||
given_name: tanflowUserInfo.given_name,
|
||||
family_name: tanflowUserInfo.family_name,
|
||||
employeeType: tanflowUserInfo.employeeType,
|
||||
designation: tanflowUserInfo.designation,
|
||||
}
|
||||
});
|
||||
|
||||
@ -934,11 +938,11 @@ export class AuthService {
|
||||
lastName: tanflowUserInfo.family_name || tanflowUserInfo.lastName || undefined,
|
||||
displayName: tanflowUserInfo.name || tanflowUserInfo.displayName || undefined,
|
||||
department: tanflowUserInfo.department || undefined,
|
||||
designation: tanflowUserInfo.title || tanflowUserInfo.designation || undefined,
|
||||
designation: tanflowUserInfo.designation || undefined, // Map designation to designation
|
||||
phone: tanflowUserInfo.phone_number || tanflowUserInfo.phone || undefined,
|
||||
// Additional fields that may be available from Tanflow (custom claims)
|
||||
manager: tanflowUserInfo.manager || undefined,
|
||||
jobTitle: tanflowUserInfo.title || tanflowUserInfo.designation || undefined,
|
||||
jobTitle: tanflowUserInfo.employeeType || undefined, // Map employeeType to jobTitle
|
||||
postalAddress: tanflowUserInfo.address ? (typeof tanflowUserInfo.address === 'string' ? tanflowUserInfo.address : JSON.stringify(tanflowUserInfo.address)) : undefined,
|
||||
mobilePhone: tanflowUserInfo.mobile_phone || tanflowUserInfo.mobilePhone || undefined,
|
||||
adGroups: Array.isArray(tanflowUserInfo.groups) ? tanflowUserInfo.groups : undefined,
|
||||
|
||||
@ -49,6 +49,7 @@ export interface LoginResponse {
|
||||
displayName?: string | null;
|
||||
department?: string | null;
|
||||
designation?: string | null;
|
||||
jobTitle?: string | null;
|
||||
role: 'USER' | 'MANAGEMENT' | 'ADMIN';
|
||||
};
|
||||
accessToken: string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user