mirror of
https://github.com/bringout/oca-ocb-pos.git
synced 2026-04-25 06:22:02 +02:00
19.0 vanilla
This commit is contained in:
parent
6e54c1af6c
commit
3ca647e428
1087 changed files with 132065 additions and 108499 deletions
|
|
@ -0,0 +1,11 @@
|
|||
import { patch } from "@web/core/utils/patch";
|
||||
import "@pos_restaurant/app/services/pos_store";
|
||||
import { PosStore } from "@point_of_sale/app/services/pos_store";
|
||||
|
||||
patch(PosStore.prototype, {
|
||||
shouldResetIdleTimer() {
|
||||
return (
|
||||
this.router.state.current !== "LoginScreen" && super.shouldResetIdleTimer(...arguments)
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/* @odoo-module alias=pos_restaurant_hr.chrome */
|
||||
|
||||
import Chrome from 'point_of_sale.Chrome';
|
||||
import Registries from 'point_of_sale.Registries';
|
||||
|
||||
|
||||
export const PosHrRestaurantChrome = (Chrome) => class extends Chrome {
|
||||
//@override
|
||||
_shouldResetIdleTimer() {
|
||||
return super._shouldResetIdleTimer() && this.tempScreen.name !== 'LoginScreen';
|
||||
}
|
||||
}
|
||||
|
||||
Registries.Component.extend(Chrome, PosHrRestaurantChrome);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import { Navbar } from "@point_of_sale/app/components/navbar/navbar";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(Navbar.prototype, {
|
||||
get showEditPlanButton() {
|
||||
if (
|
||||
this.pos.config.module_pos_restaurant &&
|
||||
(!this.pos.config.module_pos_hr || this.pos.employeeIsAdmin)
|
||||
) {
|
||||
return super.showEditPlanButton;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
import * as PosHr from "@pos_hr/../tests/tours/utils/pos_hr_helpers";
|
||||
import * as ProductScreen from "@point_of_sale/../tests/pos/tours/utils/product_screen_util";
|
||||
import * as Chrome from "@point_of_sale/../tests/pos/tours/utils/chrome_util";
|
||||
import * as FloorScreen from "@pos_restaurant/../tests/tours/utils/floor_screen_util";
|
||||
import * as SelectionPopup from "@point_of_sale/../tests/generic_helpers/selection_popup_util";
|
||||
import * as Dialog from "@point_of_sale/../tests/generic_helpers/dialog_util";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("test_post_login_default_screen_is_tables", {
|
||||
steps: () =>
|
||||
[
|
||||
Chrome.clickBtn("Open Register"),
|
||||
PosHr.clickLoginButton(),
|
||||
SelectionPopup.has("Mitchell Admin", { run: "click" }),
|
||||
Dialog.confirm("Open Register"),
|
||||
FloorScreen.isShown(),
|
||||
].flat(),
|
||||
});
|
||||
|
||||
registry.category("web_tour.tours").add("test_post_login_default_screen_is_register", {
|
||||
steps: () =>
|
||||
[
|
||||
Chrome.clickBtn("Open Register"),
|
||||
PosHr.clickLoginButton(),
|
||||
SelectionPopup.has("Mitchell Admin", { run: "click" }),
|
||||
Dialog.confirm("Open Register"),
|
||||
ProductScreen.isShown(),
|
||||
].flat(),
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue