mirror of https://github.com/wekan/wekan
parent
d22964bcfd
commit
477d71e0b9
@ -0,0 +1,70 @@ |
||||
# Do not edit. File was generated by node-gyp's "configure" step |
||||
{ |
||||
"target_defaults": { |
||||
"cflags": [], |
||||
"default_configuration": "Release", |
||||
"defines": [], |
||||
"include_dirs": [], |
||||
"libraries": [] |
||||
}, |
||||
"variables": { |
||||
"asan": 0, |
||||
"build_v8_with_gn": "false", |
||||
"coverage": "false", |
||||
"debug_nghttp2": "false", |
||||
"enable_lto": "false", |
||||
"enable_pgo_generate": "false", |
||||
"enable_pgo_use": "false", |
||||
"force_dynamic_crt": 0, |
||||
"host_arch": "x64", |
||||
"icu_gyp_path": "tools/icu/icu-system.gyp", |
||||
"icu_small": "false", |
||||
"icu_ver_major": "63", |
||||
"llvm_version": "0", |
||||
"node_byteorder": "little", |
||||
"node_debug_lib": "false", |
||||
"node_enable_d8": "false", |
||||
"node_enable_v8_vtunejit": "false", |
||||
"node_experimental_http_parser": "false", |
||||
"node_install_npm": "false", |
||||
"node_module_version": 67, |
||||
"node_no_browser_globals": "false", |
||||
"node_prefix": "/usr/local/Cellar/node/11.6.0", |
||||
"node_release_urlbase": "", |
||||
"node_shared": "false", |
||||
"node_shared_cares": "false", |
||||
"node_shared_http_parser": "false", |
||||
"node_shared_libuv": "false", |
||||
"node_shared_nghttp2": "false", |
||||
"node_shared_openssl": "false", |
||||
"node_shared_zlib": "false", |
||||
"node_tag": "", |
||||
"node_target_type": "executable", |
||||
"node_use_bundled_v8": "true", |
||||
"node_use_dtrace": "true", |
||||
"node_use_etw": "false", |
||||
"node_use_large_pages": "false", |
||||
"node_use_openssl": "true", |
||||
"node_use_pch": "false", |
||||
"node_use_v8_platform": "true", |
||||
"node_with_ltcg": "false", |
||||
"node_without_node_options": "false", |
||||
"openssl_fips": "", |
||||
"shlib_suffix": "67.dylib", |
||||
"target_arch": "x64", |
||||
"v8_enable_gdbjit": 0, |
||||
"v8_enable_i18n_support": 1, |
||||
"v8_enable_inspector": 1, |
||||
"v8_no_strict_aliasing": 1, |
||||
"v8_optimized_debug": 1, |
||||
"v8_promise_internal_field_count": 1, |
||||
"v8_random_seed": 0, |
||||
"v8_trace_maps": 0, |
||||
"v8_typed_array_max_size_in_heap": 0, |
||||
"v8_use_snapshot": "true", |
||||
"want_separate_host_toolset": 0, |
||||
"xcode_version": "10.0", |
||||
"nodedir": "/Users/angtrim/.node-gyp/11.6.0", |
||||
"standalone_static_library": 1 |
||||
} |
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
export function getMembersToMap(data) { |
||||
// we will work on the list itself (an ordered array of objects) when a
|
||||
// mapping is done, we add a 'wekan' field to the object representing the
|
||||
// imported member
|
||||
const membersToMap = data.members; |
||||
const users = data.users; |
||||
// auto-map based on username
|
||||
membersToMap.forEach((importedMember) => { |
||||
importedMember.id = importedMember.userId; |
||||
delete importedMember.userId; |
||||
const user = users.filter((user) => { |
||||
return user._id === importedMember.id; |
||||
})[0]; |
||||
if (user.profile && user.profile.fullname) { |
||||
importedMember.fullName = user.profile.fullname; |
||||
} |
||||
importedMember.username = user.username; |
||||
const wekanUser = Users.findOne({ username: importedMember.username }); |
||||
if (wekanUser) { |
||||
importedMember.wekanId = wekanUser._id; |
||||
} |
||||
}); |
||||
return membersToMap; |
||||
} |
||||
Loading…
Reference in new issue