Skip to content

Commit

Permalink
Update to version: v2.2.56
Browse files Browse the repository at this point in the history
  • Loading branch information
BhushanKBhagat committed May 2, 2023
1 parent b601b17 commit 6d75457
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 135 deletions.
264 changes: 132 additions & 132 deletions bookingbug-angular-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -946,138 +946,6 @@ angular.module('BBQueue.translations').config(['$translateProvider', function ($
}]);
'use strict';

var AddQueueCustomerController = function AddQueueCustomerController($scope, $log, AdminServiceService, AdminQueuerService, ModalForm, BBModel, $interval, $sessionStorage, $uibModal, $q, AdminBookingPopup, bbLocale) {

var addQueuer = function addQueuer(form) {

var defer = $q.defer();
var service = form.service;
var person = form.server;
$scope.new_queuer.service_id = service.id;
$scope.new_queuer.service = service;
$scope.new_queuer.locale = bbLocale.getLocale();
var new_queuer = $scope.new_queuer;
$scope.$emit('addPendingQueuer', new_queuer);
resetQueuer();
service.$post('queuers', {}, new_queuer).then(function (response) {
var queuer = new BBModel.Admin.Queuer(response);
if (person) {
queuer.startServing(person).then(function () {
defer.resolve();
}, function () {
defer.reject();
});
} else {
defer.resolve();
}
});
return defer.promise;
};

var resetQueuer = function resetQueuer() {
$scope.new_queuer = {};
$scope.loading = false;
};

$scope.addToQueue = function () {
$scope.loading = true;
var modalInstance = $uibModal.open({
templateUrl: 'queue/pick_a_service.html',
scope: $scope,
controller: function controller($scope, $uibModalInstance) {

$scope.dismiss = function () {
return $uibModalInstance.dismiss('cancel');
};

$scope.submit = function (form) {
return $uibModalInstance.close(form);
};
}
});

modalInstance.result.then(addQueuer).finally(function () {
return $scope.loading = false;
});
};

$scope.availableServers = function () {
return _.filter($scope.servers, function (server) {
return server.attendance_status == 1;
});
};

$scope.serveCustomerNow = function () {
$scope.loading = true;
var modalInstance = $uibModal.open({
templateUrl: 'queue/serve_now.html',
resolve: {
services: function services() {
return $scope.services;
},
servers: function servers() {
return $scope.availableServers();
}
},
controller: function controller($scope, $uibModalInstance, services, servers) {

$scope.form = {};

$scope.services = services;

$scope.servers = servers;

$scope.dismiss = function () {
return $uibModalInstance.dismiss('cancel');
};

$scope.submit = function (form) {
return $uibModalInstance.close(form);
};
}
});

modalInstance.result.then(addQueuer).then(resetQueuer).finally(function () {
return $scope.loading = false;
});
};

$scope.makeAppointment = function (options) {
var defaultOptions = {
item_defaults: {
pick_first_time: true,
merge_people: true,
merge_resources: true,
date: moment().format('YYYY-MM-DD')
},
on_conflict: "cancel()",
company_id: $scope.company.id
};

options = _.extend(defaultOptions, options);

var popup = AdminBookingPopup.open(options);

popup.result.finally(resetQueuer);
};
};

angular.module('BBQueue.controllers').controller('bbQueueAddCustomer', AddQueueCustomerController);
'use strict';

angular.module('BBQueue.directives').directive('bbQueueAddCustomer', function () {
return {
controller: 'bbQueueAddCustomer',
templateUrl: 'queue/add_customer.html',
scope: {
services: '=',
servers: '=',
company: '='
}
};
});
'use strict';

