-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] sign_oca: fix errors accesing to pdf viewer
- Loading branch information
1 parent
75d32b5
commit d1ca0b4
Showing
22 changed files
with
312 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
sign_oca/static/src/components/sign_oca_configure/sign_oca_configure_field_dialog.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** @odoo-module */ | ||
/* Copyright 2024 Tecnativa - Carlos Roca | ||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ | ||
|
||
import {Dialog} from "@web/core/dialog/dialog"; | ||
import {useChildRef} from "@web/core/utils/hooks"; | ||
|
||
import {Component} from "@odoo/owl"; | ||
|
||
export class SignOcaConfigureFieldDialog extends Component { | ||
setup() { | ||
this.env.dialogData.dismiss = () => this._cancel(); | ||
this.modalRef = useChildRef(); | ||
this.isProcess = false; | ||
} | ||
|
||
async _cancel() { | ||
this.props.close(); | ||
} | ||
|
||
async _confirm() { | ||
const $el = $(this.modalRef.el); | ||
await this.props.confirm( | ||
parseInt($el.find('select[name="field_id"]').val(), 10), | ||
parseInt($el.find('select[name="role_id"]').val(), 10), | ||
$el.find("input[name='required']").prop("checked"), | ||
$el.find("input[name='placeholder']").val() | ||
); | ||
this.props.close(); | ||
} | ||
|
||
async _delete() { | ||
this.props.delete(); | ||
this.props.close(); | ||
} | ||
} | ||
SignOcaConfigureFieldDialog.template = "sign_oca.SignOcaConfigureFieldDialog"; | ||
SignOcaConfigureFieldDialog.components = {Dialog}; | ||
SignOcaConfigureFieldDialog.props = { | ||
close: Function, | ||
title: { | ||
validate: (m) => { | ||
return ( | ||
typeof m === "string" || | ||
(typeof m === "object" && typeof m.toString === "function") | ||
); | ||
}, | ||
}, | ||
item: Object, | ||
info: Object, | ||
confirm: Function, | ||
delete: Function, | ||
}; |
Oops, something went wrong.