mirror of https://github.com/OCA/social.git
[FIX] mail_tracking: js linter warnings
parent
4cd143e729
commit
e996d10a13
|
@ -1,8 +1,7 @@
|
||||||
/** @odoo-module **/
|
/** @odoo-module **/
|
||||||
import {patch} from "web.utils";
|
|
||||||
import {ChatterTopbar} from "@mail/components/chatter_topbar/chatter_topbar";
|
import {ChatterTopbar} from "@mail/components/chatter_topbar/chatter_topbar";
|
||||||
|
import {patch} from "web.utils";
|
||||||
const components = {ChatterTopbar};
|
const components = {ChatterTopbar};
|
||||||
// Import {rpc}
|
|
||||||
import rpc from "web.rpc";
|
import rpc from "web.rpc";
|
||||||
|
|
||||||
patch(
|
patch(
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
/** @odoo-module **/
|
/** @odoo-module **/
|
||||||
|
|
||||||
import {attr} from "@mail/model/model_field";
|
|
||||||
import {
|
import {
|
||||||
registerFieldPatchModel,
|
registerFieldPatchModel,
|
||||||
registerInstancePatchModel,
|
registerInstancePatchModel,
|
||||||
} from "@mail/model/model_core";
|
} from "@mail/model/model_core";
|
||||||
|
import {attr} from "@mail/model/model_field";
|
||||||
|
|
||||||
registerInstancePatchModel(
|
registerInstancePatchModel(
|
||||||
"mail.chatter",
|
"mail.chatter",
|
||||||
|
|
|
@ -61,7 +61,8 @@ registerInstancePatchModel(
|
||||||
} else {
|
} else {
|
||||||
this.messaging.update({
|
this.messaging.update({
|
||||||
userSetting: insertAndReplace({
|
userSetting: insertAndReplace({
|
||||||
id: -1, // Fake id for guest
|
// Fake id for guest
|
||||||
|
id: -1,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,9 @@
|
||||||
/** @odoo-module **/
|
/** @odoo-module **/
|
||||||
|
|
||||||
// const chatter = require("mail/static/src/models/chatter/chatter.js");
|
|
||||||
// const useStore = require("mail/static/src/component_hooks/use_store/use_store.js");
|
|
||||||
import {registerMessagingComponent} from "@mail/utils/messaging_component";
|
import {registerMessagingComponent} from "@mail/utils/messaging_component";
|
||||||
const {Component} = owl;
|
const {Component} = owl;
|
||||||
|
|
||||||
export class MessageFailedBox extends Component {
|
export class MessageFailedBox extends Component {
|
||||||
constructor(...args) {
|
|
||||||
super(...args);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get chatter() {
|
|
||||||
// return this.env.models["mail.chatter"].get(this.props.chatterLocalId);
|
|
||||||
// }
|
|
||||||
|
|
||||||
_onClickTitle() {
|
_onClickTitle() {
|
||||||
this.chatter.toggleMessageFailedBoxVisibility();
|
this.chatter.toggleMessageFailedBoxVisibility();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/** @odoo-module **/
|
/** @odoo-module **/
|
||||||
import {registerNewModel} from "@mail/model/model_core";
|
|
||||||
import {attr, many2one} from "@mail/model/model_field";
|
import {attr, many2one} from "@mail/model/model_field";
|
||||||
|
import {registerNewModel} from "@mail/model/model_core";
|
||||||
|
|
||||||
function factory(dependencies) {
|
function factory(dependencies) {
|
||||||
class MessageFailed extends dependencies["mail.model"] {
|
class MessageFailed extends dependencies["mail.model"] {
|
||||||
static convertData(data) {
|
static convertData(data) {
|
||||||
const data2 = {};
|
const data2 = {};
|
||||||
if ("author" in data) {
|
if ("author" in data) {
|
||||||
if (!data.author) {
|
if (data.author) {
|
||||||
data2.author = [["unlink-all"]];
|
|
||||||
} else {
|
|
||||||
data2.author = data.author[1];
|
data2.author = data.author[1];
|
||||||
data2.author_id = data.author[0];
|
data2.author_id = data.author[0];
|
||||||
|
} else {
|
||||||
|
data2.author = [["unlink-all"]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ("body" in data) {
|
if ("body" in data) {
|
||||||
|
|
Loading…
Reference in New Issue