[16.0][ADD] lpcr_custom_pos_buttons#153
Conversation
f644271 to
f140e46
Compare
|
to make the tests work, you need to add this line to |
f140e46 to
c7d381e
Compare
c7d381e to
75509b7
Compare
75509b7 to
90f8a91
Compare
huguesdk
left a comment
There was a problem hiding this comment.
thanks for the changes. lgtm!
| import Registries from "point_of_sale.Registries"; | ||
|
|
||
| class LpcrPosButtons extends PosComponent { | ||
| get companyId() { |
There was a problem hiding this comment.
i prefer companyID, as ID is pronounced as an acronym, but it’s a matter of taste (same for LPCRPosButtons).
|
|
||
| class LpcrPosButtons extends PosComponent { | ||
| get companyId() { | ||
| return this.env.pos.company && this.env.pos.company.id; |
There was a problem hiding this comment.
is this first condition necessary? if yes, a comment should indicate in which case it can be false. assumptions should be tested when developing: it is better to have simpler code than many tests “just in case” (which actually never happen).
| <a | ||
| class="pos-topheader-button" | ||
| t-att-href="'/form?company_id=' + companyId" | ||
| target="_blank" | ||
| > | ||
| <i class="fa fa-pencil-square-o" aria-hidden="true" /> | ||
| <span style="padding-left: 10px;" t-if="!env.isMobile"> | ||
| ContactForm | ||
| </span> | ||
| </a> | ||
|
|
||
| <a | ||
| class="pos-topheader-button" | ||
| href="/web#action=membership_global_member_view.action_global_member" | ||
| target="_blank" | ||
| > | ||
| <i class="fa fa-users" aria-hidden="true" /> | ||
| <span style="padding-left: 10px;" t-if="!env.isMobile"> | ||
| GlobalMemberViewButton | ||
| </span> | ||
| </a> |
There was a problem hiding this comment.
aaah, simple a links, i like it!
|
/ocabot merge nobump |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 340a451. Thanks a lot for contributing to coopiteasy. ❤️ |
Description
Add a button redirecting to the webform and another to the members national view in the PoS.
Odoo task (if applicable)
14463
Checklist before approval