[IMP] pos restaurant: prevent an offline table removal from floor screen
- Current pos restaurant with offline mode, when you delete the table from floor screen, it would stop everything (you won't be able to create an order further) untill your server start again, that is not good indeed. Instead we should show the error popup, just like you will get when you click on '+' for adding a new table on offline mode. - Slightly improve the other relevant warning messages. - Only pos managers can edit the floor screen. Before this pos user were allowed to access the edit button (pencil icon on floor screen), but they could never update the table detail as lack of permission so in this we have prohibited the pos user from accessing an edit button(pencil icon).
This commit is contained in:
committed by
Yannick Tivisse
parent
c5a632a2fc
commit
34643da75d
@@ -258,7 +258,7 @@ var TableWidget = PosBaseWidget.extend({
|
||||
}, function(err,event) {
|
||||
self.gui.show_popup('error',{
|
||||
'title':_t('Changes could not be saved'),
|
||||
'body': _t('Check your internet connection and access rights'),
|
||||
'body': _t('You must be connected to the internet to save your changes.'),
|
||||
});
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
@@ -292,6 +292,13 @@ var TableWidget = PosBaseWidget.extend({
|
||||
}
|
||||
floorplan.update_toolbar();
|
||||
self.destroy();
|
||||
}, function(err, event) {
|
||||
self.gui.show_popup('error', {
|
||||
'title':_t('Changes could not be saved'),
|
||||
'body': _t('You must be connected to the internet to save your changes.'),
|
||||
});
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
get_notifications: function(){ //FIXME : Make this faster
|
||||
@@ -402,7 +409,7 @@ var FloorScreenWidget = screens.ScreenWidget.extend({
|
||||
.call('set_background_color',[this.floor.id, background]).fail(function(err,event){
|
||||
self.gui.show_popup('error',{
|
||||
'title':_t('Changes could not be saved'),
|
||||
'body': _t('Check your internet connection and access rights'),
|
||||
'body': _t('You must be connected to the internet to save your changes.'),
|
||||
});
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
This floor has no tables yet, use the <i class="fa fa-plus"></i> button in the editing toolbar to create new tables.
|
||||
</div>
|
||||
<div class='tables'></div>
|
||||
<span class='edit-button editing'><i class='fa fa-pencil'></i></span>
|
||||
<span t-if="widget.pos.user.role == 'manager'" class='edit-button editing'><i class='fa fa-pencil'></i></span>
|
||||
<div class='edit-bar oe_hidden'>
|
||||
<span class='edit-button new-table'>
|
||||
<i class='fa fa-plus'></i>
|
||||
|
||||
Reference in New Issue
Block a user