forked from baron/baron-sso
조직도 표현 개선
This commit is contained in:
@@ -191,8 +191,8 @@ func BuildWorksmobileUserPayloadForDomainTenants(user domain.User, tenant domain
|
||||
type worksmobileAppointment struct {
|
||||
TenantID string
|
||||
IsPrimary bool
|
||||
IsOwner bool
|
||||
HasOwner bool
|
||||
IsManager bool
|
||||
HasManager bool
|
||||
JobTitle string
|
||||
PositionID string
|
||||
}
|
||||
@@ -247,8 +247,8 @@ func buildWorksmobileUserOrganizations(user domain.User, tenant domain.Tenant, t
|
||||
Primary: appointment.IsPrimary,
|
||||
PositionID: appointment.PositionID,
|
||||
}
|
||||
if appointment.HasOwner {
|
||||
isManager := appointment.IsOwner
|
||||
if appointment.HasManager {
|
||||
isManager := appointment.IsManager
|
||||
orgUnit.IsManager = &isManager
|
||||
}
|
||||
organizations = append(organizations, WorksmobileUserOrganization{
|
||||
@@ -285,9 +285,9 @@ func worksmobileAppointmentsFromMetadata(metadata domain.JSONMap) []worksmobileA
|
||||
JobTitle: metadataString(domain.JSONMap(item), "jobTitle", "job_title", "task"),
|
||||
PositionID: metadataString(domain.JSONMap(item), "worksmobilePositionId", "positionId", "position_id"),
|
||||
}
|
||||
if isOwner, ok := metadataOptionalBool(domain.JSONMap(item), "isOwner", "isManager"); ok {
|
||||
appointment.IsOwner = isOwner
|
||||
appointment.HasOwner = true
|
||||
if isManager, ok := metadataOptionalBool(domain.JSONMap(item), "isManager", "lead", "isLead"); ok {
|
||||
appointment.IsManager = isManager
|
||||
appointment.HasManager = true
|
||||
}
|
||||
appointments = append(appointments, appointment)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user