summaryrefslogtreecommitdiff
path: root/addons/hr_holidays/static/src/components/thread_view/thread_view.js
blob: 73ca28d4d0cc95a86a3052f188aadae77bf54620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
odoo.define('hr_holidays/static/src/components/thread_view/thread_view.js', function (require) {
'use strict';

const components = {
    ThreadView: require('mail/static/src/components/thread_view/thread_view.js'),
};

const { patch } = require('web.utils');

patch(components.ThreadView, 'hr_holidays/static/src/components/thread_view/thread_view.js', {
    //--------------------------------------------------------------------------
    // Private
    //--------------------------------------------------------------------------

    /**
     * @override
     */
    _useStoreSelector(props) {
        const res = this._super(...arguments);
        const thread = res.thread;
        const correspondent = thread && thread.correspondent;
        return Object.assign({}, res, {
            correspondentOutOfOfficeText: correspondent && correspondent.outOfOfficeText,
        });
    },
});

});