feat: require cashier authentication via PIN when closing POS session if HR module is enabled

This commit is contained in:
Suherdy Yacob 2026-06-09 09:37:46 +07:00
parent 6586daa494
commit 085ef60723

View File

@ -7,6 +7,17 @@ import { NumberPopup } from "@point_of_sale/app/components/popups/number_popup/n
import { makeAwaitable } from "@point_of_sale/app/utils/make_awaitable_dialog";
patch(PosStore.prototype, {
async closeSession() {
if (this.config.module_pos_hr) {
const cashier = await this._selectCashierByPin();
if (!cashier) {
return;
}
this.setCashier(cashier);
}
return super.closeSession(...arguments);
},
async transferOrder(orderUuid, destinationTable = null, destinationOrder = null) {
this.transferDestinationTable = destinationTable;
return super.transferOrder(...arguments);