diff --git a/client/src/partials/purchases/modals/search.modal.js b/client/src/partials/purchases/modals/search.modal.js index 7ee904251a..aa860aad48 100644 --- a/client/src/partials/purchases/modals/search.modal.js +++ b/client/src/partials/purchases/modals/search.modal.js @@ -1,15 +1,15 @@ angular.module('bhima.controllers') -.controller('SearchPurchaseOrderModalController', SearchPurchaseOrderModalController); + .controller('SearchPurchaseOrderModalController', SearchPurchaseOrderModalController); // dependencies injections SearchPurchaseOrderModalController.$inject = [ - 'UserService', 'SupplierService', 'NotifyService', '$uibModalInstance', 'SearchFilterFormatService' + 'UserService', 'SupplierService', 'NotifyService', '$uibModalInstance', 'SearchFilterFormatService', ]; function SearchPurchaseOrderModalController(Users, Suppliers, Notify, Instance, SearchFilterFormat) { var vm = this; - // gloabal variables + // global variables var noMissingDatePart; // global methods @@ -17,31 +17,29 @@ function SearchPurchaseOrderModalController(Users, Suppliers, Notify, Instance, vm.cancel = Instance.close; vm.submit = submit; - // init + // init init(); - // load users + // load users Users.read() - .then(function (users) { + .then(function (users) { vm.users = users; - }) - .catch(Notify.handleError); + }) + .catch(Notify.handleError); - // load suppliers + // load suppliers Suppliers.read() - .then(function (suppliers) { + .then(function (suppliers) { vm.suppliers = suppliers; - }) - .catch(Notify.handleError); + }) + .catch(Notify.handleError); function init() { - vm.bundle = { - dateFrom: new Date(), - dateTo: new Date(), - is_confirmed: 0, - is_received: 0, - is_cancelled: 0 + vm.bundle = { + dateFrom : new Date(), + dateTo : new Date(), }; + validate(); } @@ -54,5 +52,4 @@ function SearchPurchaseOrderModalController(Users, Suppliers, Notify, Instance, noMissingDatePart = (vm.bundle.dateFrom && vm.bundle.dateTo) || (!vm.bundle.dateFrom && !vm.bundle.dateTo); vm.validDateRange = noMissingDatePart ? true : false; } - } diff --git a/client/src/partials/purchases/modals/search.tmpl.html b/client/src/partials/purchases/modals/search.tmpl.html index 8f8b013b41..b53ab1f25c 100644 --- a/client/src/partials/purchases/modals/search.tmpl.html +++ b/client/src/partials/purchases/modals/search.tmpl.html @@ -48,8 +48,7 @@
- - + {{$select.selected.display_name}} @@ -61,32 +60,33 @@
-
- FORM.LABELS.STATUS -
+

+ FORM.LABELS.STATUS +

+ + -
+ - -
+
-