mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-22 01:52:01 +02:00
12 lines
445 B
JavaScript
12 lines
445 B
JavaScript
import { onRpc } from "@web/../tests/web_test_helpers";
|
|
|
|
onRpc("get_avatar_card_data", function getAvatarCardData({ args }) {
|
|
const resourceId = args[0][0];
|
|
const resources = this.env["hr.employee.public"].search_read([["id", "=", resourceId]]);
|
|
return resources.map((resource) => ({
|
|
name: resource.name,
|
|
work_email: resource.work_email,
|
|
phone: resource.phone,
|
|
user_id: resource.user_id,
|
|
}));
|
|
});
|