var QueueDashboardController = function QueueDashboardController($scope, $log, AdminServiceService, AdminQueuerService, ModalForm, BBModel, $interval, $sessionStorage, $uibModal, $q, AdminPersonService) {

$scope.loading = true;
Expand Down Expand Up @@ -1397,6 +1265,138 @@ angular.module('BBQueue.directives').directive('bbQueueDashboard', function () {
});
'use strict';

var AddQueueCustomerController = function AddQueueCustomerController($scope, $log, AdminServiceService, AdminQueuerService, ModalForm, BBModel, $interval, $sessionStorage, $uibModal, $q, AdminBookingPopup, bbLocale) {

var addQueuer = function addQueuer(form) {

var defer = $q.defer();
var service = form.service;
var person = form.server;
$scope.new_queuer.service_id = service.id;
$scope.new_queuer.service = service;
$scope.new_queuer.locale = bbLocale.getLocale();
var new_queuer = $scope.new_queuer;
$scope.$emit('addPendingQueuer', new_queuer);
resetQueuer();
service.$post('queuers', {}, new_queuer).then(function (response) {
var queuer = new BBModel.Admin.Queuer(response);
if (person) {
queuer.startServing(person).then(function () {
defer.resolve();
}, function () {
defer.reject();
});
} else {
defer.resolve();
}
});
return defer.promise;
};

var resetQueuer = function resetQueuer() {
$scope.new_queuer = {};
$scope.loading = false;
};

$scope.addToQueue = function () {
$scope.loading = true;
var modalInstance = $uibModal.open({
templateUrl: 'queue/pick_a_service.html',
scope: $scope,
controller: function controller($scope, $uibModalInstance) {

$scope.dismiss = function () {
return $uibModalInstance.dismiss('cancel');
};

$scope.submit = function (form) {
return $uibModalInstance.close(form);
};
}
});

modalInstance.result.then(addQueuer).finally(function () {
return $scope.loading = false;
});
};

$scope.availableServers = function () {
return _.filter($scope.servers, function (server) {
return server.attendance_status == 1;
});
};

$scope.serveCustomerNow = function () {
$scope.loading = true;
var modalInstance = $uibModal.open({
templateUrl: 'queue/serve_now.html',
resolve: {
services: function services() {
return $scope.services;
},
servers: function servers() {
return $scope.availableServers();
}
},
controller: function controller($scope, $uibModalInstance, services, servers) {

$scope.form = {};

$scope.services = services;

$scope.servers = servers;

$scope.dismiss = function () {
return $uibModalInstance.dismiss('cancel');
};

$scope.submit = function (form) {
return $uibModalInstance.close(form);
};
}
});

modalInstance.result.then(addQueuer).then(resetQueuer).finally(function () {
return $scope.loading = false;
});
};

$scope.makeAppointment = function (options) {
var defaultOptions = {
item_defaults: {
pick_first_time: true,
merge_people: true,
merge_resources: true,
date: moment().format('YYYY-MM-DD')
},
on_conflict: "cancel()",
company_id: $scope.company.id
};

options = _.extend(defaultOptions, options);

var popup = AdminBookingPopup.open(options);

popup.result.finally(resetQueuer);
};
};

angular.module('BBQueue.controllers').controller('bbQueueAddCustomer', AddQueueCustomerController);
'use strict';

angular.module('BBQueue.directives').directive('bbQueueAddCustomer', function () {
return {
controller: 'bbQueueAddCustomer',
templateUrl: 'queue/add_customer.html',
scope: {
services: '=',
servers: '=',
company: '='
}
};
});
'use strict';

var QueuersController = function QueuersController($scope, $log, AdminQueuerService, AdminQueueService, ModalForm, $interval, $q, BBModel, AlertService, ErrorService, $translate) {

$scope.loading = true;
Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bookingbug-angular-queue",
"version": "2.2.55",
"version": "2.2.56",
"authors": [
"BookingBug <[email protected]>"
],
Expand All @@ -22,8 +22,8 @@
"dependencies": {
"bootstrap-sass": "^3.3.7",
"angular-sass-adminlte": "AdminLTE-angular-sass#^0.0.2",
"bookingbug-angular-core": "2.2.55",
"bookingbug-angular-admin-dashboard": "2.2.55",
"bookingbug-angular-core": "2.2.56",
"bookingbug-angular-admin-dashboard": "2.2.56",
"angular-timer": "~1.3.4",
"angular-dragdrop": "1.0.12"
}
Expand Down

0 comments on commit 6d75457

Please sign in to comment